From: Clemens Ladisch <clemens@ladisch.de>
To: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org, ffado-devel@lists.sf.net
Subject: Re: [PATCH] ALSA: firewire-lib: drop skip argument from helper functions to queue a packet
Date: Wed, 11 May 2016 09:48:23 +0200 [thread overview]
Message-ID: <5732E3C7.2030604@ladisch.de> (raw)
In-Reply-To: <1462919709-8692-1-git-send-email-o-takashi@sakamocchi.jp>
Takashi Sakamoto wrote:
> On most of audio and music units on IEEE 1394 bus which ALSA firewire stack
> supports (or plans to support), CIP with two quadlets header is used.
> Thus, there's no cases to queue packets with blank payload. If such packets
> are going to be queued, it means that they're for skips of the cycle.
>
> This commit simplifies helper functions to queue a packet.
> @@ -383,8 +382,10 @@ static int queue_packet(struct amdtp_stream *s,
> p.tag = TAG_CIP;
> p.header_length = header_length;
> - p.payload_length = (!skip) ? payload_length : 0;
> - p.skip = skip;
> + if (payload_length > 0)
> + p.payload_length = payload_length;
> + else
> + p.skip = true;
This can be simplified to:
p.payload_length = payload_length;
p.skip = payload_length == 0;
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Regards,
Clemens
next prev parent reply other threads:[~2016-05-11 7:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-10 22:35 [PATCH] ALSA: firewire-lib: drop skip argument from helper functions to queue a packet Takashi Sakamoto
2016-05-11 7:48 ` Clemens Ladisch [this message]
2016-05-11 16:14 ` Takashi Sakamoto
2016-05-11 18:37 ` 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=5732E3C7.2030604@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=ffado-devel@lists.sf.net \
--cc=o-takashi@sakamocchi.jp \
--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.