-
Notifications
You must be signed in to change notification settings - Fork 46
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
volume-basic-test.sh: switch to .tplg parsing to test topologies v2 #1193
Conversation
No typo left behind. Signed-off-by: Marc Herbert <[email protected]>
b1af0ab
to
5a4cf38
Compare
In some test configurations there are many more "volume" kcontrols than found in the topology. Is this expected? Probably the most extreme example is on stable-v2.2 / topology v1:
38 "volume" controls!! for instance:
The vast majority of these are NOT in
23 volume controls, among others:
Yet
|
Those are codec kcontrols. |
Thanks, @ranj063 just told me: no need to test codec kcontrols (at least not in this "basic" test) |
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.
New volume tests passing in:
- LNL https://sof-ci.01.org/softestpr/PR1193/build426/devicetest/index.html
- MTL https://sof-ci.01.org/softestpr/PR1193/build428/devicetest/index.html
- TGL IPC4/topoV2 https://sof-ci.01.org/softestpr/PR1193/build427/devicetest/index.html
Old tests still passing "the new way" on stable-v2.2
All test results looking good!
tools/topo2_list_vol_kcontrols.py
Outdated
|
||
# TODO: find how the kernel makes this "topology v1 versus v2" | ||
# decision and mimic it here. | ||
pga_prefix = ( |
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.
Clue from @ranj063 (thx!) no_wname_in_kcontrol_name
Wait, is |
You could skip the SOF driver with 'options snd-intel-dspcfg dsp_driver=1' and you would see which controls are from the codec. 'Master Playback' is rather typical of HDaudio codecs. That said, we should indeed have added an SOF prefix to make all firmware-controls self-explanatory. |
Synchronize with Linux commit 246b5b77fc74 ("ASoC: SOF: topology: Add a token for dropping widget name in kcontrol name") Signed-off-by: Marc Herbert <[email protected]>
Will be used in next commit to fix thesofproject#1068. See also discussion in earlier attempt thesofproject#1068.
Until now this test was "screen-scraping" amixer output. This was not compatible with v2 topologies which means the test was always SKIP for everything developped on the main branch. Switch to parsing topologies to extract volume kcontrols. Fixes: thesofproject#1069, see also discussion in earlier attempt thesofproject#1068. Signed-off-by: Marc Herbert <[email protected]>
@ranj063 , @plbossart , I flipped the NO_WNAME setting so one .tplg file goes past the 44 characters limit in order to test the kcontrol truncation issue spotted in:
Then I ran the new test in this PR. It passes without any issue because either
Note the name inside the .tplg file is NOT truncated. |
volume-basic test results look good, this is ready. |
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.
way beyond my comfort zone....
volume_kcontrols = [ | ||
kc | ||
for kc in gain_block.kcontrols | ||
if kc.hdr.type == DapmType.MIXER.name and kc.body.max != 1 |
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.
indentation doesn't look like usual python, is this intentional?
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.
python list comprehension @plbossart
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.
python list comprehension
Yes.
This new script was formatted with black
; recommended. Warning: black
formats in place, make a backup first if needed.
prv.elems | ||
for prv in widget.priv | ||
if prv.elems[0].token | ||
== SofVendorToken.SOF_TKN_COMP_NO_WNAME_IN_KCONTROL_NAME.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.
same here, indentation is probably something intentional but someone like me will never figure out what this does.
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.
List comprehension here too. This is just building a list from another, filtered list.
@@ -1330,6 +1330,7 @@ def main(): | |||
errors = 0 | |||
for f in files: | |||
tplg = GroupedTplg(tplgFormat.parse_file(f)) | |||
assert set(dump_types) <= set(supported_dump), f"unsupported type in {dump_types}" |
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.
no idea what this does.
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.
Before this commit, a typo in the command-line argument was silently producing no output.
jf-lnlm-rvp-sdw-1 seems to be in bad shape @fredoh9, was the BIOS revert applied?
|
I did and run-all-tests.sh tested. I will move it to maintenance mode and double check again. |
SOFCI TEST |
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.
way beyond my comfort zone....
Thanks for taking a look anyway! In theory, you shouldn't need to be proficient in Python to at least follow most of what is going on. If you cannot, then the functions and variable names are probably not good enough.
jf-lnlm-rvp-sdw-1 seems to be in bad shape @fredoh9, was the BIOS revert applied?
https://sof-ci.01.org/softestpr/PR1193/build431/devicetest/index.html was an OLD run!
I'm re-running tests now (I was waiting for daily runs to finish)
volume_kcontrols = [ | ||
kc | ||
for kc in gain_block.kcontrols | ||
if kc.hdr.type == DapmType.MIXER.name and kc.body.max != 1 |
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.
python list comprehension
Yes.
This new script was formatted with black
; recommended. Warning: black
formats in place, make a backup first if needed.
prv.elems | ||
for prv in widget.priv | ||
if prv.elems[0].token | ||
== SofVendorToken.SOF_TKN_COMP_NO_WNAME_IN_KCONTROL_NAME.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.
List comprehension here too. This is just building a list from another, filtered list.
@@ -1330,6 +1330,7 @@ def main(): | |||
errors = 0 | |||
for f in files: | |||
tplg = GroupedTplg(tplgFormat.parse_file(f)) | |||
assert set(dump_types) <= set(supported_dump), f"unsupported type in {dump_types}" |
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.
Before this commit, a typo in the command-line argument was silently producing no output.
4 commits
Until now this test was "screen-scraping" amixer output. This was not
compatible with v2 topologies which means the test was always SKIP for
everything developped on the main branch. Switch to parsing topologies
to extract volume kcontrols.
Fixes: #1069, see also discussion in earlier attempt #1068.