mirror of https://github.com/thesofproject/sof.git
topology2: Add HW Config class
Add class definition for HW Config, HW Config object can be instantiated as: Object.Base.hw_config."NAME" { id 0 mclk_freq 24000000 bclk_freq 4800000 tdm_slot_width 25 } where NAME is the unique instance name for the hw_config object within the same alsaconf node, for example, SSP0. Signed-off-by: Ranjani Sridharan <ranjani.sidharan@linux.intel.com> Signed-off-by: Chao Song <chao.song@linux.intel.com>
This commit is contained in:
parent
17902fcbf0
commit
2e1d2ecabb
|
@ -0,0 +1,83 @@
|
|||
# Hardware config class definition DAIs. All attributes defined herein
|
||||
# are namespaced by alsatplg to "Object.Base.hw_config.NAME.attribute_name"
|
||||
#
|
||||
# Object.Base.hw_config."NAME" {
|
||||
# id 0
|
||||
# mclk_freq 24000000
|
||||
# bclk_freq 4800000
|
||||
# tdm_slot_width 25
|
||||
# }
|
||||
#
|
||||
# where NAME is the unique instance name for the hw_config object
|
||||
# within the same alsaconf node.
|
||||
|
||||
Class.Base."hw_config" {
|
||||
#
|
||||
# Argument used to construct hw config (hw config ID)
|
||||
#
|
||||
DefineAttribute."id" {}
|
||||
|
||||
DefineAttribute."name" {
|
||||
type "string"
|
||||
}
|
||||
|
||||
# All attributes are only used for SSP.
|
||||
DefineAttribute."format" {
|
||||
type "string"
|
||||
constraints {
|
||||
valid_values [
|
||||
"I2S"
|
||||
"DSP_A"
|
||||
"DSP_B"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
DefineAttribute."mclk" {
|
||||
type "string"
|
||||
}
|
||||
|
||||
DefineAttribute."mclk_freq" {}
|
||||
|
||||
DefineAttribute."bclk" {
|
||||
type "string"
|
||||
}
|
||||
|
||||
DefineAttribute."bclk_freq" {}
|
||||
|
||||
DefineAttribute."fsync" {
|
||||
type "string"
|
||||
}
|
||||
|
||||
DefineAttribute."fsync_freq" {}
|
||||
|
||||
DefineAttribute."tdm_slots" {}
|
||||
|
||||
DefineAttribute."tdm_slot_width" {}
|
||||
|
||||
DefineAttribute."tx_slots" {}
|
||||
|
||||
DefineAttribute."rx_slots" {}
|
||||
|
||||
attributes {
|
||||
constructor [
|
||||
"id"
|
||||
]
|
||||
#
|
||||
# hw_cfg objects instantiated within the same alsaconf node must have unique
|
||||
# 'name' attribute
|
||||
#
|
||||
unique "name"
|
||||
}
|
||||
|
||||
#TODO: Add link flags
|
||||
|
||||
format "I2S"
|
||||
mclk "codec_mclk_in"
|
||||
bclk "codec_consumer"
|
||||
fsync "codec_consumer"
|
||||
fsync_freq 48000
|
||||
tdm_slots 2
|
||||
tx_slots 3
|
||||
rx_slots 3
|
||||
}
|
Loading…
Reference in New Issue