testbench: add support for mixer

Add mixer support to the testbench

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
Liam Girdwood 2022-02-04 17:06:24 +00:00 committed by Liam Girdwood
parent 47ef306bf7
commit c3adfcecc7
4 changed files with 12 additions and 2 deletions

View File

@ -173,10 +173,11 @@ check_optimization(fma -mfma -ftree-vectorize -DOPS_FMA)
check_optimization(hifi2ep -mhifi2ep "" -DOPS_HIFI2EP)
check_optimization(hifi3 -mhifi3 "" -DOPS_HIFI3)
set(sof_audio_modules volume src asrc eq-fir eq-iir dcblock crossover tdfb drc multiband_drc)
set(sof_audio_modules volume mixer src asrc eq-fir eq-iir dcblock crossover tdfb drc multiband_drc)
# sources for each module
set(volume_sources volume/volume.c volume/volume_generic.c)
set(mixer_sources mixer.c)
set(src_sources src/src.c src/src_generic.c)
set(asrc_sources asrc/asrc.c asrc/asrc_farrow.c asrc/asrc_farrow_generic.c)
set(eq-fir_sources eq_fir/eq_fir.c eq_fir/eq_fir_generic.c)

View File

@ -24,7 +24,7 @@
#define MAX_OUTPUT_FILE_NUM 16
/* number of widgets types supported in testbench */
#define NUM_WIDGETS_SUPPORTED 11
#define NUM_WIDGETS_SUPPORTED 12
struct tplg_context;

View File

@ -78,6 +78,7 @@ struct shared_lib_table lib_table[NUM_WIDGETS_SUPPORTED] = {
{"drc", "libsof_drc.so", SOF_COMP_NONE, SOF_TB_UUID(drc_uuid), 0, NULL},
{"multiband_drc", "libsof_multiband_drc.so", SOF_COMP_NONE,
SOF_TB_UUID(multiband_drc_uuid), 0, NULL},
{"mixer", "libsof_mixer.so", SOF_COMP_MIXER, NULL, 0, NULL},
};
/* compatible variables, not used */

View File

@ -684,6 +684,7 @@ int load_process(struct tplg_context *ctx)
int load_mixer(struct tplg_context *ctx)
{
struct sof_ipc_comp_mixer mixer = {0};
struct sof *sof = ctx->sof;
FILE *file = ctx->file;
int ret = 0;
@ -696,6 +697,13 @@ int load_mixer(struct tplg_context *ctx)
return -EINVAL;
}
/* load mixer component */
register_comp(mixer.comp.type, NULL);
if (ipc_comp_new(sof->ipc, ipc_to_comp_new(&mixer)) < 0) {
fprintf(stderr, "error: new mixer comp\n");
return -EINVAL;
}
return ret;
}