00001 /* 00002 * Copyright (c) 2012, Texas Instruments Incorporated 00003 * All rights reserved. 00004 * 00005 * Redistribution and use in source and binary forms, with or without 00006 * modification, are permitted provided that the following conditions 00007 * are met: 00008 * 00009 * * Redistributions of source code must retain the above copyright 00010 * notice, this list of conditions and the following disclaimer. 00011 * 00012 * * Redistributions in binary form must reproduce the above copyright 00013 * notice, this list of conditions and the following disclaimer in the 00014 * documentation and/or other materials provided with the distribution. 00015 * 00016 * * Neither the name of Texas Instruments Incorporated nor the names of 00017 * its contributors may be used to endorse or promote products derived 00018 * from this software without specific prior written permission. 00019 * 00020 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00021 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00022 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00023 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00024 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00025 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00026 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 00027 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00028 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 00029 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00030 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00031 * 00032 */ 00033 00050 #ifndef ti_xdais_dm_IAUDDEC_ 00051 #define ti_xdais_dm_IAUDDEC_ 00052 00053 #include <ti/xdais/ialg.h> 00054 #include <ti/xdais/xdas.h> 00055 00056 /* 00057 * By definition, this interface is 0.9 XDM. Before including xdm.h, 00058 * define XDM_INCLUDE_DOT9_SUPPORT 00059 */ 00060 #ifndef XDM_INCLUDE_DOT9_SUPPORT 00061 #define XDM_INCLUDE_DOT9_SUPPORT 00062 #endif 00063 #include "xdm.h" 00064 #include "iaudio.h" 00065 00066 #ifdef __cplusplus 00067 extern "C" { 00068 #endif 00069 00072 00073 #define IAUDDEC_CID "ti.xdais.dm.IAUDDEC" 00075 #define IAUDDEC_ERUNTIME XDM_ERUNTIME 00076 #define IAUDDEC_EOK XDM_EOK 00077 #define IAUDDEC_EFAIL XDM_EFAIL 00083 typedef struct IAUDDEC_Obj { 00084 struct IAUDDEC_Fxns *fxns; 00085 } IAUDDEC_Obj; 00086 00087 00091 typedef struct IAUDDEC_Obj *IAUDDEC_Handle; 00092 00093 00100 typedef struct IAUDDEC_Params { 00101 XDAS_Int32 size; 00102 XDAS_Int32 maxSampleRate; 00107 XDAS_Int32 maxBitrate; 00112 XDAS_Int32 maxNoOfCh; 00115 XDAS_Int32 dataEndianness; 00119 } IAUDDEC_Params; 00120 00121 00136 typedef struct IAUDDEC_DynamicParams { 00137 XDAS_Int32 size; 00138 XDAS_Int32 outputFormat; 00141 } IAUDDEC_DynamicParams; 00142 00143 00152 typedef struct IAUDDEC_InArgs { 00153 XDAS_Int32 size; 00154 XDAS_Int32 numBytes; 00157 } IAUDDEC_InArgs; 00158 00159 00167 typedef struct IAUDDEC_Status { 00168 XDAS_Int32 size; 00169 XDAS_Int32 extendedError; 00170 XDAS_Int32 bitRate; 00171 XDAS_Int32 sampleRate; 00176 XDAS_Int32 numChannels; 00179 XDAS_Int32 numLFEChannels; 00182 XDAS_Int32 outputFormat; 00185 XDAS_Int32 autoPosition; 00191 XDAS_Int32 fastFwdLen; 00194 XDAS_Int32 frameLen; 00197 XDAS_Int32 outputBitsPerSample; 00202 XDM_AlgBufInfo bufInfo; 00205 } IAUDDEC_Status; 00206 00207 00216 typedef struct IAUDDEC_OutArgs { 00217 XDAS_Int32 size; 00218 XDAS_Int32 extendedError; 00219 XDAS_Int32 bytesConsumed; 00222 } IAUDDEC_OutArgs; 00223 00224 00235 typedef IALG_Cmd IAUDDEC_Cmd; 00236 00237 00241 typedef struct IAUDDEC_Fxns { 00242 IALG_Fxns ialg; 00287 XDAS_Int32 (*process)(IAUDDEC_Handle handle, XDM_BufDesc *inBufs, 00288 XDM_BufDesc *outBufs, IAUDDEC_InArgs *inArgs, 00289 IAUDDEC_OutArgs *outArgs); 00290 00316 XDAS_Int32 (*control)(IAUDDEC_Handle handle, IAUDDEC_Cmd id, 00317 IAUDDEC_DynamicParams *params, IAUDDEC_Status *status); 00318 } IAUDDEC_Fxns; 00319 00320 00323 #ifdef __cplusplus 00324 } 00325 #endif 00326 00327 #endif 00328 /* 00329 * @(#) ti.xdais.dm; 1, 0, 7,1; 6-19-2012 17:57:44; /db/wtree/library/trees/dais/dais-w06/src/ xlibrary 00330 00331 */ 00332