diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-06-20 07:53:07 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-06-20 07:53:07 +0200 |
commit | 7fc8e7c1d9787ab8cb0f91adb3bc9c2c64c00ef8 (patch) | |
tree | 6c5c7d9e05ef0d494265ef924ac909c959101fba /sound/firewire/amdtp-stream.c | |
parent | ALSA: line6: remove unnecessary initialization to PODHD500X (diff) | |
parent | ALSA: hda - Apply quirks to Broxton-T, too (diff) | |
download | linux-7fc8e7c1d9787ab8cb0f91adb3bc9c2c64c00ef8.tar.xz linux-7fc8e7c1d9787ab8cb0f91adb3bc9c2c64c00ef8.zip |
Merge branch 'for-linus' into for-next
Diffstat (limited to 'sound/firewire/amdtp-stream.c')
-rw-r--r-- | sound/firewire/amdtp-stream.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c index 9678bc75dc5b..3fc581a5ad62 100644 --- a/sound/firewire/amdtp-stream.c +++ b/sound/firewire/amdtp-stream.c @@ -701,7 +701,9 @@ 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); + if (in_interrupt()) + amdtp_stream_pcm_abort(s); + WRITE_ONCE(s->pcm_buffer_pointer, SNDRV_PCM_POS_XRUN); return; } } @@ -753,7 +755,9 @@ 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); + if (in_interrupt()) + amdtp_stream_pcm_abort(s); + WRITE_ONCE(s->pcm_buffer_pointer, SNDRV_PCM_POS_XRUN); return; } |