dts: support multi-config blob storage and applying
(For AMD Branch Only)
At present the config is applied spontaneously via IPC commands of
config setting from clients, which costs blob transmission per config
switch and is unable to adopt read-only bytes control for security
concerns.
By adding enum control support on module_adapter, blob transmissions
for multi-config could be migrated to module initialization, stored by
internal blob cache, and applied selectively based on the value of
enum control. Per config switch clients only need to specify the value
of enum control, the corresponding config blob will be applied on
prepare().
For backward compatibility, simply set the value as the config index
after the corresponding config blob is obtained from external.
Signed-off-by: Pin-chih Lin <email address hidden>
module_adapter: add enum control for config_mode set/get
(For AMD Branch Only)
Adds config_mode in struct processing_module with setter/getter
implemented by enum control. This is required for DTS integration
under module_adapter, which will have read-only bytes control on
production while supporting configuration switch requested from
clients.
Signed-off-by: Pin-chih Lin <email address hidden>
This reverts commit 65e5aaa031ff27dc1de2feae4cc04f03d013d5c2.
Reason: this commit should be merged along with the corresponding fix
on DTS.
Signed-off-by: Pin-chih Lin <email address hidden>
f60f53d...
by
Balakishorepati <email address hidden>
module_adapter:Fix dangling pointer issue in module reset
During module_reset and module_free Calls, pointers are not
getting reset to NULL which causes dangling pointer exceptions.
Initialize pointers to NULL after deallocating the memory.
Signed-off-by: Balakishorepati <email address hidden>
(cherry picked from commit 3f03b75c3a1b00c57b2c1d4124c22a70ed3cbb9d)
65e5aaa...
by
Ranjani Sridharan <email address hidden>
module_adapter: Modify reset API
Modify the definition of the reset API in the module adapter interface
to make sure that it should reset the module state back to
MODULE_INITIALIZED and free all memory that was allocated during the
prepare() callback. With this change, stopping and restarting streams
will always be guaranteed to invoke the module's prepare() callback.
Also, fix the passthrough and cadence codec implementation to follow the
new definition.
At present module_adapter, period_bytes is calculated assuming the schedule
period is 1ms, which could be arbitrary in practice determined by the
topology.
This commit replaces the calculation code by audio_stream_period_bytes().
In addition, the timing for getting period_bytes is moved to the beginning
of prepare() (prior to the module prepare). At that moment it is guaranteed
that all parameters in components/buffers are settled through the pipeline.
Signed-off-by: Pin-chih Lin <email address hidden>
(cherry picked from commit b3106c396e540c260bba3b08c218f6598ea74726)