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
This commit is contained in:
Vidyakumar Athota 2016-01-04 16:47:34 -08:00 committed by Gerrit - the friendly Code Review server
parent f23619b4c8
commit 0a79f2c3a0
1 changed files with 2 additions and 0 deletions

View File

@ -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