asoc: lpass-cdc: add put_autosuspend to pair with pm_runtime_get_sync

When reading/writing lpass codec registers, pm_runtime_put_autosuspend
is missed when vote fails and it causes device fails suspending after
ssr. Add pm_runtime_put_autosuspend to pair with pm_runtime_get_sync.
When LPASS_CDC_MACRO_EVT_PRE_SSR_UP comes, core vote is needed before
resetting GFMUX reg and dev_up is not set to true yet. Add pre_dev_up
flag to indicate PRE_SSR_UP and be used in lpass_cdc_check_core_votes
to avoid false alarm.

Change-Id: Ic12ecd9645f291078e32f4921f9f77c2d85e4b8c
Signed-off-by: Meng Wang <mengw@codeaurora.org>
这个提交包含在:
Meng Wang
2021-07-28 17:09:38 +08:00
提交者 Gerrit - the friendly Code Review server
父节点 043966829b
当前提交 a8bd9abc48
修改 3 个文件,包含 13 行新增8 行删除

查看文件

@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
/* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
*/
#ifndef _LPASS_CDC_INTERNAL_H
@@ -56,6 +56,7 @@ struct lpass_cdc_priv {
bool va_without_decimation;
bool macros_supported[MAX_MACRO];
bool dev_up;
bool pre_dev_up;
bool initial_boot;
struct macro_ops macro_params[MAX_MACRO];
struct snd_soc_dai_driver *lpass_cdc_dais;