mirror of https://github.com/thesofproject/sof.git
topology2: Add SSP DAI class
Add SSP DAI class definition, SSP DAI objects can be instantiated as: Object.Dai.SSP."N" { direction "duplex" dai_name "NoCodec-0" id 0 quirks "lbm_mode" sample_bits 24 Object.hw_config."0" { mclk_freq 24000000 bclk_freq 4800000 tdm_slot_width 25 } Object.dai."playback" { period_source_count 2 period_sink_count 0 } Object.dai."capture" { period_source_count 0 period_sink_count 2 } } 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
3d184df6bf
commit
17902fcbf0
|
@ -56,4 +56,14 @@ Object.Base.VendorToken {
|
|||
"sof_tkn_copier" {
|
||||
cpc 1600
|
||||
}
|
||||
|
||||
"sof_tkn_intel_ssp" {
|
||||
clks_control 500
|
||||
mclk_id 501
|
||||
sample_bits 502
|
||||
frame_pulse_width 503
|
||||
quirks 504
|
||||
tdm_padding_per_slot 505
|
||||
bclk_delay 506
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,136 @@
|
|||
#
|
||||
# SSP DAI class definition. All attributes defined herein are namespaced
|
||||
# by alsatplg to "Object.Dai.SSP.N.attribute_name"
|
||||
#
|
||||
# Usage: SSP DAI objects can be instantiated as:
|
||||
#
|
||||
# Object.Dai.SSP."N" {
|
||||
# direction "duplex" # playback, capture or duplex
|
||||
# dai_name "NoCodec-0"
|
||||
# id 0
|
||||
# quirks "lbm_mode"
|
||||
# sample_bits 24
|
||||
# Object.hw_config."0" {
|
||||
# mclk_freq 24000000
|
||||
# bclk_freq 4800000
|
||||
# tdm_slot_width 25
|
||||
# }
|
||||
# Object.dai."playback" {
|
||||
# period_source_count 2
|
||||
# period_sink_count 0
|
||||
# }
|
||||
# Object.dai."capture" {
|
||||
# period_source_count 0
|
||||
# period_sink_count 2
|
||||
# }
|
||||
# }
|
||||
#
|
||||
# where N is the unique instance number for the SSP object within the same alsaconf node.
|
||||
|
||||
# SSP port definition
|
||||
Class.Dai."SSP" {
|
||||
|
||||
#
|
||||
# Argument used to construct DAI widget
|
||||
#
|
||||
# Playback DAI Index
|
||||
DefineAttribute."dai_index" {
|
||||
token_ref "sof_tkn_dai.word"
|
||||
}
|
||||
|
||||
DefineAttribute."direction" {
|
||||
type "string"
|
||||
constraints {
|
||||
!valid_values [
|
||||
"playback"
|
||||
"capture"
|
||||
"duplex"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
DefineAttribute."dai_type" {
|
||||
type "string"
|
||||
token_ref "sof_tkn_dai.string"
|
||||
}
|
||||
|
||||
DefineAttribute."default_hw_config_id" {}
|
||||
|
||||
DefineAttribute."name" {
|
||||
type "string"
|
||||
}
|
||||
|
||||
# Backend DAI Link ID matching with the machine driver
|
||||
DefineAttribute."id" {}
|
||||
|
||||
DefineAttribute."sample_bits" {
|
||||
# Token reference and type
|
||||
token_ref "sof_tkn_intel_ssp.word"
|
||||
}
|
||||
|
||||
DefineAttribute."bclk_delay" {
|
||||
# Token reference and type
|
||||
token_ref "sof_tkn_intel_ssp.word"
|
||||
}
|
||||
|
||||
DefineAttribute."tdm_padding_per_slot" {
|
||||
type "string"
|
||||
# Token reference and type
|
||||
token_ref "sof_tkn_intel_ssp.bool"
|
||||
constraints {
|
||||
!valid_values [
|
||||
"true"
|
||||
"false"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
# SSP quirks. Value will translated based on sof_tkn_ssp_quirks. For ex: lb_mode will
|
||||
# be converted to 64.
|
||||
DefineAttribute."quirks" {
|
||||
# Token reference and type
|
||||
token_ref "sof_tkn_intel_ssp.word"
|
||||
constraints {
|
||||
!valid_values [
|
||||
"lbm_mode"
|
||||
]
|
||||
!tuple_values [
|
||||
64
|
||||
]
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
DefineAttribute."mclk_id" {
|
||||
# Token reference and type
|
||||
token_ref "sof_tkn_intel_ssp.short"
|
||||
}
|
||||
|
||||
attributes {
|
||||
constructor [
|
||||
"name"
|
||||
]
|
||||
|
||||
mandatory [
|
||||
"id"
|
||||
"sample_bits"
|
||||
]
|
||||
|
||||
immutable [
|
||||
"dai_type"
|
||||
]
|
||||
#
|
||||
# SSP DAI objects instantiated within the same alsaconf node must have unique
|
||||
# dai_index attribute
|
||||
#
|
||||
unique "dai_index"
|
||||
}
|
||||
|
||||
dai_type "SSP"
|
||||
bclk_delay 0
|
||||
mclk_id 0
|
||||
default_hw_config_id 0
|
||||
clks_control 0
|
||||
frame_pulse_width 0
|
||||
tdm_padding_per_slot false
|
||||
}
|
Loading…
Reference in New Issue