Hello.<br><br>I'm having problems loading two identical sound-cards in my computer. I'm using Ubuntu 9.10 and PulseAudio 0.9.19 coming with this release.<br><br>I have tried looking at the logs, and when using loglevel 4 I find these lines:<br>
<a href="mailto:pulseaudio-discuss@mail.0pointer.de"></a><br>(first card - failing scenario):<br>Aug 9 22:53:08 ivar-laptop pulseaudio[2573]: module.c: Loaded "module-alsa-card" (index: #24; argument: "device_id="1" name="usb-BeAutiful_Qing_Audioengine_AW1-00" card_name="alsa_card.usb-BeAutiful_Qing_Audioengine_AW1-00" tsched=yes ignore_dB=no card_properties="module-udev-detect.discovered=1"").<br>
<br>(second card - failing scenario):<br>Aug 9 22:58:32 ivar-laptop pulseaudio[2573]: module.c: Failed to load module "module-alsa-card" (argument: "device_id="2" name="usb-BeAutiful_Qing_Audioengine_AW1-00" card_name="alsa_card.usb-BeAutiful_Qing_Audioengine_AW1-00" tsched=yes ignore_dB=no card_properties="module-udev-detect.discovered=1""): initialization failed.<br>
<br><br>I downloaded the source-code using 'apt-get source pulseaudio' and was looking around a bit. What I found was that the pa__init() function in modules/alsa/module-alsa-card.c called a function pa_card_new() located in pulsecore/card.c which returned a null-pointer. This function again called pa_namereg_register() in pulsecore/namereg.c which returned NULL because it could find the card-name in the hashmap and the fail argument was set to TRUE. As a simple test, I changed the fail argument to FALSE, and the second module loaded as well:<br>
<br>(first card - working scenario):<br>Aug 21 18:10:03 ivar-laptop pulseaudio[3835]: module.c: Loaded "module-alsa-card" (index: #18; argument: "device_id="2" name="usb-BeAutiful_Qing_Audioengine_AW1-00" card_name="alsa_card.usb-BeAutiful_Qing_Audioengine_AW1-00" tsched=yes ignore_dB=no card_properties="module-udev-detect.discovered=1"").<br>
<br>(second card - working scenario):<br>Aug 21 18:12:37 ivar-laptop pulseaudio[3835]: module.c: Loaded "module-alsa-card" (index: #19; argument: "device_id="3" name="usb-BeAutiful_Qing_Audioengine_AW1-00" card_name="alsa_card.usb-BeAutiful_Qing_Audioengine_AW1-00" tsched=yes ignore_dB=no card_properties="module-udev-detect.discovered=1"").<br>
<br><br>Having this flag set to TRUE basically disables the functionality further down in the pa_namereg_register() which tries to add a ".%u" to the card-name, where %u starts at 2 and gives up at 99. Trying to figure out where this flag was set, I found that it had been set by a function set_card_name() called further up in pa__init(). If the module being loaded has the argument "card_name" or "name", then data->namereg_fail is set to TRUE. Looking at the arguments given in the logfile, it actually provides both of these arguments, also at load-time:<br>
<br>(second card - failing scenario):<br>Aug 9 22:58:32 ivar-laptop pulseaudio[2573]: module-udev-detect.c: Loading module-alsa-card with arguments 'device_id="2" name="usb-BeAutiful_Qing_Audioengine_AW1-00" card_name="alsa_card.usb-BeAutiful_Qing_Audioengine_AW1-00" tsched=yes ignore_dB=no card_properties="module-udev-detect.discovered=1"'<br>
<br><br>So my questions are:<br>Is there a way to load both these cards without modifying the source?<br>Can I configure something to make this work?<br>What is the reasoning behind setting this flag at all?<br>Which side-effect will I experience by simply ignoring this flag, and trying to add a ".%u" to the card-name anyway?<br>
<br>Thanks for any help provided.<br><br><br>Kind Regards,<br>Ivar Mossin<br>