LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   ALSA under non-root (https://www.linuxquestions.org/questions/linux-software-2/alsa-under-non-root-533575/)

serge_shp 03-01-2007 07:55 AM

ALSA under non-root
 
Hello.
Recently I upgraded to the open SUSE 10.2 distribution from 10.x and performed online update of everything. After that there arised a problem with sound driver (I use ALSA):
no sound application can start it if running not from root.It results in the errormesages of the kind:

===
ALSA lib confmisc.c:670:(snd_func_card_driver) cannot find card '0'
ALSA lib conf.c:3500:(_snd_config_evaluate) function snd_func_card_driver returned error: No such device
ALSA lib confmisc.c:391:(snd_func_concat) error evaluating strings
ALSA lib conf.c:3500:(_snd_config_evaluate) function snd_func_concat returned error: No such device
ALSA lib confmisc.c:1070:(snd_func_refer) error evaluating name
ALSA lib conf.c:3500:(_snd_config_evaluate) function snd_func_refer returned error: No such device
ALSA lib conf.c:3968:(snd_config_expand) Evaluate error: No such device
ALSA lib pcm.c:2143:(snd_pcm_open_noupdate) Unknown PCM default
snd_pcm_open: No such device (default)
Failed to initialize plugin!
Failed to register plugin: /usr/lib64/alsaplayer/output/libalsa_out.so
Failed to load output plugin "alsa". Trying defaults.
=========

There are no problems in running those applications under root. Evidently one has to change permissions for some alsa init plugin making it run with setuid. But what is that file or how one can reveal the root of the problems?

Of course it is possible to run everything from root or to set the setUid bit to every application of interest (mplayer, xmms, xine,skype...). But there must be some more clean way?

gearoid_murphy 03-01-2007 11:17 AM

I don't think that setuid is a problem as also runs in the kernel, not as a user process. However, what may be happening is that the permissions on the /dev/dsp are set to root only. /dev/dsp being the device handle for the sound card. Try chmod on that and see what happens. Also, using strace -o strace.out ./sound_test and grepping the file strace.out will show you what files and devices the program is using and could point you in the right direction

jay73 03-01-2007 11:40 AM

Have you tried adding your user to the audio group? Run id command to see which groups the user actually belongs to. If audio is missing, that's the reason.


All times are GMT -5. The time now is 09:49 AM.