[alsa-devel] [PATCH] ALSA: firewire-lib: drop skip argument from helper functions to queue a packet
Clemens Ladisch
clemens at ladisch.de
Wed May 11 09:48:23 CEST 2016
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 at ladisch.de>
Regards,
Clemens
More information about the Alsa-devel
mailing list