Re: [alsa-devel] [PATCH] ASoC: soc-pcm: Use delay set in pointer function

2018-07-31 Thread Agrawal, Akshu
On 7/31/2018 8:10 PM, Mark Brown wrote: > On Tue, Jul 31, 2018 at 03:56:52PM +0200, Takashi Iwai wrote: >> Mark Brown wrote: > >>> Yes. I'm saying that if the CPU DAI thinks it can figure out the base >>> delay something is confused. > >> Then basically Akshu's patch does the correct thing, I

Re: [alsa-devel] [PATCH] ASoC: soc-pcm: Use delay set in pointer function

2018-07-31 Thread Mark Brown
On Tue, Jul 31, 2018 at 03:56:52PM +0200, Takashi Iwai wrote: > Mark Brown wrote: > > Yes. I'm saying that if the CPU DAI thinks it can figure out the base > > delay something is confused. > Then basically Akshu's patch does the correct thing, I suppose. I think so. Could perhaps do with a lit

Re: [alsa-devel] [PATCH] ASoC: soc-pcm: Use delay set in pointer function

2018-07-31 Thread Takashi Iwai
On Tue, 31 Jul 2018 15:51:15 +0200, Mark Brown wrote: > > On Tue, Jul 31, 2018 at 03:29:35PM +0200, Takashi Iwai wrote: > > Mark Brown wrote: > > > > > > However since it's not supposed to be providing any DMA a CPU DAI > > > > > really > > > > > shouldn't be doing this... > > > > > Well, if so

Re: [alsa-devel] [PATCH] ASoC: soc-pcm: Use delay set in pointer function

2018-07-31 Thread Mark Brown
On Tue, Jul 31, 2018 at 03:29:35PM +0200, Takashi Iwai wrote: > Mark Brown wrote: > > > > However since it's not supposed to be providing any DMA a CPU DAI really > > > > shouldn't be doing this... > > > Well, if so, the CPU dai also cannot get the exact base delay > > > corresponding to the repo

Re: [alsa-devel] [PATCH] ASoC: soc-pcm: Use delay set in pointer function

2018-07-31 Thread Takashi Iwai
On Tue, 31 Jul 2018 15:12:46 +0200, Mark Brown wrote: > > On Tue, Jul 31, 2018 at 12:32:59PM +0200, Takashi Iwai wrote: > > Mark Brown wrote: > > > > However since it's not supposed to be providing any DMA a CPU DAI really > > > shouldn't be doing this... > > > Well, if so, the CPU dai also cann

Re: [alsa-devel] [PATCH] ASoC: soc-pcm: Use delay set in pointer function

2018-07-31 Thread Mark Brown
On Tue, Jul 31, 2018 at 12:32:59PM +0200, Takashi Iwai wrote: > Mark Brown wrote: > > However since it's not supposed to be providing any DMA a CPU DAI really > > shouldn't be doing this... > Well, if so, the CPU dai also cannot get the exact base delay > corresponding to the reported position, e

Re: [alsa-devel] [PATCH] ASoC: soc-pcm: Use delay set in pointer function

2018-07-31 Thread Takashi Iwai
On Tue, 31 Jul 2018 12:19:43 +0200, Mark Brown wrote: > > On Tue, Jul 31, 2018 at 11:25:11AM +0200, Takashi Iwai wrote: > > > It's not necessary that all CPU dais provide the pointer callback. > > My suggestion is that, if CPU dai *wants* to provide the base delay, > > it must be tied with the po

Re: [alsa-devel] [PATCH] ASoC: soc-pcm: Use delay set in pointer function

2018-07-31 Thread Mark Brown
On Tue, Jul 31, 2018 at 11:25:11AM +0200, Takashi Iwai wrote: > It's not necessary that all CPU dais provide the pointer callback. > My suggestion is that, if CPU dai *wants* to provide the base delay, > it must be tied with the position value, hence it should provide the > pointer callback. If C

Re: [alsa-devel] [PATCH] ASoC: soc-pcm: Use delay set in pointer function

2018-07-31 Thread Mark Brown
On Tue, Jul 31, 2018 at 07:30:16AM +0200, Takashi Iwai wrote: > OTOH, if the CPU dai can really provide a dynamic value that is > strictly tied with pointer, CPU dai itself should provide the pointer > callback that covers both the pointer and the base delay, and it > should be used instead of com

Re: [alsa-devel] [PATCH] ASoC: soc-pcm: Use delay set in pointer function

2018-07-31 Thread Takashi Iwai
On Tue, 31 Jul 2018 11:06:59 +0200, Agrawal, Akshu wrote: > > > > On 7/31/2018 11:00 AM, Takashi Iwai wrote: > > On Tue, 31 Jul 2018 03:25:06 +0200, > > Agrawal, Akshu wrote: > >> > >> > >> > >> On 7/30/2018 9:20 PM, Mark Brown wrote: > >>> On Mon, Jul 30, 2018 at 05:32:21PM +0200, Takashi Iwai

Re: [alsa-devel] [PATCH] ASoC: soc-pcm: Use delay set in pointer function

2018-07-31 Thread Agrawal, Akshu
On 7/31/2018 11:00 AM, Takashi Iwai wrote: > On Tue, 31 Jul 2018 03:25:06 +0200, > Agrawal, Akshu wrote: >> >> >> >> On 7/30/2018 9:20 PM, Mark Brown wrote: >>> On Mon, Jul 30, 2018 at 05:32:21PM +0200, Takashi Iwai wrote: >>> That said, if delay callback of CPU dai provides the additional

Re: [alsa-devel] [PATCH] ASoC: soc-pcm: Use delay set in pointer function

2018-07-30 Thread Takashi Iwai
On Tue, 31 Jul 2018 03:25:06 +0200, Agrawal, Akshu wrote: > > > > On 7/30/2018 9:20 PM, Mark Brown wrote: > > On Mon, Jul 30, 2018 at 05:32:21PM +0200, Takashi Iwai wrote: > > > >> That said, if delay callback of CPU dai provides the additional delay, > >> the patch does correct thing. OTOH, i

Re: [alsa-devel] [PATCH] ASoC: soc-pcm: Use delay set in pointer function

2018-07-30 Thread Agrawal, Akshu
On 7/30/2018 9:20 PM, Mark Brown wrote: > On Mon, Jul 30, 2018 at 05:32:21PM +0200, Takashi Iwai wrote: > >> That said, if delay callback of CPU dai provides the additional delay, >> the patch does correct thing. OTOH, if CPU dai provides the base >> delay instead, we need to clarify that it's

Re: [alsa-devel] [PATCH] ASoC: soc-pcm: Use delay set in pointer function

2018-07-30 Thread Mark Brown
On Mon, Jul 30, 2018 at 05:32:21PM +0200, Takashi Iwai wrote: > That said, if delay callback of CPU dai provides the additional delay, > the patch does correct thing. OTOH, if CPU dai provides the base > delay instead, we need to clarify that it's rather a must; the delay > calculation in pointer

Re: [alsa-devel] [PATCH] ASoC: soc-pcm: Use delay set in pointer function

2018-07-30 Thread Takashi Iwai
On Mon, 30 Jul 2018 17:15:44 +0200, Pierre-Louis Bossart wrote: > > On 7/27/18 11:28 PM, Agrawal, Akshu wrote: > > > > > > On 7/27/2018 8:39 PM, Pierre-Louis Bossart wrote: > >> On 7/27/18 5:13 AM, Akshu Agrawal wrote: > >>> There are cases where a pointer function populates > >>> runtime->delay,

Re: [alsa-devel] [PATCH] ASoC: soc-pcm: Use delay set in pointer function

2018-07-30 Thread Pierre-Louis Bossart
On 7/27/18 11:28 PM, Agrawal, Akshu wrote: On 7/27/2018 8:39 PM, Pierre-Louis Bossart wrote: On 7/27/18 5:13 AM, Akshu Agrawal wrote: There are cases where a pointer function populates runtime->delay, such as: ./sound/pci/hda/hda_controller.c ./sound/soc/intel/atom/sst-mfld-platform-pcm.c Al

Re: [alsa-devel] [PATCH] ASoC: soc-pcm: Use delay set in pointer function

2018-07-27 Thread Agrawal, Akshu
On 7/27/2018 8:39 PM, Pierre-Louis Bossart wrote: > On 7/27/18 5:13 AM, Akshu Agrawal wrote: >> There are cases where a pointer function populates >> runtime->delay, such as: >> ./sound/pci/hda/hda_controller.c >> ./sound/soc/intel/atom/sst-mfld-platform-pcm.c >> >> Also, in some cases cpu dai u

Re: [alsa-devel] [PATCH] ASoC: soc-pcm: Use delay set in pointer function

2018-07-27 Thread Pierre-Louis Bossart
On 7/27/18 5:13 AM, Akshu Agrawal wrote: There are cases where a pointer function populates runtime->delay, such as: ./sound/pci/hda/hda_controller.c ./sound/soc/intel/atom/sst-mfld-platform-pcm.c Also, in some cases cpu dai used is generic and the pcm driver needs to set delay. This delay was