[pvrusb2] Non-root access to control pvrusb2 driver

xavier.gnata@free.fr xavier.gnata at free.fr
Sat Jan 6 10:14:29 CST 2007


Hi,

I have tried to get the result using but it was mostly a hack...
apt-get install sysfsutils and huge thanks :)

Xavier

> > Hi Folks,
> >
> > I was tooling around with sysfsutils and noticed that it's possible to
> > change the ownership of entries in the /sys subdirectory. By adding the
> > following sample entries into /etc/sysfs.conf:
> >
> > owner class/pvrusb2/sn-8206665/ctl_freq_table_channel/cur_val=user:user
> > owner class/pvrusb2/sn-8206665/ctl_freq_table_value/cur_val=user:user
> > owner class/pvrusb2/sn-8206665/ctl_channel/cur_val=user:user
> > owner class/pvrusb2/sn-8206665/ctl_frequency/cur_val=user:user
> > owner class/pvrusb2/sn-8206665/ctl_input/cur_val=user:user
> > owner class/pvrusb2/sn-8206665/ctl_mute/cur_val=user:user
> > owner class/pvrusb2/sn-8206665/ctl_volume/cur_val=user:user
> >
> > * Note: Change user:user to your user name
> >
>
> Ha!  Great find!  About a year ago there was a discussion going on here
> about being able to change those attributes.  At the time I tried to do
> something at the driver level and quickly realized it was impossible.
> I commented then that the problem could be solved in userland with a
> daemon that would handle setting these attributes appropriately - and
> here we are.  This thing has probably been sitting under our noses the
> entire time :-)
>
> > It's possible control the volume, channel and input controls without
> > having to switch to root. So, as a non-root user, it's possible to:
> >
> > echo false > /sys/class/pvrusb2/sn-8206665/ctl_mute/cur_val
> > echo 58980 > /sys/class/pvrusb2/sn-8206665/ctl_volume/cur_val
> > echo composite > /sys/class/pvrusb2/sn-8206665/ctl_input/cur_val
> >
> > I realize most people are using MythTV to interact with their devices,
> > but I thought this information might be useful to those of us who have
> > hacked together our own little scripts to watch/record TV shows.
> >
> > For a complete list of these controls, use the following command:
> >
> > find /sys/class/pvrusb2/*/* | grep cur_val
>
> This should also work:
>
> ls -d /sys/class/pvrusb2/*/ctl_*
>
> This might be useful to dump out all the controls at once:
>
> >
> > Regards,
> > Gord
>
> Thanks.
>
>   -Mike
>
>
> --
>                         |         Mike Isely          |     PGP fingerprint
>      Spammers Die!!     |                             | 03 54 43 4D 75 E5 CC
> 92
>                         |   isely @ pobox (dot) com   | 71 16 01 E2 B5 F5 C1
> E8
>                         |                             |
> _______________________________________________
> pvrusb2 mailing list
> pvrusb2 at isely.net
> http://www.isely.net/cgi-bin/mailman/listinfo/pvrusb2
>




More information about the pvrusb2 mailing list