* [PATCH] ASoC: rt5640: Fix the wrong state of the JD in the HDA header
@ 2021-12-01 9:56 Oder Chiou
2021-12-01 12:41 ` Mark Brown
2021-12-02 13:40 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Oder Chiou @ 2021-12-01 9:56 UTC (permalink / raw)
To: broonie, lgirdwood
Cc: Oder Chiou, jack.yu, alsa-devel, jacal_tseng, danielz, spujar,
albertchen, derek.fang, shumingf, flove
The patch fixes the wrong state of the JD with 1M pull up resistor in the
HDA header.
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
---
sound/soc/codecs/rt5640.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index 08b37878cb00..f3659b14c74e 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -1973,7 +1973,7 @@ static int rt5640_set_bias_level(struct snd_soc_component *component,
RT5640_PWR_FV1 | RT5640_PWR_FV2,
RT5640_PWR_FV1 | RT5640_PWR_FV2);
snd_soc_component_update_bits(component, RT5640_DUMMY1,
- 0x0301, 0x0301);
+ 0x1, 0x1);
snd_soc_component_update_bits(component, RT5640_MICBIAS,
0x0030, 0x0030);
}
@@ -2533,7 +2533,7 @@ static void rt5640_enable_hda_jack_detect(
snd_soc_component_update_bits(component, RT5640_GPIO_CTRL3,
RT5640_GP1_PF_MASK, RT5640_GP1_PF_OUT);
- snd_soc_component_update_bits(component, RT5640_DUMMY1, 0x700, 0x300);
+ snd_soc_component_update_bits(component, RT5640_DUMMY1, 0x400, 0x0);
rt5640->jack = jack;
@@ -2651,13 +2651,16 @@ static int rt5640_probe(struct snd_soc_component *component)
if (device_property_read_u32(component->dev,
"realtek,jack-detect-source", &val) == 0) {
- if (val <= RT5640_JD_SRC_GPIO4)
+ if (val <= RT5640_JD_SRC_GPIO4) {
rt5640->jd_src = val << RT5640_JD_SFT;
- else if (val == RT5640_JD_SRC_HDA_HEADER)
+ } else if (val == RT5640_JD_SRC_HDA_HEADER) {
rt5640->jd_src = RT5640_JD_SRC_HDA_HEADER;
- else
+ snd_soc_component_update_bits(component, RT5640_DUMMY1,
+ 0x0300, 0x0);
+ } else {
dev_warn(component->dev, "Warning: Invalid jack-detect-source value: %d, leaving jack-detect disabled\n",
val);
+ }
}
if (!device_property_read_bool(component->dev, "realtek,jack-detect-not-inverted"))
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: rt5640: Fix the wrong state of the JD in the HDA header
2021-12-01 9:56 [PATCH] ASoC: rt5640: Fix the wrong state of the JD in the HDA header Oder Chiou
@ 2021-12-01 12:41 ` Mark Brown
2021-12-02 13:40 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2021-12-01 12:41 UTC (permalink / raw)
To: Oder Chiou
Cc: jack.yu, alsa-devel, jacal_tseng, danielz, spujar, lgirdwood,
albertchen, derek.fang, shumingf, flove
[-- Attachment #1: Type: text/plain, Size: 220 bytes --]
On Wed, Dec 01, 2021 at 05:56:29PM +0800, Oder Chiou wrote:
> The patch fixes the wrong state of the JD with 1M pull up resistor in the
> HDA header.
Does every system have this pull up or will this need some quirking?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: rt5640: Fix the wrong state of the JD in the HDA header
2021-12-01 9:56 [PATCH] ASoC: rt5640: Fix the wrong state of the JD in the HDA header Oder Chiou
2021-12-01 12:41 ` Mark Brown
@ 2021-12-02 13:40 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2021-12-02 13:40 UTC (permalink / raw)
To: lgirdwood, Oder Chiou
Cc: jack.yu, alsa-devel, jacal_tseng, danielz, spujar, albertchen,
derek.fang, shumingf, flove
On Wed, 1 Dec 2021 17:56:29 +0800, Oder Chiou wrote:
> The patch fixes the wrong state of the JD with 1M pull up resistor in the
> HDA header.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: rt5640: Fix the wrong state of the JD in the HDA header
commit: e3dd4424c2f40aae9080667c4da42b0d7f9be711
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-02 13:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-01 9:56 [PATCH] ASoC: rt5640: Fix the wrong state of the JD in the HDA header Oder Chiou
2021-12-01 12:41 ` Mark Brown
2021-12-02 13:40 ` 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.