ALSA: isight: fix hang when unplugging a running device
commit8a495f6184eb533d5641d7dd5703d5582fa834a5
authorClemens Ladisch <clemens@ladisch.de>
Wed, 30 Mar 2011 06:27:46 +0000 (30 08:27 +0200)
committerClemens Ladisch <clemens@ladisch.de>
Wed, 30 Mar 2011 06:27:46 +0000 (30 08:27 +0200)
treee43834054aca04e34ae8e5fc6c1547a62aeaf605
parent2725fb2c0e7081f99dd2a24b3b2ea9a93b0d236d
ALSA: isight: fix hang when unplugging a running device

When aborting a PCM stream, the xrun is signaled only if the stream is
running.  When disconnecting a PCM stream, calling snd_card_disconnect()
too early would change the stream into a non-running state and thus
prevent the xrun from being noticed by user space.

To prevent this, move the snd_card_disconnect() call after the xrun.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
sound/firewire/isight.c