codecs: cadence: src: Add support for SRC from Xtensa

This includes the basic declarations for SRC from Xtensa
support.

It adds the codec id, initializes the API member of
cadence_api with exported library function for SRC and
enables support for linking in the binary codec from Cadence.

All these for the purpose of using Sample Rate Converter
from Xtensa.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
This commit is contained in:
Iuliana Prodan 2021-08-26 00:22:48 +03:00 committed by Liam Girdwood
parent be69f41bef
commit e340f8f22d
4 changed files with 27 additions and 0 deletions

View File

@ -41,6 +41,10 @@ if(CONFIG_CADENCE_CODEC_VORBIS_DEC)
sof_add_static_library(xa_vorbis_dec ${CONFIG_CADENCE_CODEC_VORBIS_DEC_LIB})
endif()
if(CONFIG_CADENCE_CODEC_SRC_PP)
sof_add_static_library(xa_src_pp ${CONFIG_CADENCE_CODEC_SRC_PP_LIB})
endif()
endif()
if(CONFIG_PASSTHROUGH_CODEC)

View File

@ -133,6 +133,21 @@ if CADENCE_CODEC
This option is a string and takes the full name of the VORBIS library binary.
endif
config CADENCE_CODEC_SRC_PP
bool "Cadence SRC polyphase"
default n
help
Select for Cadence SRC polyphase support.
This will cause Cadence codec to include Cadence SRC library
api symbol.
if CADENCE_CODEC_SRC_PP
config CADENCE_CODEC_SRC_PP_LIB
string "Cadence SRC polyphase library name"
help
This option is a string and takes the full name of the SRC library binary.
endif
endif
config PASSTHROUGH_CODEC

View File

@ -29,6 +29,7 @@ enum cadence_api_id {
CADENCE_CODEC_MP3_DEC_ID = 0x06,
CADENCE_CODEC_SBC_DEC_ID = 0x07,
CADENCE_CODEC_VORBIS_DEC_ID = 0x08,
CADENCE_CODEC_SRC_PP_ID = 0x09,
};
/*****************************************************************************/
@ -83,6 +84,12 @@ static struct cadence_api cadence_api_table[] = {
.api = xa_vorbis_dec,
},
#endif
#ifdef CONFIG_CADENCE_CODEC_SRC_PP
{
.id = CADENCE_CODEC_SRC_PP_ID,
.api = xa_src_pp,
},
#endif
};
int cadence_codec_init(struct comp_dev *dev)

View File

@ -28,6 +28,7 @@ extern xa_codec_func_t xa_drm_dec;
extern xa_codec_func_t xa_mp3_dec;
extern xa_codec_func_t xa_sbc_dec;
extern xa_codec_func_t xa_vorbis_dec;
extern xa_codec_func_t xa_src_pp;
/*****************************************************************************/
/* Cadence private data types */