From 2ca33c83da87e26fff0c1e3fddceaccea9770aec Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Mon, 10 Nov 2025 12:08:03 +0200 Subject: [PATCH 1/2] ALSA: intel-nhlt: Adjust the SSP blob size for v1.5 by one uint32_t The mdivc in SSP blob v1.5 is a flexible array with at least one mdivc value, this is not reflected in the SSP_BLOB_V1_5_SIZE. Signed-off-by: Peter Ujfalusi --- sound/hda/core/intel-nhlt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/hda/core/intel-nhlt.c b/sound/hda/core/intel-nhlt.c index 6d72a871bda0b5..8327443fff9f05 100644 --- a/sound/hda/core/intel-nhlt.c +++ b/sound/hda/core/intel-nhlt.c @@ -210,7 +210,8 @@ int intel_nhlt_ssp_mclk_mask(struct nhlt_acpi_table *nhlt, int ssp_num) size = SSP_BLOB_V2_0_SIZE; } else if (blob[1] == SSP_BLOB_VER_1_5) { mdivc_offset = SSP_BLOB_V1_5_MDIVC_OFFSET; - size = SSP_BLOB_V1_5_SIZE; + /* mdivc is a flexible array with at least one value */ + size = SSP_BLOB_V1_5_SIZE + sizeof(uint32_t); } else { mdivc_offset = SSP_BLOB_V1_0_MDIVC_OFFSET; size = SSP_BLOB_V1_0_SIZE; From 27067d38766fb047e3193b5c80b513994522e23e Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Mon, 10 Nov 2025 12:11:12 +0200 Subject: [PATCH 2/2] ALSA: intel-nhlt: Add SSP blob V3.0 definition SSP blob v3.0 have different size and the offset to mcvdiv is different. Signed-off-by: Peter Ujfalusi --- sound/hda/core/intel-nhlt.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sound/hda/core/intel-nhlt.c b/sound/hda/core/intel-nhlt.c index 8327443fff9f05..5b43cab6b21b03 100644 --- a/sound/hda/core/intel-nhlt.c +++ b/sound/hda/core/intel-nhlt.c @@ -168,6 +168,10 @@ EXPORT_SYMBOL(intel_nhlt_ssp_endpoint_mask); #define SSP_BLOB_V2_0_MDIVC_OFFSET 20 /* offset in u32 */ #define SSP_BLOB_VER_2_0 0xEE000200 +#define SSP_BLOB_V3_0_SIZE 200 +#define SSP_BLOB_V3_0_MDIVC_OFFSET 50 /* offset in u32 */ +#define SSP_BLOB_VER_3_0 0xEE000300 + int intel_nhlt_ssp_mclk_mask(struct nhlt_acpi_table *nhlt, int ssp_num) { struct nhlt_endpoint *epnt; @@ -205,7 +209,10 @@ int intel_nhlt_ssp_mclk_mask(struct nhlt_acpi_table *nhlt, int ssp_num) blob = (u32 *)cfg->config.caps; - if (blob[1] == SSP_BLOB_VER_2_0) { + if (blob[1] == SSP_BLOB_VER_3_0) { + mdivc_offset = SSP_BLOB_V3_0_MDIVC_OFFSET; + size = SSP_BLOB_V3_0_SIZE + sizeof(uint32_t); + } else if (blob[1] == SSP_BLOB_VER_2_0) { mdivc_offset = SSP_BLOB_V2_0_MDIVC_OFFSET; size = SSP_BLOB_V2_0_SIZE; } else if (blob[1] == SSP_BLOB_VER_1_5) {