]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - sound/firewire/amdtp-stream.h
Merge tag 'mtd/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
[linux.git] / sound / firewire / amdtp-stream.h
index e45de3eecfe39cb9b3b2f928f9a50307b05a3210..3942894c11ac2e319d30b0e86220579f668149b2 100644 (file)
@@ -108,10 +108,31 @@ 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);
-       unsigned int max_payload_length;
+       union {
+               struct {
+                       unsigned int ctx_header_size;
+
+                       // limit for payload of iso packet.
+                       unsigned int max_ctx_payload_length;
+
+                       // For quirks of CIP headers.
+                       // Fixed interval of dbc between previos/current
+                       // packets.
+                       unsigned int dbc_interval;
+                       // Indicate the value of dbc field in a first packet.
+                       unsigned int first_dbc;
+               } tx;
+               struct {
+                       // To calculate CIP data blocks and tstamp.
+                       unsigned int transfer_delay;
+                       unsigned int data_block_state;
+                       unsigned int last_syt_offset;
+                       unsigned int syt_offset_state;
+
+                       // To generate CIP header.
+                       unsigned int fdf;
+               } rx;
+       } ctx_data;
 
        /* For CIP headers. */
        unsigned int source_node_id_field;
@@ -119,19 +140,10 @@ struct amdtp_stream {
        unsigned int data_block_counter;
        unsigned int sph;
        unsigned int fmt;
-       unsigned int fdf;
-       /* quirk: fixed interval of dbc between previos/current packets. */
-       unsigned int tx_dbc_interval;
-       /* quirk: indicate the value of dbc field in a first packet. */
-       unsigned int tx_first_dbc;
 
        /* Internal flags. */
        enum cip_sfc sfc;
        unsigned int syt_interval;
-       unsigned int transfer_delay;
-       unsigned int data_block_state;
-       unsigned int last_syt_offset;
-       unsigned int syt_offset_state;
 
        /* For a PCM substream processing. */
        struct snd_pcm_substream *pcm;