[alsa-devel] HDAudio period/buffer sizes

Takashi Iwai tiwai at suse.de
Sun Aug 14 12:17:28 CEST 2011


At Sun, 14 Aug 2011 09:44:26 +0800,
Raymond Yau wrote:
> 
> 2011/7/27 Takashi Iwai <tiwai at suse.de>:
> > At Tue, 26 Jul 2011 14:23:40 -0500,
> > Pierre-Louis Bossart wrote:
> >>
> >> that the buffer itself was already aligned to 128 bytes from the
> >> > very beginning as it's allocated via dma_alloc_coherent().
> >> > The fact that the commit fixes the real problem means that the buffer
> >> > size must be aligned, too, at least for some hardware.
> >>
> >> I checked internally and the reply was "There is no requirement the buffer
> >> must be 128 byte multiples.  As long as it is integer number of samples, we
> >> are good."
> >>
> >> What's the best way to deal with it? Add a driver option? A compilation
> >> option?
> >
> > I'd say a driver option since this must be dynamically adjustable.
> > Care to make a patch?
> >
> > For 3.2 (after 3.1 merge window), we can disable 128-bytes limit as
> > default again for testing.  If someone hits the problem, he can switch
> > easily and we can investigate more at this time.
> >
> >
> The patch seem fix the problem of
> snd_pcm_hw_params_set_period_time_near() to 120ms at 11025Hz for those
> ad198x codec which are the only HDA codecs which support 11025Hz and
> 22050Hz
> 
> Does it mean that the period_bytes_min =128 can also be removed to
> achieve lowest latency ?

It depends on the sample rate (of course, 128byte itself defines the
limit, though).  The problem is for sample rates that can't be divided
by 8khz.


Takashi


More information about the Alsa-devel mailing list