asoc: dsp: ipc: Reduce wait timeout to 1 second

Reduce the amount of time driver waits to get a response from ADSP.
Current wait time in some cases is 5 secconds, which might cause
user space crashes in Android P. So reducing the timeout to
1 second.

CRs-Fixed: 2318751
Change-Id: I6b6789aa5b408659dd57f8f6b017df52d14b28aa
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
diff --git a/dsp/q6adm.c b/dsp/q6adm.c
index d0b9417..d5287a8 100644
--- a/dsp/q6adm.c
+++ b/dsp/q6adm.c
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
  */
 #include <linux/module.h>
 #include <linux/slab.h>
@@ -9,7 +9,6 @@
 #include <linux/jiffies.h>
 #include <linux/uaccess.h>
 #include <linux/atomic.h>
-#include <linux/wait.h>
 #include <sound/asound.h>
 #include <dsp/msm-dts-srs-tm-config.h>
 #include <dsp/apr_audio-v2.h>
@@ -1852,7 +1851,7 @@
 
 	ret = wait_event_timeout(this_adm.adm_wait,
 				 atomic_read(&this_adm.adm_stat) >= 0,
-				 5 * HZ);
+				 msecs_to_jiffies(TIMEOUT_MS));
 	if (!ret) {
 		pr_err("%s: timeout. waited for memory_map\n", __func__);
 		ret = -EINVAL;
@@ -1902,7 +1901,7 @@
 
 	ret = wait_event_timeout(this_adm.adm_wait,
 				 atomic_read(&this_adm.adm_stat) >= 0,
-				 5 * HZ);
+				 msecs_to_jiffies(TIMEOUT_MS));
 	if (!ret) {
 		pr_err("%s: timeout. waited for memory_unmap\n",
 		       __func__);