-
Notifications
You must be signed in to change notification settings - Fork 349
topology2: Move the hw_config class definition #7370
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
Closed
Closed
Changes from all commits
Commits
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
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
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
35 changes: 35 additions & 0 deletions
35
tools/topology/topology2/include/dais/hw_config_simple.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,35 @@ | ||
| # Simple hardware config class definition for HDA/SDW/DMIC type DAIs. All attributes defined herein | ||
| # are namespaced by alsatplg to "Object.Base.hw_config.1.attribute_name" | ||
| # | ||
| # Object.Base.hw_config.1 { | ||
| # id 0 | ||
| # name "HDA0" | ||
| # } | ||
| # | ||
| # where 1 is the unique instance ID for the hw_config object within the same alsaconf | ||
| # node. | ||
|
|
||
| Class.Base."hw_config" { | ||
| # | ||
| # Argument used to construct hw config (hw config ID) | ||
| # | ||
| DefineAttribute."id" {} | ||
| DefineAttribute."instance" {} | ||
|
|
||
| DefineAttribute."name" { | ||
| type "string" | ||
| } | ||
|
|
||
| attributes { | ||
| !constructor [ | ||
| "id" | ||
| ] | ||
| !mandatory [ | ||
| "name" | ||
| ] | ||
| # | ||
| # hw_config objects instantiated within the same alsaconf node must have unique | ||
| # 'instance' attribute | ||
| unique "instance" | ||
| } | ||
| } |
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
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 |
|---|---|---|
| @@ -1,15 +1,16 @@ | ||
| # Hardware config class definition DAIs. All attributes defined herein | ||
| # Hardware config class definition. All attributes defined herein | ||
| # are namespaced by alsatplg to "Object.Base.hw_config.NAME.attribute_name" | ||
| # | ||
| # Object.Base.hw_config."NAME" { | ||
| # Object.Base.hw_config.1 { | ||
| # id 0 | ||
| # mclk_freq 24000000 | ||
| # bclk_freq 4800000 | ||
| # tdm_slot_width 25 | ||
| # bclk_freq 3072000 | ||
| # tdm_slot_width 32 | ||
| # } | ||
| # | ||
| # where NAME is the unique instance name for the hw_config object | ||
| # within the same alsaconf node. | ||
| # where 1 is the unique instance ID for the hw_config object within the same alsaconf | ||
|
Member
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. Why use a number when a name is more descriptive ?
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. @lgirdwood all objects need to have instance so that we can use arrays. |
||
| # node. | ||
|
|
||
| <platform/intel/ssp_aux_config.conf> | ||
|
|
||
| Class.Base."hw_config" { | ||
| # | ||
|
|
@@ -44,7 +45,21 @@ Class.Base."hw_config" { | |
| type "string" | ||
| } | ||
|
|
||
| DefineAttribute."bclk_freq" {} | ||
| DefineAttribute."bclk_freq" { | ||
| constraints { | ||
| # Allowed values of bclk derived from mclk_freq of 24.576MHz | ||
| !valid_values [ | ||
| "12288000" | ||
| "6144000" | ||
| "3072000" | ||
| "1536000" | ||
| "768000" | ||
ranj063 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "384000" | ||
| "256000" | ||
| "128000" | ||
| ] | ||
| } | ||
| } | ||
|
|
||
| DefineAttribute."fsync" { | ||
| type "string" | ||
|
|
@@ -68,15 +83,20 @@ Class.Base."hw_config" { | |
| "name" | ||
| ] | ||
| # | ||
| # hw_cfg objects instantiated within the same alsaconf node must have unique | ||
| # hw_config objects instantiated within the same alsaconf node must have unique | ||
| # 'instance' attribute | ||
| # | ||
| unique "instance" | ||
| } | ||
|
|
||
| Object.Base.link_config.1 { | ||
| clock_source 1 | ||
| } | ||
|
|
||
| #TODO: Add link flags | ||
|
|
||
| format "I2S" | ||
| # TODO: Make this immutable | ||
| mclk_freq 24576000 | ||
| mclk "codec_mclk_in" | ||
| bclk "codec_consumer" | ||
| fsync "codec_consumer" | ||
|
|
||
File renamed without changes.
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
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.
Isn't the blob version setting missing? This works on cAVS2.5 now, as blob parsing ignores the aux blob and driver selects the clock source by itself. If we'd set blob version to v1.5 (0x105), parsing would fail on cAVS2.5 platforms.