[alsa-devel] [PATCH] ALSA - HDA - Add period time constraint to hda-intel

Raymond Yau superquad.vortex2 at gmail.com
Thu Jun 23 03:14:57 CEST 2011


2011/5/26 Takashi Iwai <tiwai at suse.de>:
> At Thu, 26 May 2011 10:01:14 +0800,
>
> Yeah, this was overlooked.  The patch below fixes both issues.
> Also it checks no_period_wakeup flag just to be sure (although setting
> this for normal read/write/drain operations doesn't make sense).
>
>

Since aplay does not support no period wakeup mode

I can only confirm that your patch fix the read/write and drain when
aplay using maximum period size/time of HDA codec (e.g. 11 seconds
period time for 44100Hz when prealloc is 4096)

Not sure whether  pulseaudio server still use maximum buffer size or not

but in pulsecore/sink.c and pulsecore/source.c

#define ABSOLUTE_MIN_LATENCY (500)
#define ABSOLUTE_MAX_LATENCY (10*PA_USEC_PER_SEC)
#define DEFAULT_FIXED_LATENCY (250*PA_USEC_PER_MSEC)

CPU usage jump from 2% to 12% when using

aplay -Dpulse --period-time=500 --buffer-time=1500 /usr/share/sounds/alsa/*.wav

although the sound is still good but PA server generate a huge amount
of messages


More information about the Alsa-devel mailing list