Skip to content
Open
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
6 changes: 6 additions & 0 deletions tools/topology/topology2/cavs-sdw.conf
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ IncludeByKey.SDW_ECHO_REF_DAI {
]
}
]
IncludeByKey.NUM_SDW_AMP_LINKS {
"0" "platform/intel/sdw-amp-echo-ref.conf"
Comment on lines +170 to +171
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

The conditional logic appears incorrect. This condition includes the amp echo reference configuration only when NUM_SDW_AMP_LINKS is "0" (no amp links), but amp echo reference should logically be included when SDW_SPK_ECHO_REF is "true" instead. The current logic would include speaker echo reference configuration even when there are no speaker/amp devices, which doesn't make sense. This should check "SDW_SPK_ECHO_REF" with value "true" to match the pattern used in sdw-amp-generic.conf line 1006.

Suggested change
IncludeByKey.NUM_SDW_AMP_LINKS {
"0" "platform/intel/sdw-amp-echo-ref.conf"
IncludeByKey.SDW_SPK_ECHO_REF {
"true" "platform/intel/sdw-amp-echo-ref.conf"

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same answer as #10573 (comment)

}
IncludeByKey.SDW_JACK {
"false" "platform/intel/sdw-jack-echo-ref.conf"
Comment on lines +173 to +174
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

The conditional logic appears incorrect. This condition includes the jack echo reference configuration when SDW_JACK is "false", but it should logically check if SDW_JACK_ECHO_REF is "true" instead. The current check on SDW_JACK being false is too broad and doesn't directly correlate with whether jack echo reference functionality is needed. This should check "SDW_JACK_ECHO_REF" with value "true" to match the pattern used in sdw-jack-generic.conf line 715.

Suggested change
IncludeByKey.SDW_JACK {
"false" "platform/intel/sdw-jack-echo-ref.conf"
IncludeByKey.SDW_JACK_ECHO_REF {
"true" "platform/intel/sdw-jack-echo-ref.conf"

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The purpose of the check is to make sure sdw-jack-generic.conf is not loaded. Because sdw-jack-echo-ref.conf is included in sdw-jack-generic.conf and he echo reference components will be duplicated if we include sdw-jack-echo-ref.conf here in that case.
Besides, SDW_JACK_ECHO_REF is checked inside sdw-jack-echo-ref.conf. No need to check it here.

}
}
}

Expand Down
125 changes: 125 additions & 0 deletions tools/topology/topology2/platform/intel/sdw-amp-echo-ref.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@

Define {
SDW_SPK_ECHO_REF_PCM_ID 12
SDW_SPK_ECHO_REF_PIPELINE_ID 120
}

IncludeByKey.PASSTHROUGH {
"false" {
IncludeByKey.SDW_SPK_ECHO_REF {
"true" {
IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK {
"true" {
IncludeByKey.USE_DAX {
"true" {
Object.Base.route [
{
source "dolby-dax.21.1"
sink "module-copier.21.$SDW_SPK_ECHO_REF_PIPELINE_ID"
}
{
source "module-copier.21.$SDW_SPK_ECHO_REF_PIPELINE_ID"
sink "alh-copier.$SDW_SPK_STREAM.0"
}
]
}
"false" {
Object.Base.route [
{
source "drc.21.1"
sink "module-copier.21.$SDW_SPK_ECHO_REF_PIPELINE_ID"
}
{
source "module-copier.21.$SDW_SPK_ECHO_REF_PIPELINE_ID"
sink "alh-copier.$SDW_SPK_STREAM.0"
}
]
}
}
}
"false" {
Object.Base.route [
{
source "gain.21.1"
sink "module-copier.21.$SDW_SPK_ECHO_REF_PIPELINE_ID"
}
{
source "module-copier.21.$SDW_SPK_ECHO_REF_PIPELINE_ID"
sink "alh-copier.$SDW_SPK_STREAM.0"
}
]
}
}
}
}
}
}

IncludeByKey.SDW_SPK_ECHO_REF {
"true" {
#module-copier ID should match SDW_SPK_ECHO_REF_PIPELINE_ID
Object.Widget.module-copier."120" {
index 21
num_input_pins 1
num_output_pins 2
num_input_audio_formats 1
num_output_audio_formats 1
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
}
]
}

Object.Pipeline {
siggen-host-copier-capture [
{
direction "capture"
index $SDW_SPK_ECHO_REF_PIPELINE_ID
Object.Widget.host-copier."1" {
stream_name "Speaker Echo Reference"
pcm_id $SDW_SPK_ECHO_REF_PCM_ID
}
Object.Widget.siggen."1" {}
}
]
}

Object.PCM.pcm [
{
name "Speaker Echo Reference"
id $SDW_SPK_ECHO_REF_PCM_ID
direction "capture"
Object.Base.fe_dai.1 {
name "Speaker Echo Reference"
}
Object.PCM.pcm_caps.1 {
name "Speaker Echo Reference"
formats 'S16_LE,S24_LE,S32_LE'
}
}
]

Object.Base.route [
{
source "alh-copier.Loopback_Virtual.25"
sink "siggen.$SDW_SPK_ECHO_REF_PIPELINE_ID.1"
}
{
source "module-copier.21.$SDW_SPK_ECHO_REF_PIPELINE_ID"
sink "siggen.$SDW_SPK_ECHO_REF_PIPELINE_ID.1"
}
{
source "siggen.$SDW_SPK_ECHO_REF_PIPELINE_ID.1"
sink "host-copier.$SDW_SPK_ECHO_REF_PCM_ID.capture"
}
]
} # SDW_SPK_ECHO_REF true
}
111 changes: 1 addition & 110 deletions tools/topology/topology2/platform/intel/sdw-amp-generic.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Define {
AMP_FEEDBACK_CH_PER_LINK 2
SDW_AMP_FEEDBACK true
AMP_PLAYBACK_NAME 'Speaker Playback'
SDW_SPK_ECHO_REF_PCM_ID 12
}

# include deep buffer config if buffer size is in 1 - 1000 ms.
Expand Down Expand Up @@ -738,50 +737,6 @@ Object.PCM.pcm [
IncludeByKey.PASSTHROUGH {
"false" {
IncludeByKey.SDW_SPK_ECHO_REF {
"true" {
IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK {
"true" {
IncludeByKey.USE_DAX {
"true" {
Object.Base.route [
{
source "dolby-dax.21.1"
sink "module-copier.21.22"
}
{
source "module-copier.21.22"
sink "alh-copier.$SDW_SPK_STREAM.0"
}
]
}
"false" {
Object.Base.route [
{
source "drc.21.1"
sink "module-copier.21.22"
}
{
source "module-copier.21.22"
sink "alh-copier.$SDW_SPK_STREAM.0"
}
]
}
}
}
"false" {
Object.Base.route [
{
source "gain.21.1"
sink "module-copier.21.22"
}
{
source "module-copier.21.22"
sink "alh-copier.$SDW_SPK_STREAM.0"
}
]
}
}
}
"false" {
IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK {
"true" {
Expand Down Expand Up @@ -1047,69 +1002,5 @@ IncludeByKey.SDW_AMP_FEEDBACK {
}

IncludeByKey.SDW_SPK_ECHO_REF {
"true" {
Object.Widget.module-copier."22" {
index 21
num_input_pins 1
num_output_pins 2
num_input_audio_formats 1
num_output_audio_formats 1
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
}
]
}

Object.Pipeline {
siggen-host-copier-capture [
{
direction "capture"
index 22
Object.Widget.host-copier."1" {
stream_name "Speaker Echo Reference"
pcm_id $SDW_SPK_ECHO_REF_PCM_ID
}
Object.Widget.siggen."1" {}
}
]
}

Object.PCM.pcm [
{
name "Speaker Echo Reference"
id $SDW_SPK_ECHO_REF_PCM_ID
direction "capture"
Object.Base.fe_dai.1 {
name "Speaker Echo Reference"
}
Object.PCM.pcm_caps.1 {
name "Speaker Echo Reference"
formats 'S16_LE,S24_LE,S32_LE'
}
}
]

Object.Base.route [
{
source "alh-copier.Loopback_Virtual.25"
sink "siggen.22.1"
}
{
source "module-copier.21.22"
sink "siggen.22.1"
}
{
source "siggen.22.1"
sink "host-copier.$SDW_SPK_ECHO_REF_PCM_ID.capture"
}
]
} # SDW_SPK_ECHO_REF true
"true" "platform/intel/sdw-amp-echo-ref.conf"
}
Loading