[alsa-devel] Playback formats; does aplay pad S16_LE, or does the hardware?

Rob Nertney rob at rob-otics.com
Mon Apr 3 01:40:30 CEST 2017


I can successfully play 32b at 32KHz and 32b at 16KHz to my I2S DAC.

I can also, with the same settings as 32b at 16KHz, play 16b at 32KHz, but I
don't think this is the way ALSA wants its data....

I've learned that hw_params is responsible for describing only what the
hardware is supposed to be capable of. Does this mean the hardware needs to
find a way to pad 0's on lower quality data for any given rate?

For example, when I play 32b @32 KHz, everything works. If I play 16b at 32KHz,
I shouldn't change any output clocks, but will also present the data on a
32bit data bus as 16bits padded with 0? Or does it pack the data such that
the hardware needs to determine that it's in 16b mode, and pad the data
itself?

Thanks,
Rob


More information about the Alsa-devel mailing list