Modify periods setting for RTNR capturing pipeline

With the  release of RTNR version 20220728, period for capturing pipeline requires at least 5ms.

Periods setting for 16KHz capturing pipeline is also removed since RTNR is currently running in 48KHz capturing pipeline only.

Signed-off-by: Ming Jen Tai <mingjen_tai@realtek.com>
This commit is contained in:
Ming Jen Tai 2022-08-05 10:42:28 +08:00 committed by Liam Girdwood
parent 9915d1e1fd
commit 8496d585d1
2 changed files with 10 additions and 7 deletions

View File

@ -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')

View File

@ -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')')