sof icon indicating copy to clipboard operation
sof copied to clipboard

module_adapter: always propagate prepare() to module

Open johnylin76 opened this issue 3 years ago • 0 comments

At present, module_adapter only propagates prepare() to the module for the first time. For modules, the specific reset() procedure only restores the initial stage after prepared, init_process() is applied to start module processing. Therefore, module_adapter blocks all the following prepare() calls to module.

However, it leads to problems that modules won't be notified for the stream parameter change once it happens afterwards, since prepare() is blocked by module_adapter. It actually breaks the ALSA conformance test in Google auto-lab, as the test automation will run with S16, S24, S32 sample format successively.

This commit removes the logic of blocking prepare() in module_adapter which makes sure that the stream parameter change can be informed to modules. Accordingly, modules should be responsible for handling stream parameter in an adaptive manner.

johnylin76 avatar Aug 21 '22 13:08 johnylin76