Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: Intel: soc-acpi-cht: Add quirk for Nextbook Ares 8A tablet

The Nextbook Ares 8A tablet which has Android as factory OS, has a buggy
DSDT with both ESSX8316 and 10EC5651 ACPI devices.

This tablet actually uses an rt5651 codec, but the matching code ends up
picking the ESSX8316 device, add a quirk to ignote the ESSX8316 device
on this tablet.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Message-Id: <20230429104721.7176-1-hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Hans de Goede and committed by
Mark Brown
ec6f82b4 4a1b5bc7

+26
+26
sound/soc/intel/common/soc-acpi-intel-cht-match.c
··· 50 50 return mach; 51 51 } 52 52 53 + /* 54 + * Some tablets with Android factory OS have buggy DSDTs with an ESSX8316 device 55 + * in the ACPI tables. While they are not using an ESS8316 codec. These DSDTs 56 + * also have an ACPI device for the correct codec, ignore the ESSX8316. 57 + */ 58 + static const struct dmi_system_id cht_ess8316_not_present_table[] = { 59 + { 60 + /* Nextbook Ares 8A */ 61 + .matches = { 62 + DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), 63 + DMI_MATCH(DMI_PRODUCT_NAME, "CherryTrail"), 64 + DMI_MATCH(DMI_BIOS_VERSION, "M882"), 65 + }, 66 + }, 67 + { } 68 + }; 69 + 70 + static struct snd_soc_acpi_mach *cht_ess8316_quirk(void *arg) 71 + { 72 + if (dmi_check_system(cht_ess8316_not_present_table)) 73 + return NULL; 74 + 75 + return arg; 76 + } 77 + 53 78 static const struct snd_soc_acpi_codecs rt5640_comp_ids = { 54 79 .num_codecs = 2, 55 80 .codecs = { "10EC5640", "10EC3276" }, ··· 138 113 .drv_name = "bytcht_es8316", 139 114 .fw_filename = "intel/fw_sst_22a8.bin", 140 115 .board = "bytcht_es8316", 116 + .machine_quirk = cht_ess8316_quirk, 141 117 .sof_tplg_filename = "sof-cht-es8316.tplg", 142 118 }, 143 119 /* some CHT-T platforms rely on RT5640, use Baytrail machine driver */