OSDN Git Service

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 03a7e05..21068b2 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 6242240..c8543cd 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 5b9d421..5996cc6 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 5c12973..c296d10 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 7187992..31a60df 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 6838736..30d5f87 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 8fba6fb..bc1f2d2 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);