Skip to content

ASoC: SOF: Intel: hda: add quirk for Xiaomi Redmi Book 16 with PDM1 dmic - #5895

Draft
kv2019i wants to merge 1 commit into
thesofproject:topic/sof-devfrom
kv2019i:202608-pdm1-quirk
Draft

ASoC: SOF: Intel: hda: add quirk for Xiaomi Redmi Book 16 with PDM1 dmic#5895
kv2019i wants to merge 1 commit into
thesofproject:topic/sof-devfrom
kv2019i:202608-pdm1-quirk

Conversation

@kv2019i

@kv2019i kv2019i commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Add a quirk to force a PDM1 DMIC topology on systems where PCH DMIC is connected to PDM1 and not not PDM0.

Link: #5894

Add a quirk to force a PDM1 DMIC topology on systems where PCH DMIC
is connected to PDM1 and not not PDM0.

Link: thesofproject#5894
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
@kv2019i

kv2019i commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator Author

V2:

  • fix build error due to dmi.h missing

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a platform-specific quirk to select an alternate SOF HDA generic topology when the internal DMIC array is wired to PDM1 (as reported for the Xiaomi Redmi Book 16 2025 / TM2415), instead of relying solely on the NHLT DMIC-count-based topology selection.

Changes:

  • Add support in SOF Intel HDA generic machine selection to consult a machine_quirk callback for an alternate machine/topology.
  • Add a DMI-based quirk in the Intel HDA ACPI match table intended to force a PDM1 DMIC topology for the affected Xiaomi model.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
sound/soc/sof/intel/hda.c Adds machine_quirk handling to allow overriding the default HDA generic machine/topology selection.
sound/soc/intel/common/soc-acpi-intel-hda-match.c Introduces a DMI match and alternate mach/topology intended to force a PDM1 DMIC topology on the target system.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread sound/soc/sof/intel/hda.c
Comment on lines +1098 to +1105
if (hda_mach->machine_quirk) {
mach_alt = hda_mach->machine_quirk(hda_mach);
if (mach_alt) {
hda_mach = mach_alt;
tplg_fixup = false;
dev_dbg(bus->dev, "using quirk for HDA machine driver\n");
}
}
Comment on lines +23 to +37
static struct snd_soc_acpi_mach intel_hda_dmic_4ch_pdm1_mach = {
/* .id is not used in this file */
.drv_name = "skl_hda_dsp_generic",
.sof_tplg_filename = "sof-hda-generic-4ch-pdm1",
};

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_4ch_pdm1_mach;

return mach;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants