All of lore.kernel.org
 help / color / mirror / Atom feed
* Variable mclk-fs in ASoC audio cards?
@ 2024-03-22 11:13 John Watts
  0 siblings, 0 replies; only message in thread
From: John Watts @ 2024-03-22 11:13 UTC (permalink / raw)
  To: alsa-devel

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@mail.gmail.com/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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-22 11:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-22 11:13 Variable mclk-fs in ASoC audio cards? John Watts

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.