|
Mike Fedyk - gnome-sound-properties and ~/.asoundrc.asoundconf
[Recent Entries][Archive][Friends][User Info]
05:10 pm
[Link] |
gnome-sound-properties and ~/.asoundrc.asoundconf "Why doesn't the audio output device change when I set it in the gnome-sound-properties (g-s-p)?"
I have been seeing this for a while, as far back as dapper, but tabled looking into it until just now. Changing the output device in g-s-p affected gnome apps, but not anything non-gnome that used alsa or oss directly like vlc.
Running strace on g-s-p revealed some files to lookup and google that brought me ubuntu bug #31893 and the two commands below to set the default sound card for alsa (non-gnome apps) to use:
asoundconf list asoundconf set-default-card <devicename> This configures some nice settings in ~/.asoundrc.asoundconf. Looking at the strace output of g-s-p further shows that ~/.asoundrc.asoundconf is being open()ed, mmap()ed, read(), close()d and unmmap()ed, but not written to by g-s-p.
That explains why the sound settings only affected gnome applications and since these settings are read by the alsa libraries, it is only checked when each process starts up. Any changes made with asoundconf will not take affect until after a process using alsa is exited and started again to get the alsa libs to re-read the config files.
So why isn't g-s-p changing the generic alsa configs? The asoundconf man page says:
This program is under development. Its features will change without notice and without preservation of backward compatibility, except insofar as they are put to use by other components of the Debian and/or Ubuntu operating systems. (As of this writing the Ubuntu developers have plans to use asoundconf for setting the value of defaults.pcm.card from the system sound preferences menu.)
I have filed ubuntu bug #119033 to help track this issue.
In feisty (or possibly edgy, I have avoided using edgy because I haven't had much success with that release), they have made the distinction in g-s-p between "sound events", "music and movies" and "audio conferencing". The developers will be have the task of finding a way to present a way to configure which sound card regular non-gnome alsa apps will use and presenting the options in an intuitive way. This may be especially hard since to my knowledge, non-gnome apps have no way to inform alsa they will be playing music or audio conferencing.
One nice thing In feisty, there is now an asoundconf-gtk package available that adds a menu entry in (system -> preferences -> default sound card) and removes the tedium of the two asoundconf commands above (and makes the process a little bit more user friendly, but not very much).
Tags: .asoundrc.asoundconf, asoundconf, gnome-sound-preferenes, ubuntu
|
|