diff --git a/tools/topology/topology1/platform/intel/intel-generic-dmic.m4 b/tools/topology/topology1/platform/intel/intel-generic-dmic.m4 index 04b06427c..147fed460 100644 --- a/tools/topology/topology1/platform/intel/intel-generic-dmic.m4 +++ b/tools/topology/topology1/platform/intel/intel-generic-dmic.m4 @@ -45,9 +45,7 @@ ifdef(`DMIC16K_PCM_CHANNELS', `', `define(DMIC16K_PCM_CHANNELS, CHANNELS)') dnl Unless explicitly specified, dmic period at 48k is 1ms ifdef(`DMIC_48k_PERIOD_US', `', `define(DMIC_48k_PERIOD_US, 1000)') -## Prolong period to 4ms for RTNR -ifdef(`RTNR', `define(`INTEL_GENERIC_DMIC_PERIOD', 4000)', `define(`INTEL_GENERIC_DMIC_PERIOD', 1000)') -ifdef(`RTNR', `define(`INTEL_GENERIC_DMIC_PERIOD_INV', 250)', `define(`INTEL_GENERIC_DMIC_PERIOD_INV', 1000)') +define(`INTEL_GENERIC_DMIC_PERIOD', 1000) ifelse(CHANNELS, 1, `define(`VOLUME_CHANNEL_MAP', LIST(` ', KCONTROL_CHANNEL(FL, 1, 0)))') ifelse(CHANNELS, 2, `define(`VOLUME_CHANNEL_MAP', LIST(` ', KCONTROL_CHANNEL(FL, 1, 0), @@ -105,7 +103,7 @@ define(`PGA_NAME', Dmic1) ifdef(NO16KDMIC, `', `PIPELINE_PCM_ADD(sof/pipe-DMIC16KPROC-capture-16khz.m4, DMIC_PIPELINE_16k_ID, DMIC_PCM_16k_ID, DMIC16K_PCM_CHANNELS, s32le, - INTEL_GENERIC_DMIC_PERIOD_INV, 0, DMIC_16k_CORE_ID, 16000, 16000, 16000)') + INTEL_GENERIC_DMIC_PERIOD, 0, DMIC_16k_CORE_ID, 16000, 16000, 16000)') undefine(`PGA_NAME') undefine(`PIPELINE_FILTER1') diff --git a/tools/topology/topology1/sof-tgl-max98357a-rt5682.m4 b/tools/topology/topology1/sof-tgl-max98357a-rt5682.m4 index 679efc658..4ca82db58 100644 --- a/tools/topology/topology1/sof-tgl-max98357a-rt5682.m4 +++ b/tools/topology/topology1/sof-tgl-max98357a-rt5682.m4 @@ -146,12 +146,17 @@ define(DMIC_PIPELINE_KWD_ID, `12') define(DMIC_DAI_LINK_16k_ID, eval(BOARD_DMIC_BE_ID_BASE + 1)) define(DMIC_PIPELINE_48k_CORE_ID, `1') -ifdef(`RTNR', `define(`DMICPROC', rtnr)', `') ifdef(`GOOGLE_RTC_AUDIO_PROCESSING', - `define(`DMICPROC', google-rtc-audio-processing)' + `ifdef(`RTNR', + `define(`DMICPROC', google-rtc-audio-processing-rtnr)', + `define(`DMICPROC', google-rtc-audio-processing)')' `define(`DMIC_48k_PERIOD_US', 10000)' , - `') + `ifdef(`RTNR', + `define(`DMICPROC', rtnr)' +# 5ms period is required for RTNR build 20220728 and later versions + `define(`DMIC_48k_PERIOD_US', 5000)')' +) ifdef(`GOOGLE_RTC_AUDIO_PROCESSING', `define(`SPK_PLAYBACK_CORE', DMIC_PIPELINE_48k_CORE_ID)', `define(`SPK_PLAYBACK_CORE', `0')')