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
86 changes: 13 additions & 73 deletions tools/topology/topology2/cavs-rt5682.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
<dai-copier-be.conf>
<dai-copier-eqiir-module-copier-capture.conf>
<gain-capture.conf>
<gain-module-copier.conf>
<google-rtc-aec-capture.conf>
<data.conf>
<pcm.conf>
<pcm_caps.conf>
Expand All @@ -41,6 +43,10 @@
<hdmi-default.conf>
<bt-default.conf>
<bt-generic.conf>
<input_pin_binding.conf>
<output_pin_binding.conf>
<input_audio_format.conf>
<output_audio_format.conf>

Define {
MCLK 24576000
Expand Down Expand Up @@ -91,6 +97,8 @@ Define {
BT_PB_HOST_PIPELINE_SINK "copier.SSP.10.1"
BT_PB_DAI_PIPELINE_SRC "copier.host.9.1"
BT_PB_PIPELINE_STREAM_NAME "copier.SSP.10.1"
GOOGLE_RTC_AEC_SUPPORT 0
GOOGLE_RTC_AEC_REF_SOURCE 'module-copier.8.2'
}

# override defaults with platform-specific config
Expand All @@ -117,6 +125,11 @@ IncludeByKey.INCLUDE_ECHO_REF {
"true" "platform/intel/speaker-echo-ref.conf"
}

# enable GOOGLE RTC AEC if needed
IncludeByKey.GOOGLE_RTC_AEC_SUPPORT {
"[1]" "platform/intel/google-rtc-aec-reference.conf"
}

#
# List of all DAIs
#
Expand Down Expand Up @@ -279,61 +292,6 @@ Object.Pipeline {
}
}
]

gain-capture [
{
format $FORMAT
index 16

Object.Widget.pipeline.1 {
stream_name "DMIC Raw"
}
Object.Widget.copier.1 {
stream_name "DMIC Raw"
Object.Base.audio_format.1 {
in_bit_depth 32
in_valid_bit_depth 32
out_bit_depth 32
out_valid_bit_depth 32
}
Object.Base.audio_format.2 {
in_channels 4
in_bit_depth 32
in_valid_bit_depth 32
out_channels 4
out_bit_depth 32
out_valid_bit_depth 32
in_ch_cfg $CHANNEL_CONFIG_QUATRO
in_ch_map $CHANNEL_MAP_3_POINT_1
out_ch_cfg $CHANNEL_CONFIG_QUATRO
out_ch_map $CHANNEL_MAP_3_POINT_1
}
}
Object.Widget.gain.1 {
Object.Base.audio_format.1 {
in_bit_depth 32
in_valid_bit_depth 32
out_bit_depth 32
out_valid_bit_depth 32
}
Object.Base.audio_format.2 {
in_channels 4
in_bit_depth 32
in_valid_bit_depth 32
out_channels 4
out_bit_depth 32
out_valid_bit_depth 32
in_ch_cfg $CHANNEL_CONFIG_QUATRO
in_ch_map $CHANNEL_MAP_3_POINT_1
out_ch_cfg $CHANNEL_CONFIG_QUATRO
out_ch_map $CHANNEL_MAP_3_POINT_1
}
Object.Control.mixer.1 {
name 'Capture Raw Volume 1'
}
}
}
]
}

Object.PCM.pcm [
Expand Down Expand Up @@ -370,20 +328,6 @@ Object.PCM.pcm [
formats 'S16_LE,S24_LE,S32_LE'
}
}
{
name "DMIC Raw"
id 18
direction "capture"
Object.Base.fe_dai."DMIC Raw" {}

Object.PCM.pcm_caps."capture" {
name "DMIC Raw"
# only 32-bit capture supported now
formats 'S32_LE'
channels_min $NUM_DMICS
channels_max $NUM_DMICS
}
}
]

Object.Base.route [
Expand All @@ -407,8 +351,4 @@ Object.Base.route [
source "copier.SSP.6.1"
sink "copier.host.5.1"
}
{
source "module-copier.14.2"
sink "gain.16.1"
}
]
139 changes: 139 additions & 0 deletions tools/topology/topology2/include/components/google-rtc-aec.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
#
# Common widget google-rtc-aec
#
# A generic google-rtc-aec widget. All attributes defined herein are namespaced
# by alsatplg to "Object.Widget.google-rtc-aec.N.attribute_name"
#
# Usage: this component can be used by instantiating it in the parent object. i.e.
#
# Object.Widget.google-rtc-aec."N" {
# index 1
# type "effect"
# }
#
# Where N is the unique instance number for the google-rtc-aec object within the same alsaconf node.
Define {
AEC_UUID "a6:a0:80:b7:9f:26:6f:46:b4:77:23:df:a0:5a:f7:58"
}

Class.Widget."google-rtc-aec" {
#
# Pipeline ID for the google-rtc-aec widget object
#
DefineAttribute."index" {}

#
# google-rtc-aec object instance
#
DefineAttribute."instance" {}

#include common component definition
<include/components/widget-common.conf>

DefineAttribute."num_audio_formats" {
# Token set reference name and type
token_ref "sof_tkn_comp.word"
}

#
# google-rtc-aec widget UUID
#
DefineAttribute."uuid" {
type "string"
# Token set reference name and type
token_ref "sof_tkn_comp.uuid"
}

DefineAttribute."cpc" {
# Token set reference name and type
token_ref "sof_tkn_comp.word"
}

DefineAttribute."is_pages" {
# Token set reference name and type
token_ref "sof_tkn_comp.word"
}

# Attribute categories
attributes {
#
# The google-rtc-aec widget name would be constructed using the index and instance attributes.
# For ex: "google-rtc-aec.1.1" or "google-rtc-aec.10.2" etc.
#
!constructor [
"index"
"instance"
]

#
# mandatory attributes that must be provided when the class is instantiated
#
!mandatory [
"no_pm"
"uuid"
"process_type"
]

#
# immutable attributes cannot be modified in the object instance
#
!immutable [
"uuid"
"type"
]

#
# deprecated attributes should not be added in the object instance
#
!deprecated [
"preload_count"
]

#
# google-rtc-aec widget objects instantiated within the same alsaconf node must have unique
# instance attribute
#
unique "instance"
}

num_audio_formats 2
num_input_audio_formats 2
num_output_audio_formats 1
# pin0 is the data captured by DMIC and pin1 is the ref data from playback stream
Object.Base.input_audio_format {
1 {
pin_index 0
in_bit_depth 16
in_valid_bit_depth 16
out_bit_depth 16
out_valid_bit_depth 16
}
2 {
pin_index 1
in_bit_depth 16
in_valid_bit_depth 16
out_bit_depth 16
out_valid_bit_depth 16
}
}

Object.Base.output_audio_format {
1 {
in_bit_depth 16
in_valid_bit_depth 16
out_bit_depth 16
out_valid_bit_depth 16
}
}

# Default attribute values for google-rtc-aec widget
# UUID: B780A0A6-269F-466F-B477-23DFA05AF758
uuid $AEC_UUID
type "effect"
no_pm "true"
core_id 0
cpc 5000
is_pages 1
num_input_pins 2
num_output_pins 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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"
}
Loading