summaryrefslogtreecommitdiffstats
path: root/sound/firewire
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-06-20 07:53:07 +0200
committerTakashi Iwai <tiwai@suse.de>2017-06-20 07:53:07 +0200
commit7fc8e7c1d9787ab8cb0f91adb3bc9c2c64c00ef8 (patch)
tree6c5c7d9e05ef0d494265ef924ac909c959101fba /sound/firewire
parent8cad7a3db658a0652e4ced46dc44fbc7872f0823 (diff)
parentc7ecb9068e6772c43941ce609f08bc53f36e1dce (diff)
downloadop-kernel-dev-7fc8e7c1d9787ab8cb0f91adb3bc9c2c64c00ef8.zip
op-kernel-dev-7fc8e7c1d9787ab8cb0f91adb3bc9c2c64c00ef8.tar.gz
Merge branch 'for-linus' into for-next
Diffstat (limited to 'sound/firewire')
-rw-r--r--sound/firewire/amdtp-stream.c8
-rw-r--r--sound/firewire/amdtp-stream.h2
2 files changed, 7 insertions, 3 deletions
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c
index 9678bc7..3fc581a 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;
}
diff --git a/sound/firewire/amdtp-stream.h b/sound/firewire/amdtp-stream.h
index 6d613f2..ed6eafd 100644
--- a/sound/firewire/amdtp-stream.h
+++ b/sound/firewire/amdtp-stream.h
@@ -135,7 +135,7 @@ struct amdtp_stream {
/* For a PCM substream processing. */
struct snd_pcm_substream *pcm;
struct tasklet_struct period_tasklet;
- unsigned int pcm_buffer_pointer;
+ snd_pcm_uframes_t pcm_buffer_pointer;
unsigned int pcm_period_pointer;
/* To wait for first packet. */
OpenPOWER on IntegriCloud