Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions tools/topology/topology2/cavs-nocodec-bt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<searchdir:include/components>
<searchdir:include/dais>
<searchdir:include/pipelines/cavs>
<searchdir:platform>
<searchdir:platform/intel>

<vendor-token.conf>
Expand All @@ -20,7 +21,7 @@
<fe_dai.conf>
<ssp.conf>
<dmic.conf>
<hw_config.conf>
<intel/hw_config_cardinal_clk.conf>
<manifest.conf>
<route.conf>
<common_definitions.conf>
Expand Down Expand Up @@ -81,7 +82,6 @@ Object.Dai.SSP [
Object.Base.hw_config.1 {
name "SSP0"
id 0
mclk_freq $MCLK
bclk_freq 3072000
tdm_slot_width 32
}
Expand All @@ -99,7 +99,6 @@ Object.Dai.SSP [
Object.Base.hw_config.1 {
name "SSP1"
id 0
mclk_freq $MCLK
bclk_freq 3072000
tdm_slot_width 32
}
Expand Down
6 changes: 2 additions & 4 deletions tools/topology/topology2/cavs-nocodec.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<searchdir:include/components>
<searchdir:include/dais>
<searchdir:include/pipelines/cavs>
<searchdir:platform>
<searchdir:platform/intel>

<vendor-token.conf>
Expand Down Expand Up @@ -30,7 +31,7 @@
<fe_dai.conf>
<ssp.conf>
<dmic.conf>
<hw_config.conf>
<intel/hw_config_cardinal_clk.conf>
<manifest.conf>
<route.conf>
<common_definitions.conf>
Expand Down Expand Up @@ -111,7 +112,6 @@ Object.Dai.SSP [
Object.Base.hw_config.1 {
name "SSP0"
id 0
mclk_freq $MCLK
bclk_freq 3072000
tdm_slot_width 32
}
Expand All @@ -129,7 +129,6 @@ Object.Dai.SSP [
Object.Base.hw_config.1 {
name "SSP2"
id 0
mclk_freq $MCLK
bclk_freq 3072000
tdm_slot_width 32
}
Expand Down Expand Up @@ -693,7 +692,6 @@ IncludeByKey.SSP1_ENABLED {
Object.Base.hw_config.1 {
name "SSP1"
id 0
mclk_freq $MCLK
bclk_freq 3072000
tdm_slot_width 32
}
Expand Down
5 changes: 2 additions & 3 deletions tools/topology/topology2/cavs-rt5682.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<searchdir:include/components>
<searchdir:include/dais>
<searchdir:include/pipelines/cavs>
<searchdir:platform>
<searchdir:platform/intel>

<vendor-token.conf>
Expand All @@ -27,7 +28,7 @@
<ssp.conf>
<dmic.conf>
<hda.conf>
<hw_config.conf>
<intel/hw_config_cardinal_clk.conf>
<manifest.conf>
<route.conf>
<common_definitions.conf>
Expand Down Expand Up @@ -132,7 +133,6 @@ Object.Dai.SSP [
Object.Base.hw_config.1 {
name $HEADSET_HW_CONFIG_NAME
id 0
mclk_freq $MCLK
bclk_freq 3072000
tdm_slot_width 32
}
Expand All @@ -157,7 +157,6 @@ Object.Dai.SSP [
Object.Base.hw_config.1 {
name $SPEAKER_HW_CONFIG_NAME
id 0
mclk_freq $MCLK
bclk_freq 3072000
tdm_slot_width 32
}
Expand Down
3 changes: 2 additions & 1 deletion tools/topology/topology2/cavs-sdw-src-gain-mixin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<searchdir:include/dais>
<searchdir:include/controls>
<searchdir:include/pipelines/cavs>
<searchdir:platform/intel>

<vendor-token.conf>
<tokens.conf>
Expand All @@ -17,7 +18,7 @@
<pcm_caps.conf>
<fe_dai.conf>
<alh.conf>
<hw_config.conf>
<hw_config_simple.conf>
<manifest.conf>
<route.conf>
<common_definitions.conf>
Expand Down
2 changes: 1 addition & 1 deletion tools/topology/topology2/cavs-sdw.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<alh.conf>
<hda.conf>
<dmic.conf>
<hw_config.conf>
<hw_config_simple.conf>
<manifest.conf>
<route.conf>
<common_definitions.conf>
Expand Down
35 changes: 35 additions & 0 deletions tools/topology/topology2/include/dais/hw_config_simple.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Simple hardware config class definition for HDA/SDW/DMIC type DAIs. All attributes defined herein
# are namespaced by alsatplg to "Object.Base.hw_config.1.attribute_name"
#
# Object.Base.hw_config.1 {
# id 0
# name "HDA0"
# }
#
# where 1 is the unique instance ID 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."instance" {}

DefineAttribute."name" {
type "string"
}

attributes {
!constructor [
"id"
]
!mandatory [
"name"
]
#
# hw_config objects instantiated within the same alsaconf node must have unique
# 'instance' attribute
unique "instance"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ Object.Dai.SSP [
tdm_slots 1
tx_slots 1
rx_slots 1
Object.Base.link_config.1 {
clock_source 0
}
}
Object.Base.hw_config.2 {
id 1
Expand All @@ -37,6 +40,9 @@ Object.Dai.SSP [
tdm_slots 1
tx_slots 1
rx_slots 1
Object.Base.link_config.1 {
clock_source 0
}
}
Object.Base.hw_config.3 {
id 2
Expand All @@ -51,6 +57,9 @@ Object.Dai.SSP [
tdm_slots 2
tx_slots 3
rx_slots 3
Object.Base.link_config.1 {
clock_source 0
}
}
}
]
9 changes: 9 additions & 0 deletions tools/topology/topology2/platform/intel/bt-ssp-config.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Object.Dai.SSP [
tdm_slots 1
tx_slots 1
rx_slots 1
Object.Base.link_config.1 {
clock_source 0
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the blob version setting missing? This works on cAVS2.5 now, as blob parsing ignores the aux blob and driver selects the clock source by itself. If we'd set blob version to v1.5 (0x105), parsing would fail on cAVS2.5 platforms.

}
Object.Base.hw_config.2 {
id 1
Expand All @@ -36,6 +39,9 @@ Object.Dai.SSP [
tdm_slots 1
tx_slots 1
rx_slots 1
Object.Base.link_config.1 {
clock_source 0
}
}
Object.Base.hw_config.3 {
id 2
Expand All @@ -50,6 +56,9 @@ Object.Dai.SSP [
tdm_slots 2
tx_slots 3
rx_slots 0
Object.Base.link_config.1 {
clock_source 0
}
}
}
]
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# Hardware config class definition DAIs. All attributes defined herein
# Hardware config class definition. All attributes defined herein
# are namespaced by alsatplg to "Object.Base.hw_config.NAME.attribute_name"
#
# Object.Base.hw_config."NAME" {
# Object.Base.hw_config.1 {
# id 0
# mclk_freq 24000000
# bclk_freq 4800000
# tdm_slot_width 25
# bclk_freq 3072000
# tdm_slot_width 32
# }
#
# where NAME is the unique instance name for the hw_config object
# within the same alsaconf node.
# where 1 is the unique instance ID for the hw_config object within the same alsaconf
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use a number when a name is more descriptive ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lgirdwood all objects need to have instance so that we can use arrays.

# node.

<platform/intel/ssp_aux_config.conf>

Class.Base."hw_config" {
#
Expand Down Expand Up @@ -44,7 +45,21 @@ Class.Base."hw_config" {
type "string"
}

DefineAttribute."bclk_freq" {}
DefineAttribute."bclk_freq" {
constraints {
# Allowed values of bclk derived from mclk_freq of 24.576MHz
!valid_values [
"12288000"
"6144000"
"3072000"
"1536000"
"768000"
"384000"
"256000"
"128000"
]
}
}

DefineAttribute."fsync" {
type "string"
Expand All @@ -68,15 +83,20 @@ Class.Base."hw_config" {
"name"
]
#
# hw_cfg objects instantiated within the same alsaconf node must have unique
# hw_config objects instantiated within the same alsaconf node must have unique
# 'instance' attribute
#
unique "instance"
}

Object.Base.link_config.1 {
clock_source 1
}

#TODO: Add link flags

format "I2S"
# TODO: Make this immutable
mclk_freq 24576000
mclk "codec_mclk_in"
bclk "codec_consumer"
fsync "codec_consumer"
Expand Down
2 changes: 1 addition & 1 deletion tools/topology/topology2/sof-hda-generic.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<hda.conf>
<dmic.conf>
<pdm_config.conf>
<hw_config.conf>
<hw_config_simple.conf>
<manifest.conf>
<route.conf>
<common_definitions.conf>
Expand Down