Skip to content

Commit 1e44863

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 <mchehab@kernel.org>
1 parent de66690 commit 1e44863

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

@@ -311,6 +312,7 @@ static const struct dmi_system_id sof_es8336_quirk_table[] = {
311312
DMI_MATCH(DMI_BOARD_NAME, "BOHB-WAX9-PCB-B2"),
312313
},
313314
.driver_data = (void *)(SOF_ES8336_SPEAKERS_EN_GPIO1_QUIRK |
315+
SOF_ES8336_JD_NOT_INVERTED |
314316
SOF_ES8336_OVERRIDE_DSM_LOW_HIGH |
315317
SOF_ES8336_HP_EN_LOW)
316318

@@ -687,6 +689,9 @@ static int sof_es8336_probe(struct platform_device *pdev)
687689

688690
if (quirk & SOF_ES8336_JD_INVERTED)
689691
props[cnt++] = PROPERTY_ENTRY_BOOL("everest,jack-detect-inverted");
692+
else if (quirk & SOF_ES8336_JD_NOT_INVERTED)
693+
props[cnt++] = PROPERTY_ENTRY_BOOL("everest,jack-detect-not-inverted");
694+
690695

691696
if (cnt) {
692697
fwnode = fwnode_create_software_node(props, NULL);

0 commit comments

Comments
 (0)