Re: [PATCH] ASoC: Intel: Atom: use hardware counter to update hw_ptr

2020-07-28 Thread Cheng-yi Chiang
On Wed, Jul 29, 2020 at 1:31 AM Pierre-Louis Bossart wrote: > > > > On 7/28/20 12:02 PM, Lu, Brent wrote: > >> > >> So if there are already quirks in atom machine drivers to change the period > >> size, why is this patch necessary? > >> > > > > The story is: google implemented the constraint but

Re: [PATCH] ASoC: Intel: Atom: use hardware counter to update hw_ptr

2020-07-28 Thread Pierre-Louis Bossart
On 7/28/20 12:02 PM, Lu, Brent wrote: So if there are already quirks in atom machine drivers to change the period size, why is this patch necessary? The story is: google implemented the constraint but doesn't know why it works so asked us to explain. After checking the two counters I

RE: [PATCH] ASoC: Intel: Atom: use hardware counter to update hw_ptr

2020-07-28 Thread Lu, Brent
> > So if there are already quirks in atom machine drivers to change the period > size, why is this patch necessary? > The story is: google implemented the constraint but doesn't know why it works so asked us to explain. After checking the two counters I realized the increase of ring buffer

Re: [PATCH] ASoC: Intel: Atom: use hardware counter to update hw_ptr

2020-07-28 Thread Pierre-Louis Bossart
On 7/27/20 9:28 PM, Lu, Brent wrote: All the Atom firmware assumes data chunks in multiples of 1ms (typically 5, 10 or 20ms). I have never seen anyone use 256 frames, that's asking for trouble really. it's actually the same with Skylake and SOF in most cases. Is this a 'real' problem or a

RE: [PATCH] ASoC: Intel: Atom: use hardware counter to update hw_ptr

2020-07-27 Thread Lu, Brent
> > All the Atom firmware assumes data chunks in multiples of 1ms (typically 5, > 10 or 20ms). I have never seen anyone use 256 frames, that's asking for > trouble really. > > it's actually the same with Skylake and SOF in most cases. > > Is this a 'real' problem or a problem detected by the

Re: [PATCH] ASoC: Intel: Atom: use hardware counter to update hw_ptr

2020-07-27 Thread Pierre-Louis Bossart
On 7/26/20 11:08 AM, Brent Lu wrote: The ring buffer counter runs faster than hardware counter if the period size in hw_param is larger than 240. Although the differce is not much (around 2k frames), it causes false underrun in CRAS sometimes because it's using 256 frames as period size in

[PATCH] ASoC: Intel: Atom: use hardware counter to update hw_ptr

2020-07-26 Thread Brent Lu
The ring buffer counter runs faster than hardware counter if the period size in hw_param is larger than 240. Although the differce is not much (around 2k frames), it causes false underrun in CRAS sometimes because it's using 256 frames as period size in hw_param. Using the hardware counter could