[Feature][ZXW-222] Add set voice dtmf api
Only Configure: No
Affected branch: master
Affected module: call
Is it affected on both ZXIC and MTK:only zxic
Self-test: Yes
Doc Update:Yes
Change-Id: Ia35e6787e4ad6f6d4a94e4d5d14967d78aa03a9a
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-voice-demo/files/lynq-qser-voice-demo.cpp b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-voice-demo/files/lynq-qser-voice-demo.cpp
index 81185d9..d6ddaf1 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-voice-demo/files/lynq-qser-voice-demo.cpp
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-voice-demo/files/lynq-qser-voice-demo.cpp
@@ -24,6 +24,7 @@
{3, "qser_voice_call_answer"},
{4, "qser_voice_set_speech_volume"},
{5, "qser_voice_get_speech_volume"},
+ {6, "qser_voice_set_dtmf"},
{-1, NULL}
};
@@ -31,7 +32,6 @@
typedef uint32_t voice_client_handle_type;
-static pthread_t s_lynq_voice_tid = -1;
int (*qser_voice_call_client_init)(voice_client_handle_type *ph_voice);
int (*qser_voice_call_client_deinit)(voice_client_handle_type );
@@ -48,6 +48,7 @@
int (*qser_voice_call_answer)(voice_client_handle_type ,int );
int (*qser_voice_set_speech_volume)(const int volume);
int (*qser_voice_get_speech_volume)(int *volume);
+int (*qser_voice_set_dtmf)(const char callnum);
void *dlHandle_call = NULL;
@@ -156,6 +157,13 @@
printf("qser_voice_get_speech_volume not defined or exported in %s\n", lynqLibPath_Call);
return -1;
}
+
+ qser_voice_set_dtmf = (int (*)(const char ))dlsym(dlHandle_call,"qser_voice_set_dtmf");
+ if(qser_voice_set_dtmf == NULL)
+ {
+ printf("qser_voice_set_dtmf not defined or exported in %s\n", lynqLibPath_Call);
+ return -1;
+ }
ret = qser_voice_call_client_init(&h_voice);
if(ret != 0 )
@@ -244,6 +252,25 @@
break;
}
+ case 6:
+ {
+
+ int ret;
+ char inputChar;
+
+ printf("Enter set dtmf\n");
+ scanf(" %c", &inputChar);
+ printf("inputChar is %c\n", inputChar);
+ ret = qser_voice_set_dtmf(inputChar);
+
+ if (ret != 0)
+ {
+ printf("qser set voice dtmf failed\n");
+ return -1;
+ }
+ break;
+ }
+
default:
print_help();
break;
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/include/lynq-qser-voice.h b/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/include/lynq-qser-voice.h
index 8666362..1fb0e01 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/include/lynq-qser-voice.h
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/include/lynq-qser-voice.h
@@ -94,19 +94,7 @@
//Get voice speech volume
int qser_voice_get_speech_volume(int *volume);
-//Set voice call waiting
-int qser_voice_call_setwaiting
-(
- int h_voice,
- qser_voice_call_waiting_service_t e_service
-);
-
-//Get voice call waiting status
-int qser_voice_call_getwaitingstatus
-(
- int h_voice,
- qser_voice_call_waiting_service_t *pe_service
-);
+int qser_voice_set_dtmf(const char callnum);
/*
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/lynq-qser-voice.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/lynq-qser-voice.cpp
index a35a192..d32a69e 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/lynq-qser-voice.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/lynq-qser-voice.cpp
@@ -229,5 +229,11 @@
return lynq_get_speech_volume(volume);
}
+int qser_voice_set_dtmf(const char callnum)
+{
+ return lynq_set_DTMF(callnum);
+
+}
+
DEFINE_LYNQ_LIB_LOG(LYNQ_QSER_CALL)