diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2023-01-10 22:49:31 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-01-12 12:14:49 +0100 |
commit | a36183f69c2c24e6e4b1f8f79adc7137ee7444d9 (patch) | |
tree | fe21c2c809c03499310077047d83ecdaccb7caf3 /sound/firewire/motu | |
parent | fef4e61b0b765b6d22badcd5b6575b159e7d510a (diff) |
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>
Diffstat (limited to 'sound/firewire/motu')
-rw-r--r-- | sound/firewire/motu/amdtp-motu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/firewire/motu/amdtp-motu.c b/sound/firewire/motu/amdtp-motu.c index ea0063cec5fb..4153527b5e08 100644 --- a/sound/firewire/motu/amdtp-motu.c +++ b/sound/firewire/motu/amdtp-motu.c @@ -73,7 +73,7 @@ int amdtp_motu_set_parameters(struct amdtp_stream *s, unsigned int rate, data_chunks = formats->msg_chunks + pcm_chunks; data_block_quadlets = 1 + DIV_ROUND_UP(data_chunks * 3, 4); - err = amdtp_stream_set_parameters(s, rate, data_block_quadlets); + err = amdtp_stream_set_parameters(s, rate, data_block_quadlets, 1); if (err < 0) return err; |