Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ modules/processing/volume_control/capi/gain/api
modules/processing/volume_control/capi/soft_vol/api
modules/cmn/common/internal_api
modules/processing/PoplessEqualizer/api
modules/processing/gain_control/limiter/api
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious. When gain module is introduced, why are these include lines not needed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is line is for including the limiter api. I believe that now that I've added the limiter source code it is required to add the api here to build the full audioreach-engine image.

modules/cmn/simple_accumulator_limiter/api
)
###
### Some strings used for picking inc paths based on arch, tgt/sim & static/shared.
Expand Down
13 changes: 10 additions & 3 deletions arch/linux/configs/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,28 @@ CONFIG_ARCH_LINUX=y
#
CONFIG_MODULES=y
# CONFIG_MODULES_DEBUG is not set

#Modules set to "y" below are required for default reference usecase
CONFIG_ENCODER=n
CONFIG_ECHO_CANCELLATION=n
CONFIG_EXAMPLE_GAIN=n
CONFIG_MSIIR=y
CONFIG_MSIIR=n
CONFIG_CHMIXER=y
CONFIG_PCM_CNV=y
CONFIG_MFC=y
CONFIG_PCM_DECODER=y
CONFIG_PCM_ENCODER=y
CONFIG_DRC=y
CONFIG_IIR_MBDRC=y
CONFIG_DRC=n
CONFIG_IIR_MBDRC=n
CONFIG_GAIN=n
CONFIG_SOFT_VOL=n
CONFIG_FIR_FILTER=n
CONFIG_POPLESS_EQUALIZER=n
CONFIG_SAL=n
CONFIG_SHOEBOX=n
CONFIG_REVERB=n
CONFIG_VIRTUALIZER=n
CONFIG_BASS_BOOST=n

#
# Signal Processing Framework
Expand Down
18 changes: 17 additions & 1 deletion modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ if(CONFIG_DRC)
add_subdirectory(processing/gain_control/drc/build)
endif()
if(CONFIG_IIR_MBDRC)
add_subdirectory(processing/gain_control/limiter/build)
add_subdirectory(processing/gain_control/iir_mbdrc/build)
endif()
if(CONFIG_GAIN)
Expand All @@ -53,3 +52,20 @@ endif()
if(CONFIG_POPLESS_EQUALIZER)
add_subdirectory(processing/PoplessEqualizer/build)
endif()
if(CONFIG_SAL)
add_subdirectory(cmn/simple_accumulator_limiter/build)
endif()
if(CONFIG_SHOEBOX OR CONFIG_REVERB)
add_subdirectory(processing/shoebox_reverb/build)
endif()
if(CONFIG_VIRTUALIZER)
add_subdirectory(processing/Virtualizer/build)
endif()
if(CONFIG_BASS_BOOST)
add_subdirectory(processing/bassboost/build)
endif()

#Build limiter if building other modules that depend on it
if(CONFIG_SAL OR CONFIG_IIR_MBDRC OR CONFIG_VIRTUALIZER OR CONFIG_BASS_BOOST)
add_subdirectory(processing/gain_control/limiter/build)
endif()
23 changes: 23 additions & 0 deletions modules/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,27 @@ config FIR_FILTER
config POPLESS_EQUALIZER
tristate "Enable POPLESS_EQUALIZER Library"
default n

config SAL
tristate "Enable SAL library"
default n

config SHOEBOX
tristate "Enable SHOEBOX library"
default n

config REVERB
tristate "Enable REVERB library"
default n

config VIRTUALIZER
tristate "Enable VIRTUALIZER library"
select MSIIR
default n

config BASS_BOOST
tristate "Enable BASS_BOOST Library"
select DRC
select MSIIR
default n
endmenu
16 changes: 0 additions & 16 deletions modules/audio/pcm_decoder/build/CMakeLists.txt

This file was deleted.

16 changes: 0 additions & 16 deletions modules/audio/pcm_encoder/build/CMakeLists.txt

This file was deleted.

7 changes: 6 additions & 1 deletion modules/cmn/common/utils/build/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,16 @@ set (lib_srcs_list
${LIB_ROOT}/src/divide_qx_island.c
${LIB_ROOT}/src/mathlib.c
${LIB_ROOT}/src/audio_complex_basic_op.c
#${LIB_ROOT}/src/filterDesign.c
${LIB_ROOT}/src/filterDesign.c
${LIB_ROOT}/src/util.c
${LIB_ROOT}/src/audio_delay32.c
${LIB_ROOT}/src/clips.c
${LIB_ROOT}/src/apiir_df1_opt.c
${LIB_ROOT}/src/audio_filter.cpp
${LIB_ROOT}/src/audio_delay.cpp
${LIB_ROOT}/src/converter_state.c
${LIB_ROOT}/src/buffer_converter.c
${LIB_ROOT}/src/convert_linear.c
)

#Call spf_build_static_library to generate the static library
Expand Down
4 changes: 4 additions & 0 deletions modules/cmn/common/utils/inc/audio_basic_op_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ int32_t s32_accu_asr_s32_imm5(int32_t accu32, int32_t var, uint32_t u5);

int32_t s32_accu_asl_s32_imm5(int32_t accu32, int32_t var, uint32_t u5);

int32_t s32_shr_s32_imm5_rnd(int32_t var, int32_t u5);

int64_t s64_shr_s64_imm6_rnd(int64_t var, int64_t u6);

#if !defined(s32_set_bit_s32_s32)
int32_t s32_set_bit_s32_s32(int32_t var1, int32_t ind);
#endif
Expand Down
98 changes: 98 additions & 0 deletions modules/cmn/common/utils/inc/filter_design.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
/*
* Copyright (c) Qualcomm Innovation Center, Inc. All Rights Reserved.
* SPDX-License-Identifier: BSD-3-Clause-Clear
*/

/*****************************************************************************
* FILE NAME: audpp_filterDesign.h TYPE: C-header file
* DESCRIPTION: Header file for filter design, adapted from QSound code.
*****************************************************************************/
#ifndef _AUDPP_FILTERDESIGN_H_
#define _AUDPP_FILTERDESIGN_H_
#include "audpp_util.h"

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/*=============================================================================
Function Declarations
=============================================================================*/
int32_t Q23_cosine_norm_freq
(
int32_t freqHz, /* input frequency in Hz */
int32_t sampleRate /* sampling rate */
);

/* Design functions. 1st order filters need three coefficients, biquads */
/* need five. Some filters have zeros which improve signal rejection */
/* (e.g. a low-pass filter with zeros will be better at filtering out high */
/* frequencies than one that doesn't) but run a little more slowly. */

void designFirstOrderLowpassCoeffs
(
int32_t coeffsL32Q23[3], /* coeffs in L32Q23 */
int16_t mB, /* attenuation at cutoff freq */
int32_t freqHz, /* cutoff frequency */
int32_t sampleRate, /* sampling rate */
bool_t withZero /* with a zero or not at fs/2 */
);

void designFirstOrderHighpassCoeffs
(
int32_t coeffsL32Q23[3], /* coeffs in L32Q23 */
int16_t mB, /* attenuation at cutoff freq */
int32_t freqHz, /* cutoff frequency */
int32_t sampleRate, /* sampling rate */
bool_t withZero /* with a zero or not at fs/2 */
);

/* QSound version */
void DesignFirstOrderCoeffs_Zero
(
int32_t coeffs[3], /* coeffs in L32Q23 */
int32_t dc_mb, /* dc gain in mB */
int32_t nyquist_mb, /* gain at fs/2 in mB */
int32_t mb, /* gain at the following freq */
int32_t freqHz, /* freq for the above gain */
int32_t sampleRate /* sampling rate */
);

void designBiquadLowpassCoeffs
(
int32_t coeffsL32Q23[5], /* coeffs in L32Q23 */
int16_t mB, /* attenuation at cutoff freq */
int32_t freqHz, /* cutoff frequency */
int32_t sampleRate, /* sampling rate */
bool_t withZero /* with a zero or not at fs/2 */
);

void designBiquadBandpassCoeffs
(
int32_t coeffsL32Q23[5], /* coeffs in L32Q23 */
int16_t mB, /* attenuation at cutoff freq */
int32_t freqHz, /* cutoff frequency */
int32_t sampleRate, /* sampling rate */
bool_t withZero /* with a zero or not */
);

void designBiquadHighpassCoeffs
(
int32_t coeffsL32Q23[5], /* coeffs in L32Q23 */
int16_t mB, /* attenuation at cutoff freq */
int32_t freqHz, /* cutoff frequency */
int32_t sampleRate /* sampling rate */
);

void cascadeFirstOrderFilters
(
int32_t coeffsL32Q23[5], /* biquad coeffs, L32Q23 */
int32_t uL32Q23[3], /* first-order filter coeffs */
int32_t vL32Q23[3] /* first-order filter coeffs */
);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* _FILTERDESIGN_H_ */
27 changes: 27 additions & 0 deletions modules/cmn/common/utils/src/audio_basic_op_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,3 +852,30 @@ int32_t s32_mult_s32_s32_left_shift_1(int32_t var1, int32_t var2)

}
#endif

#if !defined(s32_shr_s32_imm5_rnd)
int32_t s32_shr_s32_imm5_rnd(int32_t var, int32_t u5)
{
int32_t output, rnd, tmp;

tmp = var >> u5;
rnd = tmp & 1;
output = tmp >> 1 + rnd;

return (output);
}
#endif

#if !defined(s64_shr_s64_imm6_rnd)
int64_t s64_shr_s64_imm6_rnd(int64_t var, int64_t u6)
{
int64_t output, rnd, tmp;

tmp = var >> u6;
rnd = tmp & 1;
output = tmp >> 1 + rnd;

return (output);

}
#endif
Loading
Loading