no sound firefox flash plugin / alsa with sudo

Asked by edA-qa

I am unable to get Flash 9 to produce sound as a Firefox plugin when using Firefox via "sudo" command. Here are some further details to show what I did already:
-running firefox as the primary user (KDE) flash plays sound just fine (it doesn't work with sudo)
-no value in firefoxrc seems to help (aoss, esd, auto, etc.)
-the sudo'd user can play sound just find in other programs
-the mplayer plugin in firefox can play sound just fine (in sudo'd environment)
-the console shows the errors below during flash playing
-Flash 7 was producing sound (it fails as of Flash 9)
-the video and other aspects of Flash are working just fine (only the sound is missing)
-alsamixer as the sudo'd user also fails (so it seems to be more of an alsa problem than flash?)

I was also interested in using the "audiowrapper" command as recommended for other distros, but Ubuntu doesn't seem to have this command in the repository. Perhaps it would help.

If I set firefoxrc audio mode to "esd" firefox doesn't start, it gives an error message that "-a" is unsupported (very weird).

Otherwise I've pretty much don exhaustive net/forum searching and have been unable to find anything to solve my problem (I guess not many people use alsa and sudo in combination ;)

Errors on Console:
ALSA lib confmisc.c:672:(snd_func_card_driver) cannot find card '0'
ALSA lib conf.c:3493:(_snd_config_evaluate) function snd_func_card_driver returned error: No such device
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:3493:(_snd_config_evaluate) function snd_func_concat returned error: No such device
ALSA lib confmisc.c:1072:(snd_func_refer) error evaluating name
ALSA lib conf.c:3493:(_snd_config_evaluate) function snd_func_refer returned error: No such device
ALSA lib conf.c:3962:(snd_config_expand) Evaluate error: No such device
ALSA lib pcm.c:2102:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib pcm_hw.c:1305:(_snd_pcm_hw_open) Invalid value for card

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu firefox Edit question
Assignee:
No assignee Edit question
Solved by:
edA-qa
Solved:
Last query:
Last reply:
Revision history for this message
Best edA-qa (eda-qa) said :
#1

Adding the user to the "audio" group seems to solve the problem.

I guess this is the pitfall of adding users with the "adduser" command as opposed to the graphical KDE/Gnome front-ends: the user won't be in all the normal groups.