summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2015-08-24 17:55:42 (GMT)
committerAndreas Schneider <asn@cryptomilk.org>2015-08-25 13:43:36 (GMT)
commit9427510d0f95d8e5c3595bc7d82017b02d1451fa (patch)
tree52c06417671861dfec108363f2216d34f53823e9
parent7bf409edb0e3d78eaaab972467298a2cf4ee116c (diff)
downloadandroid_hardware_samsung-stable/cm-12.1-YOG4P.zip
android_hardware_samsung-stable/cm-12.1-YOG4P.tar.gz
android_hardware_samsung-stable/cm-12.1-YOG4P.tar.bz2
libsecril-client: Fix SetCallAudioPath for current devicesstable/cm-12.1-YOG4P
Change-Id: I38f10432f8e9a257af3e74312616d07698edd20f Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rwxr-xr-xril/libsecril-client/Android.mk4
-rwxr-xr-xril/libsecril-client/secril-client.cpp9
-rwxr-xr-xril/libsecril-client/secril-client.h6
3 files changed, 16 insertions, 3 deletions
diff --git a/ril/libsecril-client/Android.mk b/ril/libsecril-client/Android.mk
index 95e787d..df9ee57 100755
--- a/ril/libsecril-client/Android.mk
+++ b/ril/libsecril-client/Android.mk
@@ -15,8 +15,8 @@ LOCAL_SHARED_LIBRARIES := \
LOCAL_CFLAGS :=
-ifeq ($(BOARD_MODEM_TYPE),xmm7260)
-LOCAL_CFLAGS += -DMODEM_TYPE_XMM7260
+ifeq ($(TARGET_BOARD_PLATFORM),exynos4)
+LOCAL_CFLAGS += -DRIL_CALL_AUIO_PATH_EXTRAVOLUME
endif
LOCAL_MODULE:= libsecril-client
diff --git a/ril/libsecril-client/secril-client.cpp b/ril/libsecril-client/secril-client.cpp
index 61f046d..9351f7a 100755
--- a/ril/libsecril-client/secril-client.cpp
+++ b/ril/libsecril-client/secril-client.cpp
@@ -668,7 +668,12 @@ int SetCallVolume(HRilClient client, SoundType type, int vol_level) {
* Set external sound device path for noise reduction.
*/
extern "C"
-int SetCallAudioPath(HRilClient client, AudioPath path, ExtraVolume mode) {
+#ifdef RIL_CALL_AUIO_PATH_EXTRAVOLUME
+int SetCallAudioPath(HRilClient client, AudioPath path, ExtraVolume mode)
+#else
+int SetCallAudioPath(HRilClient client, AudioPath path)
+#endif
+{
RilClientPrv *client_prv;
int ret;
char data[6] = {0,};
@@ -696,7 +701,9 @@ int SetCallAudioPath(HRilClient client, AudioPath path, ExtraVolume mode) {
data[2] = 0x00; // data length
data[3] = 0x06; // data length
data[4] = ConvertAudioPath(path); // audio path
+#ifdef RIL_CALL_AUIO_PATH_EXTRAVOLUME
data[5] = mode; // ExtraVolume
+#endif
RegisterRequestCompleteHandler(client, REQ_SET_AUDIO_PATH, NULL);
diff --git a/ril/libsecril-client/secril-client.h b/ril/libsecril-client/secril-client.h
index fb1729c..134b80e 100755
--- a/ril/libsecril-client/secril-client.h
+++ b/ril/libsecril-client/secril-client.h
@@ -154,10 +154,12 @@ typedef enum _AudioPath {
/**
* ExtraVolume
*/
+#ifdef RIL_CALL_AUIO_PATH_EXTRAVOLUME
typedef enum _ExtraVolume {
ORIGINAL_PATH,
EXTRA_VOLUME_PATH
} ExtraVolume;
+#endif
/**
* Clock adjustment parameters.
@@ -244,7 +246,11 @@ int SetCallVolume(HRilClient client, SoundType type, int vol_level);
/**
* Set external sound device path for noise reduction.
*/
+#ifdef RIL_CALL_AUIO_PATH_EXTRAVOLUME
int SetCallAudioPath(HRilClient client, AudioPath path, ExtraVolume mode);
+#else
+int SetCallAudioPath(HRilClient client, AudioPath path);
+#endif
/**
* Set modem clock to master or slave.