-
Notifications
You must be signed in to change notification settings - Fork 132
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: ipc4: Add support for split firmware releases #5270
base: topic/sof-dev
Are you sure you want to change the base?
ASoC: SOF: ipc4: Add support for split firmware releases #5270
Conversation
sound/soc/sof/ipc4-loader.c
Outdated
|
||
kfree(lib_filename); | ||
if (ret) | ||
break; |
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.
why break
? If any of the libraries fail loading you don't attempt the rest? In this case it kind of makes sense - if there's no "main" module bundle, there's probably no "debug" either, but isn't the general concept - here's a list of optional libraries, we try to load whatever is available?
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 sof_ipc4_load_library()
will only return error if there were real error for the loading, the bundle not present is not an error, but if the bundle loading fails then that is an error, something is not right and we will abort the probing altogethe.
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.
We should continue if a bundle fails, this way we still get base FW (and it may have some built-in modules) and a registered sound card. Yes we tell the user that we could not load the library and audio may not fully work as expected.
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.
We will fail to probe the card as the modules form the failed library are missing and the topology will not probe.
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.
OK, if we continue then the car will not come up, but the debugfs for SOF is going the be there to provide further clues.
36acd21
to
1664690
Compare
Changes since v1:
|
1664690
to
d09062a
Compare
Changes since v2:
|
d09062a
to
2096214
Compare
Changes since v3:
|
sound/soc/sof/ipc4-loader.c
Outdated
ret = firmware_request_nowarn(&fw_lib->sof_fw.fw, lib_filename, | ||
sdev->dev); | ||
if (ret < 0) { | ||
dev_dbg(sdev->dev, "Library file '%s' is not present\n", |
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 with the current releases where the openmodule/debug binaries are absent, will we always see this debug message? I think this will too much of a distraction. How about we check the presence of these files before requesting to load the libraries?
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 not print here at all if does not exist...
2096214
to
8760089
Compare
Changes since v4:
|
sound/soc/sof/ipc4-loader.c
Outdated
* sof_ipc4_load_library_bundles - loads the library parts of a modular firmware | ||
* @sdev: SOF device | ||
* | ||
* With IPC4 the firmware can be monolithic or modular release. |
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 you want to remove the monolithic reference in this PR too?
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 wanted to... ;)
8760089
to
8bc8b0c
Compare
A split SOF release consists of a base firmware and two libraries: <fw_filename>-openmodules.ri for processing (audio) modules <fw_filename>-debug.ri for debug and developer modules To handle this new release model add infrastructure to try to load the two library after boot optionally. This approach will allow flexibility on handling platforms in sof-bin with single or split configuration: single release: base firmware only split release: base firmware + openmodules + debug The files for the split firmware are located at the firmware directory. Signed-off-by: Peter Ujfalusi <[email protected]>
Changes since v5:
|
SOFCI TEST |
1 similar comment
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.
works with thesofproject/sof#9702
A split SOF release consists of a base firmware and two libraries:
<fw_filename>-openmodules.ri for processing (audio) modules
<fw_filename>-debug.ri for debug and developer modules
To handle this new release model add infrastructure to try to load the two
library after boot optionally.
This approach will allow flexibility on handling platforms in sof-bin with
single or split configuration:
single release: base firmware only
split release: base firmware + openmodules + debug
The files for the split firmware are located at the firmware directory.
The documentation update is: thesofproject/sof-docs#505