<div dir="ltr"><div style="font-size:12.8px">Hi all,</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I have several USB cards, cheap ones, all have the same vendor, product and serial id. The cards are all assigned different names using udev rules based on the usb port they are plugged in.<br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">$ cat /proc/asound/cards:</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">...</div><div style="font-size:12.8px"><br><div><div><span style="font-size:12.8px"> 1 [MyCard1     ]: USB-Audio - USB Audio Device</span><br></div><div>                      GeneralPlus USB Audio Device at usb-0000:00:1d.0-1.3.5, full speed</div><div> 2 [MyCard2     ]: USB-Audio - USB Audio Device</div><div>                      GeneralPlus USB Audio Device at usb-0000:00:1d.0-1.3.7, full speed</div></div><div><br></div><div><br></div><div>The problem I'm having is that I cannot get a reliable config that allows me to name and use the sources of these cards with libpulseaudio. If I use module-udev card and source naming depends on the order they are plugged in like:</div><div><br></div><div>alsa_input.usb-GeneralPlus_USB<wbr>_Audio_Device-00.analog-mono.0<br></div><div>alsa_input.usb-GeneralPlus_USB<wbr>_Audio_Device-00.analog-mono.2<br></div><div><br></div><div><div>The closest I could get was configuring the sources statically using module-alsa-source naming them with the 'name' argument and using device=hw:MyCard[1,2]. </div><div>This works but the problem is if I unplug one of the cards and I need to plug it again and restart pulseaudio because the moment the card is unplugged pulseaudio unloads the module. The only way to get it working again is restarting, and if I don't plug the card back pulseaudio refuses to start because the system is missing a card that's in the config. <span style="font-size:12.8px">This of course have the additional and most important inconvenience of cancelling any audio capture I might be doing using the other cards.</span></div></div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I tried all sorts of things with udev trying to accomplish this using only module-udev and I failed miserably.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Is there a way to accomplish what I want?</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div>I'm using:</div><div><br></div><div>pulseaudio 9.0<br></div><div>udev 231</div><div>kernel 4.8.0<br></div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thanks!</div></div>