diff --git a/tools/topology/topology2/platform/intel/sdw-amp-generic.conf b/tools/topology/topology2/platform/intel/sdw-amp-generic.conf index 8dc9e80db..dd294600f 100644 --- a/tools/topology/topology2/platform/intel/sdw-amp-generic.conf +++ b/tools/topology/topology2/platform/intel/sdw-amp-generic.conf @@ -9,6 +9,7 @@ Define { SDW_AMP_IN_BE_ID 3 AMP_FEEDBACK_CH 2 SDW_AMP_FEEDBACK true + SDW_AMP_FMT_24 false } Object.Dai.ALH [ @@ -54,6 +55,19 @@ IncludeByKey.PASSTHROUGH { Object.Widget.alh-copier.1 { stream_name $SDW_SPK_STREAM node_type $ALH_LINK_OUTPUT_CLASS + IncludeByKey.SDW_AMP_FMT_24 { + "true" { + num_output_audio_formats 1 + Object.Base.output_audio_format [ + { + out_bit_depth 32 + out_valid_bit_depth 24 + out_sample_type $SAMPLE_TYPE_MSB_INTEGER + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" + } + ] + } + } } Object.Widget.gain.1 { Object.Control.mixer.1 { @@ -136,27 +150,44 @@ IncludeByKey.PASSTHROUGH { in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]" } ] - num_output_audio_formats 3 - Object.Base.output_audio_format [ - { - out_bit_depth 16 - out_valid_bit_depth 16 - out_sample_type $SAMPLE_TYPE_MSB_INTEGER - out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" + IncludeByKey.SDW_AMP_FMT_24 { + "true" { + num_output_audio_formats 1 + Object.Base.output_audio_format [ + { + out_bit_depth 32 + out_valid_bit_depth 24 + out_sample_type $SAMPLE_TYPE_MSB_INTEGER + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" + + } + ] } - { - out_bit_depth 32 - out_valid_bit_depth 24 - out_sample_type $SAMPLE_TYPE_MSB_INTEGER - out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" + "false" { + num_output_audio_formats 3 + num_output_audio_formats 3 + Object.Base.output_audio_format [ + { + out_bit_depth 16 + out_valid_bit_depth 16 + out_sample_type $SAMPLE_TYPE_MSB_INTEGER + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" + } + { + out_bit_depth 32 + out_valid_bit_depth 24 + out_sample_type $SAMPLE_TYPE_MSB_INTEGER + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" + } + { + out_bit_depth 32 + out_valid_bit_depth 32 + out_sample_type $SAMPLE_TYPE_MSB_INTEGER + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" + } + ] } - { - out_bit_depth 32 - out_valid_bit_depth 32 - out_sample_type $SAMPLE_TYPE_MSB_INTEGER - out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" - } - ] + } } ] pipeline [ @@ -190,8 +221,6 @@ IncludeByKey.NUM_SDW_AMP_LINKS { num_input_audio_formats 1 num_output_audio_formats 1 num_input_pins 1 - - # 32-bit 48KHz 2ch Object.Base.input_audio_format [ { in_bit_depth 32 @@ -200,14 +229,28 @@ IncludeByKey.NUM_SDW_AMP_LINKS { in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]" } ] - Object.Base.output_audio_format [ - { - out_bit_depth 32 - out_valid_bit_depth 32 - out_sample_type $SAMPLE_TYPE_MSB_INTEGER - out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" + IncludeByKey.SDW_AMP_FMT_24 { + "true" { + Object.Base.output_audio_format [ + { + out_bit_depth 32 + out_valid_bit_depth 24 + out_sample_type $SAMPLE_TYPE_MSB_INTEGER + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" + } + ] } - ] + "false" { + Object.Base.output_audio_format [ + { + out_bit_depth 32 + out_valid_bit_depth 32 + out_sample_type $SAMPLE_TYPE_MSB_INTEGER + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" + } + ] + } + } } ] IncludeByKey.SDW_AMP_FEEDBACK { @@ -225,15 +268,28 @@ IncludeByKey.NUM_SDW_AMP_LINKS { num_output_audio_formats 1 num_output_pins 1 - # 32-bit 48KHz 2ch - Object.Base.input_audio_format [ - { - in_bit_depth 32 - in_valid_bit_depth 32 - in_sample_type $SAMPLE_TYPE_MSB_INTEGER - in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]" + IncludeByKey.SDW_AMP_FMT_24 { + "true" { + Object.Base.input_audio_format [ + { + in_bit_depth 32 + in_valid_bit_depth 24 + in_sample_type $SAMPLE_TYPE_MSB_INTEGER + in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]" + } + ] } - ] + "false" { + Object.Base.input_audio_format [ + { + in_bit_depth 32 + in_valid_bit_depth 32 + in_sample_type $SAMPLE_TYPE_MSB_INTEGER + in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]" + } + ] + } + } Object.Base.output_audio_format [ { out_bit_depth 32