All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: clemens@ladisch.de, tiwai@suse.de
Cc: alsa-devel@alsa-project.org
Subject: [PATCH 1/6] ALSA: firewire-lib: use clear name for variable of CIP header
Date: Wed, 22 May 2019 23:17:03 +0900	[thread overview]
Message-ID: <20190522141708.29159-2-o-takashi@sakamocchi.jp> (raw)
In-Reply-To: <20190522141708.29159-1-o-takashi@sakamocchi.jp>

This commit is to distinguish variable of CIP header from variable of
isochronous context header.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
 sound/firewire/amdtp-stream.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c
index f43943fd962d..020edf2b1726 100644
--- a/sound/firewire/amdtp-stream.c
+++ b/sound/firewire/amdtp-stream.c
@@ -286,15 +286,15 @@ EXPORT_SYMBOL(amdtp_stream_set_parameters);
 unsigned int amdtp_stream_get_max_payload(struct amdtp_stream *s)
 {
 	unsigned int multiplier = 1;
-	unsigned int header_size = 0;
+	unsigned int cip_header_size = 0;
 
 	if (s->flags & CIP_JUMBO_PAYLOAD)
 		multiplier = 5;
 	if (!(s->flags & CIP_NO_HEADER))
-		header_size = 8;
+		cip_header_size = sizeof(__be32) * 2;
 
-	return header_size +
-		s->syt_interval * s->data_block_quadlets * 4 * multiplier;
+	return cip_header_size +
+		s->syt_interval * s->data_block_quadlets * sizeof(__be32) * multiplier;
 }
 EXPORT_SYMBOL(amdtp_stream_get_max_payload);
 
-- 
2.20.1

  reply	other threads:[~2019-05-22 14:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22 14:17 [PATCH 0/6] ALSA: firewire-lib: unify handlers for incoming packet Takashi Sakamoto
2019-05-22 14:17 ` Takashi Sakamoto [this message]
2019-05-22 14:17 ` [PATCH 2/6] ALSA: firewire-lib: calculate the length of packet payload in packet handler Takashi Sakamoto
2019-05-22 14:17 ` [PATCH 3/6] ALSA: firewire-lib: compute pointer to payload buffer in context handler Takashi Sakamoto
2019-05-22 14:17 ` [PATCH 4/6] ALSA: firewire-lib: split helper function to check incoming CIP header Takashi Sakamoto
2019-05-22 14:17 ` [PATCH 5/6] ALSA: firewire-lib: use 16 bytes IR context header to separate " Takashi Sakamoto
2019-05-22 14:17 ` [PATCH 6/6] ALSA: firewire-lib: unify packet handler for IR context Takashi Sakamoto
2019-05-23 10:20 ` [PATCH 0/6] ALSA: firewire-lib: unify handlers for incoming packet Takashi Iwai
2019-05-24  5:58 ` Takashi Iwai
2019-05-24  6:04   ` Takashi Iwai
2019-05-24  6:37     ` Takashi Sakamoto

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=20190522141708.29159-2-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.