Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions tools/topology/topology2/cavs-rt5682.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
42 changes: 27 additions & 15 deletions tools/topology/topology2/include/components/google-rtc-aec.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the real AEC version without mockup use the bytes control. Was this added just for the mockup? If the real AEC has bytes control shouldn't we have it in topology to be able to exercise it with about right ballpark size random bytes blob?

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
}
]
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
Expand Down Expand Up @@ -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"
}
{
Expand Down
67 changes: 15 additions & 52 deletions tools/topology/topology2/platform/intel/speaker-echo-ref.conf
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -33,41 +13,24 @@ 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
}
}
]
}

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"
}
]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ranj063 Not necessarily for this PR, but should we still have templates for both cases, echo ref to an AEC running on the DSP (like this case), and echo ref to user-space. I mean a given product will use only one option, not both, but in the past we've enabled both.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kv2019i for aec in userspace, we would need the host copier and the PCM but we can't tie it to this topology. So I'd say we should leave it until.theres a need for it.