diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2021-05-22 10:33:00 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-05-22 08:47:26 +0200 |
commit | 7ca7cddab2ce1893bfd83bd4c698e21325ad546f (patch) | |
tree | 32309aa4ca6d9ed17652e6301b0d7545b6c61bca /sound/firewire | |
parent | 6f24bb8a157c4af314ea61b29f532e8b4b11b28e (diff) |
ALSA: firewire-lib: code refactoring for generation of packet descriptors
This commit refactors the arguments of helper function to generate the
descriptors of packet.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210522013303.49596-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire')
-rw-r--r-- | sound/firewire/amdtp-stream.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c index cf4fbbd18756..354512a350b7 100644 --- a/sound/firewire/amdtp-stream.c +++ b/sound/firewire/amdtp-stream.c @@ -851,11 +851,11 @@ static unsigned int compute_syt(unsigned int syt_offset, unsigned int cycle, return syt & CIP_SYT_MASK; } -static void generate_pkt_descs(struct amdtp_stream *s, struct pkt_desc *descs, - const __be32 *ctx_header, unsigned int packets, - const struct seq_desc *seq_descs, - unsigned int seq_size) +static void generate_pkt_descs(struct amdtp_stream *s, const __be32 *ctx_header, unsigned int packets) { + struct pkt_desc *descs = s->pkt_descs; + const struct seq_desc *seq_descs = s->ctx_data.rx.seq.descs; + const unsigned int seq_size = s->ctx_data.rx.seq.size; unsigned int dbc = s->data_block_counter; unsigned int seq_head = s->ctx_data.rx.seq.head; bool aware_syt = !(s->flags & CIP_UNAWARE_SYT); @@ -937,8 +937,7 @@ static void process_rx_packets(struct fw_iso_context *context, u32 tstamp, size_ pool_ideal_seq_descs(s, packets); - generate_pkt_descs(s, s->pkt_descs, ctx_header, packets, s->ctx_data.rx.seq.descs, - s->ctx_data.rx.seq.size); + generate_pkt_descs(s, ctx_header, packets); process_ctx_payloads(s, s->pkt_descs, packets); |