audio: enable speaker protection for speaker-safe
enable speaker protection for speaker-safe
Bug: 71526853
Change-Id: If47cf68fa2d7e273c6cbba031145b1a60c175607
Signed-off-by: kevinshhsu <KevinSHHsu@fih-foxconn.com>
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 47d7a0e..77081c7 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -629,6 +629,7 @@
audio_extn_dsm_feedback_enable(adev, snd_device, true);
if ((snd_device == SND_DEVICE_OUT_SPEAKER ||
+ snd_device == SND_DEVICE_OUT_SPEAKER_SAFE ||
snd_device == SND_DEVICE_OUT_VOICE_SPEAKER) &&
audio_extn_spkr_prot_is_enabled()) {
if (audio_extn_spkr_prot_get_acdb_id(snd_device) < 0) {
@@ -683,6 +684,7 @@
if (adev->snd_dev_ref_cnt[snd_device] == 0) {
audio_extn_dsm_feedback_enable(adev, snd_device, false);
if ((snd_device == SND_DEVICE_OUT_SPEAKER ||
+ snd_device == SND_DEVICE_OUT_SPEAKER_SAFE ||
snd_device == SND_DEVICE_OUT_SPEAKER_REVERSE ||
snd_device == SND_DEVICE_OUT_VOICE_SPEAKER) &&
audio_extn_spkr_prot_is_enabled()) {