[pvrusb2] Non-root access to control pvrusb2 driver
G Mc.Pherson
gamcpherson at gmail.com
Fri Jan 5 13:06:21 CST 2007
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
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
Regards,
Gord
More information about the pvrusb2
mailing list