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
1 change: 1 addition & 0 deletions tools/topology/topology2/cavs-sdw.conf
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Define {
PASSTHROUGH false
SDW_JACK_CAPTURE_CH 2
ADD_BT false
SDW_LINK_VALID_BITS 24
}

# override defaults with platform-specific config
Expand Down
130 changes: 34 additions & 96 deletions tools/topology/topology2/platform/intel/sdw-amp-generic.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ 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 @@ -55,19 +54,15 @@ IncludeByKey.PASSTHROUGH {
Object.Widget.alh-copier.1 {
stream_name $SDW_SPK_STREAM
node_type $ALH_LINK_OUTPUT_CLASS
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))]"
}
]
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth $SDW_LINK_VALID_BITS
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
}
]
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
Expand Down Expand Up @@ -150,44 +145,15 @@ IncludeByKey.PASSTHROUGH {
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
]
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))]"

}
]
}
"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))]"
}
{
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))]"
}
]
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth $SDW_LINK_VALID_BITS
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
}
]
}
]
pipeline [
Expand Down Expand Up @@ -229,28 +195,14 @@ IncludeByKey.NUM_SDW_AMP_LINKS {
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
]
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))]"
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth $SDW_LINK_VALID_BITS
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
}
]
}
]
IncludeByKey.SDW_AMP_FEEDBACK {
Expand All @@ -268,28 +220,14 @@ IncludeByKey.NUM_SDW_AMP_LINKS {
num_output_audio_formats 1
num_output_pins 1

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.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth $SDW_LINK_VALID_BITS
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
Expand Down Expand Up @@ -449,7 +387,7 @@ IncludeByKey.SDW_AMP_FEEDBACK {
{
in_channels 4
in_bit_depth 32
in_valid_bit_depth 32
in_valid_bit_depth $SDW_LINK_VALID_BITS
in_ch_cfg $CHANNEL_CONFIG_3_POINT_1
in_ch_map $CHANNEL_MAP_3_POINT_1
in_sample_type $SAMPLE_TYPE_MSB_INTEGER
Expand All @@ -473,7 +411,7 @@ IncludeByKey.SDW_AMP_FEEDBACK {
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
in_valid_bit_depth $SDW_LINK_VALID_BITS
in_sample_type $SAMPLE_TYPE_MSB_INTEGER
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
Expand All @@ -482,7 +420,7 @@ IncludeByKey.SDW_AMP_FEEDBACK {
{
out_bit_depth 32
out_valid_bit_depth 32
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
]
Expand Down Expand Up @@ -510,7 +448,7 @@ IncludeByKey.SDW_AMP_FEEDBACK {

Object.PCM.pcm_caps.1 {
name "amp feedback"
formats 'S16_LE,S32_LE'
formats 'S16_LE,S24_LE,S32_LE'
channels_min $AMP_FEEDBACK_CH
channels_max $AMP_FEEDBACK_CH
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Object.Widget {
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
in_valid_bit_depth $SDW_LINK_VALID_BITS
in_sample_type $SAMPLE_TYPE_MSB_INTEGER
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
Expand Down
92 changes: 23 additions & 69 deletions tools/topology/topology2/platform/intel/sdw-jack-generic.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ IncludeByKey.PASSTHROUGH {
Define {
JACK_PLAYBACK_PCM_NAME "Jack Out"
JACK_CAPTURE_PCM_NAME "Jack In"
SDW_JACK_FMT_24 "false"
}

#
Expand Down Expand Up @@ -76,19 +75,15 @@ IncludeByKey.PASSTHROUGH {
Object.Widget.alh-copier.1 {
stream_name $SDW_JACK_OUT_STREAM
node_type $ALH_LINK_OUTPUT_CLASS
IncludeByKey.SDW_JACK_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_sample_type * 65536)]"
}
]
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth $SDW_LINK_VALID_BITS
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256)) | ($out_sample_type * 65536)]"
}
}
]
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
Expand Down Expand Up @@ -170,42 +165,15 @@ IncludeByKey.PASSTHROUGH {
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
]
IncludeByKey.SDW_JACK_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))]"
}
]
}
"false" {
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))]"
}
{
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))]"
}
]
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth $SDW_LINK_VALID_BITS
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
}
]
}
]
pipeline [
Expand Down Expand Up @@ -323,28 +291,14 @@ Object.Widget {
num_output_audio_formats 1
num_output_pins 1

IncludeByKey.SDW_JACK_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.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth $SDW_LINK_VALID_BITS
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
Expand Down
7 changes: 3 additions & 4 deletions tools/topology/topology2/production/tplg-targets-ace1.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,11 @@ SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack"
"cavs-sdw\;sof-mtl-cs42l43-l0-cs35l56-l12\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=2,SDW_DMIC=1,\
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"
SDW_JACK_IN_STREAM=Capture-SimpleJack"

"cavs-sdw\;sof-mtl-cs42l43-l0-cs35l56-l23\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=2,SDW_DMIC=1,\
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-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"
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack"

# Below topologies are used on Chromebooks

Expand Down Expand Up @@ -149,5 +148,5 @@ PDM1_MIC_B_ENABLE=1,DMIC0_ID=3,DMIC1_ID=4,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-sdw-cs42l42-l0-max98363-l2.bin,\
BT_NAME=SSP1-BT,BT_INDEX=1,BT_PCM_ID=20,BT_ID=8,BT_PCM_NAME=Bluetooth,ADD_BT=true,\
NUM_SDW_AMP_LINKS=1,SDW_SPK_STREAM=SDW2-Playback,SDW_AMP_FEEDBACK=false,\
SDW_JACK_CAPTURE_CH=1,SDW_AMP_FMT_24=true"
SDW_JACK_CAPTURE_CH=1"
)