Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 3063d84e authored by Grzegorz Jaszczyk's avatar Grzegorz Jaszczyk
Browse files

libmodprobe: add support for dynamic module options

Hitherto libmodprobe was supporting modules.options which allows passing
extra module options. This commit extends that support and beside
`options`, modules.options can now contain `dyn_options` entries.

Syntax example:
dyn_options snd_sof_pci system "/vendor/bin/mod_options --sof-fw"

This allows to determine extra module options, with help of external
program, at runtime which can be useful for unibuilds, supporting
various device flavors and therefore requiring different module options.

Using external program to customize modules parameters are inspired by
Android's external firmware handler:
https://android.googlesource.com/platform/system/core/+/master/init/README.ueventd.md#firmware-loading
and the same RunExternalHandler is reused for both dynamic module
handling and firmware handling.

Bug: 335619610
Test: Test audio on systems using snd_sof_pci module and verify
correctness of custom module parameters.

Change-Id: Ibd1a942d4ea022519676435ed525cd7c3e720d31
parent ac474ff7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment