ALSA: firewire-lib: calculate the length of packet payload in packet handler

In current packet handler, the length of payload is given as an argument
of callback function, however this value is just required to process
payload of transferred isoc packet, thus just for IR context.

This commit replaces the argument for payload of packet with the
argument of context header. As a result, the length of payload is
computed in packet handler for IR context.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Sakamoto
2019-05-22 23:17:04 +09:00
committed by Takashi Iwai
parent 07ea238ca1
commit 6f3c07d03c
2 changed files with 25 additions and 29 deletions

View File

@@ -108,9 +108,8 @@ struct amdtp_stream {
struct iso_packets_buffer buffer;
int packet_index;
int tag;
int (*handle_packet)(struct amdtp_stream *s,
unsigned int payload_quadlets, unsigned int cycle,
unsigned int index);
int (*handle_packet)(struct amdtp_stream *s, unsigned int cycle,
const __be32 *ctx_header, unsigned int index);
union {
struct {
unsigned int ctx_header_size;