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
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ fwk/api/apm
fwk/api/ar_utils
fwk/api/modules
${PROJECT_SOURCE_DIR}/ar_osal/api
modules/processing/channel_mixer/api
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
)
###
### Some strings used for picking inc paths based on arch, tgt/sim & static/shared.
Expand Down
36 changes: 0 additions & 36 deletions arch/hexagon/configs/defconfig

This file was deleted.

6 changes: 6 additions & 0 deletions arch/linux/configs/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ CONFIG_MODULES=y
CONFIG_ENCODER=y
CONFIG_ECHO_CANCELLATION=y
CONFIG_GAIN=m
CONFIG_MSIIR=y
CONFIG_CHMIXER=y
CONFIG_PCM_CNV=y
CONFIG_MFC=y
CONFIG_PCM_DECODER=y
CONFIG_PCM_ENCODER=y

#
# Signal Processing Framework
Expand Down
24 changes: 24 additions & 0 deletions modules/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# Copyright (c) Qualcomm Innovation Center, Inc. All Rights Reserved.
# SPDX-License-Identifier: BSD-3-Clause

#Include directories
include_directories(
cmn/common/utils/inc/
cmn/api
cmn/common/internal_api/imcl/api
${LIB_ROOT}/fwk/spf/utils/list/inc
${LIB_ROOT}/fwk/spf/interfaces/module/capi_cmn/ctrl_port/inc
${LIB_ROOT}/fwk/spf/containers/cmn/topologies/topo_utils/inc
${LIB_ROOT}/fwk/spf/utils/lpi_pool/inc
${LIB_ROOT}/fwk/spf/containers/cmn/graph_utils/inc
)

#Add the sub directories
add_subdirectory(cmn/build cmn)

if(CONFIG_ENCODER)
add_subdirectory(examples/encoder)
endif()
Expand All @@ -10,3 +25,12 @@ endif()
if(CONFIG_GAIN)
add_subdirectory(examples/gain)
endif()
if(CONFIG_CHMIXER)
add_subdirectory(processing/channel_mixer/build)
endif()
if(CONFIG_MSIIR)
add_subdirectory(processing/filters/multi_stage_iir/build)
endif()
if(CONFIG_PCM_CNV)
add_subdirectory(cmn/pcm_mf_cnv/build)
endif()
14 changes: 14 additions & 0 deletions modules/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,18 @@ config ECHO_CANCELLATION
config GAIN
tristate "Enable GAIN Library"
default y

config CH_MIXER
tristate "Enable CH_MIXER Library"
default y

config MSIIR
tristate "Enable MSIIR Library"
default y

config PCM_CNV
tristate "Enable PCM_CNV Library"
select CH_MIXER
select MSIIR
default y
endmenu
100 changes: 100 additions & 0 deletions modules/audio/pcm_decoder/api/pcm_decoder_api.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
#ifndef PCM_DECODER_API_H_
#define PCM_DECODER_API_H_
/*==============================================================================
@file pcm_decoder_api.h
@brief This file contains PCM decoder APIs

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

/*------------------------------------------------------------------------------
Include files
------------------------------------------------------------------------------*/
#include "chmixer_common_api.h"
#include "module_cmn_api.h"
#include "common_enc_dec_api.h"

/*# @h2xml_title1 {PCM Decoder Module API}
@h2xml_title_agile_rev {PCM Decoder Module API}
@h2xml_title_date {March 26, 2019} */

/*------------------------------------------------------------------------------
Defines
------------------------------------------------------------------------------*/

/** @ingroup ar_spf_mod_decoder_mod
Enumerates the input port ID for the MFC (#MODULE_ID_MFC) module. */
#define PCM_DEC_DATA_INPUT_PORT 0x2

/** @ingroup ar_spf_mod_decoder_mod
Enumerates the output port ID for the MFC module. */
#define PCM_DEC_DATA_OUTPUT_PORT 0x1

/*------------------------------------------------------------------------------
Module
------------------------------------------------------------------------------*/

/** @ingroup ar_spf_mod_decoder_mod
Identifier for the module used as the decoder for PCM use cases.

This module can be used to convert the properties of PCM stream:
endianness, interleaving, bit width, number of channels, and so on. It
cannot be used to convert sampling rate. The module has only one input and
one output port.

The input media format for this module is propagated from the Write Shared
Memory Endpoint module and cannot be configured.

@subhead4{Supported media format ID}

The module decodes data to the following format ID:
- Data format : #DATA_FORMAT_FIXED_POINT @lstsp1
- fmt_id : #MEDIA_FMT_ID_PCM @lstsp1
- Sample rates : 1..384 kHz @lstsp1
- Number of channels: 1..32 @lstsp1
- Bit width: @lstsep
- 16 (bits per sample 16 and Q15) @lstsp2
- 24 (bits per sample 24 and Q23, bits per sample 32 and Q23, Q27, or
Q31) @lstsp2
- 32 (bits per sample 32 and Q31) @lstsp1
- Interleaving: @lstsep
- Interleaved @lstsp2
- De-interleaved unpacked @lstsp2
- De-interleaved packed @lstsp1
- Endianness: little, big
*/
#define MODULE_ID_PCM_DEC 0x07001005

/*# @h2xmlm_module {"MODULE_ID_PCM_DEC", MODULE_ID_PCM_DEC}
@h2xmlm_displayName {"PCM Decoder"}
@h2xmlm_description {ID for the PCM Decoder module. It can be used
to convert the properties of PCM stream:
endianness, interleaving, bit width, number of
channels, and so on. It cannot be used to
convert sampling rate. For more details,
see AudioReach Signal Processing Framework (SPF) API Reference.}
@h2xmlm_dataMaxInputPorts {1}
@h2xmlm_dataMaxOutputPorts {1}
@h2xmlm_dataInputPorts {IN=PCM_DEC_DATA_INPUT_PORT}
@h2xmlm_dataOutputPorts {OUT=PCM_DEC_DATA_OUTPUT_PORT}
@h2xmlm_supportedContTypes {APM_CONTAINER_TYPE_GC}
@h2xmlm_isOffloadable {true}
@h2xmlm_stackSize {4096}

@{ <-- Start of the Module -->
@h2xml_Select {"param_id_pcm_output_format_cfg_t"}
@h2xmlm_InsertParameter
@h2xml_Select {"payload_pcm_output_format_cfg_t"}
@h2xmlm_InsertParameter
@h2xml_Select {param_id_pcm_output_format_cfg_t::data_format}
@h2xmle_rangeEnum {pcm_data_format}
@h2xml_Select {param_id_chmixer_coeff_t}
@h2xmlm_InsertParameter
@h2xml_Select {chmixer_coeff_t}
@h2xmlm_InsertStructure
@} <-- End of the Module --> */


#endif // PCM_DECODER_API_H_
16 changes: 16 additions & 0 deletions modules/audio/pcm_decoder/build/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#[[
@file CMakeLists.txt

@brief

@copyright
Copyright (c) Qualcomm Innovation Center, Inc. All Rights Reserved.
SPDX-License-Identifier: BSD-3-Clause
]]
cmake_minimum_required(VERSION 3.10)

#Include directories
set(pcm_decoder_includes
${LIB_ROOT}/api/
${LIB_ROOT}/inc/
)
35 changes: 35 additions & 0 deletions modules/audio/pcm_decoder/inc/capi_pcm_dec.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/* ======================================================================== */
/**
@file capi_pcm_dec.h

Header file to implement the Common Audio Post Processor Interface
for Tx/Rx Tuning PCM_DECODER block
*/

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

/*------------------------------------------------------------------------
* Include files
* -----------------------------------------------------------------------*/
#ifndef CAPI_PCM_DEC_H
#define CAPI_PCM_DEC_H

#include "capi.h"
#include "ar_defs.h"

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

capi_err_t capi_pcm_dec_get_static_properties(capi_proplist_t *init_set_properties,
capi_proplist_t *static_properties);
capi_err_t capi_pcm_dec_init(capi_t *_pif, capi_proplist_t *init_set_properties);

#ifdef __cplusplus
}
#endif /*__cplusplus*/

#endif // CAPI_PCM_DEC_H
Loading
Loading