lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | /*******************************************************************************
|
| 2 | * Copyright (C) 2007, ZTE Corporation.
|
| 3 | *
|
| 4 | * File Name: Drvs_volte.h
|
| 5 | * File Mark:
|
| 6 | * Description: Provide the interface of using volte
|
| 7 | * Others:
|
| 8 | * Version: V0.5
|
| 9 | * Author: lvwenhua
|
| 10 | * Date: 2014-08-4
|
| 11 | * History 1:
|
| 12 | * Date:
|
| 13 | * Version:
|
| 14 | * Author:
|
| 15 | * Modification:
|
| 16 | * History 2:
|
| 17 | ********************************************************************************/
|
| 18 | #ifndef _DRVS_VOLTE_H
|
| 19 | #define _DRVS_VOLTE_H
|
| 20 |
|
| 21 | #include <linux/volte_drv.h>
|
| 22 |
|
| 23 | typedef enum
|
| 24 | {
|
| 25 | VOLTE_IDLE = 0,
|
| 26 | VOLTE_OPEN,
|
| 27 | VOLTE_INUSE,
|
| 28 | VOLTE_MAX
|
| 29 | } T_Volte_Status;
|
| 30 | #if 0
|
| 31 | typedef enum
|
| 32 | {
|
| 33 | VOICE_GSM_MODE = 0,
|
| 34 | VOICE_TD_MODE ,
|
| 35 | VOICE_WCDMA_MODE,
|
| 36 | VOICE_LTE_MODE,
|
| 37 | VOICE_GSM_TD_MODE,//GSM TD share
|
| 38 | VOICE_GSM_WCDMA_MODE, //GSM WCDMA share
|
| 39 | MAX_VOICE_MODE
|
| 40 | } T_ZDrvVoice_MODE;
|
| 41 | typedef struct
|
| 42 | {
|
| 43 | UINT32 clock_rate;
|
| 44 | UINT32 channel_count;
|
| 45 | UINT32 samples_per_frame;
|
| 46 | UINT32 bits_per_sample;
|
| 47 | UINT32 mode;
|
| 48 | } T_ZDrvVp_Cfg;
|
| 49 |
|
| 50 | #define T_ZDrvVoice_Cfg T_ZDrvVp_Cfg
|
| 51 | #endif
|
| 52 |
|
| 53 | typedef T_ZDrvVoice_Cfg T_ZDrvVp_Cfg;
|
| 54 |
|
| 55 | typedef struct
|
| 56 | {
|
| 57 |
|
| 58 | SINT32 (*drv_voice_3G_Open)(VOID);
|
| 59 | SINT32 (*drv_voice_3G_Close)(VOID);
|
| 60 |
|
| 61 | } T_DrvVoice_3G_Opt;
|
| 62 |
|
xf.li | ce87319 | 2023-11-08 17:10:35 -0800 | [diff] [blame^] | 63 | #ifdef ECALL_SUPPORT
|
| 64 | typedef struct
|
| 65 | {
|
| 66 |
|
| 67 | SINT32 (*drv_Get_Ecall_State)(VOID);
|
| 68 | SINT32 (*drv_Ecall_Read)(UINT8 *pBuf,UINT32 *inSize);
|
| 69 | SINT32 (*drv_Ecall_Write)(UINT8 *pBuf,UINT32 inSize);
|
| 70 |
|
| 71 | } T_DrvEcall_Opt;
|
| 72 | #endif
|
| 73 |
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 74 | typedef struct
|
| 75 | {
|
| 76 | void (*drv_dtmfrx_report_cb)(char *dtmf_string, unsigned char string_len);
|
| 77 | void (*drv_dtmftx_report_cb)(char *dtmf_string, unsigned char string_len);
|
| 78 | } T_DrvDtmf_Detect_Opt;
|
| 79 |
|
| 80 | SINT32 zDrvVoice_Open(T_ZDrvVoice_Cfg *cfgParam);
|
| 81 | SINT32 zDrvVoice_Close(VOID);
|
| 82 | SINT32 zDrvVoice_ReadStart(VOID);
|
| 83 | SINT32 zDrvVoice_ReadStop(VOID);
|
| 84 | SINT32 zDrvVoice_WriteStart(VOID);
|
| 85 | SINT32 zDrvVoice_WriteStop(VOID);
|
| 86 | SINT32 zDrvVoice_ReadOneFrame(UINT8 *pBuf);
|
| 87 | SINT32 zDrvVoice_WriteOneFrame(UINT8 *pBuf);
|
| 88 | VOID zDrvVoice_3G_RegCallbacks(T_DrvVoice_3G_Opt voiceObj);
|
| 89 |
|
| 90 | SINT32 zDrvVolte_AmrEncoderInit(VOID);
|
| 91 | SINT32 zDrvVolte_AmrDecoderInit(VOID);
|
| 92 | SINT32 zDrvVolte_AmrEncoder(UINT8 *pInputBuf,UINT32 inSize,UINT8 *pOutputBuf,UINT32* pOutSize);
|
| 93 | SINT32 zDrvVolte_AmrDecoder(UINT8 *pInputBuf,UINT32 inSize,UINT8 *pOutputBuf,UINT32* pPutSize);
|
| 94 | VOID zDrvVolte_AmrEncoderDeinit(VOID);
|
| 95 | VOID zDrvVolte_AmrDecoderDeinit(VOID);
|
xf.li | ce87319 | 2023-11-08 17:10:35 -0800 | [diff] [blame^] | 96 | #ifdef ECALL_SUPPORT
|
| 97 | VOID zDrvEcall_SetCallbacks(T_DrvEcall_Opt ecallObj);
|
| 98 | #endif
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 99 | #endif
|
| 100 |
|