topology2: sdw-jack-generic: Replace audio_format objects

Use input_output_format/output_audio_format explicitly. Additionally,
this patch introduces the used of the CombineArrays feature in the
topology2 compiler to generate multiple audio format objects from the
attribute array combinations.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This commit is contained in:
Ranjani Sridharan 2023-10-12 09:32:46 -07:00 committed by Liam Girdwood
parent 6850be91ba
commit aeb83eccc4
1 changed files with 102 additions and 61 deletions

View File

@ -186,56 +186,85 @@ Object.Pipeline.host-gateway-capture [
Object.Widget.host-copier.1 {
stream_name "Passthrough Capture 0"
pcm_id 1
num_input_audio_formats 9
num_input_audio_formats 3
num_output_audio_formats 9
Object.Base.audio_format.1 {
# 32/32 -> 16/16 bits conversion is done here
in_bit_depth 32
in_valid_bit_depth 32
}
# 32-bit 48KHz 1ch
Object.Base.input_audio_format.7 {
in_channels 1
in_bit_depth 32
in_valid_bit_depth 32
in_ch_cfg $CHANNEL_CONFIG_MONO
in_ch_map $CHANNEL_MAP_MONO
}
Object.Base.output_audio_format.7 {
out_bit_depth 32
out_valid_bit_depth 32
out_channels 1
out_ch_cfg $CHANNEL_CONFIG_MONO
out_ch_map $CHANNEL_MAP_MONO
}
# 24-bit 48KHz 1ch
Object.Base.input_audio_format.8 {
in_channels 1
in_bit_depth 32
in_valid_bit_depth 32
in_ch_cfg $CHANNEL_CONFIG_MONO
in_ch_map $CHANNEL_MAP_MONO
}
Object.Base.output_audio_format.8 {
out_bit_depth 32
out_valid_bit_depth 24
out_channels 1
out_ch_cfg $CHANNEL_CONFIG_MONO
out_ch_map $CHANNEL_MAP_MONO
}
# 16-bit 48KHz 1ch
Object.Base.input_audio_format.9 {
in_channels 1
in_bit_depth 32
in_valid_bit_depth 32
in_ch_cfg $CHANNEL_CONFIG_MONO
in_ch_map $CHANNEL_MAP_MONO
}
Object.Base.output_audio_format.9 {
out_channels 1
out_ch_cfg $CHANNEL_CONFIG_MONO
out_ch_map $CHANNEL_MAP_MONO
}
Object.Base.input_audio_format [
# 32-bit 48KHz 2ch
{
in_bit_depth 32
in_valid_bit_depth 32
}
# 32-bit 48KHz 4ch
{
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
}
# 32-bit 48KHz 1ch
{
in_channels 1
in_bit_depth 32
in_valid_bit_depth 32
in_ch_cfg $CHANNEL_CONFIG_MONO
in_ch_map $CHANNEL_MAP_MONO
}
]
CombineArrays.Object.Base.output_audio_format [
# array of 2ch formats with range of out valid bit depths
{
out_bit_depth [ 32 ]
out_valid_bit_depth [
24
32
]
}
# array of 4ch formats with range of out valid bit depths
{
out_bit_depth [ 32 ]
out_valid_bit_depth [
24
32
]
out_channels [ 4 ]
out_ch_cfg [ $CHANNEL_CONFIG_3_POINT_1 ]
out_ch_map [ $CHANNEL_MAP_3_POINT_1 ]
}
# array of 1ch formats with range of out valid bit depths
{
out_bit_depth [ 32 ]
out_valid_bit_depth [
24
32
]
out_channels [ 1 ]
out_ch_cfg [ $CHANNEL_CONFIG_MONO ]
out_ch_map [ $CHANNEL_MAP_MONO ]
}
# 16-bit 2ch
{
out_bit_depth [ 16 ]
out_valid_bit_depth [ 16 ]
}
# 16-bit 4ch
{
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 ]
}
# 16-bit 1ch
{
out_channels [ 1 ]
out_bit_depth [ 16 ]
out_valid_bit_depth [ 16 ]
out_ch_cfg [ $CHANNEL_CONFIG_MONO ]
out_ch_map [ $CHANNEL_MAP_MONO ]
}
]
}
}
]
@ -253,12 +282,18 @@ Object.Widget {
num_output_audio_formats 1
num_output_pins 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.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
]
@ -279,12 +314,18 @@ IncludeByKey.PASSTHROUGH {
num_input_audio_formats 1
num_output_audio_formats 1
index 11
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.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
}
]
Object.Control.bytes."1" {
<include/components/eqiir/highpass_40hz_0db_48khz.conf>