ALSA: firewire-lib: move parameter for pcm frame multiplier from context payload...
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Tue, 10 Jan 2023 13:49:31 +0000 (22:49 +0900)
committerTakashi Iwai <tiwai@suse.de>
Thu, 12 Jan 2023 11:14:49 +0000 (12:14 +0100)
commita36183f69c2c24e6e4b1f8f79adc7137ee7444d9
treefe21c2c809c03499310077047d83ecdaccb7caf3
parentfef4e61b0b765b6d22badcd5b6575b159e7d510a
ALSA: firewire-lib: move parameter for pcm frame multiplier from context payload processing layer

The current implementation delegates the task to calculate the number of
processed PCM frames into the context payload processing layer. It looks
good as long as frame calculation is done for a single purpose.
Nevertheless, another purpose, the computation of extra delay for the
runtime of PCM substream, requires frame calculation, too.

This commit refactors the current implementation so that the packet stream
processing layer is responsible for the calculation of PCM frame, too. The
member is moved to stream structure for multiplier between data block
count and PCM frame count.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20230110134933.322794-2-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