-
Notifications
You must be signed in to change notification settings - Fork 349
Tools: Topology: Add echo reference for SDW speaker and jack #10387
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| # | ||
| # Siggen capture pipeline | ||
| # | ||
| # This class provides host pipeline for capture with siggen input. All | ||
| # attributes defined herein are namespaced by alsatplg to | ||
| # "Object.Pipeline.siggen-host-copier-capture.N.attribute_name". | ||
| # | ||
| # Usage: siggen-host-copier-capture pipeline object can be instantiated as: | ||
| # | ||
| # Object.Pipeline.siggen-host-copier-capture."N" { | ||
| # period 1000 | ||
| # time_domain "timer" | ||
| # } | ||
| # | ||
| # Where N is the unique pipeline ID within the same alsaconf node. | ||
| # | ||
|
|
||
| <include/common/input_audio_format.conf> | ||
| <include/common/output_audio_format.conf> | ||
| <include/components/pipeline.conf> | ||
| <include/components/host-copier.conf> | ||
| <include/components/siggen.conf> | ||
|
|
||
| Class.Pipeline."siggen-host-copier-capture" { | ||
|
|
||
| <include/pipelines/pipeline-common.conf> | ||
|
|
||
| attributes { | ||
| !constructor [ | ||
| "index" | ||
| ] | ||
|
|
||
| # | ||
| # siggen-host-copier-capture objects instantiated within the same alsaconf | ||
| # node must have unique pipeline_id attribute | ||
| # | ||
| unique "instance" | ||
| } | ||
|
|
||
| Object.Widget { | ||
| siggen."1" { | ||
| num_input_pins 1 | ||
| num_output_pins 1 | ||
| 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 | ||
| } | ||
| ] | ||
| } | ||
|
|
||
| host-copier."1" { | ||
| type "aif_out" | ||
| node_type $HDA_HOST_INPUT_CLASS | ||
| num_input_pins 1 | ||
| num_output_pins 1 | ||
| num_input_audio_formats 1 | ||
| num_output_audio_formats 3 | ||
| Object.Base.input_audio_format [ | ||
| { | ||
| in_bit_depth 32 | ||
| in_valid_bit_depth 32 | ||
| } | ||
| ] | ||
| Object.Base.output_audio_format [ | ||
| { | ||
| out_bit_depth 16 | ||
| out_valid_bit_depth 16 | ||
| } | ||
| { | ||
| out_bit_depth 32 | ||
| out_valid_bit_depth 24 | ||
| } | ||
| { | ||
| out_bit_depth 32 | ||
| out_valid_bit_depth 32 | ||
| } | ||
| ] | ||
| } | ||
|
|
||
| pipeline."1" { | ||
| priority 0 | ||
| lp_mode 0 | ||
| } | ||
| } | ||
|
|
||
| direction "capture" | ||
| dynamic_pipeline 1 | ||
| time_domain "timer" | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -13,6 +13,7 @@ Define { | |||||||
| AMP_FEEDBACK_CH_PER_LINK 2 | ||||||||
| SDW_AMP_FEEDBACK true | ||||||||
| AMP_PLAYBACK_NAME 'Speaker Playback' | ||||||||
| SDW_SPK_ECHO_REF_PCM_ID 12 | ||||||||
| } | ||||||||
|
|
||||||||
| Object.Dai.ALH [ | ||||||||
|
|
@@ -636,44 +637,76 @@ Object.PCM.pcm [ | |||||||
| ] | ||||||||
|
|
||||||||
| IncludeByKey.PASSTHROUGH { | ||||||||
| "false" { | ||||||||
| IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK { | ||||||||
| "true" { | ||||||||
| Object.Base.route [ | ||||||||
| { | ||||||||
| source "drc.21.1" | ||||||||
| sink "alh-copier.$SDW_SPK_STREAM.0" | ||||||||
| } | ||||||||
| ] | ||||||||
| } | ||||||||
| "false" { | ||||||||
| Object.Base.route [ | ||||||||
| { | ||||||||
| source "gain.21.1" | ||||||||
| sink "alh-copier.$SDW_SPK_STREAM.0" | ||||||||
| } | ||||||||
| ] | ||||||||
| } | ||||||||
| } | ||||||||
| Object.Base.route [ | ||||||||
| { | ||||||||
| source 'mixin.20.1' | ||||||||
| sink 'mixout.21.1' | ||||||||
| } | ||||||||
| { | ||||||||
| source 'host-copier.2.playback' | ||||||||
| sink 'gain.20.1' | ||||||||
| } | ||||||||
| ] | ||||||||
| } | ||||||||
| "true" { | ||||||||
| Object.Base.route [ | ||||||||
| { | ||||||||
| source "host-copier.2.playback" | ||||||||
| sink "alh-copier.$SDW_SPK_STREAM.0" | ||||||||
| "false" { | ||||||||
| IncludeByKey.SDW_SPK_ECHO_REF { | ||||||||
| "true" { | ||||||||
| IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK { | ||||||||
| "true" { | ||||||||
| 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" { | ||||||||
| Object.Base.route [ | ||||||||
| { | ||||||||
| source "drc.21.1" | ||||||||
| sink "alh-copier.$SDW_SPK_STREAM.0" | ||||||||
| } | ||||||||
| ] | ||||||||
| } | ||||||||
| "false" { | ||||||||
| Object.Base.route [ | ||||||||
| { | ||||||||
| source "gain.21.1" | ||||||||
| sink "alh-copier.$SDW_SPK_STREAM.0" | ||||||||
| } | ||||||||
| ] | ||||||||
| } | ||||||||
| } | ||||||||
| } | ||||||||
| } | ||||||||
| ] | ||||||||
| } | ||||||||
| Object.Base.route [ | ||||||||
| { | ||||||||
| source 'mixin.20.1' | ||||||||
| sink 'mixout.21.1' | ||||||||
| } | ||||||||
| { | ||||||||
| source 'host-copier.2.playback' | ||||||||
| sink 'gain.20.1' | ||||||||
| } | ||||||||
| ] | ||||||||
| } | ||||||||
| "true" { | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @singalsu no need to change this PR, but @ranj063 @jsarha I was wondering if we started adding inline comments to there branches line the C conventions for ifdefs, would that make the nested conditional segments a bit more easy to follow. E.g. here on L702 "# PASSTHROUGH==true " and then the definition. What do you think?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would be good. I'm quite confused with long chunks of stuff. And our indents also are not always right. |
||||||||
| Object.Base.route [ | ||||||||
| { | ||||||||
| source "host-copier.2.playback" | ||||||||
| sink "alh-copier.$SDW_SPK_STREAM.0" | ||||||||
| } | ||||||||
| ] | ||||||||
| } | ||||||||
| } | ||||||||
|
|
||||||||
| IncludeByKey.SDW_AMP_FEEDBACK { | ||||||||
|
|
@@ -885,3 +918,98 @@ IncludeByKey.SDW_AMP_FEEDBACK { | |||||||
| ] | ||||||||
| } | ||||||||
| } | ||||||||
|
|
||||||||
| IncludeByKey.SDW_SPK_ECHO_REF { | ||||||||
| "true" { | ||||||||
| Object.Widget.alh-copier [ | ||||||||
| { | ||||||||
| stream_name "Loopback_Virtual" | ||||||||
| direction "capture" | ||||||||
| type "dai_out" | ||||||||
| index 22 | ||||||||
| dai_index 25 | ||||||||
| node_type $ALH_LINK_INPUT_CLASS | ||||||||
| num_input_audio_formats 1 | ||||||||
| num_output_audio_formats 1 | ||||||||
| Object.Base.input_audio_format [ | ||||||||
singalsu marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||
| { | ||||||||
| 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))]" | ||||||||
|
||||||||
| in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]" | |
| in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]" | |
| in_rate 48000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We operate the speaker pipelines with the default rate (48 kHz) from classes. It should be added everywhere in the large topology fragment, so not doing it unless we add other rates options for speaker.
singalsu marked this conversation as resolved.
Show resolved
Hide resolved
Copilot
AI
Dec 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output_audio_format block (lines 944-945) is missing the out_rate field. For consistency with the jack configuration (line 634) and completeness of the audio format specification, consider adding the out_rate field.
| out_bit_depth 32 | |
| out_bit_depth 32 | |
| out_rate 48000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, not adding rates to speaker.
Uh oh!
There was an error while loading. Please reload this page.