]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: SOF: Intel: don't check number of sdw links when set dmic_fixup
authorBard Liao <yung-chuan.liao@linux.intel.com>
Tue, 25 Feb 2025 09:37:15 +0000 (17:37 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 25 Feb 2025 12:39:08 +0000 (12:39 +0000)
Currently, we assume that the PCH DMIC pins are pin-muxed with SoundWire
links. However, we do see a HW design that use PCH DMIC along with 3
SoundWire links. Remove the check now.
With this change the PCM DMIC will be presented if it is reported by the
BIOS irrespective of whether there are SDW links present or not.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20250225093716.67240-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda.c

index be689f6e10c81e25f995180e54125699fde86d67..a1ccd95da8bb732cc5cc752669e4ac6aca09da99 100644 (file)
@@ -1312,22 +1312,8 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev)
                /* report to machine driver if any DMICs are found */
                mach->mach_params.dmic_num = check_dmic_num(sdev);
 
-               if (sdw_mach_found) {
-                       /*
-                        * DMICs use up to 4 pins and are typically pin-muxed with SoundWire
-                        * link 2 and 3, or link 1 and 2, thus we only try to enable dmics
-                        * if all conditions are true:
-                        * a) 2 or fewer links are used by SoundWire
-                        * b) the NHLT table reports the presence of microphones
-                        */
-                       if (hweight_long(mach->link_mask) <= 2)
-                               dmic_fixup = true;
-                       else
-                               mach->mach_params.dmic_num = 0;
-               } else {
-                       if (mach->tplg_quirk_mask & SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER)
-                               dmic_fixup = true;
-               }
+               if (sdw_mach_found || mach->tplg_quirk_mask & SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER)
+                       dmic_fixup = true;
 
                if (tplg_fixup &&
                    dmic_fixup &&