blob: 63ce768e66c2ac5bfe8accd886115fc98101e151 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001/*******************************************************************************
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
23typedef enum
24{
25 VOLTE_IDLE = 0,
26 VOLTE_OPEN,
27 VOLTE_INUSE,
28 VOLTE_MAX
29} T_Volte_Status;
30#if 0
31typedef 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;
41typedef 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
53typedef T_ZDrvVoice_Cfg T_ZDrvVp_Cfg;
54
55typedef 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.lice873192023-11-08 17:10:35 -080063 typedef struct
64 {
65
66 SINT32 (*drv_Get_Ecall_State)(VOID);
67 SINT32 (*drv_Ecall_Read)(UINT8 *pBuf,UINT32 *inSize);
68 SINT32 (*drv_Ecall_Write)(UINT8 *pBuf,UINT32 inSize);
69
70 } T_DrvEcall_Opt;
xf.lice873192023-11-08 17:10:35 -080071
lh9ed821d2023-04-07 01:36:19 -070072 typedef struct
73 {
74 void (*drv_dtmfrx_report_cb)(char *dtmf_string, unsigned char string_len);
75 void (*drv_dtmftx_report_cb)(char *dtmf_string, unsigned char string_len);
76 } T_DrvDtmf_Detect_Opt;
77
78 SINT32 zDrvVoice_Open(T_ZDrvVoice_Cfg *cfgParam);
79 SINT32 zDrvVoice_Close(VOID);
80 SINT32 zDrvVoice_ReadStart(VOID);
81 SINT32 zDrvVoice_ReadStop(VOID);
82 SINT32 zDrvVoice_WriteStart(VOID);
83 SINT32 zDrvVoice_WriteStop(VOID);
84 SINT32 zDrvVoice_ReadOneFrame(UINT8 *pBuf);
85 SINT32 zDrvVoice_WriteOneFrame(UINT8 *pBuf);
86VOID zDrvVoice_3G_RegCallbacks(T_DrvVoice_3G_Opt voiceObj);
87
88SINT32 zDrvVolte_AmrEncoderInit(VOID);
89SINT32 zDrvVolte_AmrDecoderInit(VOID);
90SINT32 zDrvVolte_AmrEncoder(UINT8 *pInputBuf,UINT32 inSize,UINT8 *pOutputBuf,UINT32* pOutSize);
91SINT32 zDrvVolte_AmrDecoder(UINT8 *pInputBuf,UINT32 inSize,UINT8 *pOutputBuf,UINT32* pPutSize);
92VOID zDrvVolte_AmrEncoderDeinit(VOID);
93VOID zDrvVolte_AmrDecoderDeinit(VOID);
xf.lice873192023-11-08 17:10:35 -080094VOID zDrvEcall_SetCallbacks(T_DrvEcall_Opt ecallObj);
xf.lif1aed282024-02-06 00:31:51 -080095
lh9ed821d2023-04-07 01:36:19 -070096#endif
97