From effe44896d7721df8054cccc920efe33f42b06f0 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Wed, 15 Jan 2025 15:35:30 +0200 Subject: [PATCH] Topology: NHLT: Intel: Fix DMA slots config in SSP blob This fixes a mistake in function ssp_calculate_intern_v30(). The rx_dir[0] and tx_dir[0] value was hard-coded to 0x3 for typical stereo slots configuration. It should be instead retrieved from topology parameters for the SSP. Closes: https://github.com/alsa-project/alsa-utils/pull/289 Signed-off-by: Seppo Ingalsuo Signed-off-by: Jaroslav Kysela --- topology/nhlt/intel/ssp/ssp-process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/topology/nhlt/intel/ssp/ssp-process.c b/topology/nhlt/intel/ssp/ssp-process.c index 6a5a5e23..3a1db9fc 100644 --- a/topology/nhlt/intel/ssp/ssp-process.c +++ b/topology/nhlt/intel/ssp/ssp-process.c @@ -60,11 +60,11 @@ static void ssp_calculate_intern_v30(struct intel_nhlt_params *nhlt, int hwi) blob30->rsvd2 = 0; blob30->ssioc = blob->ssioc; - blob30->rx_dir[0].ssmidytsa = 3; + blob30->rx_dir[0].ssmidytsa = ssp->ssp_prm[di].hw_cfg[hwi].rx_slots; for (i = 1; i < I2SIPCMC; i++) blob30->rx_dir[i].ssmidytsa = 0; - blob30->tx_dir[0].ssmodytsa = 3; + blob30->tx_dir[0].ssmodytsa = ssp->ssp_prm[di].hw_cfg[hwi].tx_slots; for (i = 1; i < I2SOPCMC; i++) blob30->tx_dir[i].ssmodytsa = 0;