Variable mclk-fs in ASoC audio cards?

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

 



Greetings fellow ALSAers :)

Over the past month I have been working on a driver for the 8-channel TDM
CS5368 audio codec. However I've run in to an interesting snag that seems to
be an open problem. Let me explain.

The audio codec generally runs at 8 channels of 32-bit data, so:
MCLK = BCLK = LRCK * 256

However it is possible to read 4 or 2 channels instead:
MCLK = BCLK = LRCK * 128
MCLK = BCLK = LRCK * 64

This trade-off allows avoiding high frequency clocking at the expense of a
reduced channel count.

>From what I current see the way to indicate the multiplier here is using
mclk-fs in the device tree, but this would mean effectively fixing the channel
count in the device tree.

I have searched around found someone has suggested mapping mclk-fs to rates here:
https://lore.kernel.org/all/CAEnQRZDpJu27_pB=-ZYQjsNPC8eA4-Ur-36niT2hCosMWtC7jw@xxxxxxxxxxxxxx/T/#u

This functionality is somewhat adjacent to it, but I was wondering if it would
be better to somehow factor dai-tdm-slot-* in to mclk-fs calculation.

Perhaps mclk-fs could be divided by dai-tdm-slot-num then multiplied by slots?

Has anyone hit this problem before? How did you solve it?

John.



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

  Powered by Linux