hal: Add support to close streams on power policy callback
* Close existing streams during power policy disable callback
* Stop new streams from starting if current policy is in disabled state
Signed-off-by: Shubhasini Sugumaran <quic_c_shubsu@quicinc.com>
Change-Id: I4960e336f03086d1322708e155a4a4f02098b3fb
diff --git a/hal/audio_hw.h b/hal/audio_hw.h
old mode 100755
new mode 100644
index 4169926..ecffc06
--- a/hal/audio_hw.h
+++ b/hal/audio_hw.h
@@ -193,6 +193,10 @@
CARD_STATUS_ONLINE
} card_status_t;
+typedef enum power_policy_status_t {
+ POWER_POLICY_STATUS_OFFLINE,
+ POWER_POLICY_STATUS_ONLINE
+} power_policy_status_t;
/* These are the supported use cases by the hardware.
* Each usecase is mapped to a specific PCM device.
* Refer to pcm_device_table[].
@@ -751,6 +755,8 @@
int snd_card;
card_status_t card_status;
+ power_policy_status_t out_power_policy;
+ power_policy_status_t in_power_policy;
unsigned int cur_codec_backend_samplerate;
unsigned int cur_codec_backend_bit_width;
bool is_channel_status_set;
@@ -845,6 +851,8 @@
int curve;
};
#endif
+void out_set_power_policy(uint8_t enable);
+void in_set_power_policy(uint8_t enable);
int select_devices(struct audio_device *adev,
audio_usecase_t uc_id);