Bug 182365
Summary: | ALSA user space doesn't add dynamic audio devices, .e.g. USB | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Stefan Becker <chemobejk> |
Component: | alsa-lib | Assignee: | Martin Stransky <stransky> |
Status: | CLOSED DUPLICATE | QA Contact: | |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | 5 | CC: | kiyoseki |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2006-03-07 10:06:40 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Stefan Becker
2006-02-22 01:20:53 UTC
I just discovered that ALSA user space seems to work differently for normal user and root. I removed my USB headset and inserted it again. As myself I see: $ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: V8235 [VIA 8235], device 0: VIA 8235 [VIA 8235] ... card 0: V8235 [VIA 8235], device 1: VIA 8235 [VIA 8235] ... card 1: modem [VIA 82XX modem], device 0: VIA 82XX modem [VIA 82XX modem] Subdevices: 1/1 Subdevice #0: subdevice #0 As root I see: # aplay -l **** List of PLAYBACK Hardware Devices **** card 0: V8235 [VIA 8235], device 0: VIA 8235 [VIA 8235] ... card 0: V8235 [VIA 8235], device 1: VIA 8235 [VIA 8235] ... card 1: modem [VIA 82XX modem], device 0: VIA 82XX modem [VIA 82XX modem] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: Headset [Plantronics Headset], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 alsamixer also has problems when running as normal user: $ alsamixer ALSA lib control.c:782:(snd_ctl_open_conf) Cannot open shared library /usr/lib/alsa-lib/libasound_module_ctl_plug.so alsamixer: function snd_ctl_open failed for default: No such file or directory $ alsamixer -c0 ---> opens alsamixer for card 0 and now as root: # alsamixer ---> opens alsamixer for card 0 I'm going to disable SELinux and reboot. Let's see if it has something to do with that... OK, disabling SELinux didn't help, so it must be some other access restriction. I looked at the whole /proc/asound and /sys/class/sound but all files are readable by world, and directories are accessible by world. So where does ALSA user space look to see what devices the kernel has to offer? strace to the rescue! $ strace -ff aplay -l ... open("/dev/snd/controlC1", O_RDWR) = 3 ... write(1, "card 1: modem [VIA 82XX modem], "..., 74) = 74 ... close(3) = 0 open("/dev/snd/controlC2", O_RDONLY) = -1 EACCES (Permission denied) open("/dev/aloadC2", O_RDONLY) = -1 ENOENT (No such file or directory) open("/dev/snd/controlC3", O_RDONLY) = -1 ENOENT (No such file or directory) open("/dev/aloadC3", O_RDONLY) = -1 ENOENT (No such file or directory) ... and that leads us to: $ ls -l /dev/snd total 0 crw------- 1 stefanb root 116, 11 Feb 24 22:53 controlC0 crw------- 1 stefanb root 116, 6 Feb 24 22:53 controlC1 crw------- 1 root root 116, 15 Feb 25 00:38 controlC2 crw------- 1 root root 116, 12 Feb 25 00:38 hwC2D0 crw------- 1 stefanb root 116, 10 Feb 24 22:53 pcmC0D0c crw------- 1 stefanb root 116, 9 Feb 24 22:53 pcmC0D0p crw------- 1 stefanb root 116, 8 Feb 24 22:53 pcmC0D1c crw------- 1 stefanb root 116, 7 Feb 24 22:53 pcmC0D1p crw------- 1 stefanb root 116, 5 Feb 24 22:53 pcmC1D0c crw------- 1 stefanb root 116, 4 Feb 24 22:53 pcmC1D0p crw------- 1 root root 116, 14 Feb 25 00:38 pcmC2D0c crw------- 1 root root 116, 13 Feb 25 00:38 pcmC2D0p crw------- 1 stefanb root 116, 3 Feb 24 22:53 seq crw------- 1 stefanb root 116, 2 Feb 24 22:53 timer i.e. the character device files for new sound devices are created with the wrong UID. BTW: If I log out now and login again those get fixed... I guess it's udev's responsibility to get the UID right? Or is it DBUS or KDE? At least I have a workaround for the problem now. *** This bug has been marked as a duplicate of 181042 *** It seems the problem has been fixed by the latest changes: udev-084-13 |