Skip to content

Commit

Permalink
topology2: add clks_control attribute support
Browse files Browse the repository at this point in the history
Define clks_control attribute {0, MCLK_ES, BCLK_ES, MCLK_AON}
It depends on codec requirement by overriding the SSP_CLKS_CONTROL.
In case of the noise audio due to clocks unsynchonizes.
for examples:
RT5682/NAU8825 requires BCLK_ES.
ALC5650 requires MCLK_ALWAYS_ON.

Signed-off-by: Mac Chiang <[email protected]>
  • Loading branch information
macchian committed Oct 24, 2023
1 parent 868711c commit 7446d22
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/topology/topology2/cavs-rt5682.conf
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ Define {
GOOGLE_AEC_PIPELINE_PRIORITY 2
DMIC_PIPELINE_PRIORITY 1
ECHO_REF_PIPELINE_PRIORITY 0
SSP_CLKS_CONTROL "0"
}

# override defaults with platform-specific config
Expand Down Expand Up @@ -153,6 +154,7 @@ Object.Dai.SSP [
default_hw_conf_id 0
sample_bits 32
io_clk $MCLK
clks_control $SSP_CLKS_CONTROL

Object.Base.hw_config.1 {
name $HEADSET_HW_CONFIG_NAME
Expand Down Expand Up @@ -181,6 +183,7 @@ Object.Dai.SSP [
default_hw_conf_id 0
sample_bits 32
io_clk $MCLK
clks_control $SSP_CLKS_CONTROL

Object.Base.hw_config.1 {
name $SPEAKER_HW_CONFIG_NAME
Expand Down
19 changes: 19 additions & 0 deletions tools/topology/topology2/include/dais/ssp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,25 @@ Class.Dai."SSP" {

DefineAttribute."default_hw_config_id" {}

DefineAttribute."clks_control" {
# Token reference and type
token_ref "intel_ssp.word"
constraints {
!valid_values [
"0"
"mclk_es"
"bclk_es"
"mclk_aon"
]
!tuple_values [
0
64
128
256
]
}
}

DefineAttribute."name" {
type "string"
}
Expand Down

0 comments on commit 7446d22

Please sign in to comment.