* [PATCH] ASoC: Intel: soc-acpi-cht: Add quirk for Nextbook Ares 8A tablet
@ 2023-04-29 10:47 Hans de Goede
2023-05-01 13:19 ` Pierre-Louis Bossart
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Hans de Goede @ 2023-04-29 10:47 UTC (permalink / raw)
To: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood,
Peter Ujfalusi, Mark Brown
Cc: Hans de Goede, alsa-devel
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>
---
.../intel/common/soc-acpi-intel-cht-match.c | 26 +++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/sound/soc/intel/common/soc-acpi-intel-cht-match.c b/sound/soc/intel/common/soc-acpi-intel-cht-match.c
index 6beb00858c33..cdcbf04b8832 100644
--- a/sound/soc/intel/common/soc-acpi-intel-cht-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-cht-match.c
@@ -50,6 +50,31 @@ static struct snd_soc_acpi_mach *cht_quirk(void *arg)
return mach;
}
+/*
+ * Some tablets with Android factory OS have buggy DSDTs with an ESSX8316 device
+ * in the ACPI tables. While they are not using an ESS8316 codec. These DSDTs
+ * also have an ACPI device for the correct codec, ignore the ESSX8316.
+ */
+static const struct dmi_system_id cht_ess8316_not_present_table[] = {
+ {
+ /* Nextbook Ares 8A */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "CherryTrail"),
+ DMI_MATCH(DMI_BIOS_VERSION, "M882"),
+ },
+ },
+ { }
+};
+
+static struct snd_soc_acpi_mach *cht_ess8316_quirk(void *arg)
+{
+ if (dmi_check_system(cht_ess8316_not_present_table))
+ return NULL;
+
+ return arg;
+}
+
static const struct snd_soc_acpi_codecs rt5640_comp_ids = {
.num_codecs = 2,
.codecs = { "10EC5640", "10EC3276" },
@@ -113,6 +138,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[] = {
.drv_name = "bytcht_es8316",
.fw_filename = "intel/fw_sst_22a8.bin",
.board = "bytcht_es8316",
+ .machine_quirk = cht_ess8316_quirk,
.sof_tplg_filename = "sof-cht-es8316.tplg",
},
/* some CHT-T platforms rely on RT5640, use Baytrail machine driver */
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: Intel: soc-acpi-cht: Add quirk for Nextbook Ares 8A tablet
2023-04-29 10:47 [PATCH] ASoC: Intel: soc-acpi-cht: Add quirk for Nextbook Ares 8A tablet Hans de Goede
@ 2023-05-01 13:19 ` Pierre-Louis Bossart
2023-05-04 3:20 ` Mark, Brown, broonie
2023-05-04 4:10 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Pierre-Louis Bossart @ 2023-05-01 13:19 UTC (permalink / raw)
To: Hans de Goede, Cezary Rojewski, Liam Girdwood, Peter Ujfalusi,
Mark Brown
Cc: alsa-devel
On 4/29/23 05:47, Hans de Goede wrote:
> 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>
It took me a while to understand the logic: the ES8316 device is ignored
so the matching code keeps going until it finds the rt5651 later in the
table
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> ---
> .../intel/common/soc-acpi-intel-cht-match.c | 26 +++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/sound/soc/intel/common/soc-acpi-intel-cht-match.c b/sound/soc/intel/common/soc-acpi-intel-cht-match.c
> index 6beb00858c33..cdcbf04b8832 100644
> --- a/sound/soc/intel/common/soc-acpi-intel-cht-match.c
> +++ b/sound/soc/intel/common/soc-acpi-intel-cht-match.c
> @@ -50,6 +50,31 @@ static struct snd_soc_acpi_mach *cht_quirk(void *arg)
> return mach;
> }
>
> +/*
> + * Some tablets with Android factory OS have buggy DSDTs with an ESSX8316 device
> + * in the ACPI tables. While they are not using an ESS8316 codec. These DSDTs
> + * also have an ACPI device for the correct codec, ignore the ESSX8316.
> + */
> +static const struct dmi_system_id cht_ess8316_not_present_table[] = {
> + {
> + /* Nextbook Ares 8A */
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "CherryTrail"),
> + DMI_MATCH(DMI_BIOS_VERSION, "M882"),
> + },
> + },
> + { }
> +};
> +
> +static struct snd_soc_acpi_mach *cht_ess8316_quirk(void *arg)
> +{
> + if (dmi_check_system(cht_ess8316_not_present_table))
> + return NULL;
> +
> + return arg;
> +}
> +
> static const struct snd_soc_acpi_codecs rt5640_comp_ids = {
> .num_codecs = 2,
> .codecs = { "10EC5640", "10EC3276" },
> @@ -113,6 +138,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[] = {
> .drv_name = "bytcht_es8316",
> .fw_filename = "intel/fw_sst_22a8.bin",
> .board = "bytcht_es8316",
> + .machine_quirk = cht_ess8316_quirk,
> .sof_tplg_filename = "sof-cht-es8316.tplg",
> },
> /* some CHT-T platforms rely on RT5640, use Baytrail machine driver */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: Intel: soc-acpi-cht: Add quirk for Nextbook Ares 8A tablet
2023-04-29 10:47 [PATCH] ASoC: Intel: soc-acpi-cht: Add quirk for Nextbook Ares 8A tablet Hans de Goede
2023-05-01 13:19 ` Pierre-Louis Bossart
@ 2023-05-04 3:20 ` Mark, Brown, broonie
2023-05-04 4:10 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Mark, Brown, broonie @ 2023-05-04 3:20 UTC (permalink / raw)
To: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood,
Peter Ujfalusi, Hans de Goede
Cc: alsa-devel
On Sat, 29 Apr 2023 12:47:21 +0200, Hans de Goede wrote:
> 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.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: Intel: soc-acpi-cht: Add quirk for Nextbook Ares 8A tablet
commit: ec6f82b4c63cc68f8dc03316e725106d242706be
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: Intel: soc-acpi-cht: Add quirk for Nextbook Ares 8A tablet
2023-04-29 10:47 [PATCH] ASoC: Intel: soc-acpi-cht: Add quirk for Nextbook Ares 8A tablet Hans de Goede
2023-05-01 13:19 ` Pierre-Louis Bossart
2023-05-04 3:20 ` Mark, Brown, broonie
@ 2023-05-04 4:10 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2023-05-04 4:10 UTC (permalink / raw)
To: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood,
Peter Ujfalusi, Hans de Goede
Cc: alsa-devel
On Sat, 29 Apr 2023 12:47:21 +0200, Hans de Goede wrote:
> 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.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: Intel: soc-acpi-cht: Add quirk for Nextbook Ares 8A tablet
commit: ec6f82b4c63cc68f8dc03316e725106d242706be
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-04 6:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-29 10:47 [PATCH] ASoC: Intel: soc-acpi-cht: Add quirk for Nextbook Ares 8A tablet Hans de Goede
2023-05-01 13:19 ` Pierre-Louis Bossart
2023-05-04 3:20 ` Mark, Brown, broonie
2023-05-04 4:10 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox