* [PATCH] ASoC: da7219: software reset codec at probe
@ 2016-09-14 14:06 Xing Zheng
2016-09-14 17:15 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Xing Zheng @ 2016-09-14 14:06 UTC (permalink / raw)
To: linux-rockchip, Adam.Thomson.Opensource
Cc: cychiang, heiko, smbarber, hychao, dianders, Hsin-Yu Chao,
Xing Zheng, Support Opensource, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel
From: Hsin-Yu Chao <hychao@chromium.org>
On some platform da7219 codec has persistent power across reboot
so it doesn't reset and cause abnormal jack detection.
Workaround this issue by doing software reset at probe.
Signed-off-by: Hsin-Yu Chao <hychao@chromium.org>
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
---
sound/soc/codecs/da7219.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c
index 737e914..9d08c11 100644
--- a/sound/soc/codecs/da7219.c
+++ b/sound/soc/codecs/da7219.c
@@ -1941,6 +1941,14 @@ static int da7219_i2c_probe(struct i2c_client *i2c,
return ret;
}
+ /* Software reset codec. */
+ regmap_write_bits(da7219->regmap, DA7219_ACCDET_CONFIG_1,
+ DA7219_ACCDET_EN_MASK, 0);
+ regmap_write_bits(da7219->regmap, DA7219_CIF_CTRL,
+ DA7219_CIF_REG_SOFT_RESET_MASK, 0);
+ regmap_write_bits(da7219->regmap, DA7219_SYSTEM_ACTIVE,
+ DA7219_SYSTEM_ACTIVE_MASK, 0);
+
ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_da7219,
&da7219_dai, 1);
if (ret < 0) {
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Applied "ASoC: da7219: software reset codec at probe" to the asoc tree
@ 2016-09-14 17:15 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2016-09-14 17:15 UTC (permalink / raw)
To: Hsin-Yu Chao
Cc: Xing Zheng, Mark Brown, linux-rockchip, Adam.Thomson.Opensource,
alsa-devel, hychao, Xing Zheng, Support Opensource, linux-kernel,
Mark Brown, Takashi Iwai, heiko, Liam Girdwood, dianders,
smbarber, cychiang
The patch
ASoC: da7219: software reset codec at probe
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 96fc294cf6cb27f01a865959b9637d0aea3b57c2 Mon Sep 17 00:00:00 2001
From: Hsin-Yu Chao <hychao@chromium.org>
Date: Wed, 14 Sep 2016 22:25:40 +0800
Subject: [PATCH] ASoC: da7219: software reset codec at probe
Da7219 does not trigger interrupt to report jack status
when system boots from warm reset because its power
remains on during warm reset.
Doing software reset at probe to handle this.
Signed-off-by: Hsin-Yu Chao <hychao@chromium.org>
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/codecs/da7219.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c
index 50ea94317cb3..30f35e88bec2 100644
--- a/sound/soc/codecs/da7219.c
+++ b/sound/soc/codecs/da7219.c
@@ -1937,6 +1937,14 @@ static int da7219_i2c_probe(struct i2c_client *i2c,
return ret;
}
+ /* Software reset codec. */
+ regmap_write_bits(da7219->regmap, DA7219_ACCDET_CONFIG_1,
+ DA7219_ACCDET_EN_MASK, 0);
+ regmap_write_bits(da7219->regmap, DA7219_CIF_CTRL,
+ DA7219_CIF_REG_SOFT_RESET_MASK, 0);
+ regmap_write_bits(da7219->regmap, DA7219_SYSTEM_ACTIVE,
+ DA7219_SYSTEM_ACTIVE_MASK, 0);
+
ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_da7219,
&da7219_dai, 1);
if (ret < 0) {
--
2.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Applied "ASoC: da7219: software reset codec at probe" to the asoc tree
@ 2016-09-14 17:15 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2016-09-14 17:15 UTC (permalink / raw)
To: Hsin-Yu Chao
Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
cychiang-hpIqsD4AKlfQT0dZR+AlfA, hychao-hpIqsD4AKlfQT0dZR+AlfA,
Xing Zheng, Liam Girdwood, heiko-4mtYJXux2i+zQB+pC5nmwQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Takashi Iwai,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mark Brown,
smbarber-hpIqsD4AKlfQT0dZR+AlfA,
Adam.Thomson.Opensource-WBD+wuPFNBhBDgjK7y7TUQ,
dianders-hpIqsD4AKlfQT0dZR+AlfA, Support Opensource
The patch
ASoC: da7219: software reset codec at probe
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 96fc294cf6cb27f01a865959b9637d0aea3b57c2 Mon Sep 17 00:00:00 2001
From: Hsin-Yu Chao <hychao-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Date: Wed, 14 Sep 2016 22:25:40 +0800
Subject: [PATCH] ASoC: da7219: software reset codec at probe
Da7219 does not trigger interrupt to report jack status
when system boots from warm reset because its power
remains on during warm reset.
Doing software reset at probe to handle this.
Signed-off-by: Hsin-Yu Chao <hychao-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Signed-off-by: Xing Zheng <zhengxing-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Signed-off-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
sound/soc/codecs/da7219.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c
index 50ea94317cb3..30f35e88bec2 100644
--- a/sound/soc/codecs/da7219.c
+++ b/sound/soc/codecs/da7219.c
@@ -1937,6 +1937,14 @@ static int da7219_i2c_probe(struct i2c_client *i2c,
return ret;
}
+ /* Software reset codec. */
+ regmap_write_bits(da7219->regmap, DA7219_ACCDET_CONFIG_1,
+ DA7219_ACCDET_EN_MASK, 0);
+ regmap_write_bits(da7219->regmap, DA7219_CIF_CTRL,
+ DA7219_CIF_REG_SOFT_RESET_MASK, 0);
+ regmap_write_bits(da7219->regmap, DA7219_SYSTEM_ACTIVE,
+ DA7219_SYSTEM_ACTIVE_MASK, 0);
+
ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_da7219,
&da7219_dai, 1);
if (ret < 0) {
--
2.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Applied "ASoC: da7219: software reset codec at probe" to the asoc tree
@ 2016-09-14 17:15 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2016-09-14 17:15 UTC (permalink / raw)
To: Hsin-Yu Chao
Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
cychiang-hpIqsD4AKlfQT0dZR+AlfA, hychao-hpIqsD4AKlfQT0dZR+AlfA,
Xing Zheng, Liam Girdwood, heiko-4mtYJXux2i+zQB+pC5nmwQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Takashi Iwai,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mark Brown,
smbarber-hpIqsD4AKlfQT0dZR+AlfA,
Adam.Thomson.Opensource-WBD+wuPFNBhBDgjK7y7TUQ,
dianders-hpIqsD4AKlfQT0dZR+AlfA, Support Opensource
The patch
ASoC: da7219: software reset codec at probe
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
From 96fc294cf6cb27f01a865959b9637d0aea3b57c2 Mon Sep 17 00:00:00 2001
From: Hsin-Yu Chao <hychao-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Date: Wed, 14 Sep 2016 22:25:40 +0800
Subject: [PATCH] ASoC: da7219: software reset codec at probe
Da7219 does not trigger interrupt to report jack status
when system boots from warm reset because its power
remains on during warm reset.
Doing software reset at probe to handle this.
Signed-off-by: Hsin-Yu Chao <hychao-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Signed-off-by: Xing Zheng <zhengxing-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Signed-off-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
sound/soc/codecs/da7219.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c
index 50ea94317cb3..30f35e88bec2 100644
--- a/sound/soc/codecs/da7219.c
+++ b/sound/soc/codecs/da7219.c
@@ -1937,6 +1937,14 @@ static int da7219_i2c_probe(struct i2c_client *i2c,
return ret;
}
+ /* Software reset codec. */
+ regmap_write_bits(da7219->regmap, DA7219_ACCDET_CONFIG_1,
+ DA7219_ACCDET_EN_MASK, 0);
+ regmap_write_bits(da7219->regmap, DA7219_CIF_CTRL,
+ DA7219_CIF_REG_SOFT_RESET_MASK, 0);
+ regmap_write_bits(da7219->regmap, DA7219_SYSTEM_ACTIVE,
+ DA7219_SYSTEM_ACTIVE_MASK, 0);
+
ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_da7219,
&da7219_dai, 1);
if (ret < 0) {
--
2.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-14 17:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-14 14:06 [PATCH] ASoC: da7219: software reset codec at probe Xing Zheng
2016-09-14 17:15 ` Applied "ASoC: da7219: software reset codec at probe" to the asoc tree Mark Brown
2016-09-14 17:15 ` Mark Brown
2016-09-14 17:15 ` 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.