summaryrefslogtreecommitdiff
path: root/sound/firewire/amdtp-stream.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2019-07-22 12:37:03 +0900
committerTakashi Iwai <tiwai@suse.de>2019-07-22 16:05:06 +0200
commitd2c104a3426be9991b35c65f0f260a107c4b2942 (patch)
treefd9255ce06b2dc7149051fc03b1050154c18e85d /sound/firewire/amdtp-stream.c
parent0f5cfcb24d9c931e4571e9995bbfc08cc76d5d4a (diff)
ALSA: firewire-lib: pass packet descriptor to data block processing layer
This commit changes signature of callback function to call data block processing layer with packet descriptor. At present, the layer is called per packet. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/amdtp-stream.c')
-rw-r--r--sound/firewire/amdtp-stream.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c
index 573265113a6f..db2feb68105c 100644
--- a/sound/firewire/amdtp-stream.c
+++ b/sound/firewire/amdtp-stream.c
@@ -768,13 +768,11 @@ static void process_ctx_payloads(struct amdtp_stream *s,
for (i = 0; i < packets; ++i) {
const struct pkt_desc *desc = descs + i;
- struct snd_pcm_substream *pcm;
+ struct snd_pcm_substream *pcm = READ_ONCE(s->pcm);
unsigned int pcm_frames;
- pcm_frames = s->process_data_blocks(s, desc->ctx_payload,
- desc->data_blocks, desc->data_block_counter);
+ pcm_frames = s->process_data_blocks(s, desc, pcm);
- pcm = READ_ONCE(s->pcm);
if (pcm && pcm_frames > 0)
update_pcm_pointers(s, pcm, pcm_frames);
}