diff --git a/tools/topology/topology2/cavs-mixin-mixout-hda.conf b/tools/topology/topology2/cavs-mixin-mixout-hda.conf index f96987aef8e3..95662d468299 100644 --- a/tools/topology/topology2/cavs-mixin-mixout-hda.conf +++ b/tools/topology/topology2/cavs-mixin-mixout-hda.conf @@ -87,12 +87,16 @@ Object.PCM { pcm.0 { id 0 name 'HDA Analog' - Object.Base.fe_dai.'HDA Analog' {} - Object.PCM.pcm_caps.playback { + Object.Base.fe_dai.1 { + name "HDA Analog" + } + Object.PCM.pcm_caps.1 { + direction "playback" name $ANALOG_PLAYBACK_PCM formats 'S32_LE,S24_LE,S16_LE' } - Object.PCM.pcm_caps.capture { + Object.PCM.pcm_caps.2 { + direction "capture" name $ANALOG_CAPTURE_PCM formats 'S32_LE,S24_LE,S16_LE' } diff --git a/tools/topology/topology2/cavs-nocodec.conf b/tools/topology/topology2/cavs-nocodec.conf index e59823dd6e70..348e45f363a5 100644 --- a/tools/topology/topology2/cavs-nocodec.conf +++ b/tools/topology/topology2/cavs-nocodec.conf @@ -366,14 +366,18 @@ Object.PCM { name "Port0" id 0 direction "duplex" - Object.Base.fe_dai."Port0" {} + Object.Base.fe_dai.1 { + name "Port0" + } - Object.PCM.pcm_caps."playback" { + Object.PCM.pcm_caps.1 { + direction "playback" name "SSP0 Playback" formats 'S16_LE,S24_LE,S32_LE' } - Object.PCM.pcm_caps."capture" { + Object.PCM.pcm_caps.2 { + direction "capture" name "SSP0 Capture" formats 'S16_LE,S24_LE,S32_LE' } @@ -382,9 +386,10 @@ Object.PCM { name "ssp-capture" id 12 direction "capture" - Object.Base.fe_dai."ssp-capture" {} - - Object.PCM.pcm_caps."capture" { + Object.Base.fe_dai.1 { + name "ssp-capture" + } + Object.PCM.pcm_caps.1 { name "SSP0-1 Capture" formats 'S16_LE,S24_LE,S32_LE' } @@ -393,14 +398,18 @@ Object.PCM { name "Port1" id 1 direction "duplex" - Object.Base.fe_dai."Port1" {} + Object.Base.fe_dai.1 { + name "Port1" + } - Object.PCM.pcm_caps."playback" { + Object.PCM.pcm_caps.1 { + direction "playback" name "SSP1 Playback" formats 'S16_LE,S24_LE,S32_LE' } - Object.PCM.pcm_caps."capture" { + Object.PCM.pcm_caps.2 { + direction "capture" name "SSP1 Capture" formats 'S16_LE,S24_LE,S32_LE' } @@ -409,14 +418,18 @@ Object.PCM { name "Port2" id 2 direction "duplex" - Object.Base.fe_dai."Port2" {} + Object.Base.fe_dai.1 { + name "Port2" + } - Object.PCM.pcm_caps."playback" { + Object.PCM.pcm_caps.1 { + direction "playback" name "SSP2 Playback" formats 'S16_LE,S24_LE,S32_LE' } - Object.PCM.pcm_caps."capture" { + Object.PCM.pcm_caps.2 { + direction "capture" name "SSP2 Capture" formats 'S16_LE,S24_LE,S32_LE' } diff --git a/tools/topology/topology2/cavs-rt5682.conf b/tools/topology/topology2/cavs-rt5682.conf index 40e660c02c67..b04957d990ea 100644 --- a/tools/topology/topology2/cavs-rt5682.conf +++ b/tools/topology/topology2/cavs-rt5682.conf @@ -249,15 +249,19 @@ Object.PCM { name "Headset" id 0 direction "duplex" - Object.Base.fe_dai."Headset" {} + Object.Base.fe_dai.1 { + name "Headset" + } - Object.PCM.pcm_caps."playback" { - name "$HEADSET_PLAYBACK_PCM_STREAM_NAME" + Object.PCM.pcm_caps.1 { + direction "playback" + name "$HEADSET_PLAYBACK_PCM_STREAM_NAME" formats 'S16_LE,S24_LE,S32_LE' } - Object.PCM.pcm_caps."capture" { - name "$HEADSET_CAPTURE_PCM_STREAM_NAME" + Object.PCM.pcm_caps.2 { + direction "capture" + name "$HEADSET_CAPTURE_PCM_STREAM_NAME" formats 'S16_LE,S24_LE,S32_LE' } } @@ -265,9 +269,11 @@ Object.PCM { name "Speakers" id 1 direction "playback" - Object.Base.fe_dai."Speakers" {} + Object.Base.fe_dai.1 { + name "Speakers" + } - Object.PCM.pcm_caps."playback" { + Object.PCM.pcm_caps.1 { name "$SPEAKER_PLAYBACK_PCM_STREAM_NAME" formats 'S16_LE,S24_LE,S32_LE' } diff --git a/tools/topology/topology2/cavs-sdw-src-gain-mixin.conf b/tools/topology/topology2/cavs-sdw-src-gain-mixin.conf index f217f05085f9..0feaa3872aea 100644 --- a/tools/topology/topology2/cavs-sdw-src-gain-mixin.conf +++ b/tools/topology/topology2/cavs-sdw-src-gain-mixin.conf @@ -133,9 +133,11 @@ Object.PCM { name "Jack out" id 0 direction "playback" - Object.Base.fe_dai."Jack out" {} + Object.Base.fe_dai.1 { + name "Jack out" + } - Object.PCM.pcm_caps."playback" { + Object.PCM.pcm_caps.1 { name "Gain Playback 0" formats 'S16_LE,S32_LE' rate_min 16000 @@ -146,9 +148,11 @@ Object.PCM { name "Jack in" id 1 direction "capture" - Object.Base.fe_dai."Jack in" {} + Object.Base.fe_dai.1 { + name "Jack in" + } - Object.PCM.pcm_caps."capture" { + Object.PCM.pcm_caps.1 { name "Passthrough Capture 0" formats 'S16_LE,S32_LE' } diff --git a/tools/topology/topology2/cavs-sdw.conf b/tools/topology/topology2/cavs-sdw.conf index 885940ef8ed3..ad6a67b45162 100644 --- a/tools/topology/topology2/cavs-sdw.conf +++ b/tools/topology/topology2/cavs-sdw.conf @@ -194,9 +194,11 @@ Object.PCM { name "Jack out" id 0 direction "playback" - Object.Base.fe_dai."Jack out" {} + Object.Base.fe_dai.1 { + name "Jack out" + } - Object.PCM.pcm_caps."playback" { + Object.PCM.pcm_caps.1 { name "volume playback 0" formats 'S16_LE,S32_LE' } @@ -205,9 +207,11 @@ Object.PCM { name "Jack in" id 1 direction "capture" - Object.Base.fe_dai."Jack in" {} + Object.Base.fe_dai.1 { + name "Jack in" + } - Object.PCM.pcm_caps."capture" { + Object.PCM.pcm_caps.1 { name "Passthrough Capture 0" formats 'S16_LE,S32_LE' } diff --git a/tools/topology/topology2/get_abi.sh b/tools/topology/topology2/get_abi.sh index 1ddb8549b11e..a029846c9ea6 100755 --- a/tools/topology/topology2/get_abi.sh +++ b/tools/topology/topology2/get_abi.sh @@ -8,8 +8,10 @@ ABI_MINOR=$(awk '/^ *# *define *SOF_ABI_MINOR / { print $3 }' $1/src/include/ker ABI_PATCH=$(awk '/^ *# *define *SOF_ABI_PATCH / { print $3 }' $1/src/include/kernel/abi.h) cat < - # instance of pipeline object in the same alsaconf node - DefineAttribute."instance" {} - # # Bespoke Tuples for Pipelines # diff --git a/tools/topology/topology2/include/components/virtual.conf b/tools/topology/topology2/include/components/virtual.conf index 64cb6956609d..095628d0a02d 100644 --- a/tools/topology/topology2/include/components/virtual.conf +++ b/tools/topology/topology2/include/components/virtual.conf @@ -13,6 +13,8 @@ # Class.Widget."virtual" { + DefineAttribute."instance" {} + # # Argument used to construct virtual widget object: name # @@ -42,7 +44,7 @@ Class.Widget."virtual" { !mandatory [ "type" ] - unique "name" + unique "instance" } # default attribute values for virtual widget diff --git a/tools/topology/topology2/include/components/volume.conf b/tools/topology/topology2/include/components/volume.conf index fa6338b167b1..f83e0d081889 100644 --- a/tools/topology/topology2/include/components/volume.conf +++ b/tools/topology/topology2/include/components/volume.conf @@ -116,12 +116,16 @@ Class.Widget."pga" { # volume mixer control mixer."1" { #Channel register and shift for Front Left/Right - Object.Base.channel."fl" { + Object.Base.channel.1 { + name "fl" shift 0 } - Object.Base.channel."fr" {} + Object.Base.channel.2 { + name "fr" + } - Object.Base.ops."ctl" { + Object.Base.ops.1 { + name "ctl" info "volsw" #256 binds the mixer control to volume get/put handlers get 256 @@ -132,24 +136,29 @@ Class.Widget."pga" { # mute switch control mixer."2" { - Object.Base.channel."flw" { + Object.Base.channel.1 { + name "flw" reg 2 shift 0 } - Object.Base.channel."fl" { + Object.Base.channel.2 { + name "fl" reg 2 shift 1 } - Object.Base.channel."fr" { + Object.Base.channel.3 { + name "fr" reg 2 shift 2 } - Object.Base.channel."frw" { + Object.Base.channel.4 { + name "frw" reg 2 shift 3 } - Object.Base.ops."ctl" { + Object.Base.ops.1 { + name "ctl" info "volsw" #259 binds the mixer control to switch get/put handlers get "259" diff --git a/tools/topology/topology2/include/components/widget-common.conf b/tools/topology/topology2/include/components/widget-common.conf index b1be3f8757dd..a9f7e939c4bb 100644 --- a/tools/topology/topology2/include/components/widget-common.conf +++ b/tools/topology/topology2/include/components/widget-common.conf @@ -2,6 +2,9 @@ # Common widget attribute definitions # +# instance of the widget object +DefineAttribute."instance" {} + # # no_pm - maps to the DAPM widget's reg field # "false" value indicates that there is no direct DAPM for this widget diff --git a/tools/topology/topology2/include/controls/common.conf b/tools/topology/topology2/include/controls/common.conf index ab31d22f271b..77593fccc1fb 100644 --- a/tools/topology/topology2/include/controls/common.conf +++ b/tools/topology/topology2/include/controls/common.conf @@ -8,7 +8,7 @@ # } # Class.Base."channel" { - + DefineAttribute."instance" {} # name of the channel DefineAttribute."name" { type "string" @@ -24,9 +24,9 @@ Class.Base."channel" { ] # # scale objects instantiated within the same alsaconf node must have unique - # name attribute + # instance attribute # - unique "name" + unique "instance" } reg 1 @@ -41,6 +41,7 @@ Class.Base."channel" { # } # Class.Base."ops" { + DefineAttribute."instance" {} # ops name DefineAttribute."name" { type "string" @@ -61,9 +62,9 @@ Class.Base."ops" { ] # # ops objects instantiated within the same alsaconf node must have unique - # name attribute + # instance attribute # - unique "name" + unique "instance" } } @@ -75,6 +76,7 @@ Class.Base."ops" { # } # Class.Base."extops" { + DefineAttribute."instance" {} # extops name DefineAttribute."name" { type "string" @@ -96,9 +98,9 @@ Class.Base."extops" { ] # # extops objects instantiated within the same alsaconf node must have unique - # name attribute + # instance attribute # - unique "name" + unique "instance" } } @@ -109,6 +111,7 @@ Class.Base."extops" { # } # Class.Base."scale" { + DefineAttribute."instance" {} DefineAttribute."name" { type "string" } @@ -125,9 +128,9 @@ Class.Base."scale" { ] # # scale objects instantiated within the same alsaconf node must have unique - # name attribute + # instance attribute # - unique "name" + unique "instance" } # Default scale attributes: "-64dB step 2dB" @@ -142,6 +145,7 @@ Class.Base."scale" { # Object.Base.scale."0" {} # } Class.Base."tlv" { + DefineAttribute."instance" {} DefineAttribute."name" { type "string" } @@ -151,8 +155,8 @@ Class.Base."tlv" { ] # # TLV objects instantiated within the same alsaconf node must have unique - # name attribute + # instance attribute # - unique "name" + unique "instance" } } diff --git a/tools/topology/topology2/include/controls/mixer.conf b/tools/topology/topology2/include/controls/mixer.conf index bd88870a3cbb..7cdaeaf92b66 100644 --- a/tools/topology/topology2/include/controls/mixer.conf +++ b/tools/topology/topology2/include/controls/mixer.conf @@ -8,11 +8,13 @@ # index 1 # name "1 Master Playback Volume" # mas 32 -# Object.Base.channel."fl" { +# Object.Base.channel.1 { +# name "fl" # shift 0 # reg 0 # } -# Object.Base.channel."fr" { +# Object.Base.channel.2 { +# name "fr" # shift 1 # reg 1 # } diff --git a/tools/topology/topology2/include/dais/pdm_config.conf b/tools/topology/topology2/include/dais/pdm_config.conf index 4bb15d547600..7d75ee9dbdb5 100644 --- a/tools/topology/topology2/include/dais/pdm_config.conf +++ b/tools/topology/topology2/include/dais/pdm_config.conf @@ -1,4 +1,5 @@ Class.Base."pdm_config" { + DefineAttribute."instance" {} # # Argument used to construct DMIC PDM config # @@ -42,7 +43,7 @@ Class.Base."pdm_config" { "clk_edge" "skew" ] - unique "ctrl_id" + unique "instance" } # default attribute values diff --git a/tools/topology/topology2/platform/intel/deep-buffer.conf b/tools/topology/topology2/platform/intel/deep-buffer.conf index b7527579cfa3..c374f1947234 100644 --- a/tools/topology/topology2/platform/intel/deep-buffer.conf +++ b/tools/topology/topology2/platform/intel/deep-buffer.conf @@ -22,9 +22,11 @@ direction playback playback_compatible_d0i3 true - Object.Base.fe_dai.'DeepBuffer' {} + Object.Base.fe_dai.1 { + name "DeepBuffer" + } - Object.PCM.pcm_caps.playback { + Object.PCM.pcm_caps.1 { name $DEEP_BUFFER_PCM_NAME formats 'S16_LE,S24_LE,S32_LE' } diff --git a/tools/topology/topology2/platform/intel/dmic-generic.conf b/tools/topology/topology2/platform/intel/dmic-generic.conf index 8f4ce6bf0f0a..0639ab6e4ceb 100644 --- a/tools/topology/topology2/platform/intel/dmic-generic.conf +++ b/tools/topology/topology2/platform/intel/dmic-generic.conf @@ -18,12 +18,12 @@ Object.Dai { } # PDM controller config - Object.Base.pdm_config."0" { + Object.Base.pdm_config.1 { mic_a_enable $PDM0_MIC_A_ENABLE mic_b_enable $PDM0_MIC_B_ENABLE ctrl_id 0 } - Object.Base.pdm_config."1" { + Object.Base.pdm_config.2 { ctrl_id 1 mic_a_enable $PDM1_MIC_A_ENABLE mic_b_enable $PDM1_MIC_B_ENABLE @@ -52,12 +52,12 @@ Object.Dai { } # PDM controller config - Object.Base.pdm_config."3" { + Object.Base.pdm_config.1 { mic_a_enable $PDM0_MIC_A_ENABLE mic_b_enable $PDM0_MIC_B_ENABLE ctrl_id 0 } - Object.Base.pdm_config."4" { + Object.Base.pdm_config.2 { ctrl_id 1 mic_a_enable $PDM1_MIC_A_ENABLE mic_b_enable $PDM1_MIC_B_ENABLE @@ -126,9 +126,11 @@ Object.PCM { name "DMIC" id 10 direction "capture" - Object.Base.fe_dai."DMIC" {} + Object.Base.fe_dai.1 { + name "DMIC" + } - Object.PCM.pcm_caps."capture" { + Object.PCM.pcm_caps.1 { name $DMIC0_PCM_CAPS # only 32-bit capture supported now formats 'S32_LE' diff --git a/tools/topology/topology2/platform/intel/dmic-wov.conf b/tools/topology/topology2/platform/intel/dmic-wov.conf index ffefd5eda9ad..c94e1dfa16a2 100644 --- a/tools/topology/topology2/platform/intel/dmic-wov.conf +++ b/tools/topology/topology2/platform/intel/dmic-wov.conf @@ -120,9 +120,11 @@ Object.PCM { name "DMIC16k" id 11 direction "capture" - Object.Base.fe_dai."DMIC16k" {} + Object.Base.fe_dai.1 { + name "DMIC16k" + } - Object.PCM.pcm_caps."capture" { + Object.PCM.pcm_caps.1 { name $DMIC1_PCM_CAPS # only 32-bit capture supported now formats 'S32_LE' diff --git a/tools/topology/topology2/platform/intel/hdmi-4th.conf b/tools/topology/topology2/platform/intel/hdmi-4th.conf index e73153e6c022..bde8ef7b658f 100644 --- a/tools/topology/topology2/platform/intel/hdmi-4th.conf +++ b/tools/topology/topology2/platform/intel/hdmi-4th.conf @@ -35,8 +35,10 @@ Object.PCM { pcm.8 { name HDMI4 id $HDMI4_PCM_ID - Object.Base.fe_dai.HDMI4 {} - Object.PCM.pcm_caps.playback { + Object.Base.fe_dai.1 { + name "HDMI4" + } + Object.PCM.pcm_caps.1 { name $HDMI4_PCM_CAPS formats 'S32_LE,S16_LE' } diff --git a/tools/topology/topology2/platform/intel/hdmi-generic.conf b/tools/topology/topology2/platform/intel/hdmi-generic.conf index 8e65b96660ab..46c29a946a68 100644 --- a/tools/topology/topology2/platform/intel/hdmi-generic.conf +++ b/tools/topology/topology2/platform/intel/hdmi-generic.conf @@ -92,8 +92,10 @@ Object.PCM { pcm.5 { name HDMI1 id $HDMI1_PCM_ID - Object.Base.fe_dai.HDMI1 {} - Object.PCM.pcm_caps.playback { + Object.Base.fe_dai.1 { + name "HDMI1" + } + Object.PCM.pcm_caps.1 { name $HDMI1_PCM_CAPS formats 'S32_LE,S16_LE' } @@ -102,8 +104,10 @@ Object.PCM { pcm.6 { name HDMI2 id $HDMI2_PCM_ID - Object.Base.fe_dai.HDMI2 {} - Object.PCM.pcm_caps.playback { + Object.Base.fe_dai.1 { + name "HDMI2" + } + Object.PCM.pcm_caps.1 { name $HDMI2_PCM_CAPS formats 'S32_LE,S16_LE' } @@ -112,8 +116,10 @@ Object.PCM { pcm.7 { name HDMI3 id $HDMI3_PCM_ID - Object.Base.fe_dai.HDMI3 {} - Object.PCM.pcm_caps.playback { + Object.Base.fe_dai.1 { + name "HDMI3" + } + Object.PCM.pcm_caps.1 { name $HDMI3_PCM_CAPS formats 'S32_LE,S16_LE' } diff --git a/tools/topology/topology2/platform/intel/sdw-amp-generic.conf b/tools/topology/topology2/platform/intel/sdw-amp-generic.conf index 5a2c5299e801..a9a895e7b856 100644 --- a/tools/topology/topology2/platform/intel/sdw-amp-generic.conf +++ b/tools/topology/topology2/platform/intel/sdw-amp-generic.conf @@ -105,9 +105,11 @@ Object.PCM { name "Speaker" id 2 direction "playback" - Object.Base.fe_dai."Speaker" {} + Object.Base.fe_dai.1 { + name "Speaker" + } - Object.PCM.pcm_caps."playback" { + Object.PCM.pcm_caps.1 { name "sdw amplifiers" formats 'S16_LE,S24_LE,S32_LE' } @@ -116,9 +118,11 @@ Object.PCM { name "Amp feedback" id 3 direction "capture" - Object.Base.fe_dai."Amp feedback" {} + Object.Base.fe_dai.1 { + name "Amp feedback" + } - Object.PCM.pcm_caps."capture" { + Object.PCM.pcm_caps.1 { name "amp feedback" formats 'S16_LE,S32_LE' channels_min $AMP_FEEDBACK_CH diff --git a/tools/topology/topology2/platform/intel/sdw-dmic-generic.conf b/tools/topology/topology2/platform/intel/sdw-dmic-generic.conf index adeb41eb40fc..444e78d61942 100644 --- a/tools/topology/topology2/platform/intel/sdw-dmic-generic.conf +++ b/tools/topology/topology2/platform/intel/sdw-dmic-generic.conf @@ -52,9 +52,11 @@ Object.PCM { name "Microphone" id 4 direction "capture" - Object.Base.fe_dai."SDW DMIC" {} + Object.Base.fe_dai.1 { + name "SDW DMIC" + } - Object.PCM.pcm_caps."capture" { + Object.PCM.pcm_caps.1 { name "sdw dmic" formats 'S16_LE,S24_LE,S32_LE' } diff --git a/tools/topology/topology2/sof-hda-generic.conf b/tools/topology/topology2/sof-hda-generic.conf index 6f80fd7427e2..50fa2100720b 100644 --- a/tools/topology/topology2/sof-hda-generic.conf +++ b/tools/topology/topology2/sof-hda-generic.conf @@ -67,75 +67,93 @@ Define { Object.Widget.virtual { - codec0_in { + 1 { + name 'codec0_in' type input index 1 } - codec1_in { + 2 { + name 'codec1_in' type input index 2 } - codec0_out { + 3 { + name 'codec0_out' type output index 3 } - codec1_out { + 4 { + name 'codec1_out' type output index 4 } - codec2_in { + 5 { + name 'codec2_in' type input index 5 } - codec2_out { + 6 { + name 'codec2_out' type output index 6 } - iDisp1_out { + 7 { + name 'iDisp1_out' type output index 7 } - iDisp2_out { + 8 { + name 'iDisp2_out' type output index 8 } - iDisp3_out { + 9 { + name 'iDisp3_out' type output index 9 } - 'iDisp3 Tx' { + 10 { + name 'iDisp3 Tx' type out_drv index 0 } - 'iDisp2 Tx' { + 11 { + name 'iDisp2 Tx' type out_drv index 1 } - 'iDisp1 Tx' { + 12 { + name 'iDisp1 Tx' type out_drv index 2 } - 'Analog CPU Playback' { + 13 { + name 'Analog CPU Playback' type out_drv index 3 } - 'Digital CPU Playback' { + 14 { + name 'Digital CPU Playback' type out_drv index 4 } - 'Alt Analog CPU Playback' { + 15 { + name 'Alt Analog CPU Playback' type out_drv index 5 } - 'Analog CPU Capture' { + 16 { + name 'Analog CPU Capture' type input index 6 } - 'Digital CPU Capture' { + 17 { + name 'Digital CPU Capture' type input index 7 } - 'Alt Analog CPU Capture' { + 18 { + name 'Alt Analog CPU Capture' type input index 8 }