-
Notifications
You must be signed in to change notification settings - Fork 349
topology2: add src support #5913
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
a2e0194
topology2: add support for sampling rate
RanderWang 690c4d0
topology2: add cavs src support
RanderWang 2af0d94
topology2: add pipeline for src
RanderWang a1d1292
topology2: add src support on sdw platform
RanderWang c659e92
topology2: add S24LE support
RanderWang 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
181 changes: 181 additions & 0 deletions
181
tools/topology/topology2/cavs/cavs-sdw-src-gain-mixin.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,181 @@ | ||
| <searchdir:cavs> | ||
| <searchdir:include> | ||
| <searchdir:include/common> | ||
| <searchdir:include/components> | ||
| <searchdir:include/components/cavs> | ||
| <searchdir:include/dais> | ||
| <searchdir:include/controls> | ||
| <searchdir:include/pipelines/cavs> | ||
|
|
||
| <vendor-token.conf> | ||
| <tokens.conf> | ||
| <virtual.conf> | ||
| <src-gain-mixin-playback.conf> | ||
| <mixout-gain-dai-copier-playback.conf> | ||
| <passthrough-capture.conf> | ||
| <passthrough-be.conf> | ||
| <data.conf> | ||
| <pcm.conf> | ||
| <pcm_caps.conf> | ||
| <fe_dai.conf> | ||
| <alh.conf> | ||
| <hw_config.conf> | ||
| <manifest.conf> | ||
| <route.conf> | ||
| <cavs/common_definitions.conf> | ||
| <copier.conf> | ||
| <pipeline.conf> | ||
| <dai.conf> | ||
| <host.conf> | ||
|
|
||
| Define { | ||
| SDW_PLAYBACK_PCM 'SDW0-Playback' | ||
| SDW_CAPTURE_PCM 'SDW0-Capture' | ||
| PLAYBACK_LINK_ID 0 | ||
| CAPTURE_LINK_ID 1 | ||
| } | ||
|
|
||
| # | ||
| # List of all DAIs | ||
| # | ||
| #ALH Index: 0, Direction: duplex | ||
| Object.Dai { | ||
| ALH."2" { | ||
| id $PLAYBACK_LINK_ID | ||
| direction "playback" | ||
| name $SDW_PLAYBACK_PCM | ||
| default_hw_conf_id 0 | ||
| rate 48000 | ||
| channels 2 | ||
|
|
||
| Object.Base.hw_config."ALH2" { | ||
| id 0 | ||
| } | ||
| } | ||
| ALH."3" { | ||
| id $CAPTURE_LINK_ID | ||
| direction "capture" | ||
| name $SDW_CAPTURE_PCM | ||
| default_hw_conf_id 1 | ||
| rate 48000 | ||
| channels 2 | ||
|
|
||
| Object.Base.hw_config."ALH3" { | ||
| id 1 | ||
| } | ||
| } | ||
| } | ||
|
|
||
| # | ||
| # Pipeline definitions | ||
| # | ||
|
|
||
| # Pipeline ID:1 PCM ID: 0 | ||
| Object.Pipeline { | ||
| src-gain-mixin-playback."1" { | ||
| format "s16le" | ||
| index 1 | ||
|
|
||
| Object.Widget.copier.1.stream_name "Gain Playback 0" | ||
| Object.Widget.gain.1{ | ||
| Object.Control.mixer.1 { | ||
| name 'Src Playback Volume' | ||
| } | ||
| } | ||
|
|
||
| } | ||
| mixout-gain-dai-copier-playback."3" { | ||
| index 2 | ||
|
|
||
| Object.Widget.pipeline.1 { | ||
| stream_name 'copier.ALH.2.1' | ||
| } | ||
| Object.Widget.copier.1 { | ||
| stream_name $SDW_PLAYBACK_PCM | ||
| dai_type "ALH" | ||
| copier_type "ALH" | ||
| type "dai_in" | ||
| node_type $ALH_LINK_OUTPUT_CLASS | ||
| } | ||
|
|
||
| Object.Widget.gain.1 { | ||
| Object.Control.mixer.1 { | ||
| name 'Main Playback Volume' | ||
| } | ||
| } | ||
|
|
||
| format s16le | ||
| } | ||
|
|
||
| passthrough-capture."4" { | ||
| format "s16le" | ||
| index 4 | ||
|
|
||
| Object.Widget.copier.1.stream_name "Passthrough Capture 0" | ||
| Object.Widget.copier.1.Object.Base.audio_format.1 { | ||
| # 32 -> 16 bits conversion is done here, | ||
| # so in_bit_depth is 32 (and out_bit_depth is 16). | ||
| in_bit_depth 32 | ||
| } | ||
| } | ||
| passthrough-be.2 { | ||
| direction "capture" | ||
| index 3 | ||
| copier_type "ALH" | ||
| Object.Widget.pipeline.1 { | ||
| stream_name 'copier.ALH.3.1' | ||
| } | ||
| Object.Widget.copier.1 { | ||
| stream_name $SDW_CAPTURE_PCM | ||
| dai_type "ALH" | ||
| copier_type "ALH" | ||
| type "dai_out" | ||
| node_type $ALH_LINK_INPUT_CLASS | ||
| } | ||
| format s16le | ||
| } | ||
| } | ||
|
|
||
| Object.PCM { | ||
| pcm."0" { | ||
| name "Jack out" | ||
| id 0 | ||
| direction "playback" | ||
| Object.Base.fe_dai."Jack out" {} | ||
|
|
||
| Object.PCM.pcm_caps."playback" { | ||
| name "Gain Playback 0" | ||
| formats 'S16_LE,S32_LE' | ||
| rate_min 16000 | ||
| rate_max 48000 | ||
| } | ||
| } | ||
| pcm."1" { | ||
| name "Jack in" | ||
| id 1 | ||
| direction "capture" | ||
| Object.Base.fe_dai."Jack in" {} | ||
|
|
||
| Object.PCM.pcm_caps."capture" { | ||
| name "Passthrough Capture 0" | ||
| formats 'S16_LE,S32_LE' | ||
| } | ||
| } | ||
| } | ||
|
|
||
| Object.Base { | ||
| route."1" { | ||
| source "mixin.1.1" | ||
| sink "mixout.2.1" | ||
| } | ||
|
|
||
| route."2" { | ||
| source 'gain.2.1' | ||
| sink 'copier.ALH.2.1' | ||
| } | ||
|
|
||
| route."3" { | ||
| source "copier.ALH.3.1" | ||
| sink "copier.host.4.1" | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| # | ||
| # | ||
| # A generic src component. All attributes defined herein are namespaced | ||
| # by alsatplg to "Object.Widget.src.N.attribute_name" | ||
| # | ||
| # Usage: this component can be used by instantiating it in the parent object. i.e. | ||
| # | ||
| # Object.Widget.src."N" { | ||
| # period_sink_count 2 | ||
| # period_source_count 2 | ||
| # format "s24le" | ||
| # rate_out 48000 | ||
| # } | ||
| # | ||
| # Where N is the unique instance number for the src widget within the same alsaconf node. | ||
|
|
||
| Class.Widget."src" { | ||
| # | ||
| # Pipeline ID for the src widget object | ||
| # | ||
| DefineAttribute."index" {} | ||
|
|
||
| # | ||
| # object instance | ||
| # | ||
| DefineAttribute."instance" {} | ||
|
|
||
| #include common component definition | ||
| <include/components/widget-common.conf> | ||
|
|
||
| # | ||
| # widget UUID | ||
| # | ||
| DefineAttribute."uuid" { | ||
| type "string" | ||
| # Token set reference name and type | ||
| token_ref "sof_tkn_comp.uuid" | ||
| } | ||
|
|
||
| # | ||
| # Bespoke attributes | ||
| # | ||
|
|
||
| # Target sample rate | ||
| DefineAttribute."rate_out" { | ||
| # Token set reference name and type | ||
| token_ref "sof_tkn_src.word" | ||
| } | ||
|
|
||
| DefineAttribute."num_audio_formats" { | ||
| # Token set reference name and type | ||
| token_ref "sof_tkn_comp.word" | ||
| } | ||
|
|
||
| attributes { | ||
| # | ||
| # The widget name would be constructed using the index and instance attributes. | ||
| # For ex: "src.1.1" or "src.10.2" etc. | ||
| # | ||
| !constructor [ | ||
| "index" | ||
| "instance" | ||
| ] | ||
|
|
||
| !mandatory [ | ||
| "rate_out" | ||
| ] | ||
|
|
||
| # | ||
| # immutable attributes cannot be modified in the object instance | ||
| # | ||
| !immutable [ | ||
| "uuid" | ||
| "type" | ||
| ] | ||
|
|
||
| # | ||
| # deprecated attributes should not be added in the object instance | ||
| # | ||
| !deprecated [ | ||
| "preload_count" | ||
| ] | ||
|
|
||
| unique "instance" | ||
| } | ||
|
|
||
| # | ||
| # Default attributes | ||
| # | ||
| type "src" | ||
| # E61BB28D-149A-4C1F-B709-46823EF5F5AE | ||
| uuid "8d:b2:1b:e6:9a:14:1f:4c:b7:09:46:82:3e:f5:f5:ae" | ||
RanderWang marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| no_pm "true" | ||
|
|
||
| rate_out 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.
Uh oh!
There was an error while loading. Please reload this page.