summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRavi Kumar Alamanda <ralama@codeaurora.org>2015-09-03 05:57:53 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-09-03 05:57:53 +0000
commit2a70f594de316b72af9cbbcda8adfcadc33bf4da (patch)
tree20f014e6e64f66e06fbf9749545d50b6ddf045e1
parentcc64df8ed2804c204bfb3c6202498755835336d6 (diff)
parent5a95ff689b4a1827488d576f02b6292e4318abb2 (diff)
downloadandroid_hardware_qcom_audio-2a70f594de316b72af9cbbcda8adfcadc33bf4da.tar.gz
android_hardware_qcom_audio-2a70f594de316b72af9cbbcda8adfcadc33bf4da.tar.bz2
android_hardware_qcom_audio-2a70f594de316b72af9cbbcda8adfcadc33bf4da.zip
am 5a95ff68: hal: Fix incorrect audio calibration after device switch
* commit '5a95ff689b4a1827488d576f02b6292e4318abb2': hal: Fix incorrect audio calibration after device switch
-rw-r--r--hal/audio_hw.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 70ce0dc3..86072c0c 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -308,6 +308,8 @@ int enable_snd_device(struct audio_device *adev,
return -EINVAL;
}
+ platform_send_audio_calibration(adev->platform, snd_device);
+
adev->snd_dev_ref_cnt[snd_device]++;
if (adev->snd_dev_ref_cnt[snd_device] > 1) {
ALOGV("%s: snd_device(%d: %s) is already active",
@@ -323,13 +325,6 @@ int enable_snd_device(struct audio_device *adev,
if (audio_extn_spkr_prot_is_enabled())
audio_extn_spkr_prot_calib_cancel(adev);
- if (platform_send_audio_calibration(adev->platform, snd_device) < 0) {
- adev->snd_dev_ref_cnt[snd_device]--;
- audio_extn_sound_trigger_update_device_status(snd_device,
- ST_EVENT_SND_DEVICE_FREE);
- return -EINVAL;
- }
-
audio_extn_dsm_feedback_enable(adev, snd_device, true);
if ((snd_device == SND_DEVICE_OUT_SPEAKER ||