topology2: google-rtc-aec: Add 4ch audio formats

The DMIC capture path should support both 4ch and 2ch audio formats.
Also, since the Google AEC module only support 16-bit input format,
modify the output of the refeence capture DAI accordingly.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This commit is contained in:
Ranjani Sridharan 2023-08-31 10:19:58 -07:00 committed by Kai Vehmanen
parent 18595e9cd3
commit 351fe7e3ef
3 changed files with 91 additions and 35 deletions

View File

@ -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
out_bit_depth 16
out_valid_bit_depth 16
}
}
]
Object.Base.output_audio_format {
1 {
in_bit_depth 16
in_valid_bit_depth 16
Object.Base.output_audio_format [
{
out_bit_depth 16
out_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

View File

@ -53,15 +53,38 @@ 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 {
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
}
# 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
}
]
}
google-rtc-aec."1" {
@ -87,16 +110,37 @@ Class.Pipeline."google-rtc-aec-capture" {
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 {
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
}
]
}
}

View File

@ -23,8 +23,8 @@ Object.Pipeline {
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
out_bit_depth 16
out_valid_bit_depth 16
}
]
}