diff --git a/tools/topology/topology2/cavs-rt5682.conf b/tools/topology/topology2/cavs-rt5682.conf index 8c13b2131cac..40b670b4f4c3 100644 --- a/tools/topology/topology2/cavs-rt5682.conf +++ b/tools/topology/topology2/cavs-rt5682.conf @@ -87,7 +87,6 @@ Define { INCLUDE_ECHO_REF false ECHO_REF_HOST_PIPELINE_ID 7 ECHO_REF_DAI_PIPELINE_ID 8 - ECHO_REF_COPIER_MODULE 'module-copier.8.2' ECHO_REF_PCM_ID 29 ECHO_REF_CORE_ID 0 # override BT default definitions @@ -96,7 +95,6 @@ Define { BT_PB_DAI_PIPELINE_SRC "copier.host.9.1" BT_PB_PIPELINE_STREAM_NAME "dai-copier.SSP.10.1" GOOGLE_RTC_AEC_SUPPORT 0 - GOOGLE_RTC_AEC_REF_SOURCE 'module-copier.8.2' GOOGLE_AEC_CORE_ID 0 HEADSET_PCM_NAME "Headset" SPEAKER_PCM_NAME "Speakers" diff --git a/tools/topology/topology2/include/components/google-rtc-aec.conf b/tools/topology/topology2/include/components/google-rtc-aec.conf index e2df7a9dbeac..2d6ed613b469 100644 --- a/tools/topology/topology2/include/components/google-rtc-aec.conf +++ b/tools/topology/topology2/include/components/google-rtc-aec.conf @@ -87,35 +87,47 @@ Class.Widget."google-rtc-aec" { unique "instance" } - num_audio_formats 2 - num_input_audio_formats 2 - num_output_audio_formats 1 + num_input_audio_formats 3 + num_output_audio_formats 2 # pin0 is the data captured by DMIC and pin1 is the ref data from playback stream - Object.Base.input_audio_format { - 1 { + Object.Base.input_audio_format [ + # 2ch 16-bit on Pin 0 + { input_pin_index 0 in_bit_depth 16 in_valid_bit_depth 16 - out_bit_depth 16 - out_valid_bit_depth 16 } - 2 { + # 4ch 16-bit on Pin 0 + { + input_pin_index 0 + in_bit_depth 16 + in_valid_bit_depth 16 + in_channels 4 + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 + } + # 2ch 16-bit on Pin 1 + { input_pin_index 1 in_bit_depth 16 in_valid_bit_depth 16 + } + ] + + Object.Base.output_audio_format [ + { out_bit_depth 16 out_valid_bit_depth 16 } - } - - Object.Base.output_audio_format { - 1 { - in_bit_depth 16 - in_valid_bit_depth 16 + # 4ch 16-bit + { out_bit_depth 16 out_valid_bit_depth 16 + out_channels 4 + out_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + out_ch_map $CHANNEL_MAP_3_POINT_1 } - } + ] # Default attribute values for google-rtc-aec widget # UUID: B780A0A6-269F-466F-B477-23DFA05AF758 diff --git a/tools/topology/topology2/include/components/google-rtc-aec/rtc-aec-blob.conf b/tools/topology/topology2/include/components/google-rtc-aec/rtc-aec-blob.conf deleted file mode 100644 index f31ed7a0a747..000000000000 --- a/tools/topology/topology2/include/components/google-rtc-aec/rtc-aec-blob.conf +++ /dev/null @@ -1,19 +0,0 @@ -# aec blob data - -Object.Base.data."google-rtc-aec_blob" { - bytes " - 0x53, 0x4f, 0x46, 0x34, 0x00, 0x00, 0x00, 0x00, - 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - - 0x80, 0xbb, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x10, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, - - 0x80, 0xbb, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x10, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00" -} diff --git a/tools/topology/topology2/include/pipelines/cavs/google-rtc-aec-capture.conf b/tools/topology/topology2/include/pipelines/cavs/google-rtc-aec-capture.conf index 6699ff23bbd0..09c3810279b0 100644 --- a/tools/topology/topology2/include/pipelines/cavs/google-rtc-aec-capture.conf +++ b/tools/topology/topology2/include/pipelines/cavs/google-rtc-aec-capture.conf @@ -55,50 +55,74 @@ Class.Pipeline."google-rtc-aec-capture" { period_sink_count 1 period_source_count 1 num_audio_formats 1 - num_input_audio_formats 1 - num_output_audio_formats 1 + num_input_audio_formats 2 + num_output_audio_formats 2 - Object.Base.audio_format.1 { - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 16 - out_valid_bit_depth 16 - } - } - - google-rtc-aec."1" { - Object.Control.bytes."1" { - name google-rtc-aec_blob - access [ - tlv_read - tlv_callback - ] - - Object.Base.extops."extctl" { - get 258 - put 0 + Object.Base.input_audio_format [ + { + in_bit_depth 32 + in_valid_bit_depth 32 } - max 4096 - - IncludeByKey.GOOGLE_RTC_AEC_SUPPORT { - "[1]" "include/components/google-rtc-aec/rtc-aec-blob.conf" + # 4ch 32-bit on Pin 0 + { + input_pin_index 0 + in_bit_depth 32 + in_valid_bit_depth 32 + in_channels 4 + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 + } + ] + Object.Base.output_audio_format [ + { + out_bit_depth 16 + out_valid_bit_depth 16 + } + { + out_bit_depth 16 + out_valid_bit_depth 16 + out_channels 4 + out_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + out_ch_map $CHANNEL_MAP_3_POINT_1 } - } - } + + ] + } module-copier."2" { period_sink_count 1 period_source_count 1 - num_audio_formats 1 - num_input_audio_formats 1 - num_output_audio_formats 1 + num_input_audio_formats 2 + num_output_audio_formats 2 - Object.Base.audio_format.1 { - in_bit_depth 16 - in_valid_bit_depth 16 - out_bit_depth 32 - out_valid_bit_depth 32 - } + Object.Base.input_audio_format [ + { + in_bit_depth 16 + in_valid_bit_depth 16 + } + { + in_bit_depth 16 + in_valid_bit_depth 16 + in_channels 4 + in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + in_ch_map $CHANNEL_MAP_3_POINT_1 + } + ] + Object.Base.output_audio_format [ + # 2ch 32-bit + { + out_bit_depth 32 + out_valid_bit_depth 32 + } + # 4ch 32-bit + { + out_bit_depth 32 + out_valid_bit_depth 32 + out_channels 4 + out_ch_cfg $CHANNEL_CONFIG_3_POINT_1 + out_ch_map $CHANNEL_MAP_3_POINT_1 + } + ] } } diff --git a/tools/topology/topology2/platform/intel/google-rtc-aec-reference.conf b/tools/topology/topology2/platform/intel/google-rtc-aec-reference.conf index b2e9a88ec1e9..bf605a4fee0e 100644 --- a/tools/topology/topology2/platform/intel/google-rtc-aec-reference.conf +++ b/tools/topology/topology2/platform/intel/google-rtc-aec-reference.conf @@ -14,7 +14,7 @@ Object.Pipeline.google-rtc-aec-capture [ } Object.Base.input_pin_binding.2 { - input_pin_binding_name $GOOGLE_RTC_AEC_REF_SOURCE + input_pin_binding_name "dai-copier.SSP.$SPEAKER_CODEC_NAME.capture" } } } @@ -97,7 +97,7 @@ Object.Base.route [ sink module-copier.18.1 } { - source $GOOGLE_RTC_AEC_REF_SOURCE + source "dai-copier.SSP.$SPEAKER_CODEC_NAME.capture" sink "google-rtc-aec.18.1" } { diff --git a/tools/topology/topology2/platform/intel/speaker-echo-ref.conf b/tools/topology/topology2/platform/intel/speaker-echo-ref.conf index 2ff5f3e22e5e..733b9e51e993 100644 --- a/tools/topology/topology2/platform/intel/speaker-echo-ref.conf +++ b/tools/topology/topology2/platform/intel/speaker-echo-ref.conf @@ -1,25 +1,5 @@ -Define { - ECHO_REF_STREAM_NAME "Echo reference" -} - Object.Pipeline { - host-gateway-capture [ - { - index $ECHO_REF_HOST_PIPELINE_ID - core_id $ECHO_REF_CORE_ID - - Object.Widget.host-copier.1 { - core_id $ECHO_REF_CORE_ID - stream_name $ECHO_REF_STREAM_NAME - pcm_id $ECHO_REF_PCM_ID - } - Object.Widget.pipeline."1" { - core $ECHO_REF_CORE_ID - } - } - ] - - dai-copier-be [ + io-gateway-capture [ { index $ECHO_REF_DAI_PIPELINE_ID core_id $ECHO_REF_CORE_ID @@ -33,12 +13,20 @@ Object.Pipeline { copier_type "SSP" stream_name $SPEAKER_CODEC_NAME node_type $I2S_LINK_INPUT_CLASS - Object.Base.audio_format.1 { - in_bit_depth 32 - in_valid_bit_depth 32 - out_bit_depth 32 - out_valid_bit_depth 32 - } + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + num_output_audio_formats 1 + Object.Base.output_audio_format [ + { + out_bit_depth 16 + out_valid_bit_depth 16 + } + ] } Object.Widget.pipeline."1" { core $ECHO_REF_CORE_ID @@ -46,28 +34,3 @@ Object.Pipeline { } ] } - -Object.PCM.pcm [ - { - name "EchoRef" - id $ECHO_REF_PCM_ID - direction "capture" - Object.Base.fe_dai.1 {} - - Object.PCM.pcm_caps.1 { - name $ECHO_REF_STREAM_NAME - formats 'S16_LE,S24_LE,S32_LE' - } - } -] - -Object.Base.route [ - { - source "dai-copier.SSP.$SPEAKER_CODEC_NAME.capture" - sink $ECHO_REF_COPIER_MODULE - } - { - source $ECHO_REF_COPIER_MODULE - sink "host-copier.$ECHO_REF_PCM_ID.capture" - } -]