blob: 980e0e322873c4ede7ca57f5930198f88555cc18 [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#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
lh9ed821d2023-04-07 01:36:19 -070074 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);
88VOID zDrvVoice_3G_RegCallbacks(T_DrvVoice_3G_Opt voiceObj);
89
90SINT32 zDrvVolte_AmrEncoderInit(VOID);
91SINT32 zDrvVolte_AmrDecoderInit(VOID);
92SINT32 zDrvVolte_AmrEncoder(UINT8 *pInputBuf,UINT32 inSize,UINT8 *pOutputBuf,UINT32* pOutSize);
93SINT32 zDrvVolte_AmrDecoder(UINT8 *pInputBuf,UINT32 inSize,UINT8 *pOutputBuf,UINT32* pPutSize);
94VOID zDrvVolte_AmrEncoderDeinit(VOID);
95VOID zDrvVolte_AmrDecoderDeinit(VOID);
xf.lice873192023-11-08 17:10:35 -080096#ifdef ECALL_SUPPORT
97VOID zDrvEcall_SetCallbacks(T_DrvEcall_Opt ecallObj);
98#endif
lh9ed821d2023-04-07 01:36:19 -070099#endif
100