Let's propagate nhlt plugin error to main program,
so that we don't generate a wrong nhlt blob silently.
Fixes: https://github.com/alsa-project/alsa-utils/pull/181
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
/* calculate blob for every hw config */
for (i = 0; i < ssp->ssp_hw_config_count[ssp->ssp_count]; i++)
- ssp_calculate_intern(nhlt, i);
+ if (ssp_calculate_intern(nhlt, i) < 0)
+ return -EINVAL;
ssp_print_internal(ssp);
ssp_print_calculated(ssp);
}
/* process plugin */
- process(tplg_pp->input_cfg, tplg_pp->output_cfg);
+ ret = process(tplg_pp->input_cfg, tplg_pp->output_cfg);
err:
if (h)
/* process topology plugins */
err = pre_process_plugins(tplg_pp);
if (err < 0) {
- fprintf(stderr, "Unable to run pre-process plugins\n");
+ fprintf(stderr, "Unable to run pre-process plugins or plugins return error\n");
goto err;
}