Skip to content

Commit

Permalink
Audio: SRC: Use valid_bit_depth to select processing function
Browse files Browse the repository at this point in the history
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 <tomasz.m.leman@intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
  • Loading branch information
singalsu authored and lgirdwood committed May 9, 2024
1 parent 7f6d1c6 commit 374d2d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/audio/src/src_ipc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ int src_prepare_general(struct processing_module *mod,
/* set align requirements */
src_set_alignment(source, sink);

switch (cd->ipc_config.base.audio_fmt.depth) {
switch (cd->ipc_config.base.audio_fmt.valid_bit_depth) {
#if CONFIG_FORMAT_S16LE
case IPC4_DEPTH_16BIT:
cd->data_shift = 0;
Expand Down

0 comments on commit 374d2d6

Please sign in to comment.