From ec00f5e444706cb1902731655f3dcd04fc3df7b0 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Tue, 15 Mar 2011 07:57:24 +0100 Subject: 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 Signed-off-by: Takashi Iwai --- sound/firewire/speakers.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sound/firewire/speakers.c') 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)); -- cgit v1.2.3-55-g7522