summaryrefslogtreecommitdiff
path: root/sound/firewire/amdtp-stream.h
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2017-04-11 20:33:18 +0900
committerTakashi Iwai <tiwai@suse.de>2017-04-12 15:34:21 +0200
commitf91c9d7610a2fe306273a83e2fd5351bceb85d28 (patch)
tree83e477ea0a5ccdaa6f6e57e5ccbd83882c7a2d45 /sound/firewire/amdtp-stream.h
parent12ee4022f67f8854061b46e5c0a7ad6258ab66c2 (diff)
ALSA: firewire-lib: cache maximum length of payload to reduce function calls
During packet streaming, maximum length of payload for isochronous packet is invariable, therefore no need to recalculate. Current ALSA IEC 61883-1/6 engine calls a function to calculate it 8,000 or more times per second for incoming packet processing. This commit adds a member to have maximum length of payload into 'struct amdtp_stream', to reduces the function calls. At first callback from isochronous context, the length is calculated and stored for later processing. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/amdtp-stream.h')
-rw-r--r--sound/firewire/amdtp-stream.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/firewire/amdtp-stream.h b/sound/firewire/amdtp-stream.h
index 2bd4de4c7bb7..7e8831722821 100644
--- a/sound/firewire/amdtp-stream.h
+++ b/sound/firewire/amdtp-stream.h
@@ -110,6 +110,7 @@ struct amdtp_stream {
int (*handle_packet)(struct amdtp_stream *s,
unsigned int payload_quadlets, unsigned int cycle,
unsigned int index);
+ unsigned int max_payload_length;
/* For CIP headers. */
unsigned int source_node_id_field;