From 73fd9248e0ba9a612355753bee524e52e631890c Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Wed, 6 Jul 2022 10:39:19 -0500 Subject: [PATCH] topology1: intel-generic-dmic: add macro to enable PDM1 for 2ch cases There are multiple cases where we cannot detect that PDM1 is used instead of the default PDM0. BugLink: https://github.com/thesofproject/sof/issues/5989 Signed-off-by: Pierre-Louis Bossart --- .../topology1/platform/intel/intel-generic-dmic.m4 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/topology/topology1/platform/intel/intel-generic-dmic.m4 b/tools/topology/topology1/platform/intel/intel-generic-dmic.m4 index c9808c3d9..04b06427c 100644 --- a/tools/topology/topology1/platform/intel/intel-generic-dmic.m4 +++ b/tools/topology/topology1/platform/intel/intel-generic-dmic.m4 @@ -144,6 +144,8 @@ PCM_CAPTURE_ADD(DMIC_48k_PCM_NAME, DMIC_PCM_48k_ID, concat(`PIPELINE_PCM_', DMIC ifdef(NO16KDMIC, `', `PCM_CAPTURE_ADD(DMIC_16k_PCM_NAME, DMIC_PCM_16k_ID, concat(`PIPELINE_PCM_', DMIC_PIPELINE_16k_ID))') +ifdef(`PDM1',`define(DEF_STEREO_PDM, `STEREO_PDM1')',`define(DEF_STEREO_PDM, `STEREO_PDM0')') + # # BE configurations - overrides config in ACPI if present # @@ -157,7 +159,7 @@ ifelse(DMIC_DAI_CHANNELS, 4, `DAI_CONFIG(DMIC, 0, DMIC_DAI_LINK_48k_ID, DMIC_DAI_LINK_48k_NAME, DMIC_CONFIG(1, 2400000, 4800000, 40, 60, 48000, DMIC_WORD_LENGTH(s32le), 200, DMIC, 0, - PDM_CONFIG(DMIC, 0, STEREO_PDM0)))') + PDM_CONFIG(DMIC, 0, DEF_STEREO_PDM)))') ifdef(NO16KDMIC, `', `ifelse(DMIC16K_DAI_CHANNELS, 4, @@ -168,4 +170,6 @@ ifdef(NO16KDMIC, `', `DAI_CONFIG(DMIC, 1, DMIC_DAI_LINK_16k_ID, DMIC_DAI_LINK_16k_NAME, DMIC_CONFIG(1, 2400000, 4800000, 40, 60, 16000, DMIC_WORD_LENGTH(s32le), 400, DMIC, 1, - PDM_CONFIG(DMIC, 1, STEREO_PDM0)))')') + PDM_CONFIG(DMIC, 1, DEF_STEREO_PDM)))')') + +undefine(DEF_STEREO_PDM)