diff --git a/tools/topology/topology2/platform/intel/sdw-jack-generic.conf b/tools/topology/topology2/platform/intel/sdw-jack-generic.conf index a05a441e5db2..5c27ae386238 100644 --- a/tools/topology/topology2/platform/intel/sdw-jack-generic.conf +++ b/tools/topology/topology2/platform/intel/sdw-jack-generic.conf @@ -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 + } + ] + Output.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 + } + ] + Ooutput.Base.output_audio_format [ + { + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] Object.Control.bytes."1" {