asoc: msm_common: call spf_apm_close_all only once

Add lock to avoid calling spf_apm_close_all twice from
machine driver.

Change-Id: Id5f40b0a5f7c336aa900db5657f5fab198c6e359
This commit is contained in:
Rohit kumar
2022-11-03 11:47:05 +05:30
committed by Ritu Sharma
parent c2adcdf8a0
commit 7047b7ab7f
2 changed files with 25 additions and 24 deletions

View File

@@ -1,13 +1,7 @@
/* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#ifndef _MSM_COMMON_H_
#define _MSM_COMMON_H_
@@ -40,7 +34,7 @@ typedef enum snd_card_status_t {
struct msm_common_pdata {
uint8_t *aud_dev_state;
struct kobject aud_dev_kobj;
uint8_t dsp_sessions_closed;
struct mutex aud_dev_lock;
uint32_t num_aud_devs;
struct device_node *mi2s_gpio_p[MI2S_TDM_AUXPCM_MAX];
struct mutex lock[MI2S_TDM_AUXPCM_MAX];