Skip to contentSkip to conversation

ASoC: rt5640: enable MCLK detection

PATCH Superseded Bard Liao 2 participants 2 messages Oct 17, 2016

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Bard Liao

author
#0 lore raw

PATCH 1/1 ASoC: rt5640: enable MCLK detection

Enable MCLK detection.

---
 sound/soc/codecs/rt5640.c | 3 +++
 sound/soc/codecs/rt5640.h | 2 ++
 2 files changed, 5 insertions(+)
sound/soc/codecs/rt5640.c +3 -0
index 3cc1135..0a7378f 100644
@@ -2407,6 +2407,9 @@ static int rt5640_i2c_probe(struct i2c_client *i2c,
 	if (ret != 0)
 		dev_warn(&i2c->dev, "Failed to apply regmap patch: %d\n", ret);
 
+	regmap_update_bits(rt5640->regmap, RT5640_DUMMY1,
+				RT5640_MCLK_DET, RT5640_MCLK_DET);
+
 	if (rt5640->pdata.in1_diff)
 		regmap_update_bits(rt5640->regmap, RT5640_IN1_IN2,
 					RT5640_IN_DF1, RT5640_IN_DF1);
sound/soc/codecs/rt5640.h +2 -0
index 90c8871..22c017c 100644
@@ -1970,6 +1970,8 @@
 #define RT5640_ZCD_HP_DIS			(0x0 << 15)
 #define RT5640_ZCD_HP_EN			(0x1 << 15)
 
+/* General Control 1 (0xfa) */
+#define RT5640_MCLK_DET				(0x1 << 11)
 
 /* Codec Private Register definition */
 /* 3D Speaker Control (0x63) */
Signature · 1 line
1.8.1.1.439.g50a6b54
#1 lore raw
Quoted 1 line · Bard Liao

Enable MCLK detection.

The commit message can be a bit improved. It should explain what MCLK detection is and why it should be enabled and what the advantages of that are.