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
diff --git a/hal/audio_extn/spkr_protection.c b/hal/audio_extn/spkr_protection.c
index a9512a0..1335ee9 100644
--- a/hal/audio_extn/spkr_protection.c
+++ b/hal/audio_extn/spkr_protection.c
@@ -458,6 +458,8 @@
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