All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: rt5640: enable MCLK detection
@ 2016-10-17 10:26 Bard Liao
  2016-10-17 10:49 ` Lars-Peter Clausen
  0 siblings, 1 reply; 2+ messages in thread
From: Bard Liao @ 2016-10-17 10:26 UTC (permalink / raw)
  To: broonie, lgirdwood
  Cc: oder_chiou, jack.yu, alsa-devel, lars, shumingf, Bard Liao, flove

Enable MCLK detection.

Signed-off-by: Bard Liao <bardliao@realtek.com>
---
 sound/soc/codecs/rt5640.c | 3 +++
 sound/soc/codecs/rt5640.h | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index 3cc1135..0a7378f 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -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);
diff --git a/sound/soc/codecs/rt5640.h b/sound/soc/codecs/rt5640.h
index 90c8871..22c017c 100644
--- a/sound/soc/codecs/rt5640.h
+++ b/sound/soc/codecs/rt5640.h
@@ -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) */
-- 
1.8.1.1.439.g50a6b54

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: rt5640: enable MCLK detection
  2016-10-17 10:26 [PATCH] ASoC: rt5640: enable MCLK detection Bard Liao
@ 2016-10-17 10:49 ` Lars-Peter Clausen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars-Peter Clausen @ 2016-10-17 10:49 UTC (permalink / raw)
  To: Bard Liao, broonie, lgirdwood
  Cc: oder_chiou, jack.yu, alsa-devel, shumingf, flove

On 10/17/2016 12:26 PM, Bard Liao wrote:
> 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-17 10:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-17 10:26 [PATCH] ASoC: rt5640: enable MCLK detection Bard Liao
2016-10-17 10:49 ` Lars-Peter Clausen

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.