diff --git a/tools/topology/topology2/platform/intel/sdw-jack-generic.conf b/tools/topology/topology2/platform/intel/sdw-jack-generic.conf index 493e14603..8d71a19c1 100644 --- a/tools/topology/topology2/platform/intel/sdw-jack-generic.conf +++ b/tools/topology/topology2/platform/intel/sdw-jack-generic.conf @@ -10,6 +10,7 @@ IncludeByKey.PASSTHROUGH { Define { JACK_PLAYBACK_PCM_NAME "Jack Out" JACK_CAPTURE_PCM_NAME "Jack In" + SDW_JACK_FMT_24 "false" } # @@ -75,6 +76,19 @@ IncludeByKey.PASSTHROUGH { Object.Widget.alh-copier.1 { stream_name $SDW_JACK_OUT_STREAM node_type $ALH_LINK_OUTPUT_CLASS + IncludeByKey.SDW_JACK_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_sample_type * 65536)]" + } + ] + } + } } Object.Widget.gain.1 { Object.Control.mixer.1 { @@ -156,27 +170,42 @@ 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_JACK_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 + 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 [ @@ -294,14 +323,28 @@ Object.Widget { num_output_audio_formats 1 num_output_pins 1 - 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_JACK_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