[alsa-devel] On non-rewindability of resamplers

Raymond Yau superquad.vortex2 at gmail.com
Tue Apr 29 18:01:10 CEST 2014

> On most sound cards, PulseAudio uses timer-based scheduling and thus is
not subject to any period-size limitations. As far as I can see, snd_ymfpci
does not include SNDRV_PCM_INFO_BATCH, and thus will be used in this mode.
In addition, it has an implementation of snd_ymfpci_playback_pointer that
seems to look at the hardware, which is good. So effective period times
less than 5 ms should work on this card.


Is there any reason to use timer scheduling for the sound card which cannot
disable period wake up ?

The sound cards are still wake up by period and the timer

As the DSP of ymfpci can mix up to 32 voices of different sample rate,
mono/stereo , u8/s16 .

The driver just setup the card's timer to increase the fake hw_ptr  on 5ms
interval by (48000Hz * 5ms) 240 samples

Unlike most sound cards which  periods_min equal to 2,  the periods_min of
snd_ymfpci is 3

As the fake hw_ptr increase by 240 samples on 5 ms interval,  I  think it
is a bad idea to allow any application to perform rewind

More information about the Alsa-devel mailing list