Question about soc_pcm_pointer()
Hi ALSA ML
I noticed that current soc-pcm.c :: soc_pcm_pointer() is adding both CPU-DAI's max delay (= A) and Codec-DAI's max delay (= B).
static snd_pcm_uframes_t soc_pcm_pointer(...) { ... ^ for_each_rtd_cpu_dais(rtd, i, cpu_dai) (A) cpu_delay = max(cpu_delay, ...); v delay += cpu_delay;
^ for_each_rtd_codec_dais(rtd, i, codec_dai) (B) codec_delay = max(codec_delay, ...); v delay += codec_delay;
runtime->delay = delay; ... }
But I guess All-DAI's max delay is very enough for it. What do you think ?
Thank you for your help !!
Best regards --- Kuninori Morimoto
On Tue, Apr 20, 2021 at 08:53:29AM +0900, Kuninori Morimoto wrote:
I noticed that current soc-pcm.c :: soc_pcm_pointer() is adding both CPU-DAI's max delay (= A) and Codec-DAI's max delay (= B).
...
But I guess All-DAI's max delay is very enough for it. What do you think ?
We're looking for the delay through the full audio path so it needs to be the maximum of the DAIs doing transmit and the maximum of the DAIs doing receive (ie, all CPUs and all CODECs) rather than just the maximum of all DAIs.
Hi Mark
I noticed that current soc-pcm.c :: soc_pcm_pointer() is adding both CPU-DAI's max delay (= A) and Codec-DAI's max delay (= B).
(snip)
But I guess All-DAI's max delay is very enough for it. What do you think ?
We're looking for the delay through the full audio path so it needs to be the maximum of the DAIs doing transmit and the maximum of the DAIs doing receive (ie, all CPUs and all CODECs) rather than just the maximum of all DAIs.
OK, thank you for your feedback.
Thank you for your help !!
Best regards --- Kuninori Morimoto
participants (2)
-
Kuninori Morimoto
-
Mark Brown