diff options
author | Fred Oh <fred@codeaurora.org> | 2015-03-04 18:42:34 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-03-22 04:04:42 -0700 |
commit | 43140836810e478e3ad820b0c4083d8d46676d4c (patch) | |
tree | 61f0e9435257f1d5370d52095db9590e4542c943 | |
parent | 9aa82b84736a559c0d4eecc29a5eb1b2e75c7f5b (diff) | |
download | android_hardware_qcom_audio-43140836810e478e3ad820b0c4083d8d46676d4c.tar.gz android_hardware_qcom_audio-43140836810e478e3ad820b0c4083d8d46676d4c.tar.bz2 android_hardware_qcom_audio-43140836810e478e3ad820b0c4083d8d46676d4c.zip |
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
-rw-r--r-- | hal/audio_hw.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hal/audio_hw.c b/hal/audio_hw.c index 864a2a5b..506e1454 100644 --- a/hal/audio_hw.c +++ b/hal/audio_hw.c @@ -1478,6 +1478,14 @@ int start_output_stream(struct stream_out *out) 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); + } + #ifdef DS1_DOLBY_DDP_ENABLED if (audio_extn_is_dolby_format(out->format)) audio_extn_dolby_send_ddp_endp_params(adev); |