summaryrefslogtreecommitdiffstats
path: root/hal
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2015-04-06 19:24:18 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2015-04-06 19:24:18 -0700
commit16b2dd39c49de253e5d9d774ca44ce8ebe44d903 (patch)
tree84c26456f2bab2fbcf25391f28db631f86a5babf /hal
parent272f969a43ba794c812723aa84496dea23c513d2 (diff)
parent76440ba8538ec32f33a77d21dbe2627a5669869d (diff)
downloadandroid_hardware_qcom_audio-16b2dd39c49de253e5d9d774ca44ce8ebe44d903.tar.gz
android_hardware_qcom_audio-16b2dd39c49de253e5d9d774ca44ce8ebe44d903.tar.bz2
android_hardware_qcom_audio-16b2dd39c49de253e5d9d774ca44ce8ebe44d903.zip
Merge "hal: Fix ANR if In-Call recording is started at end of voice call"
Diffstat (limited to 'hal')
-rw-r--r--hal/voice.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/hal/voice.c b/hal/voice.c
index 5bc0a4e6..01158ddb 100644
--- a/hal/voice.c
+++ b/hal/voice.c
@@ -293,6 +293,18 @@ int voice_check_and_set_incall_rec_usecase(struct audio_device *adev,
session_id, rec_mode);
ALOGV("%s: Update usecase to %d",__func__, in->usecase);
} else {
+ /*
+ * Reject the recording instances, where the recording is started
+ * with In-call voice recording source types but voice call is not
+ * active by the time input is started
+ */
+ if ((in->source == AUDIO_SOURCE_VOICE_UPLINK) ||
+ (in->source == AUDIO_SOURCE_VOICE_DOWNLINK) ||
+ (in->source == AUDIO_SOURCE_VOICE_CALL)) {
+ ret = -EINVAL;
+ ALOGE("%s: As voice call is not active, Incall rec usecase can't be \
+ selected for requested source:%d",__func__, in->source);
+ }
ALOGV("%s: voice call not active", __func__);
}