| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * skl-sst-dsp.c - SKL SST library generic function |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 5 | 6 | * Author:Rafal Redzimski <rafal.f.redzimski@intel.com> |
|---|
| 6 | 7 | * Jeeja KP <jeeja.kp@intel.com> |
|---|
| 7 | 8 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 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. |
|---|
| 17 | 9 | */ |
|---|
| 18 | 10 | #include <sound/pcm.h> |
|---|
| 19 | 11 | |
|---|
| 20 | 12 | #include "../common/sst-dsp.h" |
|---|
| 21 | 13 | #include "../common/sst-ipc.h" |
|---|
| 22 | 14 | #include "../common/sst-dsp-priv.h" |
|---|
| 23 | | -#include "skl-sst-ipc.h" |
|---|
| 15 | +#include "skl.h" |
|---|
| 24 | 16 | |
|---|
| 25 | 17 | /* various timeout values */ |
|---|
| 26 | 18 | #define SKL_DSP_PU_TO 50 |
|---|
| .. | .. |
|---|
| 41 | 33 | */ |
|---|
| 42 | 34 | void skl_dsp_init_core_state(struct sst_dsp *ctx) |
|---|
| 43 | 35 | { |
|---|
| 44 | | - struct skl_sst *skl = ctx->thread_context; |
|---|
| 36 | + struct skl_dev *skl = ctx->thread_context; |
|---|
| 45 | 37 | int i; |
|---|
| 46 | 38 | |
|---|
| 47 | 39 | skl->cores.state[SKL_DSP_CORE0_ID] = SKL_DSP_RUNNING; |
|---|
| .. | .. |
|---|
| 56 | 48 | /* Get the mask for all enabled cores */ |
|---|
| 57 | 49 | unsigned int skl_dsp_get_enabled_cores(struct sst_dsp *ctx) |
|---|
| 58 | 50 | { |
|---|
| 59 | | - struct skl_sst *skl = ctx->thread_context; |
|---|
| 51 | + struct skl_dev *skl = ctx->thread_context; |
|---|
| 60 | 52 | unsigned int core_mask, en_cores_mask; |
|---|
| 61 | 53 | u32 val; |
|---|
| 62 | 54 | |
|---|
| .. | .. |
|---|
| 343 | 335 | */ |
|---|
| 344 | 336 | int skl_dsp_get_core(struct sst_dsp *ctx, unsigned int core_id) |
|---|
| 345 | 337 | { |
|---|
| 346 | | - struct skl_sst *skl = ctx->thread_context; |
|---|
| 338 | + struct skl_dev *skl = ctx->thread_context; |
|---|
| 347 | 339 | int ret = 0; |
|---|
| 348 | 340 | |
|---|
| 349 | 341 | if (core_id >= skl->cores.count) { |
|---|
| .. | .. |
|---|
| 372 | 364 | |
|---|
| 373 | 365 | int skl_dsp_put_core(struct sst_dsp *ctx, unsigned int core_id) |
|---|
| 374 | 366 | { |
|---|
| 375 | | - struct skl_sst *skl = ctx->thread_context; |
|---|
| 367 | + struct skl_dev *skl = ctx->thread_context; |
|---|
| 376 | 368 | int ret = 0; |
|---|
| 377 | 369 | |
|---|
| 378 | 370 | if (core_id >= skl->cores.count) { |
|---|
| .. | .. |
|---|
| 430 | 422 | |
|---|
| 431 | 423 | /* Initialise SST Audio DSP */ |
|---|
| 432 | 424 | if (sst->ops->init) { |
|---|
| 433 | | - ret = sst->ops->init(sst, NULL); |
|---|
| 425 | + ret = sst->ops->init(sst); |
|---|
| 434 | 426 | if (ret < 0) |
|---|
| 435 | 427 | return NULL; |
|---|
| 436 | 428 | } |
|---|