From 408b166ba5ad791a88a8358ec9da53c4766876d0 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Tue, 6 May 2025 15:41:25 +0300 Subject: [PATCH] Audio: Template_comp: Add note about inputs and outputs number This patch adds comments that there may be more than one input and/or output. Signed-off-by: Seppo Ingalsuo --- src/audio/template_comp/template.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/audio/template_comp/template.c b/src/audio/template_comp/template.c index 06f702645531..dd15288d9a19 100644 --- a/src/audio/template_comp/template.c +++ b/src/audio/template_comp/template.c @@ -69,8 +69,8 @@ static int template_comp_process(struct processing_module *mod, { struct template_comp_comp_data *cd = module_get_private_data(mod); struct comp_dev *dev = mod->dev; - struct sof_source *source = sources[0]; - struct sof_sink *sink = sinks[0]; + struct sof_source *source = sources[0]; /* One input in this example */ + struct sof_sink *sink = sinks[0]; /* One output in this example */ int frames = source_get_data_frames_available(source); int sink_frames = sink_get_free_frames(sink); @@ -112,6 +112,9 @@ static int template_comp_prepare(struct processing_module *mod, comp_dbg(dev, "template_comp_prepare()"); + /* The processing example in this component supports one input and one + * output. Generally there can be more. + */ if (num_of_sources != 1 || num_of_sinks != 1) return -EINVAL;