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__); }