[alsa-devel] [RFC PATCH (alsa-lib)] pcm: Modify check condition in snd_pcm_sw_params_set_avail_min
Koro Chen
koro.chen at mediatek.com
Thu Sep 3 19:49:35 PDT 2015
On Thu, 2015-09-03 at 10:38 +0100, Mark Brown wrote:
> On Thu, Sep 03, 2015 at 03:45:46PM +0800, Koro Chen wrote:
> > On Thu, 2015-09-03 at 09:08 +0200, Takashi Iwai wrote:
>
> > > How this happens? The period size is the size where irq (or wakeup)
> > > wakes up for read/write. Why the driver wakes up even if there is no
> > > enough data?
>
> > Yes it is odd to what we would normally expect. Due to our HW design,
> > when irq comes, audio HW actually has collected a full period of data,
> > but there is a buffer between the audio HW and memory, so at that moment
> > some samples are still in the buffer, not on the memory. Add a small
> > delay between triggering capture HW and enabling IRQ can also fix this,
> > although I think changing the avail_min should be better.
>
> This does sound like something that should be handled in the kernel -
> one thing we should be doing is providing a uniform interface to
> userspace.
Hmm, I thought those param settings are used to handle different HW
behavior like my case, but maybe I am wrong. It is more important to let
a single driver to be used under many different cases. I will find
solution in my driver, thank you!
More information about the Linux-mediatek
mailing list