ipc.c (f80beaf6f2b1eb55fb1b2128a43e0a0c9c4d19de) | ipc.c (1dedbe4f223cac603e871d91133b9aa3136fbc21) |
---|---|
1// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 2// 3// This file is provided under a dual BSD/GPLv2 license. When using or 4// redistributing this file, you may do so under either license. 5// 6// Copyright(c) 2018 Intel Corporation. All rights reserved. 7// 8// Author: Liam Girdwood <liam.r.girdwood@linux.intel.com> --- 170 unchanged lines hidden (view full) --- 179 return NULL; 180 } 181 182 if (!ops->tplg || !ops->tplg->widget || !ops->tplg->control) { 183 dev_err(sdev->dev, "Missing IPC topology ops\n"); 184 return NULL; 185 } 186 | 1// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 2// 3// This file is provided under a dual BSD/GPLv2 license. When using or 4// redistributing this file, you may do so under either license. 5// 6// Copyright(c) 2018 Intel Corporation. All rights reserved. 7// 8// Author: Liam Girdwood <liam.r.girdwood@linux.intel.com> --- 170 unchanged lines hidden (view full) --- 179 return NULL; 180 } 181 182 if (!ops->tplg || !ops->tplg->widget || !ops->tplg->control) { 183 dev_err(sdev->dev, "Missing IPC topology ops\n"); 184 return NULL; 185 } 186 |
187 if (ops->fw_tracing && (!ops->fw_tracing->init || !ops->fw_tracing->suspend || 188 !ops->fw_tracing->resume)) { 189 dev_err(sdev->dev, "Missing firmware tracing ops\n"); 190 return NULL; 191 } 192 |
|
187 return ipc; 188} 189EXPORT_SYMBOL(snd_sof_ipc_init); 190 191void snd_sof_ipc_free(struct snd_sof_dev *sdev) 192{ 193 struct snd_sof_ipc *ipc = sdev->ipc; 194 195 if (!ipc) 196 return; 197 198 /* disable sending of ipc's */ 199 mutex_lock(&ipc->tx_mutex); 200 ipc->disable_ipc_tx = true; 201 mutex_unlock(&ipc->tx_mutex); 202} 203EXPORT_SYMBOL(snd_sof_ipc_free); | 193 return ipc; 194} 195EXPORT_SYMBOL(snd_sof_ipc_init); 196 197void snd_sof_ipc_free(struct snd_sof_dev *sdev) 198{ 199 struct snd_sof_ipc *ipc = sdev->ipc; 200 201 if (!ipc) 202 return; 203 204 /* disable sending of ipc's */ 205 mutex_lock(&ipc->tx_mutex); 206 ipc->disable_ipc_tx = true; 207 mutex_unlock(&ipc->tx_mutex); 208} 209EXPORT_SYMBOL(snd_sof_ipc_free); |