Skip to content
Merged
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: 3 additions & 2 deletions tools/topology/topology2/avs-tplg/tplg-targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ DMIC1_ID=3,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,HDMI1_ID=4,HDMI2_ID=5,\
HDMI3_ID=6,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-adl-rt711-4ch.bin"

# BT offload
"cavs-nocodec-bt\;sof-nocodec-bt\;PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-nocodec-bt.bin"
"cavs-nocodec-bt\;sof-nocodec-bt\;PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-nocodec-bt.bin,\
PLATFORM=tgl"
# BT offload loopback test topology (lbm)
"cavs-nocodec-bt\;sof-nocodec-bt-lbm\;BT_LOOPBACK_MODE=true,\
"cavs-nocodec-bt\;sof-nocodec-bt-lbm\;BT_LOOPBACK_MODE=true,PLATFORM=tgl,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-nocodec-bt-lbm.bin"
)
15 changes: 12 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 @@ -56,6 +57,8 @@ Define {

# override defaults with platform-specific config
IncludeByKey.PLATFORM {
"tgl" "platform/intel/tgl.conf"
"adl" "platform/intel/tgl.conf"
"mtl" "platform/intel/mtl.conf"
}

Expand All @@ -81,9 +84,12 @@ Object.Dai.SSP [
Object.Base.hw_config.1 {
name "SSP0"
id 0
mclk_freq $MCLK
bclk_freq 3072000
tdm_slot_width 32
# TODO: remove this. Needs alsaptlg change.
Object.Base.link_config.1 {
clock_source 1
}
}
}
{
Expand All @@ -99,9 +105,12 @@ Object.Dai.SSP [
Object.Base.hw_config.1 {
name "SSP1"
id 0
mclk_freq $MCLK
bclk_freq 3072000
tdm_slot_width 32
# TODO: remove this. Needs alsaptlg change.
Object.Base.link_config.1 {
clock_source 1
}
}
}
]
Expand Down
20 changes: 16 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 @@ -81,6 +82,8 @@ Define {

# override defaults with platform-specific config
IncludeByKey.PLATFORM {
"tgl" "platform/intel/tgl.conf"
"adl" "platform/intel/tgl.conf"
"mtl" "platform/intel/mtl.conf"
}

Expand Down Expand Up @@ -111,9 +114,12 @@ Object.Dai.SSP [
Object.Base.hw_config.1 {
name "SSP0"
id 0
mclk_freq $MCLK
bclk_freq 3072000
tdm_slot_width 32
# TODO: remove this. Needs alsaptlg change.
Object.Base.link_config.1 {
clock_source 1
}
}
}
{
Expand All @@ -129,9 +135,12 @@ Object.Dai.SSP [
Object.Base.hw_config.1 {
name "SSP2"
id 0
mclk_freq $MCLK
bclk_freq 3072000
tdm_slot_width 32
# TODO: remove this. Needs alsaptlg change.
Object.Base.link_config.1 {
clock_source 1
}
}
}
]
Expand Down Expand Up @@ -693,9 +702,12 @@ IncludeByKey.SSP1_ENABLED {
Object.Base.hw_config.1 {
name "SSP1"
id 0
mclk_freq $MCLK
bclk_freq 3072000
tdm_slot_width 32
# TODO: remove this. Needs alsaptlg change.
Object.Base.link_config.1 {
clock_source 1
}
}
}
]
Expand Down
13 changes: 10 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,9 +133,12 @@ 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
# TODO: remove this. Needs alsaptlg change.
Object.Base.link_config.1 {
clock_source 1
}
}
}
{
Expand All @@ -157,9 +161,12 @@ 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
# TODO: remove this. Needs alsaptlg change.
Object.Base.link_config.1 {
clock_source 1
}
}
}
]
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
3 changes: 3 additions & 0 deletions tools/topology/topology2/common_definitions.conf
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,7 @@ Define {
SPI_INPUT_CLASS 26 # SPI Input (DSP <-)

DEEPBUFFER_FW_DMA_MS 100 # 100 ms copier dma size

SSP_BLOB_VERSION_1_0 0x100
SSP_BLOB_VERSION_1_5 0x105
}
5 changes: 3 additions & 2 deletions tools/topology/topology2/development/tplg-targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ set(TPLGS
# CAVS SSP topology for TGL
"cavs-nocodec\;sof-tgl-nocodec\;NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-tgl-nocodec.bin,DEEPBUFFER_FW_DMA_MS=100,\
SSP0_MIXER_2LEVEL=1"
SSP0_MIXER_2LEVEL=1,PLATFORM=tgl"

"cavs-nocodec\;sof-adl-nocodec\;NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-adl-nocodec.bin,DEEPBUFFER_FW_DMA_MS=100"
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-adl-nocodec.bin,DEEPBUFFER_FW_DMA_MS=100,\
PLATFORM=adl"

# SDW topology for MTL
"cavs-sdw\;mtl-sdw\;NUM_HDMIS=0"
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"
}
}
12 changes: 12 additions & 0 deletions tools/topology/topology2/include/dais/ssp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,16 @@ Class.Dai."SSP" {
# platform clock frequency
DefineAttribute.io_clk {}

# SSP blob version
DefineAttribute.version {
constraints {
!valid_values [
$SSP_BLOB_VERSION_1_0
$SSP_BLOB_VERSION_1_5
]
}
}

attributes {
!constructor [
"name"
Expand Down Expand Up @@ -139,4 +149,6 @@ Class.Dai."SSP" {
clks_control 0
frame_pulse_width 0
tdm_padding_per_slot false
# SSP_BLOB_VERSION must be defined in the top-level topology file
version $SSP_BLOB_VERSION
}
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
}
}
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
Copy link
Collaborator

@kv2019i kv2019i Apr 5, 2023

Choose a reason for hiding this comment

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

Should this be the cardinal clock (i.e. "1"), so we can use integer divider for 1.536Mhz?
UPDATE: no, this is ok, clouc source 0 is 38Mhz, so this is ok.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no should 0 for xtal as xtal is 38.4 and 38.4M/1.536M = 25

Copy link
Member

Choose a reason for hiding this comment

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

@kv2019i @ranj063 if the BT frequencies are 256kHz, 1536kHz then we could use either xtal or audio cardinal clocks.
It's only for the 2.4MHz case that we would have a problem, but it's not used.

I am now wondering if we actually have a case where the audio cardinal clock does not work?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@kv2019i I will let you answer this question and follow up with another PR if we need to change the clock source for BT. For now, it actually makes no difference since we dont build the topology for MTL

}
}
}
]
Loading