summaryrefslogtreecommitdiff
path: root/sound/firewire/amdtp-stream.h
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2021-05-22 10:32:59 +0900
committerTakashi Iwai <tiwai@suse.de>2021-05-22 08:47:09 +0200
commit6f24bb8a157c4af314ea61b29f532e8b4b11b28e (patch)
tree24ef5f986bd52a41effad9cb4804c2d405b11098 /sound/firewire/amdtp-stream.h
parent8070d2652e735585d31a50ff4f9bbaf2b5a49b10 (diff)
ALSA: firewire-lib: pool sequence of packet in IT context independently
Current implementation pools the sequence in AMDTP domain. This is convenient regarding to memory usage and computation time, however inconvenient for the devices such that several rx streams are expected to transfer timing information independently. This commit refactors to pool the sequence per rx packet stream. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20210522013303.49596-3-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.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/sound/firewire/amdtp-stream.h b/sound/firewire/amdtp-stream.h
index 6c4d277dc0dd..fc653fe95405 100644
--- a/sound/firewire/amdtp-stream.h
+++ b/sound/firewire/amdtp-stream.h
@@ -142,13 +142,23 @@ struct amdtp_stream {
struct {
// To calculate CIP data blocks and tstamp.
unsigned int transfer_delay;
- unsigned int seq_index;
// To generate CIP header.
unsigned int fdf;
// To generate constant hardware IRQ.
unsigned int event_count;
+
+ struct {
+ struct seq_desc *descs;
+ unsigned int size;
+ unsigned int tail;
+ unsigned int head;
+ } seq;
+
+ unsigned int data_block_state;
+ unsigned int syt_offset_state;
+ unsigned int last_syt_offset;
} rx;
} ctx_data;
@@ -281,16 +291,6 @@ struct amdtp_domain {
unsigned int tx_start;
unsigned int rx_start;
} processing_cycle;
-
- struct {
- struct seq_desc *descs;
- unsigned int size;
- unsigned int tail;
- } seq;
-
- unsigned int data_block_state;
- unsigned int syt_offset_state;
- unsigned int last_syt_offset;
};
int amdtp_domain_init(struct amdtp_domain *d);