All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: rt298: fix jack type detect error
@ 2016-10-24 10:32 Bard Liao
  2016-10-24 10:32 ` [PATCH 2/2] ASoC: rt298: disable IRQ when jack is NULL Bard Liao
  0 siblings, 1 reply; 3+ messages in thread
From: Bard Liao @ 2016-10-24 10:32 UTC (permalink / raw)
  To: broonie, lgirdwood
  Cc: oder_chiou, jack.yu, alsa-devel, lars, vinod.koul, Bard Liao,
	shumingf, senthilnathanx.veppur, flove

rt298_jack_detect may be called before card is instantiated. And
snd_soc_dapm_force_enable_pin will not work in that case. So, update
bit manually by regmap_update_bits.

Signed-off-by: Bard Liao <bardliao@realtek.com>
---
 sound/soc/codecs/rt298.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sound/soc/codecs/rt298.c b/sound/soc/codecs/rt298.c
index f80cfe4..dceffe9 100644
--- a/sound/soc/codecs/rt298.c
+++ b/sound/soc/codecs/rt298.c
@@ -249,6 +249,11 @@ static int rt298_jack_detect(struct rt298_priv *rt298, bool *hp, bool *mic)
 			snd_soc_dapm_force_enable_pin(dapm, "LDO1");
 			snd_soc_dapm_sync(dapm);
 
+			regmap_update_bits(rt298->regmap,
+				RT298_POWER_CTRL1, 0x1001, 0);
+			regmap_update_bits(rt298->regmap,
+				RT298_POWER_CTRL2, 0x4, 0x4);
+
 			regmap_write(rt298->regmap, RT298_SET_MIC1, 0x24);
 			msleep(50);
 
-- 
1.8.1.1.439.g50a6b54

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

end of thread, other threads:[~2016-11-29 11:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-24 10:32 [PATCH 1/2] ASoC: rt298: fix jack type detect error Bard Liao
2016-10-24 10:32 ` [PATCH 2/2] ASoC: rt298: disable IRQ when jack is NULL Bard Liao
2016-11-29 11:44   ` Applied "ASoC: rt298: disable IRQ when jack is NULL" to the asoc tree Mark Brown

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.