Audio Software Codecs
Loading...
Searching...
No Matches
Audio Software Codec (ASC) results/error codes

General Description

Audio sw codecs middleware APIs return results of type cy_rslt_t and consist of three parts:

Result Format
           Module base                            Type     Library-specific error code
   +--------------------------------------------+--------+------------------------------+
   |                CY_RSLT_MODULE_ASC_BASE         | 0x2   |           Error Code         |
   +--------------------------------------------+--------+------------------------------+
                         14 bits               2 bits            16 bits

See the macro section of this document for library-specific error codes.

The data structure cy_rslt_t is part of cy_result.h located in <core_lib/include>

Module base: This base is derived from CY_RSLT_MODULE_MIDDLEWARE_BASE (defined in cy_result.h) and is an offset of the CY_RSLT_MODULE_MIDDLEWARE_BASE. The details of the offset and the middleware base are defined in cy_result_mw.h, which is part of the [GitHub connectivity-utilities] (https://github.com/Infineon/connectivity-utilities) repo. For example, the buffer pool library uses CY_RSLT_MODULE_ASC_BASE as the module base.

Type: This type is defined in cy_result.h and can be one of CY_RSLT_TYPE_FATAL, CY_RSLT_TYPE_ERROR, CY_RSLT_TYPE_WARNING, or CY_RSLT_TYPE_INFO. AWS library error codes are of type CY_RSLT_TYPE_ERROR.

Library-specific error code: These error codes are library-specific and defined in the macro section.

Helper macros used for creating the library-specific result are provided as part of cy_result.h.

Macros

#define CY_RSLT_ASC_ERR_BASE   CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_ASC_BASE, 0)
 SVC error code base.
 
#define CY_RSLT_ASC_OUT_OF_MEMORY   ( CY_RSLT_ASC_ERR_BASE + 1 )
 Out of memory.
 
#define CY_RSLT_ASC_GENERIC_ERROR   ( CY_RSLT_ASC_ERR_BASE + 2 )
 Generic error.
 
#define CY_RSLT_ASC_BAD_ARG   ( CY_RSLT_ASC_ERR_BASE + 3 )
 Bad argument.
 
#define CY_RSLT_ASC_INVALID_HANDLE   ( CY_RSLT_ASC_ERR_BASE + 4 )
 Invalid handle.
 
#define CY_RSLT_ASC_ALREADY_INITIALIZED   ( CY_RSLT_ASC_ERR_BASE + 5 )
 Already initialized.
 
#define CY_RSLT_ASC_INVALID_MAX_INSTANCE_REACHED   ( CY_RSLT_ASC_ERR_BASE + 6 )
 Max instance reached.
 
#define CY_RSLT_ASC_INSTANCE_NOT_FOUND   ( CY_RSLT_ASC_ERR_BASE + 7 )
 Instance not found.
 
#define CY_RSLT_ASC_ALGO_INIT_FAILED   ( CY_RSLT_ASC_ERR_BASE + 8 )
 Algo init failed.
 
#define CY_RSLT_ASC_NOT_SUPPORTED   ( CY_RSLT_ASC_ERR_BASE + 9 )
 Not supported.
 
#define CY_RSLT_ASC_ALGO_INTERNAL_ERROR   ( CY_RSLT_ASC_ERR_BASE + 10 )
 Algorithm internal error.
 
#define CY_RSLT_ASC_INSUFFICIENT_INPUT_BUFF   ( CY_RSLT_ASC_ERR_BASE + 11 )
 Insufficient input buffer.
 
#define CY_RSLT_ASC_INSUFFICIENT_OUTPUT_BUFF   ( CY_RSLT_ASC_ERR_BASE + 12 )
 Insufficient output buffer.
 
#define CY_RSLT_ASC_HEADER_NOT_FOUND   ( CY_RSLT_ASC_ERR_BASE + 13 )
 Header not found.
 
#define CY_RSLT_ASC_PARTIAL_HEADER_IDENTIFIED   ( CY_RSLT_ASC_ERR_BASE + 14 )
 Partial header file.
 
#define CY_RSLT_ASC_CORRUPTED_DATA   ( CY_RSLT_ASC_ERR_BASE + 15 )
 Corrupted data.
 
#define CY_RSLT_ASC_PARTIAL_FRAME_LEN   ( CY_RSLT_ASC_ERR_BASE + 16 )
 Partial frame len.
 
#define CY_RSLT_ASC_HEADER_PARSING_ERROR   ( CY_RSLT_ASC_ERR_BASE + 17 )
 Header parsing error.
 
#define CY_RSLT_ASC_NEED_MORE_DATA   ( CY_RSLT_ASC_ERR_BASE + 18 )
 Need more data.
 
#define CY_RSLT_ASC_NO_IN_CACHED_DATA   ( CY_RSLT_ASC_ERR_BASE + 19 )
 No cached data.
 
#define CY_RSLT_ASC_FRAME_CH_CHANGE   ( CY_RSLT_ASC_ERR_BASE + 20 )
 Output frame channel change - recheck the recommended out size and call decode again.