[pulseaudio-discuss] Two identical USB sound-cards - second card fails to load because card-name found in hashmap.
Hello. 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. I have tried looking at the logs, and when using loglevel 4 I find these lines: pulseaudio-discuss@mail.0pointer.de (first card - failing scenario): 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). (second card - failing scenario): 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. 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: (first card - working scenario): 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). (second card - working scenario): 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). 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: (second card - failing scenario): 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' So my questions are: Is there a way to load both these cards without modifying the source? Can I configure something to make this work? What is the reasoning behind setting this flag at all? Which side-effect will I experience by simply ignoring this flag, and trying to add a .%u to the card-name anyway? Thanks for any help provided. Kind Regards, Ivar Mossin ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] Two identical USB sound-cards - second card fails to load because card-name found in hashmap.
Is it possible that sense you have two of the exact same cards, maybe one of them isn't working as there is an I R Q conflict between both of them? I'll admit my expertees on Pulse Audio are not very good at all, and probably I shouldn't be making this assumption being I really don't totally know what I'm doing, admittedly, but it is a thought. Chris. - Original Message - From: Ivar Mossin To: pulseaudio-discuss@mail.0pointer.de Sent: Saturday, August 21, 2010 3:51 PM Subject: [pulseaudio-discuss] Two identical USB sound-cards - second card fails to load because card-name found in hashmap. Hello. 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. I have tried looking at the logs, and when using loglevel 4 I find these lines: (first card - failing scenario): 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). (second card - failing scenario): 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. 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: (first card - working scenario): 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). (second card - working scenario): 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). 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: (second card - failing scenario): 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' So my questions are: Is there a way to load both these cards without modifying the source? Can I configure something to make this work? What is the reasoning behind setting this flag at all? Which side-effect will I experience by simply ignoring this flag, and trying to add a .%u to the card-name anyway? Thanks for any help provided. Kind Regards, Ivar Mossin -- ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] Two identical USB sound-cards - second card fails to load because card-name found in hashmap.
Thanks for the reply, but no, that is not the case. Both cards are working in ALSA. They are both USB cards, and all USB devices share 1 single IRQ assigned to the USB-Controller, AFAIK. Ivar. On Sat, Aug 21, 2010 at 11:54 PM, Chris Gilland cgilla...@carolina.rr.comwrote: Is it possible that sense you have two of the exact same cards, maybe one of them isn't working as there is an I R Q conflict between both of them? I'll admit my expertees on Pulse Audio are not very good at all, and probably I shouldn't be making this assumption being I really don't totally know what I'm doing, admittedly, but it is a thought. Chris. ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] Two identical USB sound-cards - second card fails to load because card-name found in hashmap.
On Sat, Aug 21, 2010 at 09:51:17PM +0200, Ivar Mossin wrote: 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. Can you post the output of lsusb -v with both cards connected? Thanks, Daniel ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss