hal: fix mutex unlock issue

If a audio/voice usecase is active, hal should re-try the speaker
calibration.Speaker portection mutex was not being unlocked for this
usecase which causes ANR.Change unlocks the mutex which fixes the issue.

CRs-fixed: 671620
Change-Id: Ic29697e29e96dba784941f4e29664b8c10f51e84
This commit is contained in:
Gopikrishnaiah Anandan 2014-05-28 13:11:51 -07:00 committed by Gerrit - the friendly Code Review server
parent d6c4d2cfd7
commit 28e9ed3b2f
1 changed files with 4 additions and 1 deletions

View File

@ -544,8 +544,11 @@ static void* spkr_calibration_thread(void *context)
}
goahead = true;
}
if (!list_empty(&adev->usecase_list))
if (!list_empty(&adev->usecase_list)) {
ALOGD("%s: Usecase active re-try calibration", __func__);
goahead = false;
pthread_mutex_unlock(&handle.mutex_spkr_prot);
}
if (goahead) {
int status;
status = spkr_calibrate(t0);