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
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ modules/audio/pcm_decoder/api
modules/audio/pcm_encoder/api
modules/cmn/pcm_mf_cnv/capi/mfc/api
modules/cmn/pcm_mf_cnv/capi/pcm_cnv/api
modules/processing/gain_control/drc/api
modules/processing/gain_control/iir_mbdrc/api
modules/cmn/api
)
###
### Some strings used for picking inc paths based on arch, tgt/sim & static/shared.
Expand Down
2 changes: 2 additions & 0 deletions arch/linux/configs/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ CONFIG_PCM_CNV=y
CONFIG_MFC=y
CONFIG_PCM_DECODER=y
CONFIG_PCM_ENCODER=y
CONFIG_DRC=y
CONFIG_IIR_MBDRC=y

#
# Signal Processing Framework
Expand Down
7 changes: 7 additions & 0 deletions modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,10 @@ endif()
if(CONFIG_PCM_CNV)
add_subdirectory(cmn/pcm_mf_cnv/build)
endif()
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()
9 changes: 9 additions & 0 deletions modules/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,13 @@ config PCM_CNV
select CH_MIXER
select MSIIR
default y

config DRC
tristate "Enable DRC Library"
default y

config IIR_MBDRC
tristate "Enable IIR_MBDRC Library"
select DRC
default y
endmenu
72 changes: 72 additions & 0 deletions modules/cmn/common/internal_api/imcl_drc_info_api.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#ifndef IMCL_DRC_INFO_API_H
#define IMCL_DRC_INFO_API_H

/**
@file imcl_drc_info_api.h

@brief defines the Intent ID for communicating DRC parameters
over Inter-Module Control Links (IMCL).

*/

/*==========================================================================
* Copyright (c) Qualcomm Innovation Center, Inc. All Rights Reserved.
* SPDX-License-Identifier: BSD-3-Clause-Clear
* =========================================================================*/

#define INTENT_ID_DRC_CONFIG 0x080010F3
#ifdef INTENT_ID_DRC_CONFIG

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


/*==============================================================================
Intent ID - INTENT_ID_DRC_CONFIG
==============================================================================*/
/**<
Intent ID to send DRC parameters over control link.

e.g.
Control link between Rx DRC and Tx AVC modules in voice path.
*/

/* ============================================================================
Param ID
==============================================================================*/

#define PARAM_ID_IMCL_DRC_DOWN_COMP_THRESHOLD 0x080010F4

/*==============================================================================
Param structure defintions
==============================================================================*/

/* Structure definition for Parameter */
typedef struct param_id_imcl_drc_down_comp_threshold_t param_id_imcl_drc_down_comp_threshold_t;

/** @h2xmlp_parameter {"PARAM_ID_IMCL_DRC_DOWN_COMP_THRESHOLD",
PARAM_ID_IMCL_DRC_DOWN_COMP_THRESHOLD}
@h2xmlp_description {This parameter is used to send the drc down
compression threshold over the control link.}
@h2xmlp_toolPolicy {NO_SUPPORT} */

#include "spf_begin_pack.h"
struct param_id_imcl_drc_down_comp_threshold_t
{
int16_t drc_rx_enable;
/**< @h2xmle_description {Specifies whether DRC module is enabled.} */

int16_t down_comp_threshold_L16Q7;
/**< @h2xmle_description {DRC down-compression ratio in Q7 format.} */
}
#include "spf_end_pack.h"
;

#ifdef __cplusplus
}
#endif /*__cplusplus*/

#endif // INTENT_ID_DRC_CONFIG

#endif /* IMCL_DRC_INFO_API_H */
1 change: 1 addition & 0 deletions modules/cmn/common/utils/build/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ set (lib_srcs_list
${LIB_ROOT}/src/util.c
${LIB_ROOT}/src/audio_delay32.c
${LIB_ROOT}/src/clips.c
${LIB_ROOT}/src/apiir_df1_opt.c
)

#Call spf_build_static_library to generate the static library
Expand Down
73 changes: 73 additions & 0 deletions modules/cmn/common/utils/inc/audio_apiir_df1_opt.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*
* Copyright (c) Qualcomm Innovation Center, Inc. All Rights Reserved.
* SPDX-License-Identifier: BSD-3-Clause-Clear
*/

#ifndef _AUDIO_IIRDF1_H_

#define _AUDIO_IIRDF1_H_



#include "ar_defs.h"



/*=============================================================================

Function Declarations

=============================================================================*/



#ifdef __cplusplus

extern "C" {

#endif /* __cplusplus */



/* To use the following function, it should be ensured that the Q-factor of den and */

/* num coefs should be <= Q27, in order to avoid overflow */

/* The suggested Q-factors are: */

/* Q1.27, Q2.26, Q3.25, Q4.24... */



/* This is the df1 allpass biquad iir function */

/* Only b0 and b1 is needed, using transfer function: */

/* H_ap(z) = (b0 + b1*z^-1 + z^-2)/(1 + b1*z^-1 + b0*z^-2) */

void iirDF1_32_ap(int32_t *inp,

int32_t *out,

int32_t samples,

int32_t *numcoefs,

int32_t *mem,

int16_t qfactor);





#ifdef __cplusplus

}

#endif /* __cplusplus */



#endif /* _AUDIO_IIRDF1_H_ */

Loading
Loading