20 Aug
2009
20 Aug
'09
10:42 a.m.
Shine Liu wrote:
I carefully read the pcm_lib.c and pcm_native.c but I didn't found
any alignmnet constraint API. Althought there's a function called snd_pcm_hw_constraint_step, but this function can't be used in the situation referred in the last mail which one hw parameter should be aligned to the other hw parameter.
The period size, the buffer size, and the number of periods are all related, so you can align the period size to the buffer size by restricting the number of periods to be an integer:
snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
HTH Clemens