-
Notifications
You must be signed in to change notification settings - Fork 350
CTC topology #8840
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
CTC topology #8840
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,100 @@ | ||
| # | ||
| # Pipeline definitions | ||
| # | ||
| # PCM0 ---> gain ----> Mixin ----> Mixout ----> gain ----> CTC ----> SSP0 | ||
| # PCM1 ---> gain ----> Mixin ----> Mixout ----> gain ----> CTC ----> SSP1 | ||
| # | ||
| # The gain before mixin is for the different routes(e.g., deepbuffer, headset). | ||
|
|
||
| # Pipeline ID:1 PCM ID: 0 | ||
| Object.Pipeline { | ||
| # playback pipelines | ||
| host-copier-gain-mixin-playback [ | ||
| { | ||
| index $HEADSET_HOST_PIPELINE_ID | ||
|
|
||
| Object.Widget.host-copier.1 { | ||
| stream_name '$HEADSET_PLAYBACK_PCM_STREAM_NAME' | ||
| pcm_id $HEADSET_PCM_ID | ||
| } | ||
| Object.Widget.gain.1 { | ||
| Object.Control.mixer.1 { | ||
| name 'Pre Mixer $HEADSET_PCM_NAME Playback Volume' | ||
| } | ||
| } | ||
| } | ||
| { | ||
| index $SPEAKER_HOST_PIPELINE_ID | ||
|
|
||
| Object.Widget.host-copier.1 { | ||
| stream_name '$SPEAKER_PLAYBACK_PCM_STREAM_NAME' | ||
| pcm_id $SPEAKER_PCM_ID | ||
| } | ||
| Object.Widget.gain.1 { | ||
| Object.Control.mixer.1 { | ||
| name 'Pre Mixer $SPEAKER_PCM_NAME Playback Volume' | ||
| } | ||
| } | ||
| } | ||
| ] | ||
|
|
||
| mixout-gain-ctc-dai-copier-playback [ | ||
eddy1021 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| { | ||
| index $HEADSET_DAI_PIPELINE_ID | ||
|
|
||
| Object.Widget.dai-copier.1 { | ||
| dai_index $HEADSET_SSP_DAI_INDEX | ||
| dai_type "SSP" | ||
| copier_type "SSP" | ||
| stream_name "$HEADSET_CODEC_NAME" | ||
| node_type $I2S_LINK_OUTPUT_CLASS | ||
| } | ||
|
|
||
| Object.Widget.gain.1 { | ||
| Object.Control.mixer.1 { | ||
| name 'Post Mixer $HEADSET_PCM_NAME Playback Volume' | ||
| } | ||
| } | ||
| } | ||
| { | ||
| index $SPEAKER_DAI_PIPELINE_ID | ||
|
|
||
| Object.Widget.dai-copier.1 { | ||
| dai_index $SPEAKER_SSP_DAI_INDEX | ||
| dai_type "SSP" | ||
| copier_type "SSP" | ||
| stream_name "$SPEAKER_CODEC_NAME" | ||
| node_type $I2S_LINK_OUTPUT_CLASS | ||
| } | ||
| Object.Widget.gain.1 { | ||
| Object.Control.mixer.1 { | ||
| name 'Post Mixer $SPEAKER_PCM_NAME Playback Volume' | ||
| } | ||
| } | ||
| Object.Widget.ctc.1 { | ||
| Object.Control.bytes."1" { | ||
| name 'CTC.0' | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
|
|
||
| Object.Base.route [ | ||
| { | ||
| source "gain.$HEADSET_DAI_PIPELINE_ID.1" | ||
| sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback" | ||
| } | ||
| { | ||
| source "mixin.$HEADSET_HOST_PIPELINE_ID.1" | ||
| sink "mixout.$HEADSET_DAI_PIPELINE_ID.1" | ||
| } | ||
| { | ||
| source "ctc.$SPEAKER_DAI_PIPELINE_ID.1" | ||
| sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback" | ||
| } | ||
| { | ||
| source "mixin.$SPEAKER_HOST_PIPELINE_ID.1" | ||
| sink "mixout.$SPEAKER_DAI_PIPELINE_ID.1" | ||
| } | ||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| # | ||
| # Common widget ctc | ||
| # | ||
| # A generic ctc widget. All attributes defined herein are namespaced | ||
| # by alsatplg to "Object.Widget.ctc.N.attribute_name" | ||
| # | ||
| # Usage: this component can be used by instantiating it in the parent object. i.e. | ||
| # | ||
| # Object.Widget.ctc."N" { | ||
| # index 1 | ||
| # type "effect" | ||
| # } | ||
| # | ||
| # Where N is the unique instance number for the parent object. | ||
|
|
||
| Class.Widget."ctc" { | ||
|
Contributor
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 @ranj063 is there a way to set a min/max channel in widgets? I don't see anything in widget common. Might be useful for validation when pipelines define channels outside the range their components support.
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. Adding @singalsu too
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. PCM has channels_min and channels_max but I don't know if it would here. In my experience when channels count can be other than default 2, it's better to list for the instances explicitly the in and out formats with possible channels counts (and all rates if non-48 kHz is possible). There's an arrays combiner than can help when there's many combinations.
Contributor
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. Makes sense but is there a way to define that at the widget level. E.g. dev A makes comp 1 If format restrictions were part of the widget definition then it would be easy to identify if all widget formats were a superset of the pipelines set of supported formats. If they were a subset then the build would fail. Just a thought on finding bugs before runtime.
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. @cujomalainey audio formats are always part of individual widgets. A pipeline does not define a superset of audio formats at all. But its an interesting idea to identify discrepancies in audio formats across widgets within the same pipeline and fail during topology build. Let me give it a thought. |
||
| # | ||
| # Pipeline ID for the CTC widget object | ||
| # | ||
| DefineAttribute."index" { | ||
| type "integer" | ||
| } | ||
|
|
||
| # | ||
| # Unique instance for CTC widget | ||
| # | ||
| DefineAttribute."instance" { | ||
| type "integer" | ||
| } | ||
|
|
||
| #include common component definition | ||
| <include/components/widget-common.conf> | ||
|
|
||
| # Attribute categories | ||
| attributes { | ||
| # | ||
| # The CTC widget name would be constructed using the index and instance attributes. | ||
| # | ||
| !constructor [ | ||
| "index" | ||
| "instance" | ||
| ] | ||
|
|
||
| # | ||
| # mandatory attributes that must be provided when the class is instantiated | ||
| # | ||
| !mandatory [ | ||
| "uuid" | ||
| "num_input_audio_formats" | ||
| "num_output_audio_formats" | ||
| ] | ||
|
|
||
| # | ||
| # 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" | ||
| ] | ||
|
|
||
| # | ||
| # DTS widget objects instantiated within the same alsaconf node must have unique | ||
| # instance attribute | ||
| # | ||
| unique "instance" | ||
| } | ||
|
|
||
| Object.Control.bytes."1" { | ||
| max 4124 | ||
| } | ||
|
|
||
| # Default attribute values for CTC widget | ||
| uuid "bc:1b:0e:bf:6a:dc:fe:45:bc:90:25:54:cb:13:7a:b4" | ||
| type "effect" | ||
| no_pm "true" | ||
| num_input_pins 1 | ||
| num_output_pins 1 | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| # | ||
eddy1021 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # BE playback pipeline: mixout-gain-ctc-dai-copier. | ||
| # This pipeline is an extension of the mixout-gain-dai-copier-playback pipeline class. | ||
| # | ||
| # All attributes defined herein are namespaced | ||
| # by alsatplg to "Object.Pipeline.mixout-gain-ctc-dai-copier-playback.N.attribute_name" | ||
| # | ||
| # Usage: mixout-gain-ctc-dai-copier-playback pipeline object can be instantiated as: | ||
| # | ||
| # Object.Pipeline.mixout-gain-ctc-dai-copier-playback."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/dai-copier.conf> | ||
| <include/components/gain.conf> | ||
| <include/components/mixout.conf> | ||
| <include/components/pipeline.conf> | ||
| <include/components/ctc.conf> | ||
| <platform/intel/efx-default.conf> | ||
| <include/pipelines/cavs/mixout-gain-dai-copier-playback.conf> | ||
|
|
||
| Class.Pipeline."mixout-gain-ctc-dai-copier-playback" { | ||
| SubTreeCopy.baseclass { | ||
| # this class extends the mixout-gain-dai-copier-playback class definition | ||
| source "Class.Pipeline.mixout-gain-dai-copier-playback" | ||
|
|
||
| # target node is not defined which means that the new subtree will be copied to | ||
| # the parent node containing the SubTreeCopy node i.e in this case the | ||
| # Class.Pipeline.mixout-gain-ctc-dai-copier-playback {} node. | ||
|
|
||
| # default copy type is to extend the base class ie the widgets and routes | ||
| # will be added to the existing list of widgets/routes in the base class | ||
|
|
||
| tree { | ||
| Object.Widget { | ||
| ctc."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 | ||
| } | ||
| ] | ||
| } | ||
| } | ||
|
|
||
| Object.Base { | ||
| ! route [ | ||
| { | ||
| source gain.$index.1 | ||
| sink ctc.$index.1 | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.