Skip to contentSkip to conversation

ASoC: rt5645: Headphone Jack sense inverts on the LattePanda board

PATCH In review Hui Wang 2 participants 2 messages Apr 29, 2019 – May 2, 2019

Subsystems (3)
lore
Share & tools
lore

Hui Wang

author
#0 lore raw

PATCH 1/1 ASoC: rt5645: Headphone Jack sense inverts on the LattePanda board

The LattePanda board has a sound card chtrt5645, when there is nothing plugged in the headphone jack, the system thinks the headphone is plugged in, while we plug a headphone in the jack, the system thinks the headphone is unplugged.

If adding quirk=0x21 in the module parameter, the headphone jack can work well. So let us fix it via platform_data.

https://bugs.launchpad.net/bugs/182459

---
 sound/soc/codecs/rt5645.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
sound/soc/codecs/rt5645.c +14 -0
index 9a0751978090..a6064606424a 100644
@@ -3631,6 +3631,11 @@ static const struct rt5645_platform_data jd_mode3_platform_data = {
 	.jd_mode = 3,
 };
 
+static const struct rt5645_platform_data lattepanda_board_platform_data = {
+	.jd_mode = 2,
+	.inv_jd1_1 = true
+};
+
 static const struct dmi_system_id dmi_platform_data[] = {
 	{
 		.ident = "Chrome Buddy",
@@ -3728,6 +3733,15 @@ static const struct dmi_system_id dmi_platform_data[] = {
 		},
 		.driver_data = (void *)&intel_braswell_platform_data,
 	},
+	{
+		.ident = "LattePanda board",
+		.matches = {
+		  DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
+		  DMI_EXACT_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
+		  DMI_EXACT_MATCH(DMI_BOARD_VERSION, "Default string"),
+		},
+		.driver_data = (void *)&lattepanda_board_platform_data,
+	},
 	{ }
 };
 
Signature · 1 line
2.17.1
maintainer
#1 lore raw

Applied "ASoC: rt5645: Headphone Jack sense inverts on the LattePanda board" to the asoc tree

The patch

ASoC: rt5645: Headphone Jack sense inverts on the LattePanda board

has been applied to the asoc tree at

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

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

Quoted 1 line

From 406dcbc55a0a20fd155be889a4a0c4b812f7c18e Mon Sep 17 00:00:00 2001

From: Hui Wang <[email protected]>
Date: Mon, 29 Apr 2019 11:44:07 +0800
Subject: [PATCH] ASoC: rt5645: Headphone Jack sense inverts on the LattePanda
board

The LattePanda board has a sound card chtrt5645, when there is nothing plugged in the headphone jack, the system thinks the headphone is plugged in, while we plug a headphone in the jack, the system thinks the headphone is unplugged.

If adding quirk=0x21 in the module parameter, the headphone jack can work well. So let us fix it via platform_data.

https://bugs.launchpad.net/bugs/182459

---
 sound/soc/codecs/rt5645.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
sound/soc/codecs/rt5645.c +14 -0
index f842775dbf2c..cd45d41df4ec 100644
@@ -3634,6 +3634,11 @@ static const struct rt5645_platform_data jd_mode3_platform_data = {
 	.jd_mode = 3,
 };
 
+static const struct rt5645_platform_data lattepanda_board_platform_data = {
+	.jd_mode = 2,
+	.inv_jd1_1 = true
+};
+
 static const struct dmi_system_id dmi_platform_data[] = {
 	{
 		.ident = "Chrome Buddy",
@@ -3731,6 +3736,15 @@ static const struct dmi_system_id dmi_platform_data[] = {
 		},
 		.driver_data = (void *)&intel_braswell_platform_data,
 	},
+	{
+		.ident = "LattePanda board",
+		.matches = {
+		  DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
+		  DMI_EXACT_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
+		  DMI_EXACT_MATCH(DMI_BOARD_VERSION, "Default string"),
+		},
+		.driver_data = (void *)&lattepanda_board_platform_data,
+	},
 	{ }
 };
 
Signature · 1 line
2.20.1