All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] ASoC: rt5645: Prevent the pop sound of the headphone while rebooting or shutdowning
@ 2015-08-24 12:32 Oder Chiou
  2015-08-24 12:32 ` [PATCH 2/5] ASoC: rt5645: Modify the headphone depop and calibration function to prevent the pop sound in the booting time Oder Chiou
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Oder Chiou @ 2015-08-24 12:32 UTC (permalink / raw)
  To: broonie, lgirdwood
  Cc: Oder Chiou, alsa-devel, john.lin, woojoo.lee, bardliao, flove

Add i2c shutdown function to prevent the pop sound of the headphone while
the system is rebooting or shutdowning

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
---
 sound/soc/codecs/rt5645.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index e5fef8f..4189d5a 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3490,13 +3490,23 @@ static int rt5645_i2c_remove(struct i2c_client *i2c)
 	return 0;
 }
 
+static void rt5645_i2c_shutdown(struct i2c_client *i2c)
+{
+	struct rt5645_priv *rt5645 = i2c_get_clientdata(i2c);
+
+	regmap_update_bits(rt5645->regmap, RT5645_GEN_CTRL3, 0x0020, 0x0020);
+	regmap_update_bits(rt5645->regmap, RT5645_IN1_CTRL2, 0x1000, 0x1000);
+	regmap_update_bits(rt5645->regmap, RT5645_IN1_CTRL1, 0x0004, 0x0000);
+}
+
 static struct i2c_driver rt5645_i2c_driver = {
 	.driver = {
 		.name = "rt5645",
 		.acpi_match_table = ACPI_PTR(rt5645_acpi_match),
 	},
 	.probe = rt5645_i2c_probe,
-	.remove   = rt5645_i2c_remove,
+	.remove = rt5645_i2c_remove,
+	.shutdown = rt5645_i2c_shutdown,
 	.id_table = rt5645_i2c_id,
 };
 module_i2c_driver(rt5645_i2c_driver);
-- 
1.8.1.1.439.g50a6b54

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

end of thread, other threads:[~2015-08-26 10:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-24 12:32 [PATCH 1/5] ASoC: rt5645: Prevent the pop sound of the headphone while rebooting or shutdowning Oder Chiou
2015-08-24 12:32 ` [PATCH 2/5] ASoC: rt5645: Modify the headphone depop and calibration function to prevent the pop sound in the booting time Oder Chiou
2015-08-25 18:13   ` Applied "ASoC: rt5645: Modify the headphone depop and calibration function to prevent the pop sound in the booting time" to the asoc tree Mark Brown
2015-08-24 12:32 ` [PATCH 3/5] ASoC: rt5645: Modify the jack detection function to prevent the pop sound while the jack plug in Oder Chiou
2015-08-25 18:13   ` Applied "ASoC: rt5645: Modify the jack detection function to prevent the pop sound while the jack plug in" to the asoc tree Mark Brown
2015-08-24 12:32 ` [PATCH 4/5] ASoC: rt5645: Remove the incorrect setting of the JD mode Oder Chiou
2015-08-25 18:13   ` Applied "ASoC: rt5645: Remove the incorrect setting of the JD mode" to the asoc tree Mark Brown
2015-08-24 12:32 ` [PATCH 5/5] ASoC: rt5645: Add the register RT5645_CHARGE_PUMP to readable check function Oder Chiou
2015-08-25 18:13   ` Applied "ASoC: rt5645: Add the register RT5645_CHARGE_PUMP to readable check function" to the asoc tree Mark Brown
2015-08-25 17:57 ` [PATCH 1/5] ASoC: rt5645: Prevent the pop sound of the headphone while rebooting or shutdowning Mark Brown
2015-08-26  2:17   ` Oder Chiou
2015-08-26 10:51     ` 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.