Skip to content

Commit

Permalink
ASoC: es8336: Add support for Huawei Matebook 14 2021
Browse files Browse the repository at this point in the history
This notebook also requires quirks as BIOS is incorrect for
speaker/headset GPIOs.

According with _DSM:
	[    4.027413] es8316 i2c-ESSX8336:00: PLATFORM_HPDET_INV_ARG=0x1

However, jack is not inverted on this device.

The speaker/headphone output on this device is:
	speaker gpio 0 active high, headphone gpio 1 active low

However, _DSM reports only:
	[    4.030564] es8316 i2c-ESSX8336:00: SPK_CTL_IO_LEVEL_ARG=0x1
Missing information about headphone active on low.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
mchehab committed Dec 31, 2023
1 parent 1e44863 commit 64af6a2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion sound/soc/intel/boards/sof_es8336.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,14 +308,25 @@ static const struct dmi_system_id sof_es8336_quirk_table[] = {
{
.callback = sof_es8336_quirk_cb,
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "HUAWEI"),
DMI_MATCH(DMI_SYS_VENDOR, "HUAWEI"), /* Matebook D15 2020 */
DMI_MATCH(DMI_BOARD_NAME, "BOHB-WAX9-PCB-B2"),
},
.driver_data = (void *)(SOF_ES8336_SPEAKERS_EN_GPIO1_QUIRK |
SOF_ES8336_JD_NOT_INVERTED |
SOF_ES8336_OVERRIDE_DSM_LOW_HIGH |
SOF_ES8336_HP_EN_LOW)

},
{
.callback = sof_es8336_quirk_cb,
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "HUAWEI"), /* Matebook 14 2021 */
DMI_MATCH(DMI_BOARD_NAME, "NBD-WXX9-PCB-B3"),
},
.driver_data = (void *)(SOF_ES8336_JD_NOT_INVERTED |
SOF_ES8336_OVERRIDE_DSM_LOW_HIGH|
SOF_ES8336_HP_EN_LOW)

},
{}
};
Expand Down

0 comments on commit 64af6a2

Please sign in to comment.