Sound Open Firmware
Loading...
Searching...
No Matches
xa_error_standards.h
Go to the documentation of this file.
1/*
2* The components of this software package from Cadence Design Systems,
3* Inc. are subject to the licenses below. By using the software package,
4* you agree to the legal terms of each license.
5*
6* Copyright (c) 1999-2018 Cadence Design Systems, Inc.
7*
8* Permission is hereby granted, free of charge, to any person obtaining
9* a copy of this software and associated documentation files (the
10* "Software"), to deal in the Software without restriction, including
11* without limitation the rights to use, copy, modify, merge, publish,
12* distribute, sublicense, and/or sell copies of the Software, and to
13* permit persons to whom the Software is furnished to do so, subject to
14* the following conditions:
15*
16* The above copyright notice and this permission notice shall be included
17* in all copies or substantial portions of the Software.
18*
19* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
23* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26*/
27
28#ifndef __XA_ERROR_STANDARDS_H__
29#define __XA_ERROR_STANDARDS_H__
30
31/*****************************************************************************/
32/* File includes */
33/* xa_type_def.h */
34/*****************************************************************************/
35
36/*****************************************************************************/
37/* Constant hash defines */
38/*****************************************************************************/
39#define XA_NO_ERROR 0
40#define XA_FATAL_ERROR 0x80000000
41
46
52
53#define XA_CODEC_GENERIC 0
54
55#define XA_ERROR_CODE(severity, class, codec, index) ((severity << 15) | (class << 11) | (codec << 6) | index)
56#define XA_ERROR_SEVERITY(code) (((code) & XA_FATAL_ERROR) != 0)
57#define XA_ERROR_CLASS(code) (((code) >> 11) & 0x0f)
58#define XA_ERROR_CODEC(code) (((code) >> 6) & 0x1f)
59#define XA_ERROR_SUBCODE(code) (((code) >> 0) & 0x3f)
60
61/* Our convention is that only api-class errors can be generic ones. */
62
63/*****************************************************************************/
64/* Class 0: API Errors */
65/*****************************************************************************/
66/* Non Fatal Errors */
67/* (none) */
68/* Fatal Errors */
75
76#endif /* __XA_ERROR_STANDARDS_H__ */
xa_error_fatal_api_generic
Definition xa_error_standards.h:69
@ XA_API_FATAL_MEM_ALLOC
Definition xa_error_standards.h:70
@ XA_API_FATAL_INVALID_CMD
Definition xa_error_standards.h:72
@ XA_API_FATAL_MEM_ALIGN
Definition xa_error_standards.h:71
@ XA_API_FATAL_INVALID_CMD_TYPE
Definition xa_error_standards.h:73
xa_error_class
Definition xa_error_standards.h:47
@ xa_class_config
Definition xa_error_standards.h:49
@ xa_class_execute
Definition xa_error_standards.h:50
@ xa_class_api
Definition xa_error_standards.h:48
xa_error_severity
Definition xa_error_standards.h:42
@ xa_severity_nonfatal
Definition xa_error_standards.h:43
@ xa_severity_fatal
Definition xa_error_standards.h:44
#define XA_CODEC_GENERIC
Definition xa_error_standards.h:53
#define XA_ERROR_CODE(severity, class, codec, index)
Definition xa_error_standards.h:55