summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVidyakumar Athota <vathota@codeaurora.org>2016-01-04 16:47:34 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-03-10 09:53:40 -0800
commit0a79f2c3a0c921cc1597d6113564d277dde40a72 (patch)
tree3a24b04a75992a3c1e9eb0713a5552cc6a3a9cf5
parentf23619b4c8f57b0e397061197a6ede08ba1efc90 (diff)
downloadandroid_hardware_qcom_audio-0a79f2c3a0c921cc1597d6113564d277dde40a72.tar.gz
android_hardware_qcom_audio-0a79f2c3a0c921cc1597d6113564d277dde40a72.tar.bz2
android_hardware_qcom_audio-0a79f2c3a0c921cc1597d6113564d277dde40a72.zip
hal: reset backend configuration before speaker calibration
For speaker thermal calibration, backend needs to be configured with default sample rate(48kHz). Currently backend configuration does not reset to default value after playback finishes, results in failure of speaker calibration. Fix this issue by resetting the backend configuration to default primary output value before speaker thermal calibration. Change-Id: Id231faf7249506ef668a943b6b12c2738b504a50
-rw-r--r--hal/audio_extn/spkr_protection.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hal/audio_extn/spkr_protection.c b/hal/audio_extn/spkr_protection.c
index a9512a0b..1335ee97 100644
--- a/hal/audio_extn/spkr_protection.c
+++ b/hal/audio_extn/spkr_protection.c
@@ -458,6 +458,8 @@ static int spkr_calibrate(int t0_spk_1, int t0_spk_2)
uc_info_rx->out_snd_device = SND_DEVICE_OUT_SPEAKER_PROTECTED;
disable_rx = true;
list_add_tail(&adev->usecase_list, &uc_info_rx->list);
+ platform_check_and_set_codec_backend_cfg(adev, uc_info_rx,
+ uc_info_rx->out_snd_device);
if (audio_extn_is_vbat_enabled())
enable_snd_device(adev, SND_DEVICE_OUT_SPEAKER_PROTECTED_VBAT);
else