[pulseaudio-discuss] Hotplug problem

Colin Guthrie gmane at colin.guthr.ie
Thu Apr 2 15:27:13 PDT 2009


With the latest code I seem to run into a bit of a race with the 
hotplugging of USB cards.

When I plug in a USB card I get the following problem.

D: module-hal-detect.c: dbus: interface=org.freedesktop.Hal.Manager, 
path=/org/freedesktop/Hal/Manager, member=DeviceAdded
D: module-console-kit.c: dbus: interface=org.freedesktop.Hal.Manager, 
path=/org/freedesktop/Hal/Manager, member=DeviceAdded
D: module-hal-detect.c: dbus: interface=org.freedesktop.Hal.Manager, 
path=/org/freedesktop/Hal/Manager, member=DeviceAdded
D: module-console-kit.c: dbus: interface=org.freedesktop.Hal.Manager, 
path=/org/freedesktop/Hal/Manager, member=DeviceAdded
D: module-hal-detect.c: dbus: interface=org.freedesktop.Hal.Manager, 
path=/org/freedesktop/Hal/Manager, member=DeviceAdded
D: module-console-kit.c: dbus: interface=org.freedesktop.Hal.Manager, 
path=/org/freedesktop/Hal/Manager, member=DeviceAdded
D: module-hal-detect.c: Loading module-alsa-card with arguments 
'device_id=1 name=usb_device_d8c_1_noserial_if0 
card_name=alsa_card.usb_device_d8c_1_noserial_if0 tsched=1'
E: module-alsa-card.c: Card '1' doesn't exist: No such file or directory
E: module.c: Failed to load  module "module-alsa-card" (argument: 
"device_id=1 name=usb_device_d8c_1_noserial_if0 
card_name=alsa_card.usb_device_d8c_1_noserial_if0 tsched=1"): 
initialization failed.
D: module-hal-detect.c: Not loaded device 
/org/freedesktop/Hal/devices/usb_device_d8c_1_noserial_if0_alsa_playback_0
D: module-hal-detect.c: dbus: interface=org.freedesktop.Hal.Manager, 
path=/org/freedesktop/Hal/Manager, member=DeviceAdded
D: module-console-kit.c: dbus: interface=org.freedesktop.Hal.Manager, 
path=/org/freedesktop/Hal/Manager, member=DeviceAdded
D: module-hal-detect.c: dbus: interface=org.freedesktop.Hal.Manager, 
path=/org/freedesktop/Hal/Manager, member=DeviceAdded
D: module-console-kit.c: dbus: interface=org.freedesktop.Hal.Manager, 
path=/org/freedesktop/Hal/Manager, member=DeviceAdded
D: module-hal-detect.c: dbus: interface=org.freedesktop.Hal.Manager, 
path=/org/freedesktop/Hal/Manager, member=DeviceAdded
D: module-console-kit.c: dbus: interface=org.freedesktop.Hal.Manager, 
path=/org/freedesktop/Hal/Manager, member=DeviceAdded
D: module-hal-detect.c: dbus: interface=org.freedesktop.Hal.Manager, 
path=/org/freedesktop/Hal/Manager, member=DeviceAdded
D: module-console-kit.c: dbus: interface=org.freedesktop.Hal.Manager, 
path=/org/freedesktop/Hal/Manager, member=DeviceAdded
D: module-hal-detect.c: dbus: interface=org.freedesktop.Hal.Manager, 
path=/org/freedesktop/Hal/Manager, member=DeviceAdded
D: module-console-kit.c: dbus: interface=org.freedesktop.Hal.Manager, 
path=/org/freedesktop/Hal/Manager, member=DeviceAdded
D: module-hal-detect.c: Not loaded device 
/org/freedesktop/Hal/devices/usb_device_d8c_1_noserial_if0_alsa_control__1
D: module-hal-detect.c: dbus: interface=org.freedesktop.Hal.Manager, 
path=/org/freedesktop/Hal/Manager, member=DeviceAdded
D: module-console-kit.c: dbus: interface=org.freedesktop.Hal.Manager, 
path=/org/freedesktop/Hal/Manager, member=DeviceAdded




If I then run:

pactl load-module module-alsa-card device_id=1 
name=usb_device_d8c_1_noserial_if0 
card_name=alsa_card.usb_device_d8c_1_noserial_if0 tsched=1

e.g. exactly what hal-detect tried to do, then it works fine.

So I guess hal is aware of the device before it "exists" or whatever.

I appreciate this is likely not a pulse audio bug, but do you have any 
ideas about how/where to track down what is happening.

Is it perhaps the fact that the loading of the usb-audio drivers them 
selves needs to happen before pulse can load the device but hal reports 
it immediately? Is hal reporting the device as being available too early 
or should pulse actually give udev or whatever time to load the modules?

Thoughts appreciated.

Col


-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
   Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
   Mandriva Linux Contributor [http://www.mandriva.com/]
   PulseAudio Hacker [http://www.pulseaudio.org/]
   Trac Hacker [http://trac.edgewall.org/]




More information about the pulseaudio-discuss mailing list