summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
diff options
context:
space:
mode:
authorHui Wang <hui.wang@canonical.com>2019-04-29 11:44:07 +0800
committerMark Brown <broonie@kernel.org>2019-05-02 11:36:35 +0900
commit406dcbc55a0a20fd155be889a4a0c4b812f7c18e (patch)
tree4237ad23c98061d85201d6b0d4c27f35cd443c18 /sound/soc/codecs
parent903c220b1ece12f17c868e43f2243b8f81ff2d4c (diff)
downloadlinux-406dcbc55a0a20fd155be889a4a0c4b812f7c18e.tar.gz
linux-406dcbc55a0a20fd155be889a4a0c4b812f7c18e.tar.bz2
linux-406dcbc55a0a20fd155be889a4a0c4b812f7c18e.zip
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 Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/rt5645.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index f842775dbf2c..cd45d41df4ec 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -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,
+ },
{ }
};