-
Notifications
You must be signed in to change notification settings - Fork 350
Topology clean ups - Part 2 #6627
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
Conversation
plbossart
left a comment
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.
thanks for starting this @ranj063. These days all I do is review your PRs :-)
Couple of suggestions below
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.
i find it hard to review this.
dai_index = 2 is seen on both line 123 and 140. is this a bug or a feature?
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.
its a feature. This one is FE DAI index 2 and the other one is BE DAI index 2
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.
dai_index always before stream name?
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.
them why not use the same value to FE DAI index and PCM ID with a macro or something that enforces this rule?
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.
yes, I think I should do that for my own sanity and others' as well
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.
do we ever have a case where dai_type and copier_type are different
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.
copier_type is applicable to all copiers (host, module, DAI copiers) whereas dai_type is only applicable for the DAI copiers. When set, the dai_type and copier_type must match. But we need 2 attributes because the dai_type is added as a token whereas copier_type is purely for the use of naming the copier
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.
For ALH I am not sure if the dai_index has any meaning. It's my understanding that the same copier or gateway will manage streaming over multiple links.
@bardliao need your help here.
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.
do we need to add the pipeline ID? It's used for topology1 and helps visualize the pipeline boundaries.
The position in the pipeline could also be useful for controls.
Maybe we need
<pipeline> <position in pipeline>
for all modules, and
<dai_index>
in addition as a suffix for copiers only? (with the caveat on dai_id for ALH above)
It is not used at all. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
4fd7a25 to
d5ce924
Compare
d5ce924 to
b56a22e
Compare
kv2019i
left a comment
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.
Changes look good, but the motivation/background would be nice to have (maybe link to some kernel/FW PR and/or discussion).
| Object.Dai { | ||
| HDA.0 { | ||
| name $HDA_ANALOG_DAI_NAME | ||
| dai_index 0 |
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 commit leaves me a bit hanging on why these changes are made. The "This is in preparation" is information, but at least for me, this still opens questions. What it is the "instance" id, why we are adding one, how should I set it, etc.
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.
+1, changes "in preparation for something in the future" are always difficult, if possible, such changes are easier to understand when submitted together with the actual use-case
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.
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.
BTW I want to make this a rule in tplg2 to have an instance for every object. will be adding that in the compiler soon.
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.
Thanks @ranj063 the expanded description is very helpful.
lgirdwood
left a comment
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.
@jsarha pls review
Add an instance attribute that will be used to instantiate DAI objects
and make dai_index a mandatory attribute for all DAI objects types. This
is in preparation to make the instance attribute default for all objects
with topology2. This is required because the topology2 compiler allows
for expansion of string values with variable definitions. So, if we
wanted to expand the value of dai_index from a variable definition(shown
as below), it is only possible if it were a normal attribute instead of
the node ID as it is currently.
Define {
SSP_DAI_INDEX 3
}
Object.Dai.SSP.1 {
dai_index $SSP_DAI_INDEX
}
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add an instance attribute and make the name attribute mandatory for the
hw_config objects. This is required because the topology2 compiler allows
for expansion of string values with variable definitions. So, if we
wanted to expand the name from a variable definition(as shown below), it
is only possible if it were a normal attribute instead of the node ID as
it is currently.
Define {
SSP0_HW_CONFIG_NAME "SSP0"
}
Object.DAI.SSP.1 {
dai_index 0
Object.Base.hw_config.1 {
name $SSP0_HW_CONFIG_NAME
}
}
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
98f2137 to
476eabd
Compare
|
|
||
| Object.Dai { | ||
| HDA.0 { | ||
| name $HDA_ANALOG_DAI_NAME |
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.
"This is required because the topology2 compiler allows for expansion of string values with variable definitions." - did you mean "doesn't allow?" Same in the next commit. But how does it help to solve the issue with included topology2 files? You still need to use unique module / component names in them, don't you? And since you don't know where it's included from and what numbers are already taken you end up trying to guess some "really large number that nobody hopefully has taken yet"
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.
@lyakh no I meant "allow". This PR is not meant to solve the issue with topology2 files but rather only amined at being able to allow substituting the dai_index for DAI objects and name for hw_config objects
|
SOFCI TEST |
This is rebased on top of #6592 and should be merged only after that one is merged