alsa-project / alsa-lib

The Advanced Linux Sound Architecture (ALSA) - library
GNU Lesser General Public License v2.1
344 stars 173 forks source link

Allow for an optional output in plugin multi #379

Closed wonbinbk closed 5 months ago

wonbinbk commented 5 months ago

Let's say I have 2 sound cards, card 0 and card 1. Card 1 is unplug-able from the system so it might not exist when applications read asound.conf.

I think it makes sense to add ability to specify an optional pcm device which if it doesn't exist won't break alsa.

ALSA lib ../../alsa-lib-1.2.6.1/src/confmisc.c:165:(snd_config_get_card) Cannot get card index for 1
perexg commented 5 months ago

It's basically wrong to use multi plugin for cards with unsynchronized clocks.

I would suggest to use a sound server or more complex loopback (snd-aloop driver) / alsaloop combination (alsaloop may be restarted with different combinations on the hotplug event).