Niranjan Yadla | 19336af | 2018-04-19 12:19:27 -0700 | [diff] [blame] | 1 | /******************************************************************************* |
| 2 | * Copyright (C) 2018 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 use this Software with Cadence processor cores only and |
| 7 | * not with any other processors and platforms, subject to |
| 8 | * the following conditions: |
| 9 | * |
| 10 | * The above copyright notice and this permission notice shall be included |
| 11 | * in all copies or substantial portions of the Software. |
| 12 | * |
| 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 14 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 15 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 16 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
| 17 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
| 18 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| 19 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 20 | |
| 21 | ******************************************************************************/ |
| 22 | |
| 23 | /******************************************************************************* |
| 24 | * xa-audio-decoder-api.h |
| 25 | * |
| 26 | * Generic audio decoder API |
| 27 | * |
| 28 | ******************************************************************************/ |
| 29 | |
| 30 | #ifndef __XA_ADEC_API_H__ |
| 31 | #define __XA_ADEC_API_H__ |
| 32 | |
| 33 | /* ...includes */ |
| 34 | #include "xa_type_def.h" |
| 35 | #include "xa_error_standards.h" |
| 36 | #include "xa_apicmd_standards.h" |
| 37 | #include "xa_memory_standards.h" |
| 38 | |
| 39 | /* ...generic audio-decoder configuration parameters */ |
| 40 | enum xa_config_param_codec { |
| 41 | XA_CODEC_CONFIG_PARAM_CHANNELS = 0x10000 + 0, |
| 42 | XA_CODEC_CONFIG_PARAM_SAMPLE_RATE = 0x10000 + 1, |
| 43 | XA_CODEC_CONFIG_PARAM_PCM_WIDTH = 0x10000 + 2, |
| 44 | XA_CODEC_CONFIG_PARAM_PRODUCED = 0x10000 + 3 |
| 45 | }; |
| 46 | |
| 47 | /* ...ports indices */ |
| 48 | enum xa_codec_ports { |
| 49 | XA_CODEC_INPUT_PORT = 0, |
| 50 | XA_CODEC_OUTPUT_PORT = 1 |
| 51 | }; |
| 52 | |
| 53 | /* ...non-fatal execution errors */ |
| 54 | enum |
| 55 | { |
| 56 | XA_CODEC_EXEC_NO_DATA = XA_ERROR_CODE(xa_severity_nonfatal, xa_class_execute, XA_CODEC_GENERIC, 0) |
| 57 | }; |
| 58 | |
| 59 | /* ...fatal execution errors */ |
| 60 | enum |
| 61 | { |
| 62 | XA_CODEC_EXEC_SEQUENCE = XA_ERROR_CODE(xa_severity_fatal, xa_class_execute, XA_CODEC_GENERIC, 0), |
| 63 | XA_CODEC_EXEC_MISBEHAVING = XA_ERROR_CODE(xa_severity_fatal, xa_class_execute, XA_CODEC_GENERIC, 1), |
| 64 | }; |
| 65 | |
| 66 | #endif |