All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about soc_pcm_pointer()
@ 2021-04-19 23:53 Kuninori Morimoto
  2021-04-20 12:44 ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Kuninori Morimoto @ 2021-04-19 23:53 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question about soc_pcm_pointer()
  2021-04-19 23:53 Question about soc_pcm_pointer() Kuninori Morimoto
@ 2021-04-20 12:44 ` Mark Brown
  2021-04-20 22:35   ` Kuninori Morimoto
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2021-04-20 12:44 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Linux-ALSA

[-- Attachment #1: Type: text/plain, Size: 515 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question about soc_pcm_pointer()
  2021-04-20 12:44 ` Mark Brown
@ 2021-04-20 22:35   ` Kuninori Morimoto
  0 siblings, 0 replies; 3+ messages in thread
From: Kuninori Morimoto @ 2021-04-20 22:35 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-20 22:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-19 23:53 Question about soc_pcm_pointer() Kuninori Morimoto
2021-04-20 12:44 ` Mark Brown
2021-04-20 22:35   ` Kuninori Morimoto

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.