ALSA: firewire-lib: pass no syt information to data block processing layer
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 22 Jul 2019 03:36:57 +0000 (12:36 +0900)
committerTakashi Iwai <tiwai@suse.de>
Mon, 22 Jul 2019 14:05:01 +0000 (16:05 +0200)
In a previous commit, the variable passed from packet streaming layer
for syt variable is useless. This commit obsoletes it.

In my future work, the syt information is passed to data block processing
layer by another way.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/amdtp-am824.c
sound/firewire/amdtp-stream.c
sound/firewire/amdtp-stream.h
sound/firewire/digi00x/amdtp-dot.c
sound/firewire/fireface/amdtp-ff.c
sound/firewire/motu/amdtp-motu.c
sound/firewire/tascam/amdtp-tascam.c

index 03a7e0533131c6e7a02b79b71552a1a1c5f0e1c2..21068b23d5282baef2a1f3255f58a433b400a2c8 100644 (file)
@@ -336,8 +336,8 @@ static void read_midi_messages(struct amdtp_stream *s, __be32 *buffer,
 }
 
 static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
-                       __be32 *buffer, unsigned int data_blocks,
-                       unsigned int data_block_counter, unsigned int *syt)
+                               __be32 *buffer, unsigned int data_blocks,
+                               unsigned int data_block_counter)
 {
        struct amdtp_am824 *p = s->protocol;
        struct snd_pcm_substream *pcm = READ_ONCE(s->pcm);
@@ -358,8 +358,8 @@ static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
 }
 
 static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
-                       __be32 *buffer, unsigned int data_blocks,
-                       unsigned int data_block_counter, unsigned int *syt)
+                               __be32 *buffer, unsigned int data_blocks,
+                               unsigned int data_block_counter)
 {
        struct amdtp_am824 *p = s->protocol;
        struct snd_pcm_substream *pcm = READ_ONCE(s->pcm);
index 6242240cd8eec06684af927cbbc2f62ff466b934..c8543cdb3c8c0a9a3ecbac6ca1f3c0537d2d303a 100644 (file)
@@ -714,8 +714,7 @@ static void out_stream_callback(struct fw_iso_context *context, u32 tstamp,
                data_blocks = calculate_data_blocks(s, syt);
                buffer = s->buffer.packets[s->packet_index].buffer;
                dbc = s->data_block_counter;
-               pcm_frames = s->process_data_blocks(s, buffer, data_blocks, dbc,
-                                                   &syt);
+               pcm_frames = s->process_data_blocks(s, buffer, data_blocks, dbc);
 
                if (s->flags & CIP_DBC_IS_END_EVENT)
                        dbc = (dbc + data_blocks) & 0xff;
@@ -782,7 +781,7 @@ static void in_stream_callback(struct fw_iso_context *context, u32 tstamp,
                if (err >= 0) {
                        buffer = s->buffer.packets[s->packet_index].buffer;
                        pcm_frames = s->process_data_blocks(s, buffer,
-                               data_blocks, dbc, &syt);
+                                                           data_blocks, dbc);
 
                        if (!(s->flags & CIP_DBC_IS_END_EVENT))
                                dbc = (dbc + data_blocks) & 0xff;
index 5b9d4212e202fe75f77657d4341bbbeaab2b2a2b..5996cc60f1667d6712c9489d36bf9b17884e76bb 100644 (file)
@@ -99,8 +99,7 @@ typedef unsigned int (*amdtp_stream_process_data_blocks_t)(
                                                struct amdtp_stream *s,
                                                __be32 *buffer,
                                                unsigned int data_blocks,
-                                               unsigned int data_block_counter,
-                                               unsigned int *syt);
+                                               unsigned int data_block_counter);
 struct amdtp_stream {
        struct fw_unit *unit;
        enum cip_flags flags;
index 5c12973c26523dcb49b25c26d347b3c5289a2d20..c296d1017ed34e8268b915fc6719e08da653ff69 100644 (file)
@@ -330,8 +330,8 @@ void amdtp_dot_midi_trigger(struct amdtp_stream *s, unsigned int port,
 }
 
 static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
-                       __be32 *buffer, unsigned int data_blocks,
-                       unsigned int data_block_counter, unsigned int *syt)
+                               __be32 *buffer, unsigned int data_blocks,
+                               unsigned int data_block_counter)
 {
        struct snd_pcm_substream *pcm;
        unsigned int pcm_frames;
@@ -350,8 +350,8 @@ static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
 }
 
 static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
-                       __be32 *buffer, unsigned int data_blocks,
-                       unsigned int data_block_counter, unsigned int *syt)
+                               __be32 *buffer, unsigned int data_blocks,
+                               unsigned int data_block_counter)
 {
        struct snd_pcm_substream *pcm;
        unsigned int pcm_frames;
index 71879922ab39a735a29412a1f7d18f03abd8ea4a..31a60dff94acee175457641d454a076eadaadfaa 100644 (file)
@@ -103,8 +103,8 @@ int amdtp_ff_add_pcm_hw_constraints(struct amdtp_stream *s,
 }
 
 static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
-                       __be32 *buffer, unsigned int data_blocks,
-                       unsigned int data_block_counter, unsigned int *syt)
+                               __be32 *buffer, unsigned int data_blocks,
+                               unsigned int data_block_counter)
 {
        struct snd_pcm_substream *pcm = READ_ONCE(s->pcm);
        unsigned int pcm_frames;
@@ -121,8 +121,8 @@ static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
 }
 
 static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
-                       __be32 *buffer, unsigned int data_blocks,
-                       unsigned int data_block_counter, unsigned int *syt)
+                               __be32 *buffer, unsigned int data_blocks,
+                               unsigned int data_block_counter)
 {
        struct snd_pcm_substream *pcm = READ_ONCE(s->pcm);
        unsigned int pcm_frames;
index 68387369988511ee091052b88f6205f09889b82a..30d5f87119ccf8d841f58f944029b9bf3b2e1cd3 100644 (file)
@@ -299,8 +299,8 @@ static void __maybe_unused copy_message(u64 *frames, __be32 *buffer,
 }
 
 static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
-                       __be32 *buffer, unsigned int data_blocks,
-                       unsigned int data_block_counter, unsigned int *syt)
+                               __be32 *buffer, unsigned int data_blocks,
+                               unsigned int data_block_counter)
 {
        struct amdtp_motu *p = s->protocol;
        struct snd_pcm_substream *pcm;
@@ -361,15 +361,12 @@ static void write_sph(struct amdtp_stream *s, __be32 *buffer,
 }
 
 static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
-                       __be32 *buffer, unsigned int data_blocks,
-                       unsigned int data_block_counter, unsigned int *syt)
+                               __be32 *buffer, unsigned int data_blocks,
+                               unsigned int data_block_counter)
 {
        struct amdtp_motu *p = (struct amdtp_motu *)s->protocol;
        struct snd_pcm_substream *pcm;
 
-       /* Not used. */
-       *syt = 0xffff;
-
        /* TODO: how to interact control messages between userspace? */
 
        if (p->midi_ports)
index 8fba6fb8ba8a35371967287278dda163cefbb11e..bc1f2d2120b485d2039b8e5449b5fa34e8765b77 100644 (file)
@@ -166,8 +166,8 @@ static void read_status_messages(struct amdtp_stream *s,
 }
 
 static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
-                       __be32 *buffer, unsigned int data_blocks,
-                       unsigned int data_block_counter, unsigned int *syt)
+                               __be32 *buffer, unsigned int data_blocks,
+                               unsigned int data_block_counter)
 {
        struct snd_pcm_substream *pcm;
 
@@ -181,14 +181,11 @@ static unsigned int process_tx_data_blocks(struct amdtp_stream *s,
 }
 
 static unsigned int process_rx_data_blocks(struct amdtp_stream *s,
-                       __be32 *buffer, unsigned int data_blocks,
-                       unsigned int data_block_counter, unsigned int *syt)
+                               __be32 *buffer, unsigned int data_blocks,
+                               unsigned int data_block_counter)
 {
        struct snd_pcm_substream *pcm;
 
-       /* This field is not used. */
-       *syt = 0x0000;
-
        pcm = READ_ONCE(s->pcm);
        if (pcm)
                write_pcm_s32(s, pcm, buffer, data_blocks);