[kde-linux] How do I set the default sound card?

Ronny Standtke Ronny.Standtke at gmx.net
Fri Jan 5 22:42:37 UTC 2007


Hi again,

Thank you all for your answers.

> Have you checked to have the correct permission on the device linked 
> by /dev/soundcard ?

> Can you compare the ownership and permissions of the symlink with those of
> the device? That is all that I can think of, if the symlink is indeed
> actually being created.

As far as I understand (and tested) ext2 and ext3 don't allow permissions for 
symlinks, they are always "lrwxrwxrwx".

I read some more ALSA documentation and now I understand that /dev/dsp is 
actually an OSS device node. But so far I don't know how to write a udev rule 
for ALSA. I don't know what device node I do have to point to. There are so 
many for a single sound card!? But anyway, maybe I don't need to...

> I agree that there should be a better solution, but I'm afraid the problem
> you are having here isn't much to do with KDE and everything to do with the
> fact that your sound cards change their name all the time. If we can just
> make them be still! ;)

> Providing the drivers for your sound devices are modules you can force the 
> device order in modprobe.conf with the install command. Man modprobe.conf 
> will give you more information. 

Now I understand that the order of the soundcards is random because of the 
dynamic nature of hardware detection. For now we probably must take this 
situation as given and must find a solution that works for "normal users" 
that (unlike me) do not want to spend several days with reading documentation 
and hacking some arcane rules into mystic system configuration files.

As a normal user I want to be able to just select my favorite sound output 
device from a list and want KDE to try using it when I log in. When my 
favorite sound device is not available (e.g. because I unplugged the USB 
headset) KDE should automatically fall back to a sane default. Alternatively 
I want to define an ordered list that KDE must try at startup. Let me try to 
write down some ideas here (for now all regarding to ALSA because this is 
what I tried so far under Linux)... 

Information about all soundcards is available in /proc/asound/cards. More 
detailed information about every single card is available 
under /proc/asound/card<x>. There you can also find out if a card has only 
capture streams (like a webcam) or if it has also playback streams (like a 
normal soundcard or a headset). This information can be used to fill the list 
to select or order the sound devices I mentioned above with human readable 
descriptions.

When KDE starts up it can look at the same locations to find my favorite sound 
device again. If it is not available it can either use the next device in the 
ordered list or (if the fallback mechanism is used) search for another device 
with playback streams.

Are my ideas realistic or is this just wishful thinking? Any KDE developer 
listening here?

Greetings and thank you

Ronny Standtke



More information about the kde-linux mailing list