summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2014-07-05 00:36:45 +0200
committerPaul Kocialkowski <contact@paulk.fr>2014-08-07 13:23:04 +0200
commit9c9f1530f6a23dc932f9d79304c81cfd114de423 (patch)
treeca12f12282abcd86456d0217740ad423823dd727
parentb85cce562b8ccd0bc82b14eb1020784a090bca8a (diff)
downloaddevice_samsung_galaxys2-common-replicant-4.2.zip
device_samsung_galaxys2-common-replicant-4.2.tar.gz
device_samsung_galaxys2-common-replicant-4.2.tar.bz2
Audio-RIL-Interface: Keep up with libsrs-clientreplicant-4.2-0004replicant-4.2-0003replicant-4.2
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rw-r--r--audio-ril-interface/audio-ril-interface.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/audio-ril-interface/audio-ril-interface.c b/audio-ril-interface/audio-ril-interface.c
index cbec73c..9ba2d0c 100644
--- a/audio-ril-interface/audio-ril-interface.c
+++ b/audio-ril-interface/audio-ril-interface.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Paul Kocialkowski
+ * Copyright (C) 2013-2014 Paul Kocialkowski
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ int galaxys2_mic_mute(void *pdata, int mute)
int galaxys2_voice_volume(void *pdata, audio_devices_t device, float volume)
{
struct srs_client *client = NULL;
- struct srs_snd_call_volume call_volume;
+ struct srs_snd_call_volume_data call_volume;
int rc;
ALOGD("%s(%d, %f)", __func__, device, volume);
@@ -80,7 +80,7 @@ int galaxys2_voice_volume(void *pdata, audio_devices_t device, float volume)
int galaxys2_route(void *pdata, audio_devices_t device)
{
struct srs_client *client;
- struct srs_snd_call_audio_path call_audio_path;
+ struct srs_snd_call_audio_path_data call_audio_path;
int rc;
ALOGD("%s(%d)", __func__, device);
@@ -143,9 +143,11 @@ struct audio_ril_interface *audio_ril_interface_open(void)
ALOGD("%s()", __func__);
- signal(SIGPIPE, SIG_IGN);
-
- srs_client_create(&client);
+ client = srs_client_create();
+ if (client == NULL) {
+ ALOGE("%s: Failed to create SRS client", __func__);
+ return NULL;
+ }
rc = srs_client_open(client);
if (rc < 0) {
@@ -153,9 +155,9 @@ struct audio_ril_interface *audio_ril_interface_open(void)
return NULL;
}
- rc = srs_client_ping(client);
+ rc = srs_ping(client);
if (rc < 0)
- ALOGE("%s: Failed to ping SRS client", __func__);
+ ALOGE("%s: Failed to ping SRS", __func__);
galaxys2_interface.pdata = (void *) client;
@@ -178,5 +180,7 @@ void audio_ril_interface_close(struct audio_ril_interface *interface)
if (rc < 0)
ALOGE("%s: Failed to close SRS client", __func__);
- srs_client_destroy(client);
+ rc = srs_client_destroy(client);
+ if (rc < 0)
+ ALOGE("%s: Failed to destroy SRS client", __func__);
}