diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2011-03-15 02:57:24 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-03-15 03:42:30 -0400 |
commit | ec00f5e444706cb1902731655f3dcd04fc3df7b0 (patch) | |
tree | f4fea4c46fa68308f401579ba93dc2c575157ba7 /sound/firewire/speakers.c | |
parent | 5b2599a07eaee53d713fb68f5343eba88fa249c0 (diff) |
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) | |||
283 | 283 | ||
284 | mutex_lock(&fwspk->mutex); | 284 | mutex_lock(&fwspk->mutex); |
285 | 285 | ||
286 | if (amdtp_out_streaming_error(&fwspk->stream)) | ||
287 | fwspk_stop_stream(fwspk); | ||
288 | |||
286 | if (!fwspk->stream_running) { | 289 | if (!fwspk->stream_running) { |
287 | err = cmp_connection_establish(&fwspk->connection, | 290 | err = cmp_connection_establish(&fwspk->connection, |
288 | amdtp_out_stream_get_max_payload(&fwspk->stream)); | 291 | amdtp_out_stream_get_max_payload(&fwspk->stream)); |