Skip to content

Commit

Permalink
audio: mixer: Set correct number of sources
Browse files Browse the repository at this point in the history
After commit 867ada2 we only allocate 1 buffer for mixer even if there
could be 2 input sources.

So, set correct number of sources for mixer.

Fixes 867ada2 ("audio: module_adapter: Allocate max number of input/output buffers")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
  • Loading branch information
dbaluta authored and lgirdwood committed Jul 11, 2023
1 parent 138a9d0 commit eac223d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/audio/mixer/mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ static int mixer_init(struct processing_module *mod)
mod_data->private = md;
mod->verify_params_flags = BUFF_PARAMS_CHANNELS;
mod->no_pause = true;
mod->max_sources = MIXER_MAX_SOURCES;

return 0;
}

Expand Down
2 changes: 2 additions & 0 deletions src/include/sof/audio/mixer.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ void sys_comp_module_mixer_interface_init(void);

#endif

#define MIXER_MAX_SOURCES 2

/* mixer component private data */
struct mixer_data {
void (*mix_func)(struct comp_dev *dev, struct audio_stream __sparse_cache *sink,
Expand Down

0 comments on commit eac223d

Please sign in to comment.