diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2014-07-05 00:36:45 +0200 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2017-01-10 10:55:32 +0100 |
commit | 7bf07b5b39e7385c06ffa34c313932625fcb1b12 (patch) | |
tree | c8e7574943ef0acdd18f79395c9a8c430e47424b | |
parent | edb07659ae1f686ac050e94f6a5eab5127add2fc (diff) | |
download | device_samsung_galaxys2-common-7bf07b5b39e7385c06ffa34c313932625fcb1b12.zip device_samsung_galaxys2-common-7bf07b5b39e7385c06ffa34c313932625fcb1b12.tar.gz device_samsung_galaxys2-common-7bf07b5b39e7385c06ffa34c313932625fcb1b12.tar.bz2 |
Audio-RIL-Interface: Keep up with libsrs-client
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rw-r--r-- | audio-ril-interface/audio-ril-interface.c | 22 |
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__); } |