isphenc1.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_ISPHENC1_
00048 #define ti_xdais_dm_ISPHENC1_
00049 
00050 #include <ti/xdais/ialg.h>
00051 #include <ti/xdais/xdas.h>
00052 #include "xdm.h"
00053 #include "ispeech1.h"
00054 
00055 #ifdef __cplusplus
00056 extern "C" {
00057 #endif
00058 
00059 
00062 
00063 #define ISPHENC1_EOK       XDM_EOK             
00064 #define ISPHENC1_EFAIL     XDM_EFAIL           
00065 #define ISPHENC1_EUNSUPPORTED XDM_EUNSUPPORTED 
00072 #define ISPHENC1_ENOOUTPUT               1
00073 
00078 typedef struct ISPHENC1_Obj {
00079     struct ISPHENC1_Fxns *fxns;
00080 } ISPHENC1_Obj;
00081 
00082 
00086 typedef struct ISPHENC1_Obj  *ISPHENC1_Handle;
00087 
00088 
00098 typedef struct ISPHENC1_Params {
00099     XDAS_Int16 size;            
00100     XDAS_Int16 frameSize;       
00103     XDAS_Int16 compandingLaw;   
00110     XDAS_Int16 packingType;     
00118     XDAS_Int16 vadSelection;    
00126     XDAS_Int16 codecSelection;  
00133     XDAS_Int16 bitRate;         
00142     XDAS_Int16 reserved;        
00143     XDAS_Int8  **tablesPtr;     
00155 } ISPHENC1_Params;
00156 
00157 
00170 typedef struct ISPHENC1_DynamicParams {
00171     XDAS_Int16 size;            
00172     XDAS_Int16 frameSize;       
00175     XDAS_Int16 bitRate;         
00183     XDAS_Int16 mode;            
00190     XDAS_Int16 vadFlag;         
00193     XDAS_Int16 noiseSuppressionMode; 
00202     XDAS_Int16 ttyTddMode;      
00209     XDAS_Int16 dtmfMode;        
00215     XDAS_Int16 dataTransmit;    
00221     XDAS_Int16 reserved;        
00222 } ISPHENC1_DynamicParams;
00223 
00224 
00231 typedef struct ISPHENC1_InArgs {
00232     XDAS_Int16 size;            
00233     XDAS_Int16 nullTrafficChannel; 
00248     XDM1_SingleBufDesc data;    
00251 } ISPHENC1_InArgs;
00252 
00253 
00259 typedef struct ISPHENC1_Status {
00260     XDAS_Int16 size;            
00261     XDAS_Int16 frameSize;       
00264     XDAS_Int32 extendedError;   
00265     XDM1_SingleBufDesc data;    
00286     XDAS_Int16 bitRate;         
00294     XDAS_Int16 mode;            
00301     XDAS_Int16 vadFlag;         
00304     XDAS_Int16 noiseSuppressionMode; 
00313     XDAS_Int16 ttyTddMode;      
00320     XDAS_Int16 dataTransmit;    
00326     XDAS_Int16 compandingLaw;   
00333     XDAS_Int16 packingType;     
00341     XDAS_Int16 vadSelection;    
00349     XDAS_Int16 codecSelection;  
00356     XDM_AlgBufInfo  bufInfo;    
00359 }ISPHENC1_Status;
00360 
00361 
00367 typedef enum {
00368     ISPHENC1_FTYPE_SPEECH = 0,  
00369     ISPHENC1_FTYPE_SIDFRAME = 1,
00370     ISPHENC1_FTYPE_NODATA = 2   
00373 } ISPHENC1_FrameType;
00374 
00375 
00384 typedef struct ISPHENC1_OutArgs {
00385     XDAS_Int16 size;            
00386     XDAS_Int16 frameType;       
00390     XDAS_Int32 extendedError;   
00391 } ISPHENC1_OutArgs;
00392 
00393 
00404 typedef  IALG_Cmd ISPHENC1_Cmd;
00405 
00406 
00410 typedef struct ISPHENC1_Fxns{
00411     IALG_Fxns   ialg;             
00490     XDAS_Int32 (*process)(ISPHENC1_Handle handle,
00491         XDM1_SingleBufDesc *inBuf, XDM1_SingleBufDesc *outBuf,
00492         ISPHENC1_InArgs *inArgs, ISPHENC1_OutArgs *outArgs);
00493 
00494 
00530     XDAS_Int32 (*control)(ISPHENC1_Handle handle, ISPHENC1_Cmd id,
00531         ISPHENC1_DynamicParams *params, ISPHENC1_Status *status);
00532 
00533 } ISPHENC1_Fxns;
00534 
00535 
00538 #ifdef __cplusplus
00539 }
00540 #endif
00541 
00542 #endif
00543 /*
00544  *  @(#) ti.xdais.dm; 1, 0, 5,194; 3-13-2009 12:27:49; /db/wtree/library/trees/dais/dais-o05x/src/
00545  */
00546 

Copyright 2009, Texas Instruments Incorporated