From: thomas schorpp <t.schorpp@gmx.de>
To: alsa-devel@lists.sourceforge.net
Subject: Re: snd-usb-audio hangs modprobe if switching dv camera betw. webcam / usb mass storage mode
Date: Sun, 31 Jul 2005 13:07:03 +0200 [thread overview]
Message-ID: <42ECB0D7.4030409@gmx.de> (raw)
In-Reply-To: <42EC96D0.7050000@gmx.de>
thomas schorpp wrote:
> hello,
>
> this bug is in conjunction with the older
> "usb disconnect hangs keyboard" bug on lkml.
>
> module-init-tools / hotplug hangs with snd-usb-audio if i switch/remove
> usb camera as stated above, if a client like kmix is attached.
> (strange, since this device has no mixers here).
>
> if its not unavoidable, pls fix soon, thx. vanilla kernel 2.6.12.0.
>
> Jul 31 10:35:58 tom1 kernel: usb 1-2: USB disconnect, address 3
> ...
> killall kmix
> ...
>
> Jul 31 10:42:08 tom1 kernel: usb 1-2: new full speed USB device using
> uhci_hcd and address 4
> Jul 31 10:42:08 tom1 kernel:
> /usr/src/spca5xx-20050701/drivers/usb/spca5xx.c: USB SPCA5XX camera
> found. Aiptek DV3500 Mpeg4
> Jul 31 10:42:08 tom1 kernel:
> /usr/src/spca5xx-20050701/drivers/usb/spca5xx.c: [spca5xx_probe:8652]
> Camera type JPEG
> Jul 31 10:42:08 tom1 kernel: ALSA sound/usb/usbaudio.c:2570: 4:3:1: add
> audio endpoint 0x86
>
> y
> tom
>
/*
* Frees the device.
*/
static void usX2Y_usb_disconnect(struct usb_device* device, void* ptr)
{
if (ptr) {
usX2Ydev_t* usX2Y = usX2Y((snd_card_t*)ptr);
struct list_head* p;
usX2Y->chip.shutdown = 1;
usX2Y->chip_status = USX2Y_STAT_CHIP_HUP;
usX2Y_unlinkSeq(&usX2Y->AS04);
usb_kill_urb(usX2Y->In04urb);
snd_card_disconnect((snd_card_t*)ptr); <--- err handler? (1)
/* release the midi resources */
list_for_each(p, &usX2Y->chip.midi_list) {
snd_usbmidi_disconnect(p, &snd_usX2Y_usb_driver);
}
if (usX2Y->us428ctls_sharedmem)
wake_up(&usX2Y->us428ctls_wait_queue_head);
snd_card_free((snd_card_t*)ptr); <---- hang
}
}
int snd_card_free(snd_card_t * card)
{
struct snd_shutdown_f_ops *s_f_ops;
if (card == NULL)
return -EINVAL;
write_lock(&snd_card_rwlock);
snd_cards[card->number] = NULL;
write_unlock(&snd_card_rwlock);
#ifdef CONFIG_PM
wake_up(&card->power_sleep);
#ifdef CONFIG_SND_GENERIC_PM
if (card->pm_dev) {
snd_generic_device_unregister(card->pm_dev); <--- not working here
card->pm_dev = NULL;
}
#endif
#endif
/* wait, until all devices are ready for the free operation */
wait_event(card->shutdown_sleep, card->files == NULL); <--- hang
(1)
/* notify all devices that we are disconnected */
err = snd_device_disconnect_all(card);
if (err < 0)
snd_printk(KERN_ERR "not all devices for card %i can be
disconnected\n", card->number); <-- not handled?
return 0;
}
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
next prev parent reply other threads:[~2005-07-31 11:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-31 9:16 snd-usb-audio hangs modprobe if switching dv camera betw. webcam / usb mass storage mode thomas schorpp
2005-07-31 11:07 ` thomas schorpp [this message]
2005-08-01 7:37 ` thomas schorpp
2005-08-01 11:18 ` thomas schorpp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42ECB0D7.4030409@gmx.de \
--to=t.schorpp@gmx.de \
--cc=alsa-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.