Skip to content
Closed
2 changes: 1 addition & 1 deletion src/include/kernel/abi.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

/** \brief SOF ABI version major, minor and patch numbers */
#define SOF_ABI_MAJOR 3
#define SOF_ABI_MINOR 29
#define SOF_ABI_MINOR 23
Copy link
Member

Choose a reason for hiding this comment

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

Minor ABI changes are backwards compatible so this is not needed.

#define SOF_ABI_PATCH 1

/** \brief SOF ABI version number. Format within 32bit word is MMmmmppp */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
list(APPEND TPLGS
# HDMI only topology with passthrough pipelines
"sof-hda-generic\;sof-hda-generic-idisp\;"
# AW88399 smart amp topologies with SSP variants (SSP port auto-detected by kernel from NHLT)
"sof-hda-generic-aw88399\;sof-hda-generic-aw88399-ssp0\;HDA_CONFIG=mix,AW_SMART_SSP_INDEX=0,AW_SMART_STREAM_NAME=SSP0-Codec"
"sof-hda-generic-aw88399\;sof-hda-generic-aw88399-ssp1\;HDA_CONFIG=mix,AW_SMART_SSP_INDEX=1,AW_SMART_STREAM_NAME=SSP1-Codec"
"sof-hda-generic-aw88399\;sof-hda-generic-aw88399-ssp2\;HDA_CONFIG=mix,AW_SMART_SSP_INDEX=2,AW_SMART_STREAM_NAME=SSP2-Codec"
# HDMI only topology with passthrough pipelines and
# 2 or 4 DMIC, no NHLT blob included in topology
"sof-hda-generic\;sof-hda-generic-idisp-2ch\;NUM_DMICS=2"
Expand Down
327 changes: 327 additions & 0 deletions tools/topology/topology2/sof-hda-generic-aw88399.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,327 @@
<searchdir:include>
<searchdir:include/common>
<searchdir:include/components>
<searchdir:include/dais>
<searchdir:include/pipelines>
<searchdir:include/pipelines/cavs>
<searchdir:platform>
<searchdir:platform/intel>

<vendor-token.conf>
<tokens.conf>
<virtual.conf>
<host-gateway-playback.conf>
<host-gateway-capture.conf>
<host-copier-gain-mixin-playback.conf>
<host-copier-gain-src-mixin-playback.conf>
<mixout-dai-copier-playback.conf>
<mixout-gain-dai-copier-playback.conf>
<mixout-aria-gain-mixin-playback.conf>
<mixout-gain-efx-dai-copier-playback.conf>
<mixout-gain-efx-mbdrc-dai-copier-playback.conf>
<mixout-gain-smart-amp-dai-copier-playback.conf>
<mixout-gain-host-copier-capture.conf>
<dai-copier-eqiir-module-copier-capture.conf>
<dai-copier-gain-eqiir-module-copier-capture.conf>
<gain-capture.conf>
<deepbuffer-playback.conf>
<io-gateway.conf>
<io-gateway-capture.conf>
<highpass-capture-be.conf>
<data.conf>
<pcm.conf>
<pcm_caps.conf>
<fe_dai.conf>
<hda.conf>
<ssp.conf>
<dmic.conf>
<pdm_config.conf>
<hw_config_simple.conf>
<platform/intel/ssp_aux_config.conf>
<manifest.conf>
<route.conf>
<common_definitions.conf>
<input_pin_binding.conf>
<output_pin_binding.conf>
<dmic-default.conf>
<hdmi-default.conf>
<deep-buffer-default.conf>
<module-copier.conf>

Define {
HDA_CONFIG "none"
PLATFORM "none"
NUM_DMICS 0
# doesn't it need to define DMIC0_HOST_PIPELINE_SINK and DMIC0_DAI_PIPELINE_SRC?
DMIC0_HOST_PIPELINE_SINK 'host-copier.6.capture'
DMIC0_DAI_PIPELINE_SRC 'module-copier.12.2'
DMIC0_DAI_COPIER 'dai-copier.DMIC.dmic01.capture'
DMIC0_DAI_EQIIR "highpass_40hz_20db"
DMIC0_PCM_CAPS 'Gain Capture 11'
AW_SMART_PIPELINE_ID 20
# Must match SSP_AMP_BE_ID in skl_hda_dsp_generic machine driver
AW_SMART_BE_ID 5
# SSP parameters - defaults can be overridden by cmake build parameters
# SSP1 is the most common for smart amps, but variants are built for all ports
AW_SMART_STREAM_NAME 'SSP1-Codec'
AW_SMART_SSP_INDEX 1
Copy link
Collaborator

Choose a reason for hiding this comment

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

IMHO, we should use a generic naming. Like SSP_AMP instead of AW_SMART

AW_SMART_HOST_PIPELINE_ID 30
AW_SMART_PCM_ID 32
AW_SMART_PCM_NAME 'AW88399 Speakers'
SSP_BLOB_VERSION $SSP_BLOB_VERSION_1_5
}

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

# Disable deepbuffer in HDA config - we'll define our own that routes to smart amp
Define {
DEEPBUFFER_FW_DMA_MS 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Again, the sof-hda-generic-aw88399.conf should be generic and the macros should be overwritten in the cmake files. And it would be better to rename sof-hda-generic-aw88399.conf to a more generic name.

}

# include HDA config if needed.
IncludeByKey.HDA_CONFIG {
"mix" "cavs-mixin-mixout-hda.conf"
"efx" "cavs-mixin-mixout-efx-hda.conf"
"src" "cavs-src-mixin-mixout-hda.conf"
"passthrough" "cavs-passthrough-hda.conf"
}

# Define our own deepbuffer that routes to AW88399 smart amp
Define {
DEEP_BUFFER_PIPELINE_ID 15
DEEP_BUFFER_PCM_ID 31
DEEP_BUFFER_PIPELINE_SRC 'mixin.15.1'
DEEP_BUFFER_PIPELINE_SINK 'mixout.20.1'
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be better to be overwrited in tplg-targets-hda-generic.cmake

DEEP_BUFFER_PCM_NAME 'Deepbuffer Speaker'
DEEPBUFFER_D0I3_COMPATIBLE true
DEEP_BUF_JACK_RATE 48000
DEEPBUFFER_FW_DMA_MS 100
}

<deepbuffer-playback.conf>

# include DMIC config if needed.
IncludeByKey.NUM_DMICS {
"[1-4]" "platform/intel/dmic-generic.conf"
}

Define {
NUM_HDMIS 3
HDMI1_ID 1
HDMI2_ID 2
HDMI3_ID 3
HDMI1_PCM_ID 3
HDMI2_PCM_ID 4
HDMI3_PCM_ID 5
DMIC0_PCM_ID 6
}

IncludeByKey.NUM_HDMIS {
"[3-4]" "platform/intel/hdmi-generic.conf"
}

Object.Widget.virtual [
{
name 'codec0_in'
type input
index 1
}
{
name 'codec1_in'
type input
index 2
}
{
name 'codec0_out'
type output
index 3
}
{
name 'codec1_out'
type output
index 4
}
{
name 'codec2_in'
type input
index 5
}
{
name 'codec2_out'
type output
index 6
}
{
name 'iDisp1_out'
type output
index 7
}
{
name 'iDisp2_out'
type output
index 8
}
{
name 'iDisp3_out'
type output
index 9
}
{
name 'iDisp3 Tx'
type out_drv
index 0
}
{
name 'iDisp2 Tx'
type out_drv
index 1
}
{
name 'iDisp1 Tx'
type out_drv
index 2
}
{
name 'Analog CPU Playback'
type out_drv
index 3
}
{
name 'Digital CPU Playback'
type out_drv
index 4
}
{
name 'Alt Analog CPU Playback'
type out_drv
index 5
}
{
name 'Analog CPU Capture'
type input
index 6
}
{
name 'Digital CPU Capture'
type input
index 7
}
{
name 'Alt Analog CPU Capture'
type input
index 8
}
]

Object.Pipeline.mixout-gain-dai-copier-playback [
{
index $AW_SMART_PIPELINE_ID

Object.Widget.dai-copier.1 {
dai_index $AW_SMART_SSP_INDEX
dai_type "SSP"
copier_type "SSP"
stream_name $AW_SMART_STREAM_NAME
node_type $I2S_LINK_OUTPUT_CLASS
}

Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Master Playback Volume'
}
}
}
]

Object.Pipeline.host-copier-gain-mixin-playback [
{
index $AW_SMART_HOST_PIPELINE_ID
Object.Widget.host-copier.1 {
stream_name $AW_SMART_PCM_NAME
pcm_id $AW_SMART_PCM_ID
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Pre Mixer AW88399 Playback Volume'
}
}
Object.Widget.mixin.1 {}
Object.Widget.pipeline.1 {
priority 0
lp_mode 0
}
}
]

Object.Base.route [
{
source "host-copier.$AW_SMART_PCM_ID.playback"
sink "gain.$AW_SMART_HOST_PIPELINE_ID.1"
}
{
source "gain.$AW_SMART_HOST_PIPELINE_ID.1"
sink "mixin.$AW_SMART_HOST_PIPELINE_ID.1"
}
]

Object.Base.route [
{
source "mixin.$AW_SMART_HOST_PIPELINE_ID.1"
sink "mixout.$AW_SMART_PIPELINE_ID.1"
}
{
source "mixout.$AW_SMART_PIPELINE_ID.1"
sink "gain.$AW_SMART_PIPELINE_ID.1"
}
{
source "gain.$AW_SMART_PIPELINE_ID.1"
sink "dai-copier.SSP.$AW_SMART_STREAM_NAME.playback"
}
]

Object.Dai.SSP [
{
name $AW_SMART_STREAM_NAME
dai_index $AW_SMART_SSP_INDEX
id $AW_SMART_BE_ID
direction "duplex"
default_hw_conf_id 0
sample_bits 32
io_clk 24576000

Object.Base.hw_config.1 {
name "SSP$AW_SMART_SSP_INDEX"
id 0
fsync_freq 48000
bclk_freq 3072000
tdm_slots 2
tdm_slot_width 32
Object.Base.link_config.1 {
clock_source 1
}
}
}
]

Object.PCM.pcm [
{
name $AW_SMART_PCM_NAME
id $AW_SMART_PCM_ID
direction "playback"
Object.Base.fe_dai.1 {
name $AW_SMART_PCM_NAME
}
Object.PCM.pcm_caps.1 {
direction "playback"
name $AW_SMART_PCM_NAME
formats 'S32_LE,S24_LE,S16_LE'
rate_min 48000
rate_max 48000
}
}
]
Loading