summaryrefslogtreecommitdiffstats
path: root/sound/firewire/speakers.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2011-03-15 07:57:24 +0100
committerTakashi Iwai <tiwai@suse.de>2011-03-15 08:42:30 +0100
commitec00f5e444706cb1902731655f3dcd04fc3df7b0 (patch)
treef4fea4c46fa68308f401579ba93dc2c575157ba7 /sound/firewire/speakers.c
parent5b2599a07eaee53d713fb68f5343eba88fa249c0 (diff)
downloadop-kernel-dev-ec00f5e444706cb1902731655f3dcd04fc3df7b0.zip
op-kernel-dev-ec00f5e444706cb1902731655f3dcd04fc3df7b0.tar.gz
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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/firewire/speakers.c b/sound/firewire/speakers.c
index f6b095e..0fce921 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));
OpenPOWER on IntegriCloud