From a13e517a69880059c4f0815085f57b66a0cd8e5b Mon Sep 17 00:00:00 2001 From: "Christopher N. Hesse" Date: Sat, 25 Feb 2017 14:33:10 +0100 Subject: [PATCH] audio: Add error logging to ril_interface Change-Id: I447d1bf2745990bd71688847d3e9cdb432c57f47 --- audio/ril_interface.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/audio/ril_interface.c b/audio/ril_interface.c index cffbbe6..f0832cb 100644 --- a/audio/ril_interface.c +++ b/audio/ril_interface.c @@ -186,12 +186,16 @@ int ril_set_call_volume(struct ril_handle *ril, rc = ril_connect_if_required(ril); if (rc != 0) { + ALOGE("%s: Failed to connect to RIL (%s)", __func__, strerror(rc)); return 0; } rc = SetCallVolume(ril->client, sound_type, (int)(volume * ril->volume_steps_max)); + if (rc != 0) { + ALOGE("%s: SetCallVolume() failed, rc=%d", __func__, rc); + } return rc; } @@ -202,10 +206,14 @@ int ril_set_call_audio_path(struct ril_handle *ril, enum _AudioPath path) rc = ril_connect_if_required(ril); if (rc != 0) { + ALOGE("%s: Failed to connect to RIL (%s)", __func__, strerror(rc)); return 0; } rc = SetCallAudioPath(ril->client, path); + if (rc != 0) { + ALOGE("%s: SetCallAudioPath() failed, rc=%d", __func__, rc); + } return rc; } @@ -217,10 +225,14 @@ int ril_set_call_clock_sync(struct ril_handle *ril, rc = ril_connect_if_required(ril); if (rc != 0) { + ALOGE("%s: Failed to connect to RIL (%s)", __func__, strerror(rc)); return 0; } rc = SetCallClockSync(ril->client, condition); + if (rc != 0) { + ALOGE("%s: SetCallClockSync() failed, rc=%d", __func__, rc); + } return rc; } @@ -231,10 +243,14 @@ int ril_set_mute(struct ril_handle *ril, enum _MuteCondition condition) rc = ril_connect_if_required(ril); if (rc != 0) { + ALOGE("%s: Failed to connect to RIL (%s)", __func__, strerror(rc)); return 0; } rc = SetMute(ril->client, condition); + if (rc != 0) { + ALOGE("%s: SetMute() failed, rc=%d", __func__, rc); + } return rc; } @@ -247,10 +263,14 @@ int ril_set_two_mic_control(struct ril_handle *ril, rc = ril_connect_if_required(ril); if (rc != 0) { + ALOGE("%s: Failed to connect to RIL (%s)", __func__, strerror(rc)); return 0; } rc = SetTwoMicControl(ril->client, device, report); + if (rc != 0) { + ALOGE("%s: SetTwoMicControl() failed, rc=%d", __func__, rc); + } return rc; } -- 2.20.1