audio: mixer: Set correct number of sources

After commit 867ada28f we only allocate 1 buffer for mixer even if there
could be 2 input sources.

So, set correct number of sources for mixer.

Fixes 867ada28f ("audio: module_adapter: Allocate max number of input/output buffers")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
This commit is contained in:
Daniel Baluta 2023-07-10 17:32:12 +03:00 committed by Liam Girdwood
parent 138a9d0187
commit eac223d4b9
2 changed files with 4 additions and 0 deletions

View File

@ -56,6 +56,8 @@ static int mixer_init(struct processing_module *mod)
mod_data->private = md; mod_data->private = md;
mod->verify_params_flags = BUFF_PARAMS_CHANNELS; mod->verify_params_flags = BUFF_PARAMS_CHANNELS;
mod->no_pause = true; mod->no_pause = true;
mod->max_sources = MIXER_MAX_SOURCES;
return 0; return 0;
} }

View File

@ -30,6 +30,8 @@ void sys_comp_module_mixer_interface_init(void);
#endif #endif
#define MIXER_MAX_SOURCES 2
/* mixer component private data */ /* mixer component private data */
struct mixer_data { struct mixer_data {
void (*mix_func)(struct comp_dev *dev, struct audio_stream __sparse_cache *sink, void (*mix_func)(struct comp_dev *dev, struct audio_stream __sparse_cache *sink,