diff --git a/tools/topology/topology2/cavs-sdw.conf b/tools/topology/topology2/cavs-sdw.conf index a4d9375f5ff2..2ba7febe63b6 100644 --- a/tools/topology/topology2/cavs-sdw.conf +++ b/tools/topology/topology2/cavs-sdw.conf @@ -167,6 +167,12 @@ IncludeByKey.SDW_ECHO_REF_DAI { ] } ] + IncludeByKey.NUM_SDW_AMP_LINKS { + "0" "platform/intel/sdw-amp-echo-ref.conf" + } + IncludeByKey.SDW_JACK { + "false" "platform/intel/sdw-jack-echo-ref.conf" + } } } diff --git a/tools/topology/topology2/platform/intel/sdw-amp-echo-ref.conf b/tools/topology/topology2/platform/intel/sdw-amp-echo-ref.conf new file mode 100644 index 000000000000..7b75a233c7f4 --- /dev/null +++ b/tools/topology/topology2/platform/intel/sdw-amp-echo-ref.conf @@ -0,0 +1,125 @@ + +Define { + SDW_SPK_ECHO_REF_PCM_ID 12 + SDW_SPK_ECHO_REF_PIPELINE_ID 120 +} + +IncludeByKey.PASSTHROUGH { + "false" { + IncludeByKey.SDW_SPK_ECHO_REF { + "true" { + IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK { + "true" { + IncludeByKey.USE_DAX { + "true" { + Object.Base.route [ + { + source "dolby-dax.21.1" + sink "module-copier.21.$SDW_SPK_ECHO_REF_PIPELINE_ID" + } + { + source "module-copier.21.$SDW_SPK_ECHO_REF_PIPELINE_ID" + sink "alh-copier.$SDW_SPK_STREAM.0" + } + ] + } + "false" { + Object.Base.route [ + { + source "drc.21.1" + sink "module-copier.21.$SDW_SPK_ECHO_REF_PIPELINE_ID" + } + { + source "module-copier.21.$SDW_SPK_ECHO_REF_PIPELINE_ID" + sink "alh-copier.$SDW_SPK_STREAM.0" + } + ] + } + } + } + "false" { + Object.Base.route [ + { + source "gain.21.1" + sink "module-copier.21.$SDW_SPK_ECHO_REF_PIPELINE_ID" + } + { + source "module-copier.21.$SDW_SPK_ECHO_REF_PIPELINE_ID" + sink "alh-copier.$SDW_SPK_STREAM.0" + } + ] + } + } + } + } + } +} + +IncludeByKey.SDW_SPK_ECHO_REF { + "true" { + #module-copier ID should match SDW_SPK_ECHO_REF_PIPELINE_ID + Object.Widget.module-copier."120" { + index 21 + num_input_pins 1 + num_output_pins 2 + num_input_audio_formats 1 + num_output_audio_formats 1 + 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.Pipeline { + siggen-host-copier-capture [ + { + direction "capture" + index $SDW_SPK_ECHO_REF_PIPELINE_ID + Object.Widget.host-copier."1" { + stream_name "Speaker Echo Reference" + pcm_id $SDW_SPK_ECHO_REF_PCM_ID + } + Object.Widget.siggen."1" {} + } + ] + } + + Object.PCM.pcm [ + { + name "Speaker Echo Reference" + id $SDW_SPK_ECHO_REF_PCM_ID + direction "capture" + Object.Base.fe_dai.1 { + name "Speaker Echo Reference" + } + Object.PCM.pcm_caps.1 { + name "Speaker Echo Reference" + formats 'S16_LE,S24_LE,S32_LE' + } + } + ] + + Object.Base.route [ + { + source "alh-copier.Loopback_Virtual.25" + sink "siggen.$SDW_SPK_ECHO_REF_PIPELINE_ID.1" + } + { + source "module-copier.21.$SDW_SPK_ECHO_REF_PIPELINE_ID" + sink "siggen.$SDW_SPK_ECHO_REF_PIPELINE_ID.1" + } + { + source "siggen.$SDW_SPK_ECHO_REF_PIPELINE_ID.1" + sink "host-copier.$SDW_SPK_ECHO_REF_PCM_ID.capture" + } + ] + } # SDW_SPK_ECHO_REF true +} diff --git a/tools/topology/topology2/platform/intel/sdw-amp-generic.conf b/tools/topology/topology2/platform/intel/sdw-amp-generic.conf index ae01992bcad1..cb885ab6fdc2 100644 --- a/tools/topology/topology2/platform/intel/sdw-amp-generic.conf +++ b/tools/topology/topology2/platform/intel/sdw-amp-generic.conf @@ -13,7 +13,6 @@ Define { AMP_FEEDBACK_CH_PER_LINK 2 SDW_AMP_FEEDBACK true AMP_PLAYBACK_NAME 'Speaker Playback' - SDW_SPK_ECHO_REF_PCM_ID 12 } # include deep buffer config if buffer size is in 1 - 1000 ms. @@ -738,50 +737,6 @@ Object.PCM.pcm [ IncludeByKey.PASSTHROUGH { "false" { IncludeByKey.SDW_SPK_ECHO_REF { - "true" { - IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK { - "true" { - IncludeByKey.USE_DAX { - "true" { - Object.Base.route [ - { - source "dolby-dax.21.1" - sink "module-copier.21.22" - } - { - source "module-copier.21.22" - sink "alh-copier.$SDW_SPK_STREAM.0" - } - ] - } - "false" { - Object.Base.route [ - { - source "drc.21.1" - sink "module-copier.21.22" - } - { - source "module-copier.21.22" - sink "alh-copier.$SDW_SPK_STREAM.0" - } - ] - } - } - } - "false" { - Object.Base.route [ - { - source "gain.21.1" - sink "module-copier.21.22" - } - { - source "module-copier.21.22" - sink "alh-copier.$SDW_SPK_STREAM.0" - } - ] - } - } - } "false" { IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK { "true" { @@ -1047,69 +1002,5 @@ IncludeByKey.SDW_AMP_FEEDBACK { } IncludeByKey.SDW_SPK_ECHO_REF { - "true" { - Object.Widget.module-copier."22" { - index 21 - num_input_pins 1 - num_output_pins 2 - num_input_audio_formats 1 - num_output_audio_formats 1 - 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.Pipeline { - siggen-host-copier-capture [ - { - direction "capture" - index 22 - Object.Widget.host-copier."1" { - stream_name "Speaker Echo Reference" - pcm_id $SDW_SPK_ECHO_REF_PCM_ID - } - Object.Widget.siggen."1" {} - } - ] - } - - Object.PCM.pcm [ - { - name "Speaker Echo Reference" - id $SDW_SPK_ECHO_REF_PCM_ID - direction "capture" - Object.Base.fe_dai.1 { - name "Speaker Echo Reference" - } - Object.PCM.pcm_caps.1 { - name "Speaker Echo Reference" - formats 'S16_LE,S24_LE,S32_LE' - } - } - ] - - Object.Base.route [ - { - source "alh-copier.Loopback_Virtual.25" - sink "siggen.22.1" - } - { - source "module-copier.21.22" - sink "siggen.22.1" - } - { - source "siggen.22.1" - sink "host-copier.$SDW_SPK_ECHO_REF_PCM_ID.capture" - } - ] - } # SDW_SPK_ECHO_REF true + "true" "platform/intel/sdw-amp-echo-ref.conf" } diff --git a/tools/topology/topology2/platform/intel/sdw-jack-echo-ref.conf b/tools/topology/topology2/platform/intel/sdw-jack-echo-ref.conf new file mode 100644 index 000000000000..44dfa01d4f6e --- /dev/null +++ b/tools/topology/topology2/platform/intel/sdw-jack-echo-ref.conf @@ -0,0 +1,167 @@ + +Define { + SDW_JACK_ECHO_REF_PCM_ID 11 + SDW_JACK_ECHO_REF_PIPELINE_ID 110 +} + +IncludeByKey.PASSTHROUGH { + "false" { + IncludeByKey.SDW_JACK_ECHO_REF { + "true" { + IncludeByKey.USE_DAX { + "true" { + Object.Base.route [ + { + source "dolby-dax.1.1" + sink "module-copier.1.$SDW_JACK_ECHO_REF_PIPELINE_ID" + } + { + source "module-copier.1.$SDW_JACK_ECHO_REF_PIPELINE_ID" + sink "alh-copier.$SDW_JACK_OUT_STREAM.0" + } + ] + } + "false" { + Object.Base.route [ + { + source "gain.1.1" + sink "module-copier.1.$SDW_JACK_ECHO_REF_PIPELINE_ID" + } + { + source "module-copier.1.$SDW_JACK_ECHO_REF_PIPELINE_ID" + sink "alh-copier.$SDW_JACK_OUT_STREAM.0" + } + ] + } + } + } + } + } +} + +IncludeByKey.SDW_JACK_ECHO_REF { + "true" { + #module-copier ID should match SDW_JACK_ECHO_REF_PIPELINE_ID + Object.Widget.module-copier."110" { + index 1 + num_input_pins 1 + num_output_pins 2 + num_input_audio_formats 1 + num_output_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate $JACK_RATE + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate $JACK_RATE + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + + Object.Pipeline { + siggen-host-copier-capture [ + { + direction "capture" + index $SDW_JACK_ECHO_REF_PIPELINE_ID + Object.Widget.host-copier."1" { + stream_name "Jack Echo Reference" + pcm_id $SDW_JACK_ECHO_REF_PCM_ID + num_input_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate $JACK_RATE + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + num_output_audio_formats 3 + Object.Base.output_audio_format [ + { + out_rate $JACK_RATE + out_bit_depth 16 + out_valid_bit_depth 16 + } + { + out_rate $JACK_RATE + out_bit_depth 32 + out_valid_bit_depth 24 + } + { + out_rate $JACK_RATE + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + Object.Widget.siggen."1" { + num_input_pins 1 + num_output_pins 1 + num_input_audio_formats 1 + num_output_audio_formats 1 + Object.Base.input_audio_format [ + { + in_rate $JACK_RATE + in_bit_depth 32 + in_valid_bit_depth 32 + } + ] + Object.Base.output_audio_format [ + { + out_rate $JACK_RATE + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] + } + } + ] + } + + Object.PCM.pcm [ + { + name "Jack Echo Reference" + id $SDW_JACK_ECHO_REF_PCM_ID + direction "capture" + Object.Base.fe_dai.1 { + name "Jack Echo Reference" + } + Object.PCM.pcm_caps.1 { + name "Jack Echo Reference" + formats 'S16_LE,S24_LE,S32_LE' + } + IncludeByKey.JACK_RATE { + "48000" { + rates '48000' + } + "96000" { + rates '96000' + } + "192000" { + rates '192000' + } + } + } + ] + + Object.Base.route [ + { + source "alh-copier.Loopback_Virtual.25" + sink "siggen.$SDW_JACK_ECHO_REF_PIPELINE_ID.1" + } + { + source "module-copier.1.$SDW_JACK_ECHO_REF_PIPELINE_ID" + sink "siggen.$SDW_JACK_ECHO_REF_PIPELINE_ID.1" + } + { + source "siggen.$SDW_JACK_ECHO_REF_PIPELINE_ID.1" + sink "host-copier.$SDW_JACK_ECHO_REF_PCM_ID.capture" + } + ] + } # SDW_JACK_ECHO_REF true +} diff --git a/tools/topology/topology2/platform/intel/sdw-jack-generic.conf b/tools/topology/topology2/platform/intel/sdw-jack-generic.conf index 27d54ba9843f..5c3a114fa0cc 100644 --- a/tools/topology/topology2/platform/intel/sdw-jack-generic.conf +++ b/tools/topology/topology2/platform/intel/sdw-jack-generic.conf @@ -11,7 +11,6 @@ Define { JACK_PLAYBACK_PCM_NAME "Jack Out" JACK_CAPTURE_PCM_NAME "Jack In" JACK_RATE 48000 - SDW_JACK_ECHO_REF_PCM_ID 11 } # @@ -656,34 +655,6 @@ Object.PCM.pcm [ IncludeByKey.PASSTHROUGH { "false" { IncludeByKey.SDW_JACK_ECHO_REF { - "true" { - IncludeByKey.USE_DAX { - "true" { - Object.Base.route [ - { - source "dolby-dax.1.1" - sink "module-copier.1.12" - } - { - source "module-copier.1.12" - sink "alh-copier.$SDW_JACK_OUT_STREAM.0" - } - ] - } - "false" { - Object.Base.route [ - { - source "gain.1.1" - sink "module-copier.1.12" - } - { - source "module-copier.1.12" - sink "alh-copier.$SDW_JACK_OUT_STREAM.0" - } - ] - } - } - } "false" { IncludeByKey.USE_DAX { "true" { @@ -740,127 +711,5 @@ IncludeByKey.PASSTHROUGH { } IncludeByKey.SDW_JACK_ECHO_REF { - "true" { - Object.Widget.module-copier."12" { - index 1 - num_input_pins 1 - num_output_pins 2 - num_input_audio_formats 1 - num_output_audio_formats 1 - Object.Base.input_audio_format [ - { - in_rate $JACK_RATE - in_bit_depth 32 - in_valid_bit_depth 32 - } - ] - Object.Base.output_audio_format [ - { - out_rate $JACK_RATE - out_bit_depth 32 - out_valid_bit_depth 32 - } - ] - } - - Object.Pipeline { - siggen-host-copier-capture [ - { - direction "capture" - index 12 - Object.Widget.host-copier."1" { - stream_name "Jack Echo Reference" - pcm_id $SDW_JACK_ECHO_REF_PCM_ID - num_input_audio_formats 1 - Object.Base.input_audio_format [ - { - in_rate $JACK_RATE - in_bit_depth 32 - in_valid_bit_depth 32 - } - ] - num_output_audio_formats 3 - Object.Base.output_audio_format [ - { - out_rate $JACK_RATE - out_bit_depth 16 - out_valid_bit_depth 16 - } - { - out_rate $JACK_RATE - out_bit_depth 32 - out_valid_bit_depth 24 - } - { - out_rate $JACK_RATE - out_bit_depth 32 - out_valid_bit_depth 32 - } - ] - } - Object.Widget.siggen."1" { - num_input_pins 1 - num_output_pins 1 - num_input_audio_formats 1 - num_output_audio_formats 1 - Object.Base.input_audio_format [ - { - in_rate $JACK_RATE - in_bit_depth 32 - in_valid_bit_depth 32 - } - ] - Object.Base.output_audio_format [ - { - out_rate $JACK_RATE - out_bit_depth 32 - out_valid_bit_depth 32 - } - ] - } - } - ] - } - - Object.PCM.pcm [ - { - name "Jack Echo Reference" - id $SDW_JACK_ECHO_REF_PCM_ID - direction "capture" - Object.Base.fe_dai.1 { - name "Jack Echo Reference" - } - Object.PCM.pcm_caps.1 { - name "Jack Echo Reference" - formats 'S16_LE,S24_LE,S32_LE' - } - IncludeByKey.JACK_RATE { - "48000" { - rates '48000' - } - "96000" { - rates '96000' - } - "192000" { - rates '192000' - } - } - } - ] - - Object.Base.route [ - { - source "alh-copier.Loopback_Virtual.25" - sink "siggen.12.1" - } - { - source "module-copier.1.12" - sink "siggen.12.1" - } - { - source "siggen.12.1" - sink "host-copier.$SDW_JACK_ECHO_REF_PCM_ID.capture" - } - ] - } # SDW_JACK_ECHO_REF true + "true" "platform/intel/sdw-jack-echo-ref.conf" } diff --git a/tools/topology/topology2/production/tplg-targets-sdca-generic.cmake b/tools/topology/topology2/production/tplg-targets-sdca-generic.cmake index 5327b23aaf4e..0eb16bc6b6d1 100644 --- a/tools/topology/topology2/production/tplg-targets-sdca-generic.cmake +++ b/tools/topology/topology2/production/tplg-targets-sdca-generic.cmake @@ -30,6 +30,18 @@ DEEP_BUF_SPK=true" "cavs-sdw\;sof-sdca-mic-id4\;SDW_JACK=false,SDW_DMIC=1,NUM_HDMIS=0,\ SDW_DMIC_STREAM=Capture-SmartMic" +"cavs-sdw\;sof-sdca-amp-ref\;SDW_JACK=false,NUM_HDMIS=0,SDW_ECHO_REF_DAI=true,\ +SDW_SPK_STREAM=Playback-SmartAmp,SDW_SPK_ECHO_REF=true,SDW_AMP_FEEDBACK=false,\ +JACK_RATE=48000" + +"cavs-sdw\;sof-sdca-jack-ref\;SDW_JACK=false,NUM_HDMIS=0,SDW_ECHO_REF_DAI=true,\ +SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_ECHO_REF=true,JACK_RATE=48000,\ +SDW_AMP_FEEDBACK=false" + +"cavs-sdw\;sof-sdca-jack-amp-ref\;SDW_JACK=false,NUM_HDMIS=0,SDW_ECHO_REF_DAI=true,\ +SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_SPK_STREAM=Playback-SmartAmp,\ +SDW_JACK_ECHO_REF=true,JACK_RATE=48000,SDW_SPK_ECHO_REF=true,SDW_AMP_FEEDBACK=false" + "cavs-sdw\;sof-hdmi-pcm5-id2\;SDW_JACK=false,HDMI1_ID=2,HDMI2_ID=3,HDMI3_ID=4" "cavs-sdw\;sof-hdmi-pcm5-id3\;SDW_JACK=false,HDMI1_ID=3,HDMI2_ID=4,HDMI3_ID=5" "cavs-sdw\;sof-hdmi-pcm5-id4\;SDW_JACK=false,HDMI1_ID=4,HDMI2_ID=5,HDMI3_ID=6"