Hello. I would like to ask you the following: Is it possible when I plug in my usb speakers to have the sound redirected directly to them (as it happens also in windows?)
I have some USb external speakers that work fine with Linux. I have configured them with priority 1 and I also have configured my soundcard with priority 2.
So when the speakers are plugged in in advance (Before os boots) I can only listen music through my usb speakers.
When my usb speakers are unplugged and system reboots afterwards I could only listen music from the internal speakers (soundcard).
But things dont work dynamically if I just plug my usb speakers while music is playing the sound is not getting redirected. So I have to restart alsasound which is a little bit annoying.
Do you have anything to suggest me that might help?
Best Regards
Hallo, I have had this problem too. From what I learned, the only way to get ALSA to default to any sound card as soon as it appears on the system, seems to be to write a complicated script to do it. Or perhaps set sudo privileges to the ALSA restart command so you do not have to type the root password every time.
My own workaround is simpler: I just create/edit the ~/.asoundrc file to set my USB speakers as the system default, just for my own user account. How to do this is explained on the ALSA wiki and the ~/.asoundrc file is also explained there.
I found that in this way I can get my USB speakers working right away after plugging them in, without rebooting or restarting ALSA. But I do have to restart ALSA if I later unplug them, in order to get back to my laptop’s built-in speakers, even though I comment out the .asoundrc lines. But according to the ALSA wiki this is to be expected.
In any case I did not change any part of the default YaST audio configuration, which set my laptop’s internal sound card as the default, on openSUSE 10.3 and later 11.1. This method might not work with older sound apps that only use OSS.
Hope this helps.