Skip to contentSkip to conversation

ASoC: rt286: fix unexpected interrupt happens

PATCH In review [email protected] 3 participants 3 messages Jul 9, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: rt286: fix unexpected interrupt happens

From: Shuming Fan <[email protected]>

The HV/VREF should not turn off if the headphone jack plug-in. This patch could solve the unexpected interrupt issue in some devices.

---
 sound/soc/codecs/rt286.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/rt286.c +4 -4
index 9593a9a27bf8..e8d14eefc41b 100644
@@ -272,13 +272,13 @@ static int rt286_jack_detect(struct rt286_priv *rt286, bool *hp, bool *mic)
 		regmap_read(rt286->regmap, RT286_GET_MIC1_SENSE, &buf);
 		*mic = buf & 0x80000000;
 	}
-	if (!*mic) {
+
+	if (!*hp) {
 		snd_soc_dapm_disable_pin(dapm, "HV");
 		snd_soc_dapm_disable_pin(dapm, "VREF");
-	}
-	if (!*hp)
 		snd_soc_dapm_disable_pin(dapm, "LDO1");
-	snd_soc_dapm_sync(dapm);
+		snd_soc_dapm_sync(dapm);
+	}
 
 	return 0;
 }
Signature · 1 line
2.27.0
#1 lore raw
Quoted 6 lines · On 7/9/20 5:13 AM, [email protected] wrote:

From: Shuming Fan <[email protected]>

The HV/VREF should not turn off if the headphone jack plug-in. This patch could solve the unexpected interrupt issue in some devices.

For more context, this patch removes a recurring click with a ~1s period audible with headphones on Dell XPS13-9343.

Quoted 28 lines
---
  sound/soc/codecs/rt286.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/rt286.c +4 -4
index 9593a9a27bf8..e8d14eefc41b 100644
@@ -272,13 +272,13 @@ static int rt286_jack_detect(struct rt286_priv *rt286, bool *hp, bool *mic)
  		regmap_read(rt286->regmap, RT286_GET_MIC1_SENSE, &buf);
  		*mic = buf & 0x80000000;
  	}
-	if (!*mic) {
+
+	if (!*hp) {
  		snd_soc_dapm_disable_pin(dapm, "HV");
  		snd_soc_dapm_disable_pin(dapm, "VREF");
-	}
-	if (!*hp)
  		snd_soc_dapm_disable_pin(dapm, "LDO1");
-	snd_soc_dapm_sync(dapm);
+		snd_soc_dapm_sync(dapm);
+	}
 
  	return 0;
  }
maintainer
#2 lore raw
In reply to [email protected]
Quoted 2 lines · On Thu, 9 Jul 2020 18:13:45 +0800, [email protected] wrote:

The HV/VREF should not turn off if the headphone jack plug-in. This patch could solve the unexpected interrupt issue in some devices.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: rt286: fix unexpected interrupt happens

      commit: 12eb3ad0638c2a6af72de866e9d7837de16ee82f

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