summaryrefslogtreecommitdiff
path: root/sound/firewire/digi00x
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2019-07-22 06:37:03 +0300
committerTakashi Iwai <tiwai@suse.de>2019-07-22 17:05:06 +0300
commitd2c104a3426be9991b35c65f0f260a107c4b2942 (patch)
treefd9255ce06b2dc7149051fc03b1050154c18e85d /sound/firewire/digi00x
parent0f5cfcb24d9c931e4571e9995bbfc08cc76d5d4a (diff)
downloadlinux-d2c104a3426be9991b35c65f0f260a107c4b2942.tar.xz
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/digi00x')
-rw-r--r--sound/firewire/digi00x/amdtp-dot.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/sound/firewire/digi00x/amdtp-dot.c b/sound/firewire/digi00x/amdtp-dot.c
index c296d1017ed3..83ac4b37f26d 100644
--- a/sound/firewire/digi00x/amdtp-dot.c
+++ b/sound/firewire/digi00x/amdtp-dot.c
@@ -330,42 +330,39 @@ void amdtp_dot_midi_trigger(struct amdtp_stream *s, unsigned int port,
}
static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
- __be32 *buffer, unsigned int data_blocks,
- unsigned int data_block_counter)
+ const struct pkt_desc *desc,
+ struct snd_pcm_substream *pcm)
{
- struct snd_pcm_substream *pcm;
unsigned int pcm_frames;
- pcm = READ_ONCE(s->pcm);
if (pcm) {
- read_pcm_s32(s, pcm, buffer, data_blocks);
- pcm_frames = data_blocks;
+ read_pcm_s32(s, pcm, desc->ctx_payload, desc->data_blocks);
+ pcm_frames = desc->data_blocks;
} else {
pcm_frames = 0;
}
- read_midi_messages(s, buffer, data_blocks);
+ read_midi_messages(s, desc->ctx_payload, desc->data_blocks);
return pcm_frames;
}
static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
- __be32 *buffer, unsigned int data_blocks,
- unsigned int data_block_counter)
+ const struct pkt_desc *desc,
+ struct snd_pcm_substream *pcm)
{
- struct snd_pcm_substream *pcm;
unsigned int pcm_frames;
- pcm = READ_ONCE(s->pcm);
if (pcm) {
- write_pcm_s32(s, pcm, buffer, data_blocks);
- pcm_frames = data_blocks;
+ write_pcm_s32(s, pcm, desc->ctx_payload, desc->data_blocks);
+ pcm_frames = desc->data_blocks;
} else {
- write_pcm_silence(s, buffer, data_blocks);
+ write_pcm_silence(s, desc->ctx_payload, desc->data_blocks);
pcm_frames = 0;
}
- write_midi_messages(s, buffer, data_blocks, data_block_counter);
+ write_midi_messages(s, desc->ctx_payload, desc->data_blocks,
+ desc->data_block_counter);
return pcm_frames;
}