Skip to contentSkip to conversation

ASoC: cs42l73: If Internal MCLK is >= 6.4MHz, then set SCLK to 64*Fs.

PATCH Applied Paul Handrigan 3 participants 3 messages Mar 5, 2013 – Mar 6, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: cs42l73: If Internal MCLK is >= 6.4MHz, then set SCLK to 64*Fs.

---
 sound/soc/codecs/cs42l73.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
sound/soc/codecs/cs42l73.c +5 -1
index 6361dab..3b20c86 100644
@@ -1180,7 +1180,11 @@ static int cs42l73_pcm_hw_params(struct snd_pcm_substream *substream,
 		priv->config[id].mmcc &= 0xC0;
 		priv->config[id].mmcc |= cs42l73_mclk_coeffs[mclk_coeff].mmcc;
 		priv->config[id].spc &= 0xFC;
-		priv->config[id].spc |= MCK_SCLK_MCLK;
+		/* Use SCLK=64*Fs if internal MCLK >= 6.4MHz */
+		if (priv->mclk >= 6400000)
+			priv->config[id].spc |= MCK_SCLK_64FS;
+		else
+			priv->config[id].spc |= MCK_SCLK_MCLK;
 	} else {
 		/* CS42L73 Slave */
 		priv->config[id].spc &= 0xFC;
Signature · 1 line
1.7.0.4