diff --git a/tools/topology/topology2/include/components/webrtc-aec.conf b/tools/topology/topology2/include/components/webrtc-aec.conf index efb46bdbc603..f83f8cd5d25e 100644 --- a/tools/topology/topology2/include/components/webrtc-aec.conf +++ b/tools/topology/topology2/include/components/webrtc-aec.conf @@ -100,9 +100,13 @@ Class.Widget."webrtc-aec" { } } - # 4 input formats: pin0 (mic) S16/S32 + pin1 (ref) S16/S32 - num_input_audio_formats 4 - num_output_audio_formats 2 + # pin0 is the microphone and pin1 is the echo reference. The module has multiple + # input pins, each pin must have a single format since the formats of the pins + # cannot be selected at runtime. The output uses the sample format of pin0. + # Override the formats in the widget object for S32 (pin0 and output) or for a + # different channel count. + num_input_audio_formats 2 + num_output_audio_formats 1 Object.Base.input_audio_format [ # Pin 0 — microphone S16 @@ -112,13 +116,6 @@ Class.Widget."webrtc-aec" { in_valid_bit_depth 16 ibs "$[(($in_channels * ($[($in_rate + 999)] / 1000)) * ($in_bit_depth / 8)) * $WEBRTC_AEC_PERIOD_MS]" } - # Pin 0 — microphone S32 - { - input_pin_index 0 - in_bit_depth 32 - in_valid_bit_depth 32 - ibs "$[(($in_channels * ($[($in_rate + 999)] / 1000)) * ($in_bit_depth / 8)) * $WEBRTC_AEC_PERIOD_MS]" - } # Pin 1 — echo reference S16 { input_pin_index 1 @@ -126,13 +123,6 @@ Class.Widget."webrtc-aec" { in_valid_bit_depth 16 ibs "$[(($in_channels * ($[($in_rate + 999)] / 1000)) * ($in_bit_depth / 8)) * $WEBRTC_AEC_PERIOD_MS]" } - # Pin 1 — echo reference S32 - { - input_pin_index 1 - in_bit_depth 32 - in_valid_bit_depth 32 - ibs "$[(($in_channels * ($[($in_rate + 999)] / 1000)) * ($in_bit_depth / 8)) * $WEBRTC_AEC_PERIOD_MS]" - } ] Object.Base.output_audio_format [ @@ -142,12 +132,6 @@ Class.Widget."webrtc-aec" { out_valid_bit_depth 16 obs "$[(($out_channels * ($[($out_rate + 999)] / 1000)) * ($out_bit_depth / 8)) * $WEBRTC_AEC_PERIOD_MS]" } - # S32 output - { - out_bit_depth 32 - out_valid_bit_depth 32 - obs "$[(($out_channels * ($[($out_rate + 999)] / 1000)) * ($out_bit_depth / 8)) * $WEBRTC_AEC_PERIOD_MS]" - } ] # UUID: e5da7b5b-133a-ba46-b517651d6300bb83