[alsa-devel] [PATCH 3/3] ASoC: omap-mcbsp: make minimum period size larger than FIFO

Jarkko Nikula jarkko.nikula at bitmer.com
Sun Mar 11 18:39:04 CET 2012

On Fri, 2012-03-09 at 23:07 +0200, Grazvydas Ignotas wrote:
> On Fri, Mar 9, 2012 at 3:42 PM, Peter Ujfalusi <peter.ujfalusi at ti.com> wrote:
> > On 03/09/2012 03:25 PM, Grazvydas Ignotas wrote:
> >>> If this is a real issue in Pandora, could it be solved with adding
> >>> /etc/asound.conf to the filesystem, and limit the period size via that?
> >>
> >> We are already doing that, however we encourage people to install
> >> their own distros on pandora, and now they have to drag whole ALSA
> >> configuration for things to work. IMHO device driver like this must be
> >> able to work without any special userspace configuration.
> >
I agree. What's the use case where the problem shows up? Or actually hw
parameters in that use case so can it be repeated using plain

> > We have two issues here:
> > if you are using the element mode (dma_op_mode) you might want to have
> > bigger period size than the FIFO size. However if you are using the
> > threshold mode you will be fine with a period size between fifo_size/2,
> > and fifo_size.
> Threshold mode doesn't seem to help, I still need to go over FIFO
> size. From what I can see in the code it's setting the threshold to
> period size, so I still get underflow condition after first write, as
> first write goes to FIFO, DMA shows that it has nothing left to send
> after first write finishes.
Period size smaller than FIFO size has used to work in element mode too
but I think I have always used in my tests multiple periods. What I'm
thinking if we have a boundary condition with 2-3 periods and where
buffer size is near FIFO size.

I think instead of limiting minimum period size to FIFO size we should
find that boundary condition. Like if min buffer > FIFO + 1 period or
something like that in order to keep possible to use small periods.


More information about the Alsa-devel mailing list