]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ASoC: SOF: Intel: HDA: Limit the number of dai drivers for nocodec mode
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Fri, 26 May 2023 20:41:49 +0000 (15:41 -0500)
committerMark Brown <broonie@kernel.org>
Tue, 30 May 2023 13:11:04 +0000 (14:11 +0100)
With a common kernel config for nocodec and codec modes, the number of DAI
drivers will be set to 15 for nocodec as well. So adjust this when set
the machine params for the nocodec mode if the debug flag is set.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20230526204149.456068-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda.c
sound/soc/sof/intel/hda.h

index 3153e21f100ab59687d775759342ca2ac1b842eb..835c2568dd60a80b0614fdf27e2aeffc941985dd 100644 (file)
@@ -1562,7 +1562,11 @@ void hda_set_mach_params(struct snd_soc_acpi_mach *mach,
 
        mach_params = &mach->mach_params;
        mach_params->platform = dev_name(sdev->dev);
-       mach_params->num_dai_drivers = desc->ops->num_drv;
+       if (IS_ENABLED(CONFIG_SND_SOC_SOF_NOCODEC_DEBUG_SUPPORT) &&
+           sof_debug_check_flag(SOF_DBG_FORCE_NOCODEC))
+               mach_params->num_dai_drivers = SOF_SKL_NUM_DAIS_NOCODEC;
+       else
+               mach_params->num_dai_drivers = desc->ops->num_drv;
        mach_params->dai_drivers = desc->ops->drv;
 }
 
index 65832a38bffa4f7d2bf1aebf3e16dec82cdc5a71..5b3dad2dadf465c40cb97548aadcf1b0d5fbb01b 100644 (file)
        (HDA_DSP_BDL_SIZE / sizeof(struct sof_intel_dsp_bdl))
 
 /* Number of DAIs */
+#define SOF_SKL_NUM_DAIS_NOCODEC       8
+
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
 #define SOF_SKL_NUM_DAIS               15
 #else
-#define SOF_SKL_NUM_DAIS               8
+#define SOF_SKL_NUM_DAIS               SOF_SKL_NUM_DAIS_NOCODEC
 #endif
 
 /* Intel HD Audio SRAM Window 0*/