From d9b501dbac023995d30070ef4f64789dea3db708 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Tue, 25 Aug 2026 12:54:01 +0300 Subject: [PATCH 1/2] ASoC: SOF: Intel: hda: add quirk for Fujitsu LIFEBOOK U7412 with PDM1 dmic Add a quirk to force a PDM1 DMIC topology on systems where PCH DMIC is connected to PDM1 and not PDM0. Link: https://github.com/thesofproject/linux/issues/5949 Signed-off-by: Kai Vehmanen --- .../intel/common/soc-acpi-intel-hda-match.c | 29 +++++++++++++++++++ sound/soc/sof/intel/hda.c | 19 +++++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/common/soc-acpi-intel-hda-match.c b/sound/soc/intel/common/soc-acpi-intel-hda-match.c index e93336e27bebd7..022f0137aacbbf 100644 --- a/sound/soc/intel/common/soc-acpi-intel-hda-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-hda-match.c @@ -6,13 +6,42 @@ * */ +#include #include #include +static const struct dmi_system_id hda_pdm1_dmic[] = { + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU CLIENT COMPUTING LIMITED"), + DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK U7412"), + DMI_MATCH(DMI_PRODUCT_SKU, "SK00ICPS"), + }, + }, + { } +}; + +static struct snd_soc_acpi_mach intel_hda_dmic_2ch_pdm1_mach = { + /* .id is not used in this file */ + .drv_name = "skl_hda_dsp_generic", + .sof_tplg_filename = "sof-hda-generic-2ch-pdm1.tplg", +}; + +static struct snd_soc_acpi_mach *hda_dmic_pdm1_quirk(void *arg) +{ + struct snd_soc_acpi_mach *mach = arg; + + if (dmi_check_system(hda_pdm1_dmic)) + return &intel_hda_dmic_2ch_pdm1_mach; + + return mach; +} + struct snd_soc_acpi_mach snd_soc_acpi_intel_hda_machines[] = { { /* .id is not used in this file */ .drv_name = "skl_hda_dsp_generic", + .machine_quirk = hda_dmic_pdm1_quirk, .sof_tplg_filename = "sof-hda-generic", /* the tplg suffix is added at run time */ .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER, }, diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index 45e968fb19104b..ff9a0705a34d14 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -1045,7 +1045,7 @@ static void hda_generic_machine_select(struct snd_sof_dev *sdev, { struct hdac_bus *bus = sof_to_bus(sdev); struct snd_soc_acpi_mach_params *mach_params; - struct snd_soc_acpi_mach *hda_mach; + struct snd_soc_acpi_mach *hda_mach, *mach_alt; struct snd_sof_pdata *pdata = sdev->pdata; const char *tplg_filename; int codec_num = 0; @@ -1099,6 +1099,23 @@ static void hda_generic_machine_select(struct snd_sof_dev *sdev, if (!pdata->tplg_filename) tplg_fixup = true; + if (tplg_fixup && hda_mach->machine_quirk) { + mach_alt = hda_mach->machine_quirk(hda_mach); + if (mach_alt && mach_alt != hda_mach) { + /* + * The quirk provides the complete topology name + * (including the .tplg extension), so set it as + * if overridden by the user. This skips all + * topology name fixups later. + */ + hda_mach->drv_name = mach_alt->drv_name; + hda_mach->sof_tplg_filename = mach_alt->sof_tplg_filename; + pdata->tplg_filename = mach_alt->sof_tplg_filename; + tplg_fixup = false; + dev_dbg(bus->dev, "using quirk for HDA machine driver\n"); + } + } + if (tplg_fixup && codec_num == 1 && HDA_IDISP_CODEC(bus->codec_mask)) { tplg_filename = devm_kasprintf(sdev->dev, GFP_KERNEL, From afd6e7c676347df4d38748c5733a84e1381cff61 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Thu, 3 Dec 2026 15:01:12 +0200 Subject: [PATCH 2/2] ASoC: Intel: soc-acpi-intel-hda-match: add PDM1 quirk for Fujitsu LIFEBOOK E5512 Fujitsu LIFEBOOK E5512 has the PCH DMIC connected to PDM1, so add it to the PDM1 DMIC quirk table. The SKU reported by DMI is a generic "SK00", so match on the board name instead to keep the quirk specific to this model. Link: https://github.com/thesofproject/linux/issues/5949 Signed-off-by: Kai Vehmanen --- sound/soc/intel/common/soc-acpi-intel-hda-match.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sound/soc/intel/common/soc-acpi-intel-hda-match.c b/sound/soc/intel/common/soc-acpi-intel-hda-match.c index 022f0137aacbbf..55bb0215a79d3b 100644 --- a/sound/soc/intel/common/soc-acpi-intel-hda-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-hda-match.c @@ -18,6 +18,13 @@ static const struct dmi_system_id hda_pdm1_dmic[] = { DMI_MATCH(DMI_PRODUCT_SKU, "SK00ICPS"), }, }, + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU CLIENT COMPUTING LIMITED"), + DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E5512"), + DMI_MATCH(DMI_BOARD_NAME, "FJNB2F4"), + }, + }, { } };