HAL: CS35L36: Add support for speaker protection
This patch adds the audio HAL extension hook for supporting per-device
speaker calibration file loading as well as enabling hostless pcm stream
needed for the ADSP to obtain I/V/VP feedback from the CS35L36 boosted
amplifier codec.
Bug: 69005593
Test: Run cirrus_sp_status test tool on B1 P1.1
Change-Id: I511818fee7d15327619fec6d17b8fe55d54f1866
Signed-off-by: David Lin <dtwlin@google.com>
diff --git a/hal/Android.mk b/hal/Android.mk
index 58a79fb..ff1cf2b 100644
--- a/hal/Android.mk
+++ b/hal/Android.mk
@@ -150,6 +150,11 @@
LOCAL_SRC_FILES += audio_extn/spkr_protection.c
endif
+ifeq ($(strip $(AUDIO_FEATURE_ENABLED_CIRRUS_SPKR_PROTECTION)),true)
+ LOCAL_CFLAGS += -DSPKR_PROT_ENABLED
+ LOCAL_SRC_FILES += audio_extn/cirrus_playback.c
+endif
+
ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DSM_FEEDBACK)),true)
LOCAL_CFLAGS += -DDSM_FEEDBACK_ENABLED
LOCAL_SRC_FILES += audio_extn/dsm_feedback.c