From 6be85d4cabb4419516dc53212e36d746190ad4e9 Mon Sep 17 00:00:00 2001 From: Deru Wang Date: Fri, 28 Aug 2020 13:45:30 +0800 Subject: [PATCH] dsp: add new boot cmd for early audio The schedule_work of adsp loader boot will block machine driver probing need add new boot cmd without schedule_work to accelerate early audio. Change-Id: I5d344c56ef19985fca9d047687f4ea96a879dc27 Signed-off-by: Deru Wang --- dsp/adsp-loader.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dsp/adsp-loader.c b/dsp/adsp-loader.c index b74c9b5f5d76..ee0c7fd7e6d8 100755 --- a/dsp/adsp-loader.c +++ b/dsp/adsp-loader.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2012-2014, 2017-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2014, 2017-2021, The Linux Foundation. All rights reserved. */ #include @@ -24,6 +24,7 @@ #define SSR_RESET_CMD 1 #define IMAGE_UNLOAD_CMD 0 #define MAX_FW_IMAGES 4 +#define BOOT_FOR_EARLY_CHIME_CMD 2 static ssize_t adsp_boot_store(struct kobject *kobj, struct kobj_attribute *attr, @@ -260,7 +261,11 @@ static ssize_t adsp_boot_store(struct kobject *kobj, } else if (boot == IMAGE_UNLOAD_CMD) { pr_debug("%s: going to call adsp_unloader\n", __func__); adsp_loader_unload(adsp_private); + } else if (boot == BOOT_FOR_EARLY_CHIME_CMD) { + pr_debug("%s: going to call adsp_load_fw\n", __func__); + adsp_load_fw(NULL); } + return count; }