-
Notifications
You must be signed in to change notification settings - Fork 140
ASoC: SOF: Intel: pci-tgl: Change the default paths and firmware names #4382
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
ASoC: SOF: Intel: pci-tgl: Change the default paths and firmware names #4382
Conversation
|
This will certainly going to fail in cavs testing due to missing files, needs CI action. |
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.
no objection on the change proper but we need a clearer message about firmware releases, not just build.
sound/soc/sof/intel/pci-tgl.c
Outdated
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 think you should clarify the backwards-compatibility story and which versions of sof-bin this will be aligned with.
It wouldn't hurt to clarify why the change is not made for earlier cAVS versions
Also if TGL uses this 'sof-ipc4-tplg' convention, I am not sure why we have the 'sof-ace-tplg'. It's a bit inconsistent, so my vote is to change MTL 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.
I think you should clarify the backwards-compatibility story and which versions of sof-bin this will be aligned with. It wouldn't hurt to clarify why the change is not made for earlier cAVS versions
I think the commit message says that the SOF firmware supports building for cAVS2.5 platforms, that is the reason why older platforms remain unchanged.
Also if TGL uses this 'sof-ipc4-tplg' convention, I am not sure why we have the 'sof-ace-tplg'. It's a bit inconsistent, so my vote is to change MTL as well.
Right, but should that be included in this PR?
|
Does it mean SOF IPC4 supports TGL officially? |
The /lib/firmware/ directory structure should certainly not be part of any closed-source CI "secret". It should be documented in places (sof-docs, sof-bin, both, other?) that do not require grepping and making sense of the Linux kernel sources and it should be implemented in the same build script(s) used by CI and developers. For instance:
There are just examples of (trying to) align everyone on the same /lib/firmware/ layout; I don't know how it must be done in this particular case. If this is not done then there will be very tedious, duplicated and error-prone file shuffling and last minute bugs in sof-bin releases. |
sound/soc/sof/intel/pci-tgl.c
Outdated
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.
EHL stays with v2.2 LTS branch. We don't test SOF+IPC4 on Elkhart Lake (EHL) or release SOF binaries for this platform. Maybe we should remove EHL support from SOF main branch?
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.
It does not really matter, EHL is in the TGL family and if ever it will get IPC4 support in SOF (it can be built, right, it is just the signing) then it must follow the convention we have.
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.
Or if we drop EHL entirely then sure, the driver can drop it, but do we want that?
sound/soc/sof/intel/pci-tgl.c
Outdated
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.
Maybe we can set default_fw_path to "intel/sof-ipc4" for both TGL and TGL-H? They use different default_fw_filename , sof-tgl.ri and sof-tgl-h.ri now.
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.
@ujfalusi @kv2019i @marc-hb @plbossart Now xtensa-build-zephyr uses cAVS naming style: thesofproject/sof@762f63bf8b4b8c63 if w/ parameter --fw-naming AVS
But the default value of --fw-naming is SOF. If we omit this parameter or set --fw-naming SOF, and we also don't set '--use-platform-subdir', the layout of SOF+IPC4 is
/lib/firmware/intel/sof
└─community
│ ├── sof-tgl.ri
│ ├── sof-tgl-h.ri
│ └── sof-mtl.ri
├── dbgkey
│ ├── sof-tgl.ri
│ ├── sof-tgl-h.ri
│ └── sof-mtl.ri
├── sof-tgl.ri
├── sof-tgl-h.ri
└── sof-mtl.ri
The layout would be similar to that of SOF+IPC3. Is it good enough? Do we want to change the output directory name from sof to sof-ipc4?
The parameter '--use-platform-subdir' was introduced to avoid FW name collision of using AVS naming style.
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 don't want to have exceptions to a rule that we apply.
{vendor}/sof-ipc4/{platform}/sof-{platform}.ri
or
{vendor}/sof-ipc4/sof-{platform}.ri
but not a mix of naming and placement convention, that will be a huge burden and just confusion at the end.
sound/soc/sof/intel/pci-tgl.c
Outdated
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'm not sure if adding platform subfolder name to default_fw_filename is enough or necessary. Maybe DSP HiFi version or module library API version is more relevant here.
Does it mean SOF IPC4 supports TGL officially?
@bardliao I think @kv2019i previously shared that from SOF v2.7 certain cavs2.5 devices will use IPC4 by default and we'll define quirks in kernel driver for these platforms. But probably most cavs2.5 devices will stay with stable v2.2 for Linux distributions, because the effort to define topology2 for all cavs2.5 platforms would be huge.
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 have made the change to align with MTL and LNL convention, which uses subdirs. The pattern is:
{vendor}/sof-ipc4/{platform}/sof-{platform}.ri
For the library path we need to have separate directories, I think the reason was to have similar pattern under sof-ipc4 and sof-ipc4-lib
The reason why we never changed this is that everyone had a bit better idea and we never settled on a final solution ;)
3783358 to
c2c51f1
Compare
|
Changes since v1:
|
c2c51f1 to
48878f1
Compare
|
Changes since v2:
|
|
More of the same mess:
Ping? Can we please gather around and discuss a 1-2 pages long document (including pictures!) before making code changes? This commit message could be start. I'm all for more self-explanatory code and less "paperwork" but asking people writing scripts to search and (fail) to fully understand Linux kernel source goes really too far - and it has failed consistently. |
Started by @kv2019i , please review: |
48878f1 to
d3d218a
Compare
|
Changes since v3:
I would like to push this for v6.6 upstream, CAV2.5 binaries are not published in the sof-bin release so it is a change that we can still do. It will only bring some discomfort for developers when moving, but it is a simple thing to handle. |
This is not related to that, this is for IPC4 support on CAV2.5, which is not official atm and we need to have correct paths before it get official (if ever). We absolutely cannot use intel/avs/* for SOF IPC4 binaries |
Both are about /lib/firmware/intel/ and all documentation about it ("official" and not) should be in the same place. UPDATE: sorry, I edited the comment, now fixed |
|
Also, an sof-docs PR about CI and validation have already wasted an inordinate amount of time on this topic; let's learn from our mistakes. |
|
@marc-hb wrote:
I think @ujfalusi you probably should add a note that this patch does NOT change the default IPC version, and does NOT change any paths for the driver that are used by default. I.e. this patch only affects configurations where user has explicitly forced IPC4 to be used across all systems (ipc_type parameter). I.e. only impacts developers and CI systems in Intel. So given above, I think we don't need to mention this yet in sof-docs at all. The sof-docs page should document what the kernel does by default. If and when we change the default, then that must be accompanied with a sof-docs PR, that's for sure. |
|
@marc-hb, we will document the TGL IPC4 support when there are binaries to be used by users, currently they are not available and TGL family is only supported with IPC3. Yes, when we reach the point that some parts of TGL can move to IPC4 then we will need documentation since there will be machines that might missing the tplg2 files, so they will fall back to IPC3. What this PR is doing is to fix the incorrect IPC4 path before it is too late, as I said CAV2.5 must not refer to the avs path for SOF as we can build IPC4 for it. The AVS path is reserved for the AVS firmware, right? |
This does not seem correct:
sof-docs is mostly targeted at audio developers and testers (end-users should not need any documentation at all) and the IPC3/IPC4 transition has been in progress for much longer than six months. Documentation can also refer to the past and to the future, this happens all the time. As long as the markers and distinction with the present is clear (kernel git versions, different README if desired, etc.) then that's not a problem. In fact that's even one of the main superiorities of documentation: it can span multiple versions. In documentation you can have plain English explanations starting with "starting with version X,..." that would look really strange in source code and that you obviously cannot add to older source code. If really needed then the corresponding sof-docs PR can also stay a draft for a while and be merged only when the corresponding source code is merged. In the mean time sof-docs will provide a much better place to discuss and better reference than the Linux source code; even before anything is merged. What's especially frustrating in this particular case is that all the time spent discussing |
|
@marc-hb, yes, 2.5 went out with documenting the wrong path for the IPC4 files since the kernel was like that. We need to change the kernel now so we can move and document the paths for developers. I can create a draft sof-docs PR to document the CAV2.5 paths for IPC4 SOF, sure, now issue. Don't get me wrong: I agree that both kernel and sof-bin should implement what the documentation say and that should be the golden rule. |
It was not a mistake, it was intentional and agreed on. We did not want to upstream support for any firmware that was not PV-quality. Sometime in early 2023 it was decided to stop testing with reference firmware, so clearly that initial direction does not work any longer. We still don't have a clear direction however on what to do with IPC4 on TGL, do we? |
Yes, we were developing the kernel with the reference firmware since SOF back then did not had usable IPC4 support and it took some time to get there.
And way before we stopped testing the reference firmware we were only run tests with it for the sake of compatibility sanity checks. To make sure that the development of SOF and kernel is not going to a direction when it is no longer compatible with IPC4 protocol.
Right, we don't, but on the other hand SOF supports IPC4 for TGL, we all (developers) use IPC4 on TGL and most of us (developers) would like to see IPC4 on TGL in the hands (ears) of our users. My point is that TGL works with SOF firmware in IPC3 and IPC4, it is not working with the reference firmware out of box as the topologies have SOF modules, we cannot probe the reference firmware without modifying topologies. If the direction clears and we decide that SOF.IPC4 on TGL is in good shape for users and then we try to fix the paths, it is already late. |
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.
No objections on the code changes proper, but this cannot be merged as is.
|
btw we have a fantastic new test status where all cavs tests are shown as completed without errors but they all TIMEOUT... see https://sof-ci.01.org/linuxpr/PR4382/build6743/devicetest/index.html |
|
SOFCI TEST |
This is really odd as this PR passed in the past. CI is specifying the firmware via module parameter for sure, I'm not sure about the topology file. |
|
@plbossart, yes CI does this: it sets |
The currently used paths and firmware name reflects the reference firmware
convention:
default_fw_path: intel/avs/{platform_name}
default_lib_path: intel/avs-lib/{platform_name}
default_tplg_path: intel/avs-tplg
default_fw_filename: dsp_basefw.bin
The SOF supports building the firmware for cAVS2.5 platforms using IPC4 and
it is the preferred IPC4 implementation to be used on these devices.
Change the paths and firmware names to reflect this:
default_fw_path: intel/sof-ipc4/{platform_name}
default_lib_path: intel/sof-ipc4-lib/{platform_name}
default_tplg_path: intel/sof-ipc4-tplg
default_fw_filename: sof-{platform_name}.ri
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
d3d218a to
7e7261a
Compare
|
Changes since v4:
|
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 @ujfalusi
The currently used paths and firmware name reflects the reference firmware convention:
default_fw_path: intel/avs/{platform_name}
default_lib_path: intel/avs-lib/{platform_name}
default_tplg_path: intel/avs-tplg
default_fw_filename: dsp_basefw.bin
The SOF supports building the firmware for cAVS2.5 platforms using IPC4 and it is the preferred IPC4 implementation to be used on these devices.
Change the paths and firmware names to reflect this:
default_fw_path: intel/sof-ipc4/{platform_name}
default_lib_path: intel/sof-ipc4-lib/{platform_name}
default_tplg_path: intel/sof-ipc4-tplg
default_fw_filename: sof-{platform_name}.ri