mirror of https://github.com/thesofproject/sof.git
topology2; Make dai_index a mandatory attribute for DAI objects
Add an instance attribute that will be used to instantiate DAI objects and make dai_index a mandatory attribute for all DAI objects types. This is in preparation to make the instance attribute default for all objects with topology2. This is required because the topology2 compiler allows for expansion of string values with variable definitions. So, if we wanted to expand the value of dai_index from a variable definition(shown as below), it is only possible if it were a normal attribute instead of the node ID as it is currently. Define { SSP_DAI_INDEX 3 } Object.Dai.SSP.1 { dai_index $SSP_DAI_INDEX } Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This commit is contained in:
parent
54f6f623de
commit
969b387584
|
@ -17,6 +17,7 @@ IncludeByKey.DEEPBUFFER_FW_DMA_MS{
|
|||
Object.Dai {
|
||||
HDA.0 {
|
||||
name $HDA_ANALOG_DAI_NAME
|
||||
dai_index 0
|
||||
id 4
|
||||
default_hw_conf_id 4
|
||||
Object.Base.hw_config.HDA0 {}
|
||||
|
|
|
@ -40,6 +40,7 @@ Define {
|
|||
#ALH Index: 0, Direction: duplex
|
||||
Object.Dai {
|
||||
ALH."2" {
|
||||
dai_index 2
|
||||
id $PLAYBACK_LINK_ID
|
||||
direction "playback"
|
||||
name $SDW_PLAYBACK_PCM
|
||||
|
@ -52,6 +53,7 @@ Object.Dai {
|
|||
}
|
||||
}
|
||||
ALH."3" {
|
||||
dai_index 3
|
||||
id $CAPTURE_LINK_ID
|
||||
direction "capture"
|
||||
name $SDW_CAPTURE_PCM
|
||||
|
|
|
@ -100,6 +100,7 @@ IncludeByKey.SDW_DMIC {
|
|||
#ALH Index: 0, Direction: duplex
|
||||
Object.Dai {
|
||||
ALH."2" {
|
||||
dai_index 2
|
||||
id $SDW_JACK_OUT_BE_ID
|
||||
direction "playback"
|
||||
name $SDW_JACK_OUT_STREAM
|
||||
|
@ -112,6 +113,7 @@ Object.Dai {
|
|||
}
|
||||
}
|
||||
ALH."3" {
|
||||
dai_index 3
|
||||
id $SDW_JACK_IN_BE_ID
|
||||
direction "capture"
|
||||
name $SDW_JACK_IN_STREAM
|
||||
|
|
|
@ -17,10 +17,14 @@
|
|||
# ALH port definition
|
||||
Class.Dai."ALH" {
|
||||
|
||||
#
|
||||
# instance ID of ALH DAI object
|
||||
#
|
||||
DefineAttribute."instance" {}
|
||||
|
||||
#
|
||||
# Argument used to construct DAI widget
|
||||
#
|
||||
# Playback DAI Index
|
||||
DefineAttribute."dai_index" {
|
||||
token_ref "sof_tkn_dai.word"
|
||||
}
|
||||
|
@ -75,12 +79,13 @@ Class.Dai."ALH" {
|
|||
"format"
|
||||
"rate"
|
||||
"ch"
|
||||
"dai_index"
|
||||
]
|
||||
|
||||
!immutable [
|
||||
"dai_type"
|
||||
]
|
||||
unique "dai_index"
|
||||
unique "instance"
|
||||
}
|
||||
|
||||
dai_type "ALH"
|
||||
|
|
|
@ -23,6 +23,11 @@
|
|||
|
||||
Class.Dai."DMIC" {
|
||||
|
||||
#
|
||||
# instance ID of DMIC DAI object
|
||||
#
|
||||
DefineAttribute."instance" {}
|
||||
|
||||
#
|
||||
# Argument used to construct DAI widget
|
||||
#
|
||||
|
@ -94,12 +99,13 @@ Class.Dai."DMIC" {
|
|||
]
|
||||
!mandatory [
|
||||
"num_pdm_active"
|
||||
"dai_index"
|
||||
]
|
||||
!immutable [
|
||||
"dai_type"
|
||||
"direction"
|
||||
]
|
||||
unique "dai_index"
|
||||
unique "instance"
|
||||
}
|
||||
|
||||
dai_type "DMIC"
|
||||
|
|
|
@ -24,6 +24,11 @@
|
|||
# Where N is the dai index of the HDA DAI in the firmware
|
||||
|
||||
Class.Dai."HDA" {
|
||||
#
|
||||
# instance ID of HDA DAI object
|
||||
#
|
||||
DefineAttribute."instance" {}
|
||||
|
||||
#
|
||||
# DAI Index in the firmware
|
||||
#
|
||||
|
@ -67,15 +72,16 @@ Class.Dai."HDA" {
|
|||
]
|
||||
!mandatory [
|
||||
"id"
|
||||
"dai_index"
|
||||
]
|
||||
!immutable [
|
||||
"type"
|
||||
]
|
||||
#
|
||||
# HDA DAI objects instantiated within the same alsaconf node must have unique
|
||||
# dai_index attribute
|
||||
# instance attribute
|
||||
#
|
||||
unique "dai_index"
|
||||
unique "instance"
|
||||
}
|
||||
|
||||
dai_type "HDA"
|
||||
|
|
|
@ -31,9 +31,11 @@
|
|||
Class.Dai."SSP" {
|
||||
|
||||
#
|
||||
# Argument used to construct DAI widget
|
||||
# instance ID of SSP DAI object
|
||||
#
|
||||
# Playback DAI Index
|
||||
DefineAttribute."instance" {}
|
||||
|
||||
# DAI Index
|
||||
DefineAttribute."dai_index" {
|
||||
token_ref "sof_tkn_dai.word"
|
||||
}
|
||||
|
@ -117,6 +119,7 @@ Class.Dai."SSP" {
|
|||
!mandatory [
|
||||
"id"
|
||||
"sample_bits"
|
||||
"dai_index"
|
||||
]
|
||||
|
||||
!immutable [
|
||||
|
@ -124,9 +127,9 @@ Class.Dai."SSP" {
|
|||
]
|
||||
#
|
||||
# SSP DAI objects instantiated within the same alsaconf node must have unique
|
||||
# dai_index attribute
|
||||
# instance attribute
|
||||
#
|
||||
unique "dai_index"
|
||||
unique "instance"
|
||||
}
|
||||
|
||||
dai_type "SSP"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
Object.Dai {
|
||||
DMIC.0 {
|
||||
dai_index 0
|
||||
name $DMIC0_NAME
|
||||
id $DMIC0_ID
|
||||
driver_version $DMIC_DRIVER_VERSION
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
Object.Dai {
|
||||
HDA.7 {
|
||||
dai_index 7
|
||||
name iDisp4
|
||||
id $HDMI4_ID
|
||||
default_hw_conf_id 3
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
Object.Dai {
|
||||
HDA.4 {
|
||||
dai_index 4
|
||||
name iDisp1
|
||||
id $HDMI1_ID
|
||||
default_hw_conf_id 1
|
||||
|
@ -7,6 +8,7 @@ Object.Dai {
|
|||
direction playback
|
||||
}
|
||||
HDA.5 {
|
||||
dai_index 5
|
||||
name iDisp2
|
||||
id $HDMI2_ID
|
||||
default_hw_conf_id 2
|
||||
|
@ -14,6 +16,7 @@ Object.Dai {
|
|||
direction playback
|
||||
}
|
||||
HDA.6 {
|
||||
dai_index 6
|
||||
name iDisp3
|
||||
id $HDMI3_ID
|
||||
default_hw_conf_id 3
|
||||
|
|
|
@ -11,7 +11,8 @@ Define {
|
|||
}
|
||||
|
||||
Object.Dai {
|
||||
ALH."514" {
|
||||
ALH."1" {
|
||||
dai_index 514
|
||||
id $SDW_AMP_BE_ID
|
||||
direction "playback"
|
||||
name $SDW_SPK_STREAM
|
||||
|
@ -23,7 +24,8 @@ Object.Dai {
|
|||
id 0
|
||||
}
|
||||
}
|
||||
ALH."515" {
|
||||
ALH."2" {
|
||||
dai_index 515
|
||||
id $SDW_AMP_IN_BE_ID
|
||||
direction "capture"
|
||||
name $SDW_SPK_IN_STREAM
|
||||
|
|
|
@ -6,7 +6,8 @@ Define {
|
|||
}
|
||||
|
||||
Object.Dai {
|
||||
ALH."771" {
|
||||
ALH."1" {
|
||||
dai_index 771
|
||||
id $SDW_DMIC_BE_ID
|
||||
direction "capture"
|
||||
name $SDW_DMIC_STREAM
|
||||
|
|
Loading…
Reference in New Issue