-
Notifications
You must be signed in to change notification settings - Fork 311
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
Add Loadable smart amp support #8554
Conversation
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com> Co-authored-by: Dobrowolski, PawelX <pawelx.dobrowolski@intel.com> Signed-off-by: Chao Song <chao.song@linux.intel.com> Signed-off-by: Rander Wang <rander.wang@intel.com>
Loadable modules are linked, using a linked script, built by a cmake script. That linker script includes multiple existing linker script fragments. Each of those fragments defines 1 or more sections and respective PHDRs. However, some of those scripts, e.g. common_rodata_linker_script.txt and data_linker_script.txt add sections to the same rodata_phdr PHDR. This makes the linker allocate sections in that PHDR twice in the resulting output file: one copy is real and the other one is filled with zeros. Removing one of the PHDR definitions solves the problem and removes about 60KiB of empty space from the output file. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The module-adapter API has 3 processing modes: raw, stream and source-sink, and until now only one of them can be implemented by any module. However, the "modules" module, that loads loadable modules, has to implement all of them to be prepared to handle any loadable modules. This adds support for such modules. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Loadable modules use the system service pointer to call exported base firmware methods. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Chao Song <chao.song@linux.intel.com> Signed-off-by: Rander Wang <rander.wang@intel.com>
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 this approach has been abandoned. We aren't copying headers under lmdk/
|
||
|
||
#ifndef _ADSP_STDDEF_H_ | ||
#define _ADSP_STDDEF_H_ |
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.
@RanderWang Why do we need to copy headers? It seems in this example copying headers is not needed -> #8546
I thought now that we have headers in separate module folder, we no longer needed this. And 8546 seems to show this is now needed.
Something I'm missing?
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.
o, I did part time work on loadable smart amp long time ago and am out of date. Let me check the latest status
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 would mention that all these modifications in module_adapter
are unnecessary. Native loadable modules should not use the module_adapter
. @pjdobrowolski is working on the necessary fix in lib_manager
, until then I'm using this workaround softwarecki@26f4b47
The smart amp is still using input output stream buffer so we have such issue. Now plan to first convert stream buffer to sink|source buffer. |
@softwarecki you probably mean "shouldn't use modules.c," not use the module adapter, because the module adapter is an essential API that cannot be dropped. As for the modules.c wrapping - removing it would be good, yes. Looking forward to it! |
No description provided.