blob: fd31c2d4fb0dab515ecb3ab544e030540816c546 [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
63 typedef struct
64 {
65 void (*drv_dtmfrx_report_cb)(char *dtmf_string, unsigned char string_len);
66 void (*drv_dtmftx_report_cb)(char *dtmf_string, unsigned char string_len);
67 } T_DrvDtmf_Detect_Opt;
68
69 SINT32 zDrvVoice_Open(T_ZDrvVoice_Cfg *cfgParam);
70 SINT32 zDrvVoice_Close(VOID);
71 SINT32 zDrvVoice_ReadStart(VOID);
72 SINT32 zDrvVoice_ReadStop(VOID);
73 SINT32 zDrvVoice_WriteStart(VOID);
74 SINT32 zDrvVoice_WriteStop(VOID);
75 SINT32 zDrvVoice_ReadOneFrame(UINT8 *pBuf);
76 SINT32 zDrvVoice_WriteOneFrame(UINT8 *pBuf);
77VOID zDrvVoice_3G_RegCallbacks(T_DrvVoice_3G_Opt voiceObj);
78
79SINT32 zDrvVolte_AmrEncoderInit(VOID);
80SINT32 zDrvVolte_AmrDecoderInit(VOID);
81SINT32 zDrvVolte_AmrEncoder(UINT8 *pInputBuf,UINT32 inSize,UINT8 *pOutputBuf,UINT32* pOutSize);
82SINT32 zDrvVolte_AmrDecoder(UINT8 *pInputBuf,UINT32 inSize,UINT8 *pOutputBuf,UINT32* pPutSize);
83VOID zDrvVolte_AmrEncoderDeinit(VOID);
84VOID zDrvVolte_AmrDecoderDeinit(VOID);
85#endif
86