Skip to content

Commit 374d2d6

Browse files
singalsulgirdwood
authored andcommitted
Audio: SRC: Use valid_bit_depth to select processing function
The check of cd->ipc_config.base.audio_fmt.depth results to select S32_LE format processing function for SRC when the format is S24_LE. The check need to be done for valid_bit_depth instead. The S32_LE function appears to work but any sample that exceeds the range -2^23 .. +2^23-1 is overflow for S24_le. Also the use of S24_LE processing core will improve the signal-to-noise ratio. Reported-by: Tomasz Leman <[email protected]> Signed-off-by: Seppo Ingalsuo <[email protected]>
1 parent 7f6d1c6 commit 374d2d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/audio/src/src_ipc4.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ int src_prepare_general(struct processing_module *mod,
149149
/* set align requirements */
150150
src_set_alignment(source, sink);
151151

152-
switch (cd->ipc_config.base.audio_fmt.depth) {
152+
switch (cd->ipc_config.base.audio_fmt.valid_bit_depth) {
153153
#if CONFIG_FORMAT_S16LE
154154
case IPC4_DEPTH_16BIT:
155155
cd->data_shift = 0;

0 commit comments

Comments
 (0)