mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
audio-kernel: Reset client info on deregister.
For elite and audioreach co-exit, we need keep source file same. This patch exit in audioreach but not included in elite, cp it to keep file same. Leveraged from audio-ar commit id ac15eb7016aff23a2be2a57289635d741cb95340 Change-Id: I187909403e9b54c8f6836477208de5e8311bf4ff Signed-off-by: Kogara Naveen Kumar <quic_nkogara@quicinc.com>
This commit is contained in:
parent
282aeeb375
commit
2283a81ea0
1 changed files with 14 additions and 4 deletions
|
|
@ -1,6 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2018, 2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
|
|
@ -233,6 +234,9 @@ int snd_event_client_deregister(struct device *dev)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
dev_dbg(dev, "%s: removing client to SND event FW \n",
|
||||
__func__);
|
||||
|
||||
mutex_lock(&snd_event_mutex);
|
||||
if (list_empty(&snd_event_client_list)) {
|
||||
dev_dbg(dev, "%s: No SND client registered\n", __func__);
|
||||
|
|
@ -249,7 +253,7 @@ int snd_event_client_deregister(struct device *dev)
|
|||
|
||||
c->state = false;
|
||||
|
||||
if (master && master->clients_found) {
|
||||
if (master) {
|
||||
struct snd_event_client *d;
|
||||
bool dev_found = false;
|
||||
|
||||
|
|
@ -260,9 +264,12 @@ int snd_event_client_deregister(struct device *dev)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (dev_found) {
|
||||
ret = check_and_update_fwk_state();
|
||||
master->clients_found = false;
|
||||
if (dev_found ) {
|
||||
if(master->clients_found) {
|
||||
ret = check_and_update_fwk_state();
|
||||
master->clients_found = false;
|
||||
}
|
||||
master->clients->cl_arr[i].dev = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -465,6 +472,9 @@ int snd_event_notify(struct device *dev, unsigned int state)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
dev_dbg(dev, "%s: snd_event_notify (state %u)\n",
|
||||
__func__, state);
|
||||
|
||||
mutex_lock(&snd_event_mutex);
|
||||
if (list_empty(&snd_event_client_list) && !master) {
|
||||
dev_err(dev, "%s: No device registered\n", __func__);
|
||||
|
|
|
|||
Loading…
Reference in a new issue