[alsa-devel] [PATCH 1/3] ALSA: pcm - introduce device_buffer

Vinod Koul vinod.koul at linux.intel.com
Fri Aug 31 17:05:32 CEST 2012


On Fri, 2012-08-31 at 10:06 +0800, Raymond Yau wrote:
> 
> 2012-8-31 上午9:08 於 "Vinod Koul" <vinod.koul at linux.intel.com> 寫道:
> >
> > In many modern SoCs the audio DSP can buffer the PCM ring buffer
> data, typically
> > in SRAMs or any other memory available.
> > Today we have no means to represent this buffering and ALSA in some
> cases when
> > device still has to render this buffer but app_ptr is equal to
> hw_ptr alsa
> > wrongly detects an overrun
> >
> > This patch tries to add a new field "device_buffer" to represent
> buffering done in
> > DSPs. This value is also used for the xrun calculations in ALSA
> >
> > Signed-off-by: Vinod Koul <vinod.koul at linux.intel.com>
> > ---
> 
> 
> are these buffer similar to hda 's FIFO ?
No FIFO should only be represented by "delay" not by this one.
> 
> can the alsa application use snd_pcm_rewind to rewind the app_ptr ?
Well yes, but if device is deep buffering that it can cause issues. We
discussed this and perhaps it would be good to tell device about app
pointer and also rewind/fwd, so that it can control this buffering

-- 
~Vinod



More information about the Alsa-devel mailing list