Skip to content
Closed
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
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ 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
modules/processing/volume_control/capi/gain/api
modules/processing/volume_control/capi/soft_vol/api
modules/cmn/common/internal_api
)
###
### Some strings used for picking inc paths based on arch, tgt/sim & static/shared.
Expand Down
10 changes: 7 additions & 3 deletions arch/linux/configs/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ CONFIG_ARCH_LINUX=y
#
CONFIG_MODULES=y
# CONFIG_MODULES_DEBUG is not set
CONFIG_ENCODER=y
CONFIG_ECHO_CANCELLATION=y
CONFIG_GAIN=m
CONFIG_ENCODER=n
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's avoid clubbing unrelated changes into same commit

CONFIG_ECHO_CANCELLATION=n
CONFIG_EXAMPLE_GAIN=n
CONFIG_MSIIR=y
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_GAIN=y
CONFIG_SOFT_VOL=y

#
# Signal Processing Framework
Expand Down
15 changes: 14 additions & 1 deletion modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ endif()
if(CONFIG_ECHO_CANCELLATION)
add_subdirectory(examples/echo_cancellation)
endif()
if(CONFIG_GAIN)
if(CONFIG_EXAMPLE_GAIN)
add_subdirectory(examples/gain)
endif()
if(CONFIG_CHMIXER)
Expand All @@ -34,3 +34,16 @@ 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()
if(CONFIG_GAIN)
add_subdirectory(processing/volume_control/capi/gain/build)
endif()
if(CONFIG_SOFT_VOL)
add_subdirectory(processing/volume_control/capi/soft_vol/build)
endif()
21 changes: 19 additions & 2 deletions modules/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ config ECHO_CANCELLATION
tristate "Enable ECHO Cancellation Library"
default y

config GAIN
tristate "Enable GAIN Library"
config EXAMPLE_GAIN
tristate "Enable EXAMPLE_GAIN Library"
default y

config CH_MIXER
Expand All @@ -35,4 +35,21 @@ 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

config GAIN
tristate "Enable GAIN Library"
default y
Copy link
Contributor

Choose a reason for hiding this comment

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

We should default to n


config SOFT_VOL
tristate "Enable SOFT_VOL Library"
default y
Copy link
Contributor

Choose a reason for hiding this comment

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

Should set to n

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 */
110 changes: 110 additions & 0 deletions modules/cmn/common/internal_api/imcl_module_gain_api.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
#ifndef IMCL_MODULE_GAIN_API_H
#define IMCL_MODULE_GAIN_API_H

/**
@file imcl_module_gain_api.h

@brief defines the Intent ID for communicating module's gain
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_GAIN_INFO 0x080010F5
#ifdef INTENT_ID_GAIN_INFO

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


/*==============================================================================
Intent ID - INTENT_ID_GAIN_INFO
==============================================================================*/
/**<
Intent ID for the control link to send gain information.
This intent can be used by a module to send its gain to another module.

e.g.
Soft Volume Control sends the target gain to AVC-TX module in voice path.
*/

/* ============================================================================
Param ID
==============================================================================*/
/**<
This parameter is used to send the target gain for each channel.
It may be different than current gain.

*/
#define PARAM_ID_IMCL_TARGET_GAIN 0x080010F6

/*==============================================================================
Param structure defintions
==============================================================================*/
typedef struct imcl_gain_config_t imcl_gain_config_t;

#include "spf_begin_pack.h"
struct imcl_gain_config_t
{
uint32_t channel_mask_lsb;
/**< @h2xmle_description {Lower 32 bits of the mask that indicates the corresponding
channel whose maximum tap length is to be set.\n
- Set the bits corresponding to 1 to 31 channels of standard
channel mapping (channels are mapped per standard channel mapping)\n
- Position of the bit to set 1 (left shift)(channel_map) \n}
@h2xmle_default {0}
*/

uint32_t channel_mask_msb;
/**< @h2xmle_description {Upper 32 bits of the mask that indicates the corresponding channel
whose maximum tap length is to be set. \n
- Set the bits corresponding to 32 to 63 channels of standard channel
mapping (channels are mapped per standard channel mapping) \n
- Position of the bit to set 1 (left shift)(channel_map - 32)}
@h2xmle_default {0} */

uint32_t gain;
/**< @h2xmle_description {Gain value for the above channels in Q28 format}
@h2xmle_dataFormat {Q28}
@h2xmle_default {0} */
}
#include "spf_end_pack.h"
;

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

/** @h2xmlp_parameter {"PARAM_ID_IMCL_TARGET_GAIN",
PARAM_ID_IMCL_TARGET_GAIN}
@h2xmlp_description {This parameter is used to send the target gain for each channel.}
@h2xmlp_toolPolicy {NO_SUPPORT} */

#include "spf_begin_pack.h"
#include "spf_begin_pragma.h"
struct param_id_imcl_gain_t
{
uint32_t num_config;
/**< @h2xmle_description {Number of channels-gain configurations provided}
@h2xmle_range {1..63}
@h2xmle_default {1} */

imcl_gain_config_t gain_data[0];
/**< @h2xmle_description {Payload consisting of all channels-gain pairs }
@h2xmle_variableArraySize {num_config} */
}
#include "spf_end_pragma.h"
#include "spf_end_pack.h"
;

#ifdef __cplusplus
}
#endif /*__cplusplus*/

#endif // INTENT_ID_GAIN_INFO

#endif /* IMCL_MODULE_GAIN_API_H */
68 changes: 68 additions & 0 deletions modules/cmn/common/internal_api/imcl_mute_api.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#ifndef IMCL_MUTE_API_H
#define IMCL_MUTE_API_H

/**
@file imcl_mute_api.h

@brief defines the Intent IDs for communication over Inter-Module Control
Links (IMCL) between TTY modules(1x TTY/CTM/LTE_TTY) and Soft volume Modules

*/

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

#define INTENT_ID_MUTE 0x08001195
#ifdef INTENT_ID_MUTE

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


/*==============================================================================
Intent ID - INTENT_ID_MUTE
==============================================================================*/
/**<
Intent ID for the control link between TTY module(1x/CTM/LTE_TTY in Rx path) and soft volume module(in Tx path).
TTY module communicates with the soft volume module to indicate whether to
mute or unmute the stream in the Tx path. The parameter - PARAM_ID_IMCL_MUTE
is used for this communication.

*/

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

#define PARAM_ID_IMCL_MUTE 0x08001196
/** @h2xmlp_parameter {"PARAM_ID_IMCL_MUTE", PARAM_ID_IMCL_MUTE}
@h2xmlp_description {Configures the mute flag}
@h2xmlp_toolPolicy {NO_SUPPORT}*/

#include "spf_begin_pack.h"

/* Payload of the PARAM_ID_IMCL_MUTE parameter used
by the Volume Control module */
/* Structure for the mute configuration parameter for a
volume control module. */
struct param_id_imcl_mute_t
{
uint32_t mute_flag;
/**< @h2xmle_description {Specifies whether mute is enabled}
@h2xmle_rangeList {"Disable"= 0;
"Enable"=1}
@h2xmle_default {0} */
}
#include "spf_end_pack.h"
;

#ifdef __cplusplus
}
#endif /*__cplusplus*/

#endif

#endif /* IMCL_MUTE_API_H */
Loading
Loading