]> git.baikalelectronics.ru Git - kernel.git/commit
V4L/DVB (10659): em28xx: register device to soundcard for sysfs
authorNicola Soranzo <nsoranzo@tiscali.it>
Thu, 19 Feb 2009 16:41:56 +0000 (13:41 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 27 Feb 2009 01:29:18 +0000 (22:29 -0300)
commit59f4432658f856842e90816d60b0d292e3e68334
tree8542073ecba7294c03db979f49f9798dc2bb6a42
parentd03a45431b28e648ae77abd5b4af02acc82ce0a6
V4L/DVB (10659): em28xx: register device to soundcard for sysfs

As explained in "Writing an ALSA driver" (T. Iwai), audio drivers should
set the struct device for the card before registering the card instance.
This will add the correct /sys/class/sound/cardN/device symlink, so HAL
can see the device and ConsoleKit sets its ACL permissions for the
logged-in user.

For em28xx audio capture cards found e.g. in Hauppauge WinTV-HVR-900 (R2),
this patch fixes errors like:

ALSA lib pcm_hw.c:1429:(_snd_pcm_hw_open) Invalid value for card
Error opening audio: Permission denied

when running mplayer as a normal user.

Signed-off-by: Nicola Soranzo <nsoranzo@tiscali.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/em28xx/em28xx-audio.c