forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/sound/soc/intel/skylake/skl-sst-dsp.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * skl-sst-dsp.c - SKL SST library generic function
34 *
....@@ -5,22 +6,13 @@
56 * Author:Rafal Redzimski <rafal.f.redzimski@intel.com>
67 * Jeeja KP <jeeja.kp@intel.com>
78 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as version 2, as
11
- * published by the Free Software Foundation.
12
- *
13
- * This program is distributed in the hope that it will be useful, but
14
- * WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
- * General Public License for more details.
179 */
1810 #include <sound/pcm.h>
1911
2012 #include "../common/sst-dsp.h"
2113 #include "../common/sst-ipc.h"
2214 #include "../common/sst-dsp-priv.h"
23
-#include "skl-sst-ipc.h"
15
+#include "skl.h"
2416
2517 /* various timeout values */
2618 #define SKL_DSP_PU_TO 50
....@@ -41,7 +33,7 @@
4133 */
4234 void skl_dsp_init_core_state(struct sst_dsp *ctx)
4335 {
44
- struct skl_sst *skl = ctx->thread_context;
36
+ struct skl_dev *skl = ctx->thread_context;
4537 int i;
4638
4739 skl->cores.state[SKL_DSP_CORE0_ID] = SKL_DSP_RUNNING;
....@@ -56,7 +48,7 @@
5648 /* Get the mask for all enabled cores */
5749 unsigned int skl_dsp_get_enabled_cores(struct sst_dsp *ctx)
5850 {
59
- struct skl_sst *skl = ctx->thread_context;
51
+ struct skl_dev *skl = ctx->thread_context;
6052 unsigned int core_mask, en_cores_mask;
6153 u32 val;
6254
....@@ -343,7 +335,7 @@
343335 */
344336 int skl_dsp_get_core(struct sst_dsp *ctx, unsigned int core_id)
345337 {
346
- struct skl_sst *skl = ctx->thread_context;
338
+ struct skl_dev *skl = ctx->thread_context;
347339 int ret = 0;
348340
349341 if (core_id >= skl->cores.count) {
....@@ -372,7 +364,7 @@
372364
373365 int skl_dsp_put_core(struct sst_dsp *ctx, unsigned int core_id)
374366 {
375
- struct skl_sst *skl = ctx->thread_context;
367
+ struct skl_dev *skl = ctx->thread_context;
376368 int ret = 0;
377369
378370 if (core_id >= skl->cores.count) {
....@@ -430,7 +422,7 @@
430422
431423 /* Initialise SST Audio DSP */
432424 if (sst->ops->init) {
433
- ret = sst->ops->init(sst, NULL);
425
+ ret = sst->ops->init(sst);
434426 if (ret < 0)
435427 return NULL;
436428 }