Re: [PATCH] ALSA: firewire-lib: drop skip argument from helper functions to queue a packet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>


Regards,
Clemens
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux