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.