Skip to content
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

loadable libraries and smart-amp-test as an example #8180

Merged
merged 9 commits into from
Mar 8, 2024

Commits on Mar 6, 2024

  1. lib-manager: add support for llext

    Add support for loadable modules, built for dynamic linking with
    Zephyr's LLEXT API.
    
    Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
    lyakh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    1b2c9e3 View commit details
    Browse the repository at this point in the history
  2. lib-manager: migrate to module adapter context

    lib-manager is module-adapter specific, it doesn't need the component
    API and shouldn't use struct comp_driver in function arguments.
    
    Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
    lyakh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    a861ae4 View commit details
    Browse the repository at this point in the history
  3. module-adapter: add Zephyr extension context

    Module adapter drivers can be loaded and unloaded, using the Zephyr
    loadable extension API. Add its context to struct struct module_data.
    
    Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
    lyakh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    ec0038e View commit details
    Browse the repository at this point in the history
  4. lib-manager: fix a wrongly named .desc pointer

    Pointers that we store in a global array for each loaded library,
    aren't really firmware manifest descriptor pointers, they're pointers
    to storage buffers, where entire libraries are stored. A
    SOF_MAN_ELF_TEXT_OFFSET offset has to be added to that address to get
    to the manifest descriptor.
    
    Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
    lyakh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    76edab3 View commit details
    Browse the repository at this point in the history
  5. module: (cosmetic) regroup some declarations and assignments

    Regroup code in modules_init() to move declarations and assignments
    closer to where they're needed.
    
    Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
    lyakh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    387bd4f View commit details
    Browse the repository at this point in the history
  6. lib-manager: use an appropriate type for a pointer integer

    lib_manager_allocate_module() returns a pointer as an integer, use
    uintptr_t for it.
    
    Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
    lyakh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    a2fd06b View commit details
    Browse the repository at this point in the history
  7. modules: split modules_init() into two parts

    The first part modules_new() is only needed when a new module is
    registered, the rest is needed every time a module is instantiated.
    
    Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
    lyakh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    19dee61 View commit details
    Browse the repository at this point in the history
  8. modules: don't re-load on each restart

    While modules are in use, no need to unload and re-load them,
    re-initialising audio interfaces is enough. With llext modules this
    uses the LLEXT reference counting to identify when a module should be
    unloaded.
    
    Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
    lyakh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    92d84b1 View commit details
    Browse the repository at this point in the history
  9. smart-amp-test: make a loadable module

    Convert the smart-amp-test in its IPC4 version to a loadable LLEXT
    module. Use an overlay configuration to select between monolithic and
    modular builds.
    
    Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
    lyakh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    c067427 View commit details
    Browse the repository at this point in the history