Re: How can I make sure the period size is a multiple of 16?

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

 



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

_______________________________________________
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