From: Ranjani Sridharan Date: Fri, 26 May 2023 20:41:49 +0000 (-0500) Subject: ASoC: SOF: Intel: HDA: Limit the number of dai drivers for nocodec mode X-Git-Tag: v6.6.7~1940^2~32^2~126^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0f7b6a433097808e7f3e82f837ccc1353f070e4a;p=platform%2Fkernel%2Flinux-starfive.git ASoC: SOF: Intel: HDA: Limit the number of dai drivers for nocodec mode 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 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20230526204149.456068-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index 3153e21..835c256 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -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; } diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h index 65832a3..5b3dad2 100644 --- a/sound/soc/sof/intel/hda.h +++ b/sound/soc/sof/intel/hda.h @@ -414,10 +414,12 @@ (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*/