[alsa-devel] About the buffer_time and period_time

Fengwei Yin yfw.bsp at gmail.com
Wed Oct 17 03:05:28 CEST 2007


On 10/17/07, Liam Girdwood <lg at opensource.wolfsonmicro.com> wrote:
>
> On Tue, 2007-10-16 at 16:27 +0800, Fengwei Yin wrote:
> > Hi all,
> > I met a problem about period_time/buffer_time on PXA with ASOC enabled.
> > The kernel version is 2.6.21.
> >
> > The Audio stream is 32k which is not supported by PXA ASOC driver.
> Please
> > refer following
> > RATES definition for PXA2xx.
> >
> > #define PXA2XX_AC97_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
> >                 SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 |
> > SNDRV_PCM_RATE_44100 | \
> >                 SNDRV_PCM_RATE_48000)
> >
>
> This may be a bug in the pxa AC97 driver as most AC97 codecs can run at
> 32k and hence drive the AC97 link at 32k. I assume your using the WM9713
> and this will request from the pxa AC97 controller when it needs PCM
> audio data in VRA mode. i.e. it will mark every 2 out of 3 AC97 frames
> (slot 3 & 4) as valid.
>
> Can you set SNDRV_PCM_RATE_32000 and give it a try, hopefully it should
> work and wont require any sample rate conversion.
>
> Liam


I tried set SNDRV_PCM_RATE_32000, the audio playback works OK. And
SNDRV_PCM_RATE_32000 should be added because the drivers instead of ASOC
have this bit.

But my understand is the default samplerate conversion will convert the
sample
rate to one supported by hardware if I remove 32k support in driver.

My test show that there are some issues in samplerate conversion. And why
buffer_time can be change to 400000 successfully if I set period_time first?

Regards
Yin, Fengwei


More information about the Alsa-devel mailing list