Skip to content

Commit 28279f0

Browse files
committed
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 <[email protected]>
1 parent a0ebe69 commit 28279f0

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

sound/soc/sof/intel/hda.c

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,6 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev)
16231623
mach->tplg_quirk_mask & SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER &&
16241624
mach->mach_params.i2s_link_mask) {
16251625
int ssp_num;
1626-
int mclk_mask;
16271626

16281627
if (hweight_long(mach->mach_params.i2s_link_mask) > 1 &&
16291628
!(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)
16481647

16491648
sof_pdata->tplg_filename = tplg_filename;
16501649

1651-
mclk_mask = check_nhlt_ssp_mclk_mask(sdev, ssp_num);
1652-
1653-
if (mclk_mask < 0) {
1654-
dev_err(sdev->dev, "Invalid MCLK configuration\n");
1655-
return NULL;
1656-
}
1657-
1658-
dev_dbg(sdev->dev, "MCLK mask %#x found in NHLT\n", mclk_mask);
1659-
1660-
if (mclk_mask) {
1661-
dev_info(sdev->dev, "Overriding topology with MCLK mask %#x from NHLT\n", mclk_mask);
1662-
sdev->mclk_id_override = true;
1663-
sdev->mclk_id_quirk = (mclk_mask & BIT(0)) ? 0 : 1;
1650+
if (sof_pdata->ipc_type == SOF_IPC_TYPE_3) {
1651+
int mclk_mask = check_nhlt_ssp_mclk_mask(sdev,
1652+
ssp_num);
1653+
1654+
if (mclk_mask < 0) {
1655+
dev_err(sdev->dev,
1656+
"Invalid MCLK configuration for SSP%d\n",
1657+
ssp_num);
1658+
return NULL;
1659+
}
1660+
1661+
if (mclk_mask) {
1662+
sdev->mclk_id_override = true;
1663+
sdev->mclk_id_quirk = (mclk_mask & BIT(0)) ? 0 : 1;
1664+
dev_info(sdev->dev,
1665+
"SSP%d to use MCLK id %d (mask: %#x)\n",
1666+
ssp_num, sdev->mclk_id_quirk, mclk_mask);
1667+
} else {
1668+
dev_dbg(sdev->dev,
1669+
"MCLK mask is empty for SSP%d in NHLT\n",
1670+
ssp_num);
1671+
}
16641672
}
16651673
}
16661674

0 commit comments

Comments
 (0)