]> git.alsa-project.org Git - alsa-utils.git/commitdiff
topology: plugins: nhlt: set dmic stereo mode only in hw version 1
authorJaska Uimonen <jaska.uimonen@linux.intel.com>
Wed, 21 Jun 2023 15:02:24 +0000 (18:02 +0300)
committerJaroslav Kysela <perex@perex.cz>
Tue, 1 Aug 2023 07:34:19 +0000 (09:34 +0200)
Dmic stereo mode should be set only in hw version 1. In later hw
versions this bit is reserved.

Fixes: https://github.com/alsa-project/alsa-utils/pull/222
Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.ntel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
topology/nhlt/intel/dmic/dmic-process.c

index 3a2fca6c702be4a4a5321c0f500ef9bcba680535..0292f9dc2fce25851432495b21f24c8acc8da786 100644 (file)
@@ -830,8 +830,11 @@ static int configure_registers(struct intel_dmic_params *dmic, struct dmic_calc_
                        CIC_CONTROL_CIC_START_A(1) |
                        CIC_CONTROL_MIC_B_POLARITY(dmic->dmic_prm[di].pdm[i].polarity_mic_b) |
                        CIC_CONTROL_MIC_A_POLARITY(dmic->dmic_prm[di].pdm[i].polarity_mic_a) |
-                       CIC_CONTROL_MIC_MUTE(cic_mute) |
-                       CIC_CONTROL_STEREO_MODE(stereo[i]);
+                       CIC_CONTROL_MIC_MUTE(cic_mute);
+
+               if (dmic->dmic_prm[di].driver_version == 1)
+                       val |= CIC_CONTROL_STEREO_MODE(stereo[i]);
+
                dmic->dmic_blob_pdm[i].cic_control = val;
 
                val = CIC_CONFIG_CIC_SHIFT(cfg->cic_shift + 8) |