Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: firewire-lib: obsolete return value from context payload processing layer

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>

authored by

Takashi Sakamoto and committed by
Takashi Iwai
7fc693e4 a36183f6

+25 -66
+4 -12
sound/firewire/amdtp-am824.c
··· 344 344 } 345 345 } 346 346 347 - static unsigned int process_it_ctx_payloads(struct amdtp_stream *s, 348 - const struct pkt_desc *desc, 349 - unsigned int count, 350 - struct snd_pcm_substream *pcm) 347 + static void process_it_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc, 348 + unsigned int count, struct snd_pcm_substream *pcm) 351 349 { 352 350 struct amdtp_am824 *p = s->protocol; 353 351 unsigned int pcm_frames = 0; ··· 369 371 370 372 desc = amdtp_stream_next_packet_desc(s, desc); 371 373 } 372 - 373 - return pcm_frames; 374 374 } 375 375 376 - static unsigned int process_ir_ctx_payloads(struct amdtp_stream *s, 377 - const struct pkt_desc *desc, 378 - unsigned int count, 379 - struct snd_pcm_substream *pcm) 376 + static void process_ir_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc, 377 + unsigned int count, struct snd_pcm_substream *pcm) 380 378 { 381 379 struct amdtp_am824 *p = s->protocol; 382 380 unsigned int pcm_frames = 0; ··· 394 400 395 401 desc = amdtp_stream_next_packet_desc(s, desc); 396 402 } 397 - 398 - return pcm_frames; 399 403 } 400 404 401 405 /**
+1 -1
sound/firewire/amdtp-stream.c
··· 1043 1043 int i; 1044 1044 1045 1045 pcm = READ_ONCE(s->pcm); 1046 - (void)s->process_ctx_payloads(s, desc, count, pcm); 1046 + s->process_ctx_payloads(s, desc, count, pcm); 1047 1047 1048 1048 if (pcm) { 1049 1049 unsigned int data_block_count = 0;
+4 -5
sound/firewire/amdtp-stream.h
··· 107 107 }; 108 108 109 109 struct amdtp_stream; 110 - typedef unsigned int (*amdtp_stream_process_ctx_payloads_t)( 111 - struct amdtp_stream *s, 112 - const struct pkt_desc *desc, 113 - unsigned int count, 114 - struct snd_pcm_substream *pcm); 110 + typedef void (*amdtp_stream_process_ctx_payloads_t)(struct amdtp_stream *s, 111 + const struct pkt_desc *desc, 112 + unsigned int count, 113 + struct snd_pcm_substream *pcm); 115 114 116 115 struct amdtp_domain; 117 116 struct amdtp_stream {
+4 -12
sound/firewire/digi00x/amdtp-dot.c
··· 341 341 WRITE_ONCE(p->midi[port], midi); 342 342 } 343 343 344 - static unsigned int process_ir_ctx_payloads(struct amdtp_stream *s, 345 - const struct pkt_desc *desc, 346 - unsigned int count, 347 - struct snd_pcm_substream *pcm) 344 + static void process_ir_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc, 345 + unsigned int count, struct snd_pcm_substream *pcm) 348 346 { 349 347 unsigned int pcm_frames = 0; 350 348 int i; ··· 360 362 361 363 desc = amdtp_stream_next_packet_desc(s, desc); 362 364 } 363 - 364 - return pcm_frames; 365 365 } 366 366 367 - static unsigned int process_it_ctx_payloads(struct amdtp_stream *s, 368 - const struct pkt_desc *desc, 369 - unsigned int count, 370 - struct snd_pcm_substream *pcm) 367 + static void process_it_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc, 368 + unsigned int count, struct snd_pcm_substream *pcm) 371 369 { 372 370 unsigned int pcm_frames = 0; 373 371 int i; ··· 384 390 385 391 desc = amdtp_stream_next_packet_desc(s, desc); 386 392 } 387 - 388 - return pcm_frames; 389 393 } 390 394 391 395 int amdtp_dot_init(struct amdtp_stream *s, struct fw_unit *unit,
+4 -12
sound/firewire/fireface/amdtp-ff.c
··· 112 112 return amdtp_stream_add_pcm_hw_constraints(s, runtime); 113 113 } 114 114 115 - static unsigned int process_it_ctx_payloads(struct amdtp_stream *s, 116 - const struct pkt_desc *desc, 117 - unsigned int count, 118 - struct snd_pcm_substream *pcm) 115 + static void process_it_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc, 116 + unsigned int count, struct snd_pcm_substream *pcm) 119 117 { 120 118 unsigned int pcm_frames = 0; 121 119 int i; ··· 131 133 132 134 desc = amdtp_stream_next_packet_desc(s, desc); 133 135 } 134 - 135 - return pcm_frames; 136 136 } 137 137 138 - static unsigned int process_ir_ctx_payloads(struct amdtp_stream *s, 139 - const struct pkt_desc *desc, 140 - unsigned int count, 141 - struct snd_pcm_substream *pcm) 138 + static void process_ir_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc, 139 + unsigned int count, struct snd_pcm_substream *pcm) 142 140 { 143 141 unsigned int pcm_frames = 0; 144 142 int i; ··· 150 156 151 157 desc = amdtp_stream_next_packet_desc(s, desc); 152 158 } 153 - 154 - return pcm_frames; 155 159 } 156 160 157 161 int amdtp_ff_init(struct amdtp_stream *s, struct fw_unit *unit,
+4 -12
sound/firewire/motu/amdtp-motu.c
··· 328 328 cache->tx_cycle_count = (cache->tx_cycle_count + 1) % CYCLES_PER_SECOND; 329 329 } 330 330 331 - static unsigned int process_ir_ctx_payloads(struct amdtp_stream *s, 332 - const struct pkt_desc *desc, 333 - unsigned int count, 334 - struct snd_pcm_substream *pcm) 331 + static void process_ir_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc, 332 + unsigned int count, struct snd_pcm_substream *pcm) 335 333 { 336 334 struct snd_motu *motu = container_of(s, struct snd_motu, tx_stream); 337 335 struct amdtp_motu *p = s->protocol; ··· 368 370 if (trace_data_block_sph_enabled() || 369 371 trace_data_block_message_enabled()) 370 372 probe_tracepoints_events(s, desc, count); 371 - 372 - return pcm_frames; 373 373 } 374 374 375 375 static void write_sph(struct amdtp_motu_cache *cache, __be32 *buffer, unsigned int data_blocks, ··· 392 396 cache->rx_cycle_count = (cache->rx_cycle_count + 1) % CYCLES_PER_SECOND; 393 397 } 394 398 395 - static unsigned int process_it_ctx_payloads(struct amdtp_stream *s, 396 - const struct pkt_desc *desc, 397 - unsigned int count, 398 - struct snd_pcm_substream *pcm) 399 + static void process_it_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc, 400 + unsigned int count, struct snd_pcm_substream *pcm) 399 401 { 400 402 struct amdtp_motu *p = s->protocol; 401 403 const struct pkt_desc *cursor = desc; ··· 429 435 if (trace_data_block_sph_enabled() || 430 436 trace_data_block_message_enabled()) 431 437 probe_tracepoints_events(s, desc, count); 432 - 433 - return pcm_frames; 434 438 } 435 439 436 440 int amdtp_motu_init(struct amdtp_stream *s, struct fw_unit *unit,
+4 -12
sound/firewire/tascam/amdtp-tascam.c
··· 176 176 } 177 177 } 178 178 179 - static unsigned int process_ir_ctx_payloads(struct amdtp_stream *s, 180 - const struct pkt_desc *desc, 181 - unsigned int count, 182 - struct snd_pcm_substream *pcm) 179 + static void process_ir_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc, 180 + unsigned int count, struct snd_pcm_substream *pcm) 183 181 { 184 182 unsigned int pcm_frames = 0; 185 183 int i; ··· 195 197 196 198 desc = amdtp_stream_next_packet_desc(s, desc); 197 199 } 198 - 199 - return pcm_frames; 200 200 } 201 201 202 - static unsigned int process_it_ctx_payloads(struct amdtp_stream *s, 203 - const struct pkt_desc *desc, 204 - unsigned int count, 205 - struct snd_pcm_substream *pcm) 202 + static void process_it_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc, 203 + unsigned int count, struct snd_pcm_substream *pcm) 206 204 { 207 205 unsigned int pcm_frames = 0; 208 206 int i; ··· 216 222 217 223 desc = amdtp_stream_next_packet_desc(s, desc); 218 224 } 219 - 220 - return pcm_frames; 221 225 } 222 226 223 227 int amdtp_tscm_init(struct amdtp_stream *s, struct fw_unit *unit,