[alsa-devel] Stream format conversion in SoC driver

Giedrius Trainavičius giedrius.trainavicius at gmail.com
Thu Jan 5 02:09:43 CET 2017


Great! I managed to get 16 bit output to work just fine! Thank you!

After investigating related code and the PCM registers documentation,
turned out all I had to do was to call:

snd_soc_dai_set_bclk_ratio(dai, 32*2); // 32 bits for each of 2 channels

I've seen this method before, but its use / meaning wasn't obvious at
first...

However, recording using ADC generating 64 bit frames, 24 bit samples,
didn't work as expected when using 16bits... (it was producing noise mostly
in one channel, and less noise in the other) I haven't yet investigated
why, but will do.

Any way I can provide different sample format constraints for playback and
capture? (until 16 bit recording issue is resolved)

Thank you,
Giedrius.
​


More information about the Alsa-devel mailing list