mirror of https://github.com/thesofproject/sof.git
topology2: add dmic and pdm classes
Add classes for dmic and pdm config. Suggested-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
This commit is contained in:
parent
89ec377cb5
commit
c4880ff50a
|
@ -73,6 +73,31 @@ Object.Base.VendorToken {
|
|||
bclk_delay 506
|
||||
}
|
||||
|
||||
"sof_tkn_intel_dmic" {
|
||||
driver_version 600
|
||||
clk_min 601
|
||||
clk_max 602
|
||||
duty_min 603
|
||||
duty_max 604
|
||||
num_pdm_active 605
|
||||
sample_rate 608
|
||||
fifo_word_length 609
|
||||
unmute_ramp_time_ms 610
|
||||
|
||||
|
||||
}
|
||||
|
||||
"sof_tkn_intel_dmic_pdm" {
|
||||
ctrl_id 700
|
||||
mic_a_enable 701
|
||||
mic_b_enable 702
|
||||
polarity_a 703
|
||||
polarity_b 704
|
||||
clk_edge 705
|
||||
skew 706
|
||||
|
||||
}
|
||||
|
||||
"sof_tkn_mute_led" {
|
||||
mute_led_use 1300
|
||||
mute_led_direction 1301
|
||||
|
|
|
@ -54,6 +54,7 @@ Class.Widget."copier" {
|
|||
"host"
|
||||
"SSP" # TODO: add more DAIs
|
||||
"ALH"
|
||||
"DMIC"
|
||||
"module"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,113 @@
|
|||
#
|
||||
# Intel DMIC DAI
|
||||
#
|
||||
# All attributes defined herein are namespaced by alsatplg to "dmic.attribute_name"
|
||||
#
|
||||
# Usage: this component can be used by declaring in the "dais" field of
|
||||
# a parent object. i.e.
|
||||
#
|
||||
# For Capture
|
||||
# Object.DMIC."M.capture" {
|
||||
# name "dmic16k"
|
||||
# id 2
|
||||
# Object.Base.hw_config."0" {
|
||||
# id 0
|
||||
# }
|
||||
# Object.Base.pdm_config."0" {
|
||||
# ctrl_id 0
|
||||
# }
|
||||
# }
|
||||
#
|
||||
#
|
||||
# Where M is DAI index in the firmware
|
||||
|
||||
Class.Dai."DMIC" {
|
||||
|
||||
#
|
||||
# Argument used to construct DAI widget
|
||||
#
|
||||
# DAI Index
|
||||
DefineAttribute."dai_index" {
|
||||
token_ref "sof_tkn_dai.word"
|
||||
}
|
||||
|
||||
DefineAttribute."direction" {
|
||||
type "string"
|
||||
}
|
||||
|
||||
DefineAttribute."dai_type" {
|
||||
type "string"
|
||||
token_ref "sof_tkn_dai.string"
|
||||
}
|
||||
|
||||
# Backend DAI Link ID matching with the machine driver
|
||||
DefineAttribute.id {}
|
||||
|
||||
DefineAttribute.default_hw_config_id {}
|
||||
|
||||
DefineAttribute.name {
|
||||
type "string"
|
||||
}
|
||||
|
||||
DefineAttribute.driver_version {
|
||||
token_ref "sof_tkn_intel_dmic.word"
|
||||
}
|
||||
|
||||
DefineAttribute.clk_min {
|
||||
token_ref "sof_tkn_intel_dmic.word"
|
||||
}
|
||||
|
||||
DefineAttribute.clk_max {
|
||||
token_ref "sof_tkn_intel_dmic.word"
|
||||
}
|
||||
|
||||
DefineAttribute.duty_min {
|
||||
token_ref "sof_tkn_intel_dmic.word"
|
||||
}
|
||||
|
||||
DefineAttribute.duty_max {
|
||||
token_ref "sof_tkn_intel_dmic.word"
|
||||
}
|
||||
|
||||
DefineAttribute.num_pdm_active {
|
||||
token_ref "sof_tkn_intel_dmic.word"
|
||||
}
|
||||
|
||||
DefineAttribute.sample_rate {
|
||||
token_ref "sof_tkn_intel_dmic.word"
|
||||
}
|
||||
|
||||
DefineAttribute.fifo_word_length {
|
||||
token_ref "sof_tkn_intel_dmic.word"
|
||||
}
|
||||
|
||||
DefineAttribute.unmute_ramp_time_ms {
|
||||
token_ref "sof_tkn_intel_dmic.word"
|
||||
}
|
||||
|
||||
attributes {
|
||||
!constructor [
|
||||
"name"
|
||||
]
|
||||
!mandatory [
|
||||
"num_pdm_active"
|
||||
]
|
||||
!immutable [
|
||||
"dai_type"
|
||||
"direction"
|
||||
]
|
||||
unique "dai_index"
|
||||
}
|
||||
|
||||
dai_type "DMIC"
|
||||
default_hw_config_id 0
|
||||
clk_min 2400000
|
||||
clk_max 4800000
|
||||
duty_min 40
|
||||
duty_max 60
|
||||
sample_rate 48000
|
||||
fifo_word_length 32
|
||||
unmute_ramp_time_ms 400
|
||||
driver_version 1
|
||||
direction "capture"
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
Class.Base."pdm_config" {
|
||||
#
|
||||
# Argument used to construct DMIC PDM config
|
||||
#
|
||||
DefineAttribute."ctrl_id" {
|
||||
token_ref "sof_tkn_intel_dmic_pdm.short"
|
||||
}
|
||||
|
||||
DefineAttribute.mic_a_enable {
|
||||
token_ref "sof_tkn_intel_dmic_pdm.short"
|
||||
}
|
||||
|
||||
DefineAttribute.mic_b_enable {
|
||||
token_ref "sof_tkn_intel_dmic_pdm.short"
|
||||
}
|
||||
|
||||
DefineAttribute.polarity_a {
|
||||
token_ref "sof_tkn_intel_dmic_pdm.short"
|
||||
}
|
||||
|
||||
DefineAttribute.polarity_b {
|
||||
token_ref "sof_tkn_intel_dmic_pdm.short"
|
||||
}
|
||||
|
||||
DefineAttribute.clk_edge {
|
||||
token_ref "sof_tkn_intel_dmic_pdm.short"
|
||||
}
|
||||
|
||||
DefineAttribute.skew {
|
||||
token_ref "sof_tkn_intel_dmic_pdm.short"
|
||||
}
|
||||
|
||||
attributes {
|
||||
!constructor [
|
||||
"ctrl_id"
|
||||
]
|
||||
!mandatory [
|
||||
"mic_a_enable"
|
||||
"mic_b_enable"
|
||||
"polarity_a"
|
||||
"polarity_b"
|
||||
"clk_edge"
|
||||
"skew"
|
||||
]
|
||||
unique "ctrl_id"
|
||||
}
|
||||
|
||||
# default attribute values
|
||||
mic_a_enable 1
|
||||
mic_b_enable 1
|
||||
polarity_a 0
|
||||
polarity_b 0
|
||||
clk_edge 0
|
||||
skew 0
|
||||
}
|
Loading…
Reference in New Issue