topologies: switch all .m4 files to codec_provider and codec_consumer#5162
Conversation
All .tplg output files have been compared and are strictly identical after the change. The deprecation warnings were added more than one year ago in https://github.com/alsa-project/alsa-lib/commits//706192341d1d0bbb906 Now that we just upgraded our Docker image to ALSA 1.2.6 (https://hub.docker.com/r/thesofproject/sof/tags) so thesofproject#5153 can enable topology v2, the volume of warnings has became unbearable. For instance good luck trying to find the actual error messages for the build failures of thesofproject#5155 - they're totally drowned in these deprecation warnings. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
|
Ready for review but keeping as a draft for a day or two until any topology v2 dust from v2 #5153 settles. Compare the still too verbose but now somewhat readable : ... with the previously unreadable: |
Already done? |
When i pulled down your branch there was a few outstanding comments |
greg-intel
left a comment
There was a problem hiding this comment.
I make the noise, you clean it up. Nice.
OK. This PR is not a complete cleanup, it's only replacing two very specific ALSA keywords in the code. It does not change any comment. Considering the huge number of lines in this PR, I would like to keep it sort of "minimal", I mean 100% focused on a single logical change (two actually: master+slave but you get my point) and 100% focused on getting rid of the build warnings. So this PR breaks someone else's build somewhere else in only one way, minimizing git conflicts, easier to review and automate, etc. etc. |
|
https://sof-ci.01.org/sofpr/PR5162/build11524/devicetest/?model=TGLU_UP_HDA_ZEPHYR&testcase=check-suspend-resume-with-playback-5 looks like #5120 Everything else is green. |
|
Just a very early heads-up that this PR breaks alsatplg version 1.2.2 (default version in latest Ubuntu LTS) in an incredibly subtle and time-consuming / nasty way. No error message at build time and the .tplg output files seem to have the expected size. But their content differs very slightly and breaks Any clue? EDIT: answers in #5192 diffoscope BTconsumer2/topology/sof-apl-nocodec.tplg BTconsumer6/topology/sof-apl-nocodec.tplg
--- codec_consumer1.2.2/topology/sof-apl-nocodec.tplg
+++ codec_consumer1.2.6/topology/sof-apl-nocodec.tplg
@@ -2096,15 +2096,15 @@
000082f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008300: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008310: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008320: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008330: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008340: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008350: 0000 0000 0000 0000 0000 0000 0000 0078 ...............x
-00008360: 0000 0000 0000 0001 0000 0000 0000 0000 ................
+00008360: 0000 0000 0000 0001 0000 0000 0000 0101 ................
00008370: 0100 0000 0077 0100 e02e 0080 bb00 0002 .....w..........
00008380: 0000 0020 0000 0003 0000 0003 0000 0000 ... ............
00008390: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000083a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000083b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000083c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000083d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
@@ -2211,15 +2211,15 @@
00008a20: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008a30: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008a40: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008a50: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008a60: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008a70: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008a80: 0000 0078 0000 0001 0000 0001 0000 0000 ...x............
-00008a90: 0000 0000 0100 0000 0077 0100 e02e 0080 .........w......
+00008a90: 0000 0101 0100 0000 0077 0100 e02e 0080 .........w......
00008aa0: bb00 0002 0000 0020 0000 0003 0000 0003 ....... ........
00008ab0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008ac0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008ad0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008ae0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008af0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00008b00: 0000 0000 0000 0000 0000 0000 0000 0000 ................
@@ -2325,15 +2325,15 @@
00009140: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00009150: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00009160: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00009170: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00009180: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00009190: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000091a0: 0000 0000 0000 0078 0000 0002 0000 0001 .......x........
-000091b0: 0000 0000 0000 0000 0100 0000 0077 0100 .............w..
+000091b0: 0000 0000 0000 0101 0100 0000 0077 0100 .............w..
000091c0: e02e 0080 bb00 0002 0000 0020 0000 0003 ........... ....
000091d0: 0000 0003 0000 0000 0000 0000 0000 0000 ................
000091e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
000091f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00009200: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00009210: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00009220: 0000 0000 0000 0000 0000 0000 0000 0000 ................
|
|
@marc-hb I suggest you to compare the generated conf, which should be human readable. |
|
The generated conf files are the same. AFAIK they come from m4 not alsatplg. Revert submitted in #5192 |
|
@marc-hb No, they are not the same AFTER THE PR BEFORE THE PR Maybe c687815 is related to the issue |
Sorry I meant: the .conf files are exactly the same between 1.2.2 and 1.2.6, I just checked again.
Of course this PR changes the .conf files, that's expected.
Please provide a specific topology filename so I can try to reproduce.
Maybe you're looking at a different issue. For all comparisons I've reverted this PR; no other change involved. |
it's the same I build three sof-apl-nocodec.conf from the latest main, the one commit before your PR, and the one commit before c687815, I found the my env: alsatplg version 1.2.5.1 libasound version 1.2.5 libatopology version 1.2.5 |
That is the problem: you're involving other commits. To test, revert this commit only (at any point you like) and don't change anything else. |
1.2.5 is close to 1.2.6 so it's probably fine. I found the problem with 1.2.2 |
|
The hex diff Here is how the alsa-lib process the hardware config. https://github.com/alsa-project/alsa-lib/blob/c687c482107f746332dd18f7407f6c6efbffccb2/src/topology/pcm.c#L1400 |
While you think, I test aplay.
Absolutely none of the many test results and evidence I have on UP2 APL point at commit c687815
Thanks! How would alsatplg 1.2.2 corrupting these values in the .tplg file (see revert PR #5192) NOT cause any issue? Maybe commit c687815 has some problems but they are not problems I have and they are not related to this 1.2.2 + codec_consumer issue. |
Root caused, see my comment in |
…consumer" This reverts commit f50b6fe. I discovered the hard way that this change causes alsatplg version 1.2.2 (the default version in the current LTS Ubuntu) to corrupt just a few bytes in .tplg output in an incredibly discrete and time-consuming way: no error message at build time and same file size. See example at thesofproject#5162. We could/should just require a minimum alsatplg version at the CMake level but at this moment we don't even know which minimum version is needed and we would also need to take some time to test a few alsatplg versions. If version 1.2.2 would just fail with an decent error message that can be searched and discussed then everything would be fine but silent corruption is really not OK. So users of recent versions will unfortunately have to live with the huge number of warnings for now. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
…consumer" This reverts commit f50b6fe. I discovered the hard way that this change causes alsatplg version 1.2.2 (the default version in the current LTS Ubuntu) to corrupt just a few bytes in .tplg output in an incredibly discrete and time-consuming way: no error message at build time and same file size. See example at #5162. We could/should just require a minimum alsatplg version at the CMake level but at this moment we don't even know which minimum version is needed and we would also need to take some time to test a few alsatplg versions. If version 1.2.2 would just fail with an decent error message that can be searched and discussed then everything would be fine but silent corruption is really not OK. So users of recent versions will unfortunately have to live with the huge number of warnings for now. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
EDIT: reverted in #5192
All .tplg output files have been compared and are strictly identical
after the change. EDIT: compared identical only with alsatplg 1.2.6! 1.2.2 silently corrupts .tplg files, see below.
The deprecation warnings were added more than one year ago in
https://github.com/alsa-project/alsa-lib/commits//706192341d1d0bbb906
Now that we just upgraded our Docker image to ALSA 1.2.6
(https://hub.docker.com/r/thesofproject/sof/tags) so #5153 can enable
topology v2, the volume of warnings has became unbearable. For instance
good luck trying to find the actual error messages for the build
failures of #5155 - they're totally drowned in these deprecation
warnings.
Signed-off-by: Marc Herbert marc.herbert@intel.com