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>
This commit is contained in:

committed by
Meng Wang

vanhempi
63f4815535
commit
0fcf2af3df
@@ -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 @@ static int adm_memory_map_regions(phys_addr_t *buf_add, uint32_t mempool_id,
|
||||
|
||||
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 @@ static int adm_memory_unmap_regions(void)
|
||||
|
||||
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__);
|
||||
|
Viittaa uudesa ongelmassa
Block a user