Re: [PATCH] pcm_lib.c: Fixed inaccurate calculation of hw_ptr_interrupt in snd_pcm_update_hw_ptr_interrupt function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux