]> www.infradead.org Git - users/hch/dma-mapping.git/commitdiff
ALSA: firewire-lib: obsolete return value from context payload processing layer
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Tue, 10 Jan 2023 13:49:32 +0000 (22:49 +0900)
committerTakashi Iwai <tiwai@suse.de>
Thu, 12 Jan 2023 11:14:50 +0000 (12:14 +0100)
This commit obsoletes return value from the context payload processing layer
since the multiplier between the data block count and PCM frame count was
moved to the packet streaming processing layer.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20230110134933.322794-3-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 b849f529fcba6eefac0aad3cab3c6e5bd369b099..3660c312bf334fb440117a17a9d651a364056f01 100644 (file)
@@ -344,10 +344,8 @@ static void read_midi_messages(struct amdtp_stream *s, __be32 *buffer,
        }
 }
 
-static unsigned int process_it_ctx_payloads(struct amdtp_stream *s,
-                                           const struct pkt_desc *desc,
-                                           unsigned int count,
-                                           struct snd_pcm_substream *pcm)
+static void process_it_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc,
+                                   unsigned int count, struct snd_pcm_substream *pcm)
 {
        struct amdtp_am824 *p = s->protocol;
        unsigned int pcm_frames = 0;
@@ -371,14 +369,10 @@ static unsigned int process_it_ctx_payloads(struct amdtp_stream *s,
 
                desc = amdtp_stream_next_packet_desc(s, desc);
        }
-
-       return pcm_frames;
 }
 
-static unsigned int process_ir_ctx_payloads(struct amdtp_stream *s,
-                                           const struct pkt_desc *desc,
-                                           unsigned int count,
-                                           struct snd_pcm_substream *pcm)
+static void process_ir_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc,
+                                   unsigned int count, struct snd_pcm_substream *pcm)
 {
        struct amdtp_am824 *p = s->protocol;
        unsigned int pcm_frames = 0;
@@ -400,8 +394,6 @@ static unsigned int process_ir_ctx_payloads(struct amdtp_stream *s,
 
                desc = amdtp_stream_next_packet_desc(s, desc);
        }
-
-       return pcm_frames;
 }
 
 /**
index 453751e4fef840a20222c7ead7745e9462997f66..06a24a7f63c11c99c1c4d4e775fed11ff8deacdb 100644 (file)
@@ -1043,7 +1043,7 @@ static void process_ctx_payloads(struct amdtp_stream *s,
        int i;
 
        pcm = READ_ONCE(s->pcm);
-       (void)s->process_ctx_payloads(s, desc, count, pcm);
+       s->process_ctx_payloads(s, desc, count, pcm);
 
        if (pcm) {
                unsigned int data_block_count = 0;
index 35b48f9ddbf78c1209bea47e24ff6035a13f8696..b7ff44751ab93b625a154057535b532a65b46706 100644 (file)
@@ -107,11 +107,10 @@ struct pkt_desc {
 };
 
 struct amdtp_stream;
-typedef unsigned int (*amdtp_stream_process_ctx_payloads_t)(
-                                               struct amdtp_stream *s,
-                                               const struct pkt_desc *desc,
-                                               unsigned int count,
-                                               struct snd_pcm_substream *pcm);
+typedef void (*amdtp_stream_process_ctx_payloads_t)(struct amdtp_stream *s,
+                                                   const struct pkt_desc *desc,
+                                                   unsigned int count,
+                                                   struct snd_pcm_substream *pcm);
 
 struct amdtp_domain;
 struct amdtp_stream {
index b3f67af2d3b1c09dad2ef10f722dc02ad3223ef9..7db0024495b7ac3256285e375d8e2479c1bf3f1a 100644 (file)
@@ -341,10 +341,8 @@ void amdtp_dot_midi_trigger(struct amdtp_stream *s, unsigned int port,
                WRITE_ONCE(p->midi[port], midi);
 }
 
-static unsigned int process_ir_ctx_payloads(struct amdtp_stream *s,
-                                           const struct pkt_desc *desc,
-                                           unsigned int count,
-                                           struct snd_pcm_substream *pcm)
+static void process_ir_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc,
+                                   unsigned int count, struct snd_pcm_substream *pcm)
 {
        unsigned int pcm_frames = 0;
        int i;
@@ -362,14 +360,10 @@ static unsigned int process_ir_ctx_payloads(struct amdtp_stream *s,
 
                desc = amdtp_stream_next_packet_desc(s, desc);
        }
-
-       return pcm_frames;
 }
 
-static unsigned int process_it_ctx_payloads(struct amdtp_stream *s,
-                                           const struct pkt_desc *desc,
-                                           unsigned int count,
-                                           struct snd_pcm_substream *pcm)
+static void process_it_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc,
+                                   unsigned int count, struct snd_pcm_substream *pcm)
 {
        unsigned int pcm_frames = 0;
        int i;
@@ -390,8 +384,6 @@ static unsigned int process_it_ctx_payloads(struct amdtp_stream *s,
 
                desc = amdtp_stream_next_packet_desc(s, desc);
        }
-
-       return pcm_frames;
 }
 
 int amdtp_dot_init(struct amdtp_stream *s, struct fw_unit *unit,
index 27943b7f86fa730d1700e14958b97dbe01574193..76c9d33ed57267eaf2d7a946c3f7a6bb26555b5c 100644 (file)
@@ -112,10 +112,8 @@ int amdtp_ff_add_pcm_hw_constraints(struct amdtp_stream *s,
        return amdtp_stream_add_pcm_hw_constraints(s, runtime);
 }
 
-static unsigned int process_it_ctx_payloads(struct amdtp_stream *s,
-                                          const struct pkt_desc *desc,
-                                          unsigned int count,
-                                          struct snd_pcm_substream *pcm)
+static void process_it_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc,
+                                   unsigned int count, struct snd_pcm_substream *pcm)
 {
        unsigned int pcm_frames = 0;
        int i;
@@ -133,14 +131,10 @@ static unsigned int process_it_ctx_payloads(struct amdtp_stream *s,
 
                desc = amdtp_stream_next_packet_desc(s, desc);
        }
-
-       return pcm_frames;
 }
 
-static unsigned int process_ir_ctx_payloads(struct amdtp_stream *s,
-                                           const struct pkt_desc *desc,
-                                           unsigned int count,
-                                           struct snd_pcm_substream *pcm)
+static void process_ir_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc,
+                                   unsigned int count, struct snd_pcm_substream *pcm)
 {
        unsigned int pcm_frames = 0;
        int i;
@@ -156,8 +150,6 @@ static unsigned int process_ir_ctx_payloads(struct amdtp_stream *s,
 
                desc = amdtp_stream_next_packet_desc(s, desc);
        }
-
-       return pcm_frames;
 }
 
 int amdtp_ff_init(struct amdtp_stream *s, struct fw_unit *unit,
index 4153527b5e081f8962ae95535cd191f9c73deda2..39ed57d2c5a0aac5c5f6998c5ebb87c7d12e4512 100644 (file)
@@ -328,10 +328,8 @@ static void cache_event_offsets(struct amdtp_motu_cache *cache, const __be32 *bu
        cache->tx_cycle_count = (cache->tx_cycle_count + 1) % CYCLES_PER_SECOND;
 }
 
-static unsigned int process_ir_ctx_payloads(struct amdtp_stream *s,
-                                           const struct pkt_desc *desc,
-                                           unsigned int count,
-                                           struct snd_pcm_substream *pcm)
+static void process_ir_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc,
+                                   unsigned int count, struct snd_pcm_substream *pcm)
 {
        struct snd_motu *motu = container_of(s, struct snd_motu, tx_stream);
        struct amdtp_motu *p = s->protocol;
@@ -370,8 +368,6 @@ static unsigned int process_ir_ctx_payloads(struct amdtp_stream *s,
        if (trace_data_block_sph_enabled() ||
            trace_data_block_message_enabled())
                probe_tracepoints_events(s, desc, count);
-
-       return pcm_frames;
 }
 
 static void write_sph(struct amdtp_motu_cache *cache, __be32 *buffer, unsigned int data_blocks,
@@ -396,10 +392,8 @@ static void write_sph(struct amdtp_motu_cache *cache, __be32 *buffer, unsigned i
        cache->rx_cycle_count = (cache->rx_cycle_count + 1) % CYCLES_PER_SECOND;
 }
 
-static unsigned int process_it_ctx_payloads(struct amdtp_stream *s,
-                                           const struct pkt_desc *desc,
-                                           unsigned int count,
-                                           struct snd_pcm_substream *pcm)
+static void process_it_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc,
+                                   unsigned int count, struct snd_pcm_substream *pcm)
 {
        struct amdtp_motu *p = s->protocol;
        const struct pkt_desc *cursor = desc;
@@ -435,8 +429,6 @@ static unsigned int process_it_ctx_payloads(struct amdtp_stream *s,
        if (trace_data_block_sph_enabled() ||
            trace_data_block_message_enabled())
                probe_tracepoints_events(s, desc, count);
-
-       return pcm_frames;
 }
 
 int amdtp_motu_init(struct amdtp_stream *s, struct fw_unit *unit,
index bb4cf2d26d1b8a0ac8aa992df294bbf3f16ce56e..0b42d65590081a05cd82305cac4f0320e81be7c5 100644 (file)
@@ -176,10 +176,8 @@ static void read_status_messages(struct amdtp_stream *s,
        }
 }
 
-static unsigned int process_ir_ctx_payloads(struct amdtp_stream *s,
-                                           const struct pkt_desc *desc,
-                                           unsigned int count,
-                                           struct snd_pcm_substream *pcm)
+static void process_ir_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc,
+                                   unsigned int count, struct snd_pcm_substream *pcm)
 {
        unsigned int pcm_frames = 0;
        int i;
@@ -197,14 +195,10 @@ static unsigned int process_ir_ctx_payloads(struct amdtp_stream *s,
 
                desc = amdtp_stream_next_packet_desc(s, desc);
        }
-
-       return pcm_frames;
 }
 
-static unsigned int process_it_ctx_payloads(struct amdtp_stream *s,
-                                           const struct pkt_desc *desc,
-                                           unsigned int count,
-                                           struct snd_pcm_substream *pcm)
+static void process_it_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc,
+                                   unsigned int count, struct snd_pcm_substream *pcm)
 {
        unsigned int pcm_frames = 0;
        int i;
@@ -222,8 +216,6 @@ static unsigned int process_it_ctx_payloads(struct amdtp_stream *s,
 
                desc = amdtp_stream_next_packet_desc(s, desc);
        }
-
-       return pcm_frames;
 }
 
 int amdtp_tscm_init(struct amdtp_stream *s, struct fw_unit *unit,