Skip to content

Commit 3ef3117

Browse files
committed
ASoC: es8336: don't invert jack detection on Huawei D15
Despite what DSM reports, jack detection is not inverted on this device. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent b0f5cf2 commit 3ef3117

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

sound/soc/codecs/es8316.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,9 @@ static void es8316_enable_jack_detect(struct snd_soc_component *component,
694694
if (device_property_read_bool(component->dev,
695695
"everest,jack-detect-inverted"))
696696
es8316->jd_inverted = true;
697+
if (device_property_read_bool(component->dev,
698+
"everest,jack-detect-not-inverted"))
699+
es8316->jd_inverted = false;
697700

698701
mutex_lock(&es8316->lock);
699702

sound/soc/intel/boards/sof_es8336.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
#define SOF_ES8336_OVERRIDE_DSM_LOW_HIGH BIT(9)
5353
#define SOF_ES8336_SPK_EN_LOW BIT(10)
5454
#define SOF_ES8336_HP_EN_LOW BIT(11)
55+
#define SOF_ES8336_JD_NOT_INVERTED BIT(12)
5556

5657
static unsigned long quirk;
5758

@@ -339,6 +340,7 @@ static const struct dmi_system_id sof_es8336_quirk_table[] = {
339340
DMI_MATCH(DMI_BOARD_NAME, "BOHB-WAX9-PCB-B2"),
340341
},
341342
.driver_data = (void *)(SOF_ES8336_SPEAKERS_EN_GPIO1_QUIRK |
343+
SOF_ES8336_JD_NOT_INVERTED |
342344
SOF_ES8336_OVERRIDE_DSM_LOW_HIGH |
343345
SOF_ES8336_HP_EN_LOW)
344346

@@ -692,6 +694,9 @@ static int sof_es8336_probe(struct platform_device *pdev)
692694

693695
if (quirk & SOF_ES8336_JD_INVERTED)
694696
props[cnt++] = PROPERTY_ENTRY_BOOL("everest,jack-detect-inverted");
697+
else if (quirk & SOF_ES8336_JD_NOT_INVERTED)
698+
props[cnt++] = PROPERTY_ENTRY_BOOL("everest,jack-detect-not-inverted");
699+
695700

696701
if (cnt) {
697702
fwnode = fwnode_create_software_node(props, NULL);

0 commit comments

Comments
 (0)