Re: [Alsa-devel] snd-usb-audio hang when rmmoding after unplugging midisport1x1
Mathieu Geli wrote: ok, what I did, is first to apply your patch to my source tree (1.0.3rc2), clean, compile, install, and even reboot. That doesn't output anymore the two lines urb status -104, and usb_submit_urb: -32 but still hang after printing: drivers/usb/core/usb.c: deregistering driver snd-usb-audio It seems to work fine on my 2.4.25 kernel. Can you unload the snd-usb-audio module? If not, please apply the patch below to see whether the driver or the USB core is the culprit. Regards, Clemens -- --- alsa-kernel/usb/usbaudio.c 8 Mar 2004 09:29:51 - 1.87 +++ alsa-kernel/usb/usbaudio.c 12 Mar 2004 12:05:22 - @@ -2928,6 +2928,7 @@ return; chip = snd_magic_cast(snd_usb_audio_t, ptr, return); + snd_printk(KERN_INFO snd_usb_audio_disconnect called, refcount = %d\n, chip-num_interfaces); card = chip-card; down(register_mutex); chip-shutdown = 1; @@ -2947,6 +2948,7 @@ } else { up(register_mutex); } + snd_printk(KERN_INFO snd_usb_audio_disconnect finished!\n); } /* --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] snd-usb-audio hang when rmmoding after unplugging midisport1x1
Hello, I've got this 'big' problem for the hotplug feature: I'm trying to plug/unplug the midisport1x1 from M-Audio. The plug works like a charm, hotplug does its job, load the firmware (fxload) and snd-usb-audio, if not inserted, is auto-loaded. But hen I unplug the device, and I want to plug it again, the usb just hang, trying to rmmoding snd-usb-audio or anything else usb related will just hang. I've disabled alsa in the kernel, installed instead alsa-driver-1.0.3rc2, and confiured it with intel8x0 (I'm on a dell inspiron 8200 laptop) , usb-audio and sequencer. My kernel is a 2.6.3rc4, I'm using debian unstable. the hid and uhci-hcd are modules, and autoloaded at boot via the uhci-hcd line in /etc/modules I've cleaned anything snd- related in the modules.conf and so far that works. ### dmesg gives ### usb 2-1: USB disconnect, address 2 usb 2-1: new full speed USB device using address 3 usb 2-1: USB disconnect, address 3 usb 2-1: new full speed USB device using address 4 drivers/usb/core/usb.c: registered new driver snd-usb-audio * ok the device has been plugged and works fine, led blinking * * now let's unplug it * drivers/usb/core/usb.c: deregistering driver snd-usb-audio ALSA /home/mathieu/alsa-driver-1.0.3rc2/alsa-kernel/usb/usbmidi.c:148: urb status -104 ALSA /home/mathieu/alsa-driver-1.0.3rc2/alsa-kernel/usb/usbmidi.c:134: usb_submit_urb: -32 I've tryed to comment out, and do some silly modifications in this file, but doesn't have any effect. So I'm wondering if I'll see one day the hotpug for my new midi device wworking ... :/ If you guys have a solution, well... that'll be a good relief :) Cheers, Mathieu PS: maybe an lsusb -v could as well help... Bus 002 Device 004: ID 0763:1011 Midiman Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 1.00 bDeviceClass0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize064 idVendor 0x0763 Midiman idProduct 0x1011 bcdDevice1.21 iManufacturer 0 iProduct0 iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 39 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 Remote Wakeup MaxPower0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes3 Transfer TypeInterrupt Synch Type None Usage Type Data wMaxPacketSize 0x0020 bytes 32 once bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0020 bytes 32 once bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0020 bytes 32 once bInterval 0 Bus 002 Device 001: ID : Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass9 Hub bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x idProduct 0x bcdDevice2.06 iManufacturer 3 iProduct2 iSerial 1 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 25 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x40 Self Powered MaxPower0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 9 Hub bInterfaceSubClass 0 bInterfaceProtocol
Re: [Alsa-devel] snd-usb-audio hang when rmmoding after unplugging midisport1x1
Mathieu Geli wrote: I'm trying to plug/unplug the midisport1x1 from M-Audio. The plug works like a charm, hotplug does its job, load the firmware (fxload) and snd-usb-audio, if not inserted, is auto-loaded. But hen I unplug the device, and I want to plug it again, the usb just hang, trying to rmmoding snd-usb-audio or anything else usb related will just hang. There was a bug which has been fixed three days ago (after 1.0.3 came out). Either get the latest version from the CVS, or apply the patch below. HTH Clemens -- --- alsa-kernel/usb/usbmidi.c 3 Mar 2004 11:35:15 - 1.24 +++ alsa-kernel/usb/usbmidi.c 8 Mar 2004 09:34:05 - 1.25 @@ -453,8 +453,16 @@ usbmidi_out_port_t* port = (usbmidi_out_port_t*)substream-runtime-private_data; port-active = up; - if (up) + if (up) { + if (port-ep-umidi-chip-shutdown) { + /* gobble up remaining bytes to prevent wait in +* snd_rawmidi_drain_output */ + while (!snd_rawmidi_transmit_empty(substream)) + snd_rawmidi_transmit_ack(substream, 1); + return; + } tasklet_hi_schedule(port-ep-tasklet); + } } static int snd_usbmidi_input_open(snd_rawmidi_substream_t* substream) --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] snd-usb-audio hang when rmmoding after unplugging midisport1x1
Thanks for your reply, ok, what I did, is first to apply your patch to my source tree (1.0.3rc2), clean, compile, install, and even reboot. That doesn't output anymore the two lines urb status -104, and usb_submit_urb: -32 but still hang after printing: drivers/usb/core/usb.c: deregistering driver snd-usb-audio So I have dl the CVS and reinstalled alsa-driver. That just have the same effect :/ Mathieu --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] snd-usb-audio hang when rmmoding after unplugging midisport1x1
sorry about my fuzzy observations, my bad, even with the last CVS I got those errors line when rmmoding snd-usb-audio, while the device is on. (I didn't redo the same actions than before) Is there any way to maybe unplug the device safely (usbfs point of view) ? I was guessing smtgh like a fxUNload programm. There is obviously something from the midisport1x1 who bugs snd-usb-audio. Indepandently they works both fine :) Maybe I've a easy view 'bout how the things are working, but I would expect from snd-usb-audio a timeout, after which he gives up, trying to communicate with the device if nothnig happens. Cheers, Mathieu --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel