5 Sep
2007
5 Sep
'07
3:29 a.m.
On Wednesday 05 September 2007 10:50:31 Timur Tabi wrote:
To work around a hardware issue, my ASoC driver requires the period size to be a multiple of 16. What is the best way to ensure that?
Well, I was going to refer you to http://www-old.alsa-project.org/~iwai/writing-an-alsa-driver/index.html but I just get a blank page today.
Set snd_pcm_hardware.period_bytes_min to 16 or is that 16 * samplesize?
You need to add some constraints to your driver, in the open callback. E.g. snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 16);
List of hwparams that can be constrained is in asound.h List of constraint helpers in pcm.h, or grep for snd_pcm_hw_constraint to see usage examples.
-- Eliot