iaudenc1.h

Go to the documentation of this file.
00001 /* 
00002  * Copyright (c) 2009, 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 
00047 #ifndef ti_xdais_dm_IAUDENC1_
00048 #define ti_xdais_dm_IAUDENC1_
00049 
00050 #include <ti/xdais/ialg.h>
00051 #include <ti/xdais/xdas.h>
00052 #include "xdm.h"
00053 #include "iaudio.h"
00054 
00055 #ifdef __cplusplus
00056 extern "C" {
00057 #endif
00058 
00059 
00062 
00063 #define IAUDENC1_EOK      XDM_EOK              
00064 #define IAUDENC1_EFAIL    XDM_EFAIL            
00065 #define IAUDENC1_EUNSUPPORTED XDM_EUNSUPPORTED 
00071 typedef struct IAUDENC1_Obj {
00072     struct IAUDENC1_Fxns *fxns;
00073 } IAUDENC1_Obj;
00074 
00075 
00079 typedef struct IAUDENC1_Obj  *IAUDENC1_Handle;
00080 
00081 
00088 typedef struct IAUDENC1_Params {
00089     XDAS_Int32 size;            
00090     XDAS_Int32 sampleRate;      
00098     XDAS_Int32 bitRate;         
00103     XDAS_Int32 channelMode;     
00108     XDAS_Int32 dataEndianness;  
00112     XDAS_Int32 encMode;         
00117     XDAS_Int32 inputFormat;     
00121     XDAS_Int32 inputBitsPerSample;
00127     XDAS_Int32 maxBitRate;      
00131     XDAS_Int32 dualMonoMode;    
00138     XDAS_Int32 crcFlag;         
00145     XDAS_Int32 ancFlag;         
00157     XDAS_Int32 lfeFlag;         
00163 } IAUDENC1_Params;
00164 
00165 
00180 typedef struct IAUDENC1_DynamicParams {
00181     XDAS_Int32 size;            
00182     XDAS_Int32 bitRate;         
00187     XDAS_Int32 sampleRate;      
00195     XDAS_Int32 channelMode;     
00200     XDAS_Int32 lfeFlag;         
00206     XDAS_Int32 dualMonoMode;    
00213     XDAS_Int32 inputBitsPerSample;
00219 } IAUDENC1_DynamicParams;
00220 
00221 
00230 typedef struct IAUDENC1_InArgs {
00231     XDAS_Int32 size;            
00232     XDAS_Int32 numInSamples;    
00236     XDM1_SingleBufDesc ancData; 
00243 } IAUDENC1_InArgs;
00244 
00245 
00253 typedef struct IAUDENC1_Status {
00254     XDAS_Int32 size;            
00255     XDAS_Int32 extendedError;   
00256     XDM1_SingleBufDesc data;    
00272     XDM_AlgBufInfo bufInfo;     
00276     XDAS_Int32 validFlag;       
00282     XDAS_Int32 lfeFlag;         
00288     XDAS_Int32 bitRate;         
00293     XDAS_Int32 sampleRate;      
00301     XDAS_Int32 channelMode;     
00307     XDAS_Int32 encMode;         
00312 } IAUDENC1_Status;
00313 
00314 
00323 typedef struct IAUDENC1_OutArgs {
00324     XDAS_Int32 size;            
00325     XDAS_Int32 extendedError;   
00326     XDAS_Int32 bytesGenerated;  
00329     XDAS_Int32 numZeroesPadded; 
00336     XDAS_Int32 numInSamples;    
00339 } IAUDENC1_OutArgs;
00340 
00341 
00352 typedef  IALG_Cmd IAUDENC1_Cmd;
00353 
00354 
00358 typedef struct IAUDENC1_Fxns{
00359     IALG_Fxns   ialg;             
00430     XDAS_Int32  (*process)(IAUDENC1_Handle handle, XDM1_BufDesc *inBufs,
00431         XDM1_BufDesc *outBufs, IAUDENC1_InArgs *inArgs,
00432         IAUDENC1_OutArgs *outArgs);
00433 
00434 
00470     XDAS_Int32  (*control)(IAUDENC1_Handle handle, IAUDENC1_Cmd id,
00471         IAUDENC1_DynamicParams *params, IAUDENC1_Status *status);
00472 
00473 } IAUDENC1_Fxns;
00474 
00475 
00478 #ifdef __cplusplus
00479 }
00480 #endif
00481 
00482 #endif
00483 /*
00484  *  @(#) ti.xdais.dm; 1, 0, 5,194; 3-13-2009 12:27:48; /db/wtree/library/trees/dais/dais-o05x/src/
00485  */
00486 

Copyright 2009, Texas Instruments Incorporated