Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

topology2: add cs42l43 + cs35l56 topology for MTL and TGL #8359

Merged
merged 6 commits into from
Nov 15, 2023
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: 5 additions & 0 deletions tools/topology/topology2/avs-tplg/tplg-targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-tgl-rt715-rt711-rt1308-mono.bin"
DMIC1_ID=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,SDW_AMP_FEEDBACK=false,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-tgl-rt711-rt1308-4ch.bin"

"cavs-sdw\;sof-tgl-cs42l43-l3-cs35l56-l01\;PLATFORM=tgl,NUM_SDW_AMP_LINKS=2,SDW_DMIC=1,\
NUM_HDMIS=0,SDW_SPK_STREAM=Playback-SmartAmp,SDW_SPK_IN_STREAM=Capture-SmartAmp,\
SDW_DMIC_STREAM=Capture-SmartMic,SDW_JACK_OUT_STREAM=Playback-SimpleJack,\
SDW_JACK_IN_STREAM=Capture-SimpleJack,SDW_AMP_FMT_24=true,SDW_JACK_FMT_24=true"

# IPC4 topology for TGL rt712 Headset, Amp and DMIC
"cavs-sdw\;sof-tgl-rt712\;SDW_JACK_OUT_STREAM=SDW0-Playback-SimpleJack,\
SDW_JACK_IN_STREAM=SDW0-Capture-SimpleJack,SDW_SPK_STREAM=SDW0-Playback-SmartAmp,\
Expand Down
4 changes: 4 additions & 0 deletions tools/topology/topology2/cavs-sdw-src-gain-mixin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,16 @@ Object.Widget {
{
in_bit_depth 32
in_valid_bit_depth 32
in_sample_type $SAMPLE_TYPE_MSB_INTEGER
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,16 @@ Class.Pipeline."mixout-gain-alh-dai-copier-playback" {
{
in_bit_depth 32
in_valid_bit_depth 32
in_sample_type $SAMPLE_TYPE_MSB_INTEGER
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
]
}
Expand Down
132 changes: 106 additions & 26 deletions tools/topology/topology2/platform/intel/sdw-amp-generic.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Define {
SDW_AMP_IN_BE_ID 3
AMP_FEEDBACK_CH 2
SDW_AMP_FEEDBACK true
SDW_AMP_FMT_24 false
}

Object.Dai.ALH [
Expand Down Expand Up @@ -54,6 +55,19 @@ IncludeByKey.PASSTHROUGH {
Object.Widget.alh-copier.1 {
stream_name $SDW_SPK_STREAM
node_type $ALH_LINK_OUTPUT_CLASS
IncludeByKey.SDW_AMP_FMT_24 {
kv2019i marked this conversation as resolved.
Show resolved Hide resolved
"true" {
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 24
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
kv2019i marked this conversation as resolved.
Show resolved Hide resolved
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
]
}
}
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
Expand Down Expand Up @@ -120,31 +134,60 @@ IncludeByKey.PASSTHROUGH {
{
in_bit_depth 16
in_valid_bit_depth 16
in_sample_type $SAMPLE_TYPE_MSB_INTEGER
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
{
in_bit_depth 32
in_valid_bit_depth 24
in_sample_type $SAMPLE_TYPE_MSB_INTEGER
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
{
in_bit_depth 32
in_valid_bit_depth 32
in_sample_type $SAMPLE_TYPE_MSB_INTEGER
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
]
num_output_audio_formats 3
Object.Base.output_audio_format [
{
out_bit_depth 16
out_valid_bit_depth 16
}
{
out_bit_depth 32
out_valid_bit_depth 24
IncludeByKey.SDW_AMP_FMT_24 {
"true" {
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 24
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"

}
]
}
{
out_bit_depth 32
out_valid_bit_depth 32
"false" {
num_output_audio_formats 3
num_output_audio_formats 3
Object.Base.output_audio_format [
{
out_bit_depth 16
out_valid_bit_depth 16
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
{
out_bit_depth 32
out_valid_bit_depth 24
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
kv2019i marked this conversation as resolved.
Show resolved Hide resolved
{
out_bit_depth 32
out_valid_bit_depth 32
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
]
}
]
}
}
]
pipeline [
Expand Down Expand Up @@ -178,20 +221,36 @@ IncludeByKey.NUM_SDW_AMP_LINKS {
num_input_audio_formats 1
num_output_audio_formats 1
num_input_pins 1

# 32-bit 48KHz 2ch
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
in_sample_type $SAMPLE_TYPE_MSB_INTEGER
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
IncludeByKey.SDW_AMP_FMT_24 {
"true" {
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 24
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
]
}
]
"false" {
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
]
}
}
}
]
IncludeByKey.SDW_AMP_FEEDBACK {
Expand All @@ -209,17 +268,34 @@ IncludeByKey.NUM_SDW_AMP_LINKS {
num_output_audio_formats 1
num_output_pins 1

# 32-bit 48KHz 2ch
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
IncludeByKey.SDW_AMP_FMT_24 {
"true" {
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 24
in_sample_type $SAMPLE_TYPE_MSB_INTEGER
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
]
}
]
"false" {
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
in_sample_type $SAMPLE_TYPE_MSB_INTEGER
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
]
}
}
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
]
}
Expand Down Expand Up @@ -394,12 +470,16 @@ IncludeByKey.SDW_AMP_FEEDBACK {
{
in_bit_depth 32
in_valid_bit_depth 32
in_sample_type $SAMPLE_TYPE_MSB_INTEGER
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,16 @@ Object.Widget {
{
in_bit_depth 32
in_valid_bit_depth 32
in_sample_type $SAMPLE_TYPE_MSB_INTEGER
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
]
}
Expand Down
Loading