Re: [PATCH v2] ALSA: firewire-lib: Fix stall of process context at packet error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jun 9 2017 22:27, Clemens Ladisch wrote:
Takashi Sakamoto wrote:
---
  sound/firewire/amdtp-stream.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c
index 9678bc75dc5b..de4f6b6dbd47 100644
--- a/sound/firewire/amdtp-stream.c
+++ b/sound/firewire/amdtp-stream.c
@@ -701,7 +701,7 @@ static void out_stream_callback(struct fw_iso_context *context, u32 tstamp,
  		cycle = increment_cycle_count(cycle, 1);
  		if (s->handle_packet(s, 0, cycle, i) < 0) {
  			s->packet_index = -1;
-			amdtp_stream_pcm_abort(s);
+			WRITE_ONCE(s->pcm_buffer_pointer, SNDRV_PCM_POS_XRUN);
  			return;
  		}
  	}
@@ -753,7 +753,7 @@ static void in_stream_callback(struct fw_iso_context *context, u32 tstamp,
  	/* Queueing error or detecting invalid payload. */
  	if (i < packets) {
  		s->packet_index = -1;
-		amdtp_stream_pcm_abort(s);
+		WRITE_ONCE(s->pcm_buffer_pointer, SNDRV_PCM_POS_XRUN);
  		return;
  	}

SNDRV_PCM_POS_XRUN has type unsigned long and might not fit into an unsigned int.

I forgot to add it to staging...

Furthermore, I realized that we should care of software IRQ context for OHCI 1394 context. Packets are handled and we need to abort PCM substream in this context.


Thanks

Takashi Sakaomto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux