[feature] voice call audio interface
Change-Id: I3429a426c07f1cd082ffff2855dbda05cb22373f
diff --git a/framework/lynq-ril-service/src/cc.cpp b/framework/lynq-ril-service/src/cc.cpp
index f212ff7..09456b8 100755
--- a/framework/lynq-ril-service/src/cc.cpp
+++ b/framework/lynq-ril-service/src/cc.cpp
@@ -776,17 +776,17 @@
int inCallRecord(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI)
{
+ android::Parcel p;
int recordEnable = 0;
char* filepath = NULL;
if(inCallstatus == CALL_OFF || speechStatus == SPEECH_OFF) {
RLOGW("[warning],not in calling status. Can't do record!");
- return 0;
+ goto FAIL_RETURN;
}
- if(argc < 3) {
- free(pRI);
+ if(argc < 3) {
RLOGW("[error],inCallRecord parameter error!");
- return 0;
+ goto FAIL_RETURN;
}
recordEnable = atoi(argv[1]) ? 1 : 0;
@@ -802,20 +802,31 @@
}else{
inCallRecordMode = 0;
RLOGW("[error],inCallRecord Start fail!");
+ goto FAIL_RETURN;
}
} else { //disable record
if (inCallRecordMode == 1) {
- if(!(-1 != GSM_Stop() && -1 != GSM_Close()))
- RLOGW("[error],inCallRecord fail!");
-
inCallRecordMode = 0;
+ if(!(-1 != GSM_Stop() && -1 != GSM_Close()))
+ {
+ RLOGW("[error],inCallRecord fail!");
+ goto FAIL_RETURN;
+ }
}
}
-
- if(pRI != NULL) {
+ if(pRI != NULL) {
+ android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_RECORD,0,0);
+ android::LYNQ_RIL_respSocket_sp(p,pRI);
free(pRI);
- }
+ }
return 0;
+FAIL_RETURN:
+ if(pRI != NULL) {
+ android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_RECORD,0,2);
+ android::LYNQ_RIL_respSocket_sp(p,pRI);
+ free(pRI);
+ }
+ return -1;
}
int StopRecord()
@@ -834,10 +845,13 @@
int setSpeechVolume(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI)
{
+ android::Parcel p;
int setValue = 0;
RLOGD("setSpeechVolume start!");
if(argc < 2) {
+ android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_SET_SPEECH_VOLUME,0,2);
+ android::LYNQ_RIL_respSocket_sp(p,pRI);
free(pRI);
RLOGW("Warning: no set volume value!");
return -1;
@@ -848,28 +862,64 @@
if (get_audio_path() == 0) {
if(setValue < MIN_VOLUME || setValue > MAX_VOLUME) {
RLOGW("Warning: set volume value is over-range!");
+ android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_SET_SPEECH_VOLUME,0,2);
+ android::LYNQ_RIL_respSocket_sp(p,pRI);
+ free(pRI);
return -1;
}
} else {
if(setValue < BT_MIN_VOLUME || setValue > BT_MAX_VOLUME) {
RLOGW("Warning: set bt volume value is over-range!");
+ android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_SET_SPEECH_VOLUME,0,2);
+ android::LYNQ_RIL_respSocket_sp(p,pRI);
+ free(pRI);
return -1;
}
}
//paramter is from 1 to 7
mixer_set_volume(setValue);
+ android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_SET_SPEECH_VOLUME,0,0);
+ printf(">>>>set speech Volume<<<< success value is %d!\n",setValue);
+ /*Warren add for t800 ril service 2021/12/23 end*/
+ android::LYNQ_RIL_respSocket_sp(p,pRI);
free(pRI);
return 0;
}
+int getSpeechVolume(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI)
+{
+ android::Parcel p;
+ printf("WARREN TEST001!!!\n");
+ int volumn = mixer_get_volume();
+ //TBC -200 fail status
+ if(volumn <0) {
+ printf("get speech volumn fail, please check whether does call exsit.\n");
+ /*Warren add for t800 ril service 2021/12/23 start*/
+ android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_GET_SPEECH_VOLUME,0,2);
+ /*Warren add for t800 ril service 2021/12/23 end*/
+ } else {
+ /*Warren add for t800 ril service 2021/12/23 start*/
+ android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_GET_SPEECH_VOLUME,0,0);
+ /*Warren add for t800 ril service 2021/12/23 end*/
+ }
+ printf("current Speech Volume is%d",volumn);
+ p.writeInt32(volumn);
+ android::LYNQ_RIL_respSocket(p,(void *)pRI);
+ if(pRI) {
+ free(pRI);
+ }
+ return 0;
+}
int setDtmfVolume(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI)
{
+ android::Parcel p;
int setValue = 0;
- Parcel p;
RLOGD("setDtmfVolume start!");
printf("setDtmfVolume start!\n");
if(argc < 2) {
RLOGW("Warning: no set volume value!");
printf("Warning: no set volume value!\n");
+ android::lynqAssemblyParcelheader(p,socket_id,LYNQ_REQUEST_SET_DTMF_VOLUME,0,2);
+ android::LYNQ_RIL_respSocket_sp(p,pRI);
free(pRI);
return -1;
}
@@ -1260,7 +1310,7 @@
//RIL_REQUEST_SET_MUTE
int setMute(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI)
{
- Parcel p;
+ android::Parcel p;
printf("WARREN TEST002!!!\n");
if(argc<2)
{
@@ -1275,12 +1325,12 @@
int ret = setCallMute(mute);
if(ret) {
/*Warren add for t800 ril service 2021/12/23 start*/
- android::lynqAssemblyParcelheader(p,socket_id,RIL_REQUEST_GET_MUTE,0,2);
+ android::lynqAssemblyParcelheader(p,socket_id,RIL_REQUEST_SET_MUTE,0,2);
/*Warren add for t800 ril service 2021/12/23 start*/
printf("set mute fail, please try agian\n");
} else {
/*Warren add for t800 ril service 2021/12/23 start*/
- android::lynqAssemblyParcelheader(p,socket_id,RIL_REQUEST_GET_MUTE,0,0);
+ android::lynqAssemblyParcelheader(p,socket_id,RIL_REQUEST_SET_MUTE,0,0);
/*Warren add for t800 ril service 2021/12/23 start*/
}
/*Warren add for t800 ril service 2021/12/23 start*/
@@ -1297,11 +1347,11 @@
int getMute(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI)
{
- Parcel p;
+ android::Parcel p;
printf("WARREN TEST001!!!\n");
int mute = getCallMute();
//TBC -200 fail status
- if(mute == -200) {
+ if(mute < 0) {
printf("get mute state fail, please check whether does call exsit.\n");
/*Warren add for t800 ril service 2021/12/23 start*/
android::lynqAssemblyParcelheader(p,socket_id,RIL_REQUEST_GET_MUTE,0,2);
@@ -1313,8 +1363,8 @@
}
printf("current mute state is%s",((mute == 1) ? "on\n" : "off\n"));
p.writeInt32(mute);
- android::LYNQ_RIL_respSocket(p,(void *)pRI);
if(pRI) {
+ android::LYNQ_RIL_respSocket(p,(void *)pRI);
free(pRI);
}
return 0;
diff --git a/framework/lynq-ril-service/src/cc.h b/framework/lynq-ril-service/src/cc.h
index d4c01bb..a1176ae 100755
--- a/framework/lynq-ril-service/src/cc.h
+++ b/framework/lynq-ril-service/src/cc.h
@@ -90,6 +90,7 @@
void set_bt_wbs(int wbs);
int get_bt_wbs(void);
int setSpeechVolume(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
+int getSpeechVolume(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
int setDtmfVolume(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
//void callStateChange(void);
void speechonoff(int callnum);
diff --git a/framework/lynq-ril-service/src/commands.h b/framework/lynq-ril-service/src/commands.h
index 133fd06..e051db0 100755
--- a/framework/lynq-ril-service/src/commands.h
+++ b/framework/lynq-ril-service/src/commands.h
@@ -74,7 +74,7 @@
{"RIL_REQUEST_LAST_CALL_FAIL_CAUSE",getLastCallFailCause, "get last call fail cause", RIL_REQUEST_LAST_CALL_FAIL_CAUSE},
{"RIL_REQUEST_GET_CURRENT_CALLS",getCurrentCalls,"get Current Calls",RIL_REQUEST_GET_CURRENT_CALLS},
{"RIL_REQUEST_AUTO_ANSWER",autoAnswerCall,"auto answer call",-1},
- {"RIL_REQUEST_RECORD",inCallRecord,"InCall record",-1},
+ {"RIL_REQUEST_RECORD",inCallRecord,"InCall record",LYNQ_REQUEST_RECORD},
#ifdef C2K_SUPPORT
{"RIL_REQUEST_CDMA_BURST_DTMF",sendBurstDtmf,"cdma burst dtmf",RIL_REQUEST_CDMA_BURST_DTMF},
@@ -85,7 +85,8 @@
{"RIL_REQUEST_SET_SPEECH_ON",setSpeechOn,"set Speech On",-1},
{"RIL_REQUEST_SET_SPEECH_OFF",setSpeechOff,"set Speech Off",-1},
#endif
- {"RIL_REQUEST_SET_SPEECH_VOLUME",setSpeechVolume,"set Speech Volume",-1},
+ {"RIL_REQUEST_GET_SPEECH_VOLUME",getSpeechVolume,"get Speech Volume",LYNQ_REQUEST_GET_SPEECH_VOLUME},
+ {"RIL_REQUEST_SET_SPEECH_VOLUME",setSpeechVolume,"set Speech Volume",LYNQ_REQUEST_SET_SPEECH_VOLUME},
/*Warren change for t800 ril service 2021/12/24 start*/
{"RIL_REQUEST_SET_DTMF_VOLUME",setDtmfVolume,"set dtmf Volume",LYNQ_REQUEST_SET_DTMF_VOLUME},
/*Warren change for t800 ril service 2021/12/24 start*/
diff --git a/framework/lynq-ril-service/src/lynq_interface.h b/framework/lynq-ril-service/src/lynq_interface.h
index 2a26b51..3d250cb 100755
--- a/framework/lynq-ril-service/src/lynq_interface.h
+++ b/framework/lynq-ril-service/src/lynq_interface.h
@@ -13,6 +13,11 @@
#define LYNQ_REQUEST_DELETE_SMS_FROM_MEMORY (LYNQ_REQUEST_VENDOR_BASE + 6)
#define LYNQ_REQUEST_LIST_SMS_FROM_MEMORY (LYNQ_REQUEST_VENDOR_BASE + 7)
#define LYNQ_REQUEST_SET_DEFAULT_SIM_ALL (LYNQ_REQUEST_VENDOR_BASE + 8)
+
+#define LYNQ_REQUEST_SET_SPEECH_VOLUME (LYNQ_REQUEST_VENDOR_BASE +9)
+#define LYNQ_REQUEST_GET_SPEECH_VOLUME (LYNQ_REQUEST_VENDOR_BASE +10)
+#define LYNQ_REQUEST_RECORD (LYNQ_REQUEST_VENDOR_BASE +11)
+
typedef struct{
int request;
int waitTime;
diff --git a/framework/lynq-ril-service/src/ril.cpp b/framework/lynq-ril-service/src/ril.cpp
index 3dd15d3..64d758f 100755
--- a/framework/lynq-ril-service/src/ril.cpp
+++ b/framework/lynq-ril-service/src/ril.cpp
@@ -4945,6 +4945,9 @@
/*LYNQ CMD*/
case LYNQ_AUTO_ANSWER_CALL: return "LYNQ_AUTO_ANSWER_CALL";
case LYNQ_REQUEST_SET_DTMF_VOLUME: return "RIL_REQUEST_SET_DTMF_VOLUME";
+ case LYNQ_REQUEST_SET_SPEECH_VOLUME: return "RIL_REQUEST_SET_SPEECH_VOLUME";
+ case LYNQ_REQUEST_GET_SPEECH_VOLUME: return "RIL_REQUEST_GET_SPEECH_VOLUME";
+ case LYNQ_REQUEST_RECORD: return "RIL_REQUEST_RECORD";
case LYNQ_REQUEST_WRITE_SMS_TO_MEMORY: return "LYNQ_REQUEST_WRITE_SMS_TO_MEMORY";
case LYNQ_REQUEST_READ_SMS_FROM_MEMORY: return "LYNQ_REQUEST_READ_SMS_FROM_MEMORY";
case LYNQ_REQUEST_DELETE_SMS_FROM_MEMORY: return "LYNQ_REQUEST_DELETE_SMS_FROM_MEMORY";
@@ -5206,6 +5209,9 @@
case RIL_REQUEST_QUERY_SIM_RETRY_COUNT: return "RIL_REQUEST_QUERY_SIM_RETRY_COUNT";
case RIL_REQUEST_QUERY_EID: return "RIL_REQUEST_QUERY_EID";
case LYNQ_REQUEST_SET_DTMF_VOLUME: return "RIL_REQUEST_SET_DTMF_VOLUME";
+ case LYNQ_REQUEST_SET_SPEECH_VOLUME: return "RIL_REQUEST_SET_SPEECH_VOLUME";
+ case LYNQ_REQUEST_GET_SPEECH_VOLUME: return "RIL_REQUEST_GET_SPEECH_VOLUME";
+ case LYNQ_REQUEST_RECORD: return "RIL_REQUEST_RECORD";
/*warren add for t800 ril service 2022/1/22 start*/
case LYNQ_REQUEST_WRITE_SMS_TO_MEMORY: return "LYNQ_REQUEST_WRITE_SMS_TO_MEMORY";
case LYNQ_REQUEST_READ_SMS_FROM_MEMORY: return "LYNQ_REQUEST_READ_SMS_FROM_MEMORY";
diff --git a/lib/liblynq-call/include/libcall/lynq_call.h b/lib/liblynq-call/include/libcall/lynq_call.h
index c37f86a..2df87cd 100755
--- a/lib/liblynq-call/include/libcall/lynq_call.h
+++ b/lib/liblynq-call/include/libcall/lynq_call.h
@@ -47,8 +47,12 @@
int lynq_call_hungup_all();
int lynq_wait_incoming_call(int *handle);
int lynq_set_auto_answercall(const int mode);
-int lynq_get_mute_status(int *status);
+int lynq_get_mute_mic(int *status);
int lynq_set_mute_mic(const int enable);
+int lynq_get_speech_volume(int *status);
+int lynq_set_speech_volume(int value);
+int lynq_incall_record_start(char* file_path);
+int lynq_incall_record_stop();
int lynq_set_DTMF(const char callnum);
int lynq_set_DTMF_volume(const int volume);
int lynq_get_current_call_state(int *handle, int *call_state,int *toa,int *direction,char addr[]);
diff --git a/lib/liblynq-call/lynq_call.cpp b/lib/liblynq-call/lynq_call.cpp
index 6fb06f0..e7d0585 100755
--- a/lib/liblynq-call/lynq_call.cpp
+++ b/lib/liblynq-call/lynq_call.cpp
@@ -100,6 +100,10 @@
/*Null anomaly*/
LYNQ_E_NULL_ANONALY=9001
}LYNQ_E;
+typedef enum{
+ LYNQ_E_VOLUMN_SET_DTMF,
+ LYNQ_E_VOLUMN_SET_SPEECH
+}LYNQ_E_VOLUMN_SET;
int lynq_call_state =CALL_OFF;
int lynq_call_client_sockfd = 0;
@@ -819,7 +823,58 @@
LYINFLOG("auto answer call mode =%d",mode);
return 0;
}
-int lynq_get_mute_status(int *status)
+int lynq_get_current_call_state(int *handle, int *call_state,int *toa,int *direction,char addr[])
+{
+ int lynq_call_id = 0;
+ if(handle==NULL)
+ {
+ return LYNQ_E_NULL_ANONALY;
+ }
+ lynq_call_id = *handle;
+ *call_state = lynq_call_lists[lynq_call_id].call_state;
+ *toa = lynq_call_lists[lynq_call_id].toa;
+ *direction = lynq_call_lists[lynq_call_id].direction;
+ memcpy(addr,lynq_call_lists[lynq_call_id].addr,strlen(lynq_call_lists[lynq_call_id].addr)+1);
+ return 0;
+}
+
+/*audio begin*/
+int lynq_set_common_request(int request_id, int argc, const char* format,...)
+{
+ Parcel p;
+ lynq_client_t client;
+ int resp_type = -1;
+ int request = -1;
+ int slot_id = -1;
+ int error = -1;
+ //if(!lynq_call_state)
+ //{
+ // LYERRLOG("LYNQ_E_CONFLICT");
+ // return LYNQ_E_CONFLICT;
+ //}
+ client.uToken = Global_uToken_call;
+ client.request = request_id;
+ client.paramLen = argc;
+ bzero(client.param,LYNQ_REQUEST_PARAM_BUF);
+ va_list args;
+ va_start(args, format);
+ vsnprintf(client.param, LYNQ_REQUEST_PARAM_BUF, format, args);
+ va_end(args);
+ LYDBGLOG("uToken=%d,request=%d,paralen=%d,param=%s\n",client.uToken,client.request,client.paramLen,client.param);
+ if(send_request(lynq_call_client_sockfd,&client)==-1)
+ {
+ LYERRLOG("send request fail");
+ return -1;
+ }
+ if(get_response(lynq_call_client_sockfd,p)==0)
+ {
+ JumpHeader(p,&resp_type,&request,&slot_id,&error);
+ LYINFLOG("resp_type=%d,request=%d,slot_id=%d,error_code=%d",resp_type,request,slot_id,error);
+ }
+ return error;
+}
+
+int lynq_get_common_request(int request_id, int* status)
{
Parcel p;
lynq_client_t client;
@@ -833,7 +888,7 @@
return -1;
}
client.uToken = Global_uToken_call;
- client.request = 54;//RIL_REQUEST_GET_MUTE
+ client.request = request_id;
client.paramLen = 0;
bzero(client.param,LYNQ_REQUEST_PARAM_BUF);
LYDBGLOG("uToken=%d,request=%d,paralen=%d,param=%s\n",client.uToken,client.request,client.paramLen,client.param);
@@ -842,10 +897,12 @@
LYERRLOG("send request fail");
return -1;
}
- get_response(lynq_call_client_sockfd,p);
- JumpHeader(p,&resp_type,&request,&slot_id,&error);
- p.readInt32(status);
- LYINFLOG("resp_type=%d,request=%d,slot_id=%d,error_code=%d",resp_type,request,slot_id,error);
+ if(get_response(lynq_call_client_sockfd,p)==0)
+ {
+ JumpHeader(p,&resp_type,&request,&slot_id,&error);
+ p.readInt32(status);
+ LYINFLOG("resp_type=%d,request=%d,slot_id=%d,error_code=%d",resp_type,request,slot_id,error);
+ }
return error;
}
@@ -865,27 +922,11 @@
if(!judge_mic(enable)){
return LYNQ_E_CONFLICT;
}
- Parcel p;
- lynq_client_t client;
- int resp_type = -1;
- int request = -1;
- int slot_id = -1;
- int error = -1;
- client.uToken = Global_uToken_call;
- client.request = 53;//RIL_REQUEST_SET_MUTE
- client.paramLen = 1;
- bzero(client.param,LYNQ_REQUEST_PARAM_BUF);
- sprintf(client.param,"%d",enable);
- LYDBGLOG("uToken=%d,request=%d,paralen=%d,param=%s\n",client.uToken,client.request,client.paramLen,client.param);
- if(send_request(lynq_call_client_sockfd,&client)==-1)
- {
- LYERRLOG("send request fail");
- return -1;
- }
- get_response(lynq_call_client_sockfd,p);
- JumpHeader(p,&resp_type,&request,&slot_id,&error);
- LYINFLOG("resp_type=%d,request=%d,slot_id=%d,error_code=%d",resp_type,request,slot_id,error);
- return error;
+ return lynq_set_common_request(53,1,"%d",enable); //RIL_REQUEST_SET_MUTE
+}
+int lynq_get_mute_mic(int *status)
+{
+ return lynq_get_common_request(54,status);//RIL_REQUEST_GET_MUTE
}
/**
@@ -917,89 +958,55 @@
{
return LYNQ_E_CONFLICT;
}
- Parcel p;
- lynq_client_t client;
- int resp_type = -1;
- int request = -1;
- int slot_id = -1;
- int error = -1;
if(!lynq_call_state)
{
LYERRLOG("LYNQ_E_CONFLICT");
return LYNQ_E_CONFLICT;
}
- client.uToken = Global_uToken_call;
- client.request = 24;//RIL_REQUEST_DTMF
- client.paramLen = 1;
- bzero(client.param,LYNQ_REQUEST_PARAM_BUF);
- sprintf(client.param,"%c",callnum);
- LYDBGLOG("uToken=%d,request=%d,paralen=%d,param=%s\n",client.uToken,client.request,client.paramLen,client.param);
- if(send_request(lynq_call_client_sockfd,&client)==-1)
- {
- LYERRLOG("send request fail");
- return -1;
- }
- get_response(lynq_call_client_sockfd,p);
- JumpHeader(p,&resp_type,&request,&slot_id,&error);
- LYINFLOG("resp_type=%d,request=%d,slot_id=%d,error_code=%d",resp_type,request,slot_id,error);
- return error;
-
+ return lynq_set_common_request(24,1,"%c",callnum); //RIL_REQUEST_DTMF
}
-
-static int judge_volume(const int volume){
- if(volume < 0 ||volume >36){
- return 0;
+static int judge_volume(LYNQ_E_VOLUMN_SET set,const int volume){
+ if(set==LYNQ_E_VOLUMN_SET_DTMF){
+ if(volume < 0 ||volume >36){
+ return 0;
+ }
+ }
+ else if (set==LYNQ_E_VOLUMN_SET_SPEECH)
+ {
+ if(volume < 1 ||volume >7){
+ return 0;
+ }
}
return 1;
}
-
int lynq_set_DTMF_volume(const int volume)
{
- if(!judge_volume(volume)){
+ if(!judge_volume(LYNQ_E_VOLUMN_SET_DTMF,volume)){
return LYNQ_E_CONFLICT;
}
- Parcel p;
- lynq_client_t client;
- int resp_type = -1;
- int request = -1;
- int slot_id = -1;
- int error = -1;
- //if(!lynq_call_state)
- //{
- // LYERRLOG("LYNQ_E_CONFLICT");
- // return LYNQ_E_CONFLICT;
- //}
- client.uToken = Global_uToken_call;
- client.request = 8003;//LYNQ_REQUEST_SET_DTMF_VOLUME
- client.paramLen = 1;
- bzero(client.param,LYNQ_REQUEST_PARAM_BUF);
- sprintf(client.param,"%d",volume);
- LYDBGLOG("uToken=%d,request=%d,paralen=%d,param=%s\n",client.uToken,client.request,client.paramLen,client.param);
- if(send_request(lynq_call_client_sockfd,&client)==-1)
- {
- LYERRLOG("send request fail");
- return -1;
- }
- get_response(lynq_call_client_sockfd,p);
- JumpHeader(p,&resp_type,&request,&slot_id,&error);
- LYINFLOG("resp_type=%d,request=%d,slot_id=%d,error_code=%d",resp_type,request,slot_id,error);
- return 0;
+ return lynq_set_common_request(8003,1,"%d",volume);//LYNQ_REQUEST_SET_DTMF_VOLUME
}
-int lynq_get_current_call_state(int *handle, int *call_state,int *toa,int *direction,char addr[])
+int lynq_set_speech_volume(int volume)//mixer_set_volume
{
- int lynq_call_id = 0;
- if(handle==NULL)
+ if(!judge_volume(LYNQ_E_VOLUMN_SET_SPEECH,volume))
{
- return LYNQ_E_NULL_ANONALY;
+ return LYNQ_E_CONFLICT;
}
- lynq_call_id = *handle;
- *call_state = lynq_call_lists[lynq_call_id].call_state;
- *toa = lynq_call_lists[lynq_call_id].toa;
- *direction = lynq_call_lists[lynq_call_id].direction;
- memcpy(addr,lynq_call_lists[lynq_call_id].addr,strlen(lynq_call_lists[lynq_call_id].addr)+1);
- return 0;
+ return lynq_set_common_request(8009,1,"%d",volume); //LYNQ_REQUEST_SET_SPEECH_VOLUME
}
-
+int lynq_get_speech_volume(int* volumn)//mixer_get_volume
+{
+ return lynq_get_common_request(8010,volumn);//LYNQ_REQUEST_GET_SPEECH_VOLUME
+}
+int lynq_incall_record_start(char* file_path)
+{
+ return lynq_set_common_request(8011,2,"%s\0%s","1",file_path); //LYNQ_REQUEST_RECORD
+}
+int lynq_incall_record_stop()
+{
+ return lynq_set_common_request(8011,2,"%s\0%s","0",""); //LYNQ_REQUEST_RECORD
+}
+/*audio end*/
#if 0
int main(int argc,char **argv)
{