diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2019-10-18 00:54:13 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-10-18 04:35:40 +0200 |
commit | a0e023317e2d55c6b2fbf342c12d8a59797e1cff (patch) | |
tree | 656c7b1ebe190982276e87af108ab34d12c35a94 /sound/firewire/amdtp-stream.h | |
parent | 3aac32634172819ede79426c85e0a43ee7fcc3b3 (diff) |
ALSA: firewire-lib: use variable size of queue for isoc packets instead of fixed size
The number of packets in packet buffer has been fixed number (=48) since
first commit of ALSA IEC 61883-1/6 packet streaming engine.
This commit allows the engine to use variable number of packets in the
buffer. The size is calculated by a parameter in AMDTP domain structure
surely to store the number of events in the packets of buffer. Although
the value of parameter is expected to come from 'period size' parameter
of PCM substream, at present 48 is still used.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20191017155424.885-2-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.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/firewire/amdtp-stream.h b/sound/firewire/amdtp-stream.h index d95a4ed15f20..8d541727e437 100644 --- a/sound/firewire/amdtp-stream.h +++ b/sound/firewire/amdtp-stream.h @@ -117,6 +117,7 @@ struct amdtp_stream { /* For packet processing. */ struct fw_iso_context *context; struct iso_packets_buffer buffer; + unsigned int queue_size; int packet_index; struct pkt_desc *pkt_descs; int tag; @@ -274,6 +275,7 @@ struct amdtp_domain { struct list_head streams; unsigned int events_per_period; + unsigned int events_per_buffer; }; int amdtp_domain_init(struct amdtp_domain *d); @@ -286,9 +288,11 @@ int amdtp_domain_start(struct amdtp_domain *d); void amdtp_domain_stop(struct amdtp_domain *d); static inline int amdtp_domain_set_events_per_period(struct amdtp_domain *d, - unsigned int events_per_period) + unsigned int events_per_period, + unsigned int events_per_buffer) { d->events_per_period = events_per_period; + d->events_per_buffer = events_per_buffer; return 0; } |