Sound Open Firmware
Loading...
Searching...
No Matches
xa_src_pp_api.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011-2021 Cadence Design Systems, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining
5 * a copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sublicense, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject to
10 * the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included
13 * in all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 */
23
24
25#ifndef _XA_SRC_PP_API_H_
26#define _XA_SRC_PP_API_H_
27
28#include "xa_type_def.h"
29
30/* Sample Rate Convrter configuration parameters */
32{
42 XA_SRC_PP_CONFIG_PARAM_ENABLE_ASRC = 9, // Only available when the library is build with ASRC_ENABLE
43 XA_SRC_PP_CONFIG_PARAM_DRIFT_ASRC = 10, // Only available when the library is build with ASRC_ENABLE
44 XA_SRC_PP_CONFIG_PARAM_GET_DRIFT_FRACT_ASRC = 11, // Only available when the library is build with ASRC_ENABLE
45 XA_SRC_PP_CONFIG_PARAM_ENABLE_CUBIC = 12, // Only available when the library is build with POLYPHASE_CUBIC_INTERPOLATION
46 XA_SRC_PP_CONFIG_PARAM_CUSTOM_MODE = 20 /* Only available for HiFi2 based libraries built with compiler switch "XA_CUSTOM_SRC_IMPL" on */
47};
48
49#define XA_SRC_PP 3
50
51/* Define for the number of PCM Width */
52#define TWO_BYTES_PER_SAMPLE 2
53#define THREE_BYTES_PER_SAMPLE 3
54
55/*****************************************************************************/
56/* Class 1: Configuration Errors */
57/*****************************************************************************/
58/* Non-Fatal Errors */
66/* Fatal Errors */
77
78/*****************************************************************************/
79/* Class 2: Execution Class Errors */
80/*****************************************************************************/
81/* Non Fatal Errors */
87
88/* Fatal Errors */
95
96#if defined(__cplusplus)
97extern "C" {
98#endif /* __cplusplus */
99 /* Either one of the following is available in any library */
100xa_codec_func_t xa_src_pp; // Standard SRC / SRCPlus
102#if defined(__cplusplus)
103}
104#endif /* __cplusplus */
105
106#endif /*_XA_SRC_PP_API_H_*/
@ xa_class_config
Definition xa_error_standards.h:49
@ xa_class_execute
Definition xa_error_standards.h:50
@ xa_severity_nonfatal
Definition xa_error_standards.h:43
@ xa_severity_fatal
Definition xa_error_standards.h:44
#define XA_ERROR_CODE(severity, class, codec, index)
Definition xa_error_standards.h:55
xa_config_param_src_pp
Definition xa_src_pp_api.h:32
@ XA_SRC_PP_CONFIG_PARAM_INPUT_SAMPLE_RATE
Definition xa_src_pp_api.h:33
@ XA_SRC_PP_CONFIG_PARAM_SET_OUTPUT_BUF_PTR
Definition xa_src_pp_api.h:39
@ XA_SRC_PP_CONFIG_PARAM_OUTPUT_SAMPLE_RATE
Definition xa_src_pp_api.h:34
@ XA_SRC_PP_CONFIG_PARAM_GET_DRIFT_FRACT_ASRC
Definition xa_src_pp_api.h:44
@ XA_SRC_PP_CONFIG_PARAM_INPUT_CHANNELS
Definition xa_src_pp_api.h:37
@ XA_SRC_PP_CONFIG_PARAM_OUTPUT_CHUNK_SIZE
Definition xa_src_pp_api.h:36
@ XA_SRC_PP_CONFIG_PARAM_DRIFT_ASRC
Definition xa_src_pp_api.h:43
@ XA_SRC_PP_CONFIG_PARAM_SET_INPUT_BUF_PTR
Definition xa_src_pp_api.h:38
@ XA_SRC_PP_CONFIG_PARAM_CUSTOM_MODE
Definition xa_src_pp_api.h:46
@ XA_SRC_PP_CONFIG_PARAM_INPUT_CHUNK_SIZE
Definition xa_src_pp_api.h:35
@ XA_SRC_PP_CONFIG_PARAM_ENABLE_ASRC
Definition xa_src_pp_api.h:42
@ XA_SRC_PP_CONFIG_PARAM_GET_NUM_STAGES
Definition xa_src_pp_api.h:40
@ XA_SRC_PP_CONFIG_PARAM_BYTES_PER_SAMPLE
Definition xa_src_pp_api.h:41
@ XA_SRC_PP_CONFIG_PARAM_ENABLE_CUBIC
Definition xa_src_pp_api.h:45
xa_error_nonfatal_config_src_pp
Definition xa_src_pp_api.h:60
@ XA_SRC_PP_CONFIG_NON_FATAL_INVALID_ENABLE_CUBIC
Definition xa_src_pp_api.h:64
@ XA_SRC_PP_CONFIG_NON_FATAL_INVALID_ENABLE_ASRC
Definition xa_src_pp_api.h:62
@ XA_SRC_PP_CONFIG_NON_FATAL_INVALID_CONFIG_TYPE
Definition xa_src_pp_api.h:61
@ XA_SRC_PP_CONFIG_NON_FATAL_INVALID_DRIFT_ASRC
Definition xa_src_pp_api.h:63
xa_error_fatal_config_src_pp
Definition xa_src_pp_api.h:68
@ XA_SRC_PP_CONFIG_FATAL_INVALID_BYTES_PER_SAMPLE
Definition xa_src_pp_api.h:75
@ XA_SRC_PP_CONFIG_FATAL_INVALID_OUTPUT_RATE
Definition xa_src_pp_api.h:70
@ XA_SRC_PP_CONFIG_FATAL_INVALID_INPUT_RATE
Definition xa_src_pp_api.h:69
@ XA_SRC_PP_CONFIG_FATAL_INVALID_INPUT_CHANNELS
Definition xa_src_pp_api.h:72
@ XA_SRC_PP_CONFIG_FATAL_INVALID_INPUT_PTR
Definition xa_src_pp_api.h:73
@ XA_SRC_PP_CONFIG_FATAL_INVALID_INPUT_CHUNK_SIZE
Definition xa_src_pp_api.h:71
@ XA_SRC_PP_CONFIG_FATAL_INVALID_OUTPUT_PTR
Definition xa_src_pp_api.h:74
xa_codec_func_t xa_src384k_pp
Definition xa_src_pp_api.h:101
xa_error_fatal_execute_src_pp
Definition xa_src_pp_api.h:90
@ XA_SRC_PP_EXECUTE_FATAL_ERR_EXECUTE
Definition xa_src_pp_api.h:93
@ XA_SRC_PP_EXECUTE_FATAL_ERR_INIT
Definition xa_src_pp_api.h:92
@ XA_SRC_PP_EXECUTE_FATAL_ERR_POST_CONFIG_INIT
Definition xa_src_pp_api.h:91
#define XA_SRC_PP
Definition xa_src_pp_api.h:49
xa_error_nonfatal_execute_src_pp
Definition xa_src_pp_api.h:83
@ XA_SRC_PP_EXECUTE_NON_FATAL_INVALID_API_SEQ
Definition xa_src_pp_api.h:85
@ XA_SRC_PP_EXECUTE_NON_FATAL_INVALID_CONFIG_SEQ
Definition xa_src_pp_api.h:84
xa_codec_func_t xa_src_pp
Definition xa_src_pp_api.h:100
XA_ERRORCODE xa_codec_func_t(xa_codec_handle_t p_xa_module_obj, WORD32 i_cmd, WORD32 i_idx, pVOID pv_value)
Definition xa_type_def.h:94