All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: tiwai@suse.de
Cc: alsa-devel@alsa-project.org, clemens@ladisch.de
Subject: [PATCH 3/6] ALSA: firewire-lib: code refactoring for generation of packet descriptors
Date: Sat, 22 May 2021 10:33:00 +0900	[thread overview]
Message-ID: <20210522013303.49596-4-o-takashi@sakamocchi.jp> (raw)
In-Reply-To: <20210522013303.49596-1-o-takashi@sakamocchi.jp>

This commit refactors the arguments of helper function to generate the
descriptors of packet.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
 sound/firewire/amdtp-stream.c | 11 +++++------
 1 file 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);
 
-- 
2.27.0


  parent reply	other threads:[~2021-05-22  1:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-22  1:32 [PATCH 0/6] ALSA: firewire-lib: code refactoring for processing rx packets Takashi Sakamoto
2021-05-22  1:32 ` [PATCH 1/6] ALSA: firewire-lib: add flag to unaware of syt in CIP header Takashi Sakamoto
2021-05-22  1:32 ` [PATCH 2/6] ALSA: firewire-lib: pool sequence of packet in IT context independently Takashi Sakamoto
2021-05-22  1:33 ` Takashi Sakamoto [this message]
2021-05-22  1:33 ` [PATCH 4/6] ALSA: firewire-lib: code refactoring for generation of syt sequence Takashi Sakamoto
2021-05-22  1:33 ` [PATCH 5/6] ALSA: firewire-lib: code refactoring for generation of data block sequence Takashi Sakamoto
2021-05-22  1:33 ` [PATCH 6/6] ALSA: firewire-lib: code refactoring for transfer delay Takashi Sakamoto
2021-05-22  6:50 ` [PATCH 0/6] ALSA: firewire-lib: code refactoring for processing rx packets Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210522013303.49596-4-o-takashi@sakamocchi.jp \
    --to=o-takashi@sakamocchi.jp \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.