[Feature][ZXW-65]merged P49 base code
Change-Id: I3e09c0c3d47483bc645f02310380ecb7fc6f4041
diff --git a/ap/lib/libvoice/voiceipc.c b/ap/lib/libvoice/voiceipc.c
index 998d7a5..de88327 100755
--- a/ap/lib/libvoice/voiceipc.c
+++ b/ap/lib/libvoice/voiceipc.c
@@ -22,8 +22,10 @@
extern int sc_audio_get_tx_voice_mute_state(int *p_mute);
extern int sc_audio_set_rx_voice_mute_state(int mute);
extern int sc_audio_get_rx_voice_mute_state(int *p_mute);
-extern int sc_audio_set_loopback_enable_state(int enable);
-extern int sc_audio_get_loopback_enable_state(int *p_enable);
+//extern int sc_audio_set_loopback_enable_state(int enable);
+//extern int sc_audio_get_loopback_enable_state(int *p_enable);
+int ap_audio_set_loopback_enable(int dev_mode,int enable);
+int ap_audio_get_loopback_enable(int *p_enable);
static int voice_ipc_fd = -1;
static voice_ipc_control_msg voice_ctrl_recvmsg[IPC_VOICE_FUNC_MAX] = {0};
@@ -400,11 +402,15 @@
{
int ret = VOICEIPC_OK;
int msg_len = 0;
- int enable = 0;
+ int dev_mode = 0,enable = 0;
//memcpy(&dev_mode, msg.param, msg.param_len);
- enable = *((int *)msg.param);
- ret = sc_audio_set_loopback_enable_state(enable);
+ //enable = *((int *)msg.param);
+ memcpy(&dev_mode, msg.param, sizeof(int));
+ memcpy(&enable, msg.param+sizeof(int), sizeof(int));
+
+ //ret = sc_audio_set_loopback_enable_state(enable);
+ ret = ap_audio_set_loopback_enable(dev_mode,enable);
//msg.func_id不变
msg.param_len = sizeof(int);
@@ -425,8 +431,8 @@
int *p_enable = NULL;
p_enable = (int *)msg.param;
- ret = sc_audio_get_loopback_enable_state(p_enable);
-
+ //ret = sc_audio_get_loopback_enable_state(p_enable);
+ ret = ap_audio_get_loopback_enable(p_enable);
//msg.func_id不变
msg.param_len = sizeof(int);
if(0 == ret)