diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2019-07-22 06:37:03 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-07-22 17:05:06 +0300 |
commit | d2c104a3426be9991b35c65f0f260a107c4b2942 (patch) | |
tree | fd9255ce06b2dc7149051fc03b1050154c18e85d /sound/firewire/fireface | |
parent | 0f5cfcb24d9c931e4571e9995bbfc08cc76d5d4a (diff) | |
download | linux-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/fireface')
-rw-r--r-- | sound/firewire/fireface/amdtp-ff.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/sound/firewire/fireface/amdtp-ff.c b/sound/firewire/fireface/amdtp-ff.c index 31a60dff94ac..c36232fc4d3e 100644 --- a/sound/firewire/fireface/amdtp-ff.c +++ b/sound/firewire/fireface/amdtp-ff.c @@ -103,17 +103,18 @@ int amdtp_ff_add_pcm_hw_constraints(struct amdtp_stream *s, } 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 = READ_ONCE(s->pcm); unsigned int pcm_frames; if (pcm) { - write_pcm_s32(s, pcm, (__le32 *)buffer, data_blocks); - pcm_frames = data_blocks; + write_pcm_s32(s, pcm, (__le32 *)desc->ctx_payload, + desc->data_blocks); + pcm_frames = desc->data_blocks; } else { - write_pcm_silence(s, (__le32 *)buffer, data_blocks); + write_pcm_silence(s, (__le32 *)desc->ctx_payload, + desc->data_blocks); pcm_frames = 0; } @@ -121,15 +122,15 @@ static unsigned int process_rx_data_blocks(struct amdtp_stream *s, } 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 = READ_ONCE(s->pcm); unsigned int pcm_frames; if (pcm) { - read_pcm_s32(s, pcm, (__le32 *)buffer, data_blocks); - pcm_frames = data_blocks; + read_pcm_s32(s, pcm, (__le32 *)desc->ctx_payload, + desc->data_blocks); + pcm_frames = desc->data_blocks; } else { pcm_frames = 0; } |