Skip to content

Commit b5cbb1b

Browse files
committed
audio: phase vocoder: derive input format from module base_cfg
This patch fixes the issue with the Phase Vocoder module producing strong rattle with other than s16 format decoded output from compress decoders such as MP3 and AAC. The pipeline bind path only propagates the container frame_fmt into the shared buffer between two modules; it does not populate valid_sample_fmt. As a result source_get_valid_fmt() on the phase vocoder's input returned the zero-initialised value (S16_LE), so the wrong processing variant was selected whenever the topology declared a valid bit depth other than 16. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent 6589967 commit b5cbb1b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/audio/phase_vocoder/phase_vocoder.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <sof/audio/sink_source_utils.h>
77
#include <sof/audio/sink_api.h>
88
#include <sof/audio/source_api.h>
9+
#include <ipc4/base-config.h>
910
#include <rtos/init.h>
1011
#include "phase_vocoder.h"
1112

@@ -177,6 +178,12 @@ static int phase_vocoder_prepare(struct processing_module *mod, struct sof_sourc
177178
return -EINVAL;
178179
}
179180

181+
#if CONFIG_IPC_MAJOR_4
182+
/* Push base_cfg.audio_fmt onto endpoints so valid_sample_fmt is not left at 0 (S16_LE). */
183+
ipc4_update_source_format(sources[0], &base_cfg->audio_fmt);
184+
ipc4_update_sink_format(sinks[0], &base_cfg->audio_fmt);
185+
#endif
186+
180187
/* get source data format */
181188
cd->frame_bytes = source_get_frame_bytes(sources[0]);
182189
cd->stream_channels = source_get_channels(sources[0]);

0 commit comments

Comments
 (0)