Skip to content
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

Comp no wname in kcontrol name #7874

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

jsarha
Copy link
Contributor

@jsarha jsarha commented Jun 28, 2023

Ok, this PR has evolved enough so that the branch name does not anymore match the content, so I guess its time to turn the page and create a new one. The predecessor can be found as draft here: #7227

Adds "no_wname_in_kcontrol_name" token, and the associated boolean
attribute to generic component attributes.

If the attribute is set to true for a widget then non of its
associated kcontrols names will have the widget name as a prefix. For
example "gain.2.1 Post Mixer Analog Playback Volume" becomes just
"Post Mixer Analog Playback Volume".

Signed-off-by: Jyri Sarha <[email protected]>
@jsarha jsarha requested a review from ranj063 as a code owner June 28, 2023 21:11
@ranj063
Copy link
Collaborator

ranj063 commented Jun 28, 2023

@jsarha I was discussing the volume test in sof-ci with @marc-hb yesterday and we realized that the IPC4 volume tests do nothing today because there are no mixer names with "PGA" in the name. Now, if we remove the widget name in the mixer names altogether, the tests will also no nothing for IPC3 as well. So we first need to think about what the volume tests do before we move ahead with this change

@@ -61,4 +61,5 @@ Class.Widget."eqiir" {
no_pm "true"
num_input_pins 1
num_output_pins 1
no_wname_in_kcontrol_name "true"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not set this to true in widget-common.conf?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack, seems that base class is best place.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Set no_wname_in_kcontrol_name attribute default to true to for all
widgets.

This change will drop widget name prefixes from all kcontrols created
from currently defined widgets, as they all include
widget-common.conf. In practice this means that for example "gain.2.1
Post Mixer Analog Playback Volume" becomes just "Post Mixer Analog
Playback Volume" and same for all kcontrols.

This behavior can be reverted per widget basis by setting
no_wname_in_kcontrol_name attribute to false in the relevant widget.

Signed-off-by: Jyri Sarha <[email protected]>
@jsarha jsarha force-pushed the comp_no_wname_in_kcontrol_name branch from 876b1f5 to aee77aa Compare August 16, 2023 19:12
@jsarha
Copy link
Contributor Author

jsarha commented Aug 16, 2023

Moved the default value change to widget-common.conf. This became relevant again now that thesofproject/linux#4445 got merged and upstreamed.

@jsarha
Copy link
Contributor Author

jsarha commented Aug 16, 2023

@jsarha I was discussing the volume test in sof-ci with @marc-hb yesterday and we realized that the IPC4 volume tests do nothing today because there are no mixer names with "PGA" in the name. Now, if we remove the widget name in the mixer names altogether, the tests will also no nothing for IPC3 as well. So we first need to think about what the volume tests do before we move ahead with this change

The simplest way would be using amixer numid notation to identify the mixers, but maybe a regex pattern to match a particular mixer would be easier to follow. Could someone point me to the test script in question, so I would have better understanding of what I am talking about?

@jsarha jsarha closed this Aug 16, 2023
@jsarha jsarha reopened this Aug 16, 2023
@lgirdwood
Copy link
Member

@ranj063 good for you ?

@lgirdwood lgirdwood merged commit 865946c into thesofproject:main Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants