From 8dda726f94a0ea587a8a89f19f3abe1ad673dc48 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Tue, 11 Nov 2025 11:30:42 +0200 Subject: [PATCH] ASoC: SOF: Intel: hda: Only check SSP MCLK mask in case of IPC3 IPC4 is using the NHLT blob itself and sends the SSP blob from it directly to the firmware, there is no need for the MCLK quirk based on the SSP blob since the SSP blob is in use. At the same time reword the error, info and debug messages for clarity. Signed-off-by: Peter Ujfalusi --- sound/soc/sof/intel/hda.c | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index 0bb85f92e1069d..d88ec66728fd9c 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -1623,7 +1623,6 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev) mach->tplg_quirk_mask & SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER && mach->mach_params.i2s_link_mask) { int ssp_num; - int mclk_mask; if (hweight_long(mach->mach_params.i2s_link_mask) > 1 && !(mach->tplg_quirk_mask & SND_SOC_ACPI_TPLG_INTEL_SSP_MSB)) @@ -1648,19 +1647,28 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev) sof_pdata->tplg_filename = tplg_filename; - mclk_mask = check_nhlt_ssp_mclk_mask(sdev, ssp_num); - - if (mclk_mask < 0) { - dev_err(sdev->dev, "Invalid MCLK configuration\n"); - return NULL; - } - - dev_dbg(sdev->dev, "MCLK mask %#x found in NHLT\n", mclk_mask); - - if (mclk_mask) { - dev_info(sdev->dev, "Overriding topology with MCLK mask %#x from NHLT\n", mclk_mask); - sdev->mclk_id_override = true; - sdev->mclk_id_quirk = (mclk_mask & BIT(0)) ? 0 : 1; + if (sof_pdata->ipc_type == SOF_IPC_TYPE_3) { + int mclk_mask = check_nhlt_ssp_mclk_mask(sdev, + ssp_num); + + if (mclk_mask < 0) { + dev_err(sdev->dev, + "Invalid MCLK configuration for SSP%d\n", + ssp_num); + return NULL; + } + + if (mclk_mask) { + sdev->mclk_id_override = true; + sdev->mclk_id_quirk = (mclk_mask & BIT(0)) ? 0 : 1; + dev_info(sdev->dev, + "SSP%d to use MCLK id %d (mask: %#x)\n", + ssp_num, sdev->mclk_id_quirk, mclk_mask); + } else { + dev_dbg(sdev->dev, + "MCLK mask is empty for SSP%d in NHLT\n", + ssp_num); + } } }