diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2011-03-15 07:57:24 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-03-15 08:42:30 +0100 |
commit | ec00f5e444706cb1902731655f3dcd04fc3df7b0 (patch) | |
tree | f4fea4c46fa68308f401579ba93dc2c575157ba7 /sound/firewire/speakers.c | |
parent | 5b2599a07eaee53d713fb68f5343eba88fa249c0 (diff) | |
download | linux-stable-ec00f5e444706cb1902731655f3dcd04fc3df7b0.tar.gz linux-stable-ec00f5e444706cb1902731655f3dcd04fc3df7b0.tar.bz2 linux-stable-ec00f5e444706cb1902731655f3dcd04fc3df7b0.zip |
ALSA: firewire-lib, firewire-speakers: handle packet queueing errors
Add an AMDTP stream error state that occurs when we fail to queue
another packet. In this case, the stream is stopped, and the error can
be reported when the application tries to restart the PCM stream.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/speakers.c')
-rw-r--r-- | sound/firewire/speakers.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/firewire/speakers.c b/sound/firewire/speakers.c index f6b095ef075a..0fce9218abb1 100644 --- a/sound/firewire/speakers.c +++ b/sound/firewire/speakers.c @@ -283,6 +283,9 @@ static int fwspk_prepare(struct snd_pcm_substream *substream) mutex_lock(&fwspk->mutex); + if (amdtp_out_streaming_error(&fwspk->stream)) + fwspk_stop_stream(fwspk); + if (!fwspk->stream_running) { err = cmp_connection_establish(&fwspk->connection, amdtp_out_stream_get_max_payload(&fwspk->stream)); |