ALSA: dice: fix hang when unplugging a running device
commitf075c67d8bd5736fd612e5cec5ceafa4d58ef47d
authorClemens Ladisch <clemens@ladisch.de>
Wed, 30 Mar 2011 06:28:09 +0000 (30 08:28 +0200)
committerClemens Ladisch <clemens@ladisch.de>
Wed, 30 Mar 2011 06:28:09 +0000 (30 08:28 +0200)
tree847ae565dbe355326ab9f45545f3cf4bfcf6e705
parent8a495f6184eb533d5641d7dd5703d5582fa834a5
ALSA: dice: 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/dice.c