Repository navigation
Change the naming convention for the ALH DAI copiers in topology #7640
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f31ee79
topology2: components: Introduce a new class definition for ALH DAI c…
ranj063 89546ab
topology2: Introduce a new pipeline class
ranj063 15ed2d9
topology2: Use the new ALH dai copier class
ranj063 0d9800f
topology2: dai-copier: Remove ALH support
ranj063 ee88662
topology2: sdw-amp-generic: Show all aggregated DAIs on the graph
ranj063 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
143 changes: 143 additions & 0 deletions
143
tools/topology/topology2/include/components/alh-dai-copier.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,143 @@ | ||
| # | ||
| # ALH DAI gateway copier | ||
| # | ||
| # ALH DAI copier widget. All attributes defined herein are namespaced | ||
| # by alsatplg to "Object.Widget.alh-copier.N.attribute_name" | ||
| # | ||
| # Usage: this component can be used by instantiating it in the parent object. i.e. | ||
| # | ||
| # Object.Widget.alh-copier."N" { | ||
| # dai_index 0 | ||
| # stream_name "SDW1-Playback" | ||
| # } | ||
| # | ||
| # Where N is the unique instance number for the alh-copier object within the same alsaconf node. | ||
|
|
||
| Class.Widget."alh-copier" { | ||
| # | ||
| # Pipeline ID for the alh-copier object | ||
| # | ||
| DefineAttribute."index" {} | ||
|
|
||
| # DAI index: this is always 0 when there is no aggregation. | ||
| DefineAttribute."dai_index" { | ||
| token_ref "sof_tkn_dai.word" | ||
| } | ||
|
|
||
| # | ||
| # alh-copier object instance | ||
| # | ||
| DefineAttribute."instance" {} | ||
|
|
||
| #include common component definition | ||
| <include/components/widget-common.conf> | ||
|
|
||
| # | ||
| # alh-copier component UUID | ||
| # | ||
| DefineAttribute."uuid" { | ||
| type "string" | ||
| # Token set reference name and type | ||
| token_ref "sof_tkn_comp.uuid" | ||
| } | ||
|
|
||
| # | ||
| # Bespoke Attribute Definitions for alh-copier | ||
| # | ||
|
|
||
| DefineAttribute."dai_type" { | ||
| type "string" | ||
| token_ref "sof_tkn_dai.string" | ||
| } | ||
|
|
||
| DefineAttribute."direction" { | ||
| type "string" | ||
| token_ref "sof_tkn_dai.word" | ||
| constraints { | ||
| !valid_values [ | ||
| "playback" | ||
| "capture" | ||
| ] | ||
| !tuple_values [ | ||
| 0 | ||
| 1 | ||
| ] | ||
| } | ||
| } | ||
|
|
||
| # | ||
| # cycles per chunk processed | ||
| # | ||
| DefineAttribute."cpc" { | ||
| # Token set reference name and type | ||
| token_ref "sof_tkn_comp.word" | ||
| } | ||
|
|
||
| DefineAttribute."bss_size" {} | ||
|
|
||
| DefineAttribute."is_pages" { | ||
| # Token set reference name and type | ||
| token_ref "sof_tkn_comp.word" | ||
| } | ||
|
|
||
| DefineAttribute."node_type" { | ||
| # Token set reference name and type | ||
| token_ref "sof_tkn_copier.word" | ||
| constraints { | ||
| !valid_values [ | ||
| $ALH_LINK_OUTPUT_CLASS # ALH link output, legacy for SNDW (DSP ->) | ||
| $ALH_LINK_INPUT_CLASS # ALH link input, legacy for SNDW (DSP <-) | ||
| ] | ||
| } | ||
| } | ||
|
|
||
| attributes { | ||
| # | ||
| # The alh-copier widget name would be constructed using the stream_name, | ||
| # direction and dai_index attributes. For ex: "alh-copier.SDW1-Playback.0". | ||
| # | ||
| !constructor [ | ||
| "stream_name" | ||
| "dai_index" | ||
| ] | ||
|
|
||
| # | ||
| # mandatory attributes that must be provided when the alh-copier class is | ||
| # instantiated | ||
| # | ||
| !mandatory [ | ||
| "no_pm" | ||
| "num_input_audio_formats" | ||
| "num_output_audio_formats" | ||
| "node_type" | ||
| ] | ||
|
|
||
| # | ||
| # immutable attributes cannot be modified in the object instance | ||
| # num_input_audio_formats for capture and num_output_formats for playback are | ||
| # mandatory even though the num_input_pins/num_output_pins are 0 because | ||
| # these are used to set the DMA buffer format. | ||
| # | ||
| !immutable [ | ||
| "uuid" | ||
| "dai_type" | ||
|
ranj063 marked this conversation as resolved.
Outdated
|
||
| ] | ||
|
|
||
| unique "instance" | ||
| } | ||
|
|
||
| # | ||
| # Default attributes for alh-copier | ||
| # | ||
| #UUID: 9BA00C83-CA12-4A83-943C-1FA2E82F9DDA | ||
| uuid "83:0c:a0:9b:12:CA:83:4a:94:3c:1f:a2:e8:2f:9d:da" | ||
| no_pm "true" | ||
| core_id 0 | ||
| cpc 1647 | ||
| bss_size 280 | ||
| dai_type "ALH" | ||
| dai_index 0 | ||
|
|
||
| # math expression for computing is_pages | ||
| is_pages "$[(($bss_size + 4095) & -4095) / 4096]" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 109 additions & 0 deletions
109
tools/topology/topology2/include/pipelines/cavs/mixout-gain-alh-dai-copier-playback.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| # | ||
| # BE playback pipeline: mixout-gain-alh-dai-copier. | ||
| # | ||
| # All attributes defined herein are namespaced | ||
| # by alsatplg to "Object.Pipeline.mixout-gain-alh-dai-copier-playback.N.attribute_name" | ||
| # | ||
| # Usage: mixout-gain-alh-dai-copier-playback pipeline object can be instantiated as: | ||
| # | ||
| # Object.Pipeline.mixout-gain-alh-dai-copier-playback."N" { | ||
| # time_domain "timer" | ||
| # rate 48000 | ||
| # } | ||
| # | ||
| # Where N is the unique pipeline ID within the same alsaconf node. | ||
| # | ||
|
|
||
| <include/common/audio_format.conf> | ||
| <include/components/alh-dai-copier.conf> | ||
| <include/components/gain.conf> | ||
| <include/components/mixout.conf> | ||
| <include/components/pipeline.conf> | ||
|
|
||
| Class.Pipeline."mixout-gain-alh-dai-copier-playback" { | ||
|
|
||
| DefineAttribute."index" {} | ||
|
|
||
| <include/pipelines/pipeline-common.conf> | ||
|
|
||
| attributes { | ||
| !constructor [ | ||
| "index" | ||
| ] | ||
|
|
||
| !immutable [ | ||
| "direction" | ||
| ] | ||
|
|
||
| # | ||
| # mixout-gain-alh-dai-copier-playback objects instantiated within the same alsaconf | ||
| # node must have unique instance attribute | ||
| # | ||
| unique "instance" | ||
| } | ||
|
|
||
| Object.Widget { | ||
| mixout."1" {} | ||
| alh-copier."1" { | ||
| type dai_in | ||
| num_input_audio_formats 1 | ||
| num_output_audio_formats 1 | ||
| num_input_pins 1 | ||
|
|
||
| # copier only supports one format based on mixin/mixout requirements: | ||
| # 32-bit 48KHz 2ch | ||
| 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 | ||
| } | ||
|
ranj063 marked this conversation as resolved.
Outdated
|
||
| ] | ||
| } | ||
| gain."1" { | ||
| num_input_audio_formats 1 | ||
| num_output_audio_formats 1 | ||
|
|
||
| # 32-bit 48KHz 2ch | ||
| 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 | ||
| } | ||
| ] | ||
| } | ||
|
|
||
| pipeline."1" { | ||
| priority 0 | ||
| lp_mode 0 | ||
| } | ||
| } | ||
|
|
||
| Object.Base { | ||
| route.1 { | ||
| source mixout.$index.1 | ||
| sink gain.$index.1 | ||
| } | ||
| } | ||
|
|
||
| direction "playback" | ||
| dynamic_pipeline 1 | ||
| time_domain "timer" | ||
| channels 2 | ||
| channels_min 2 | ||
| channels_max 2 | ||
| rate 48000 | ||
| rate_min 48000 | ||
| rate_max 48000 | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
commit title: topology2: componenets:
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.
fixed now