hal: set maximum polling time to 1000 ms
Since small bufs uses blocking writes, a write will be blocked for
the default max poll time (20s) in the event of an SSR.Reduce the poll
time to observe and deal with SSR faster.
Change-Id: I8693a55596bc9578f9b5a04469d12155f191dcf1
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 038c8e7..9db7ed5 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -1546,6 +1546,14 @@
if (out->offload_callback)
compress_nonblock(out->compr, out->non_blocking);
+ /* Since small bufs uses blocking writes, a write will be blocked
+ for the default max poll time (20s) in the event of an SSR.
+ Reduce the poll time to observe and deal with SSR faster.
+ */
+ if (out->use_small_bufs) {
+ compress_set_max_poll_wait(out->compr, 1000);
+ }
+
audio_extn_dts_create_state_notifier_node(out->usecase);
audio_extn_dts_notify_playback_state(out->usecase, 0, out->sample_rate,
popcount(out->channel_mask),