.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * sst.h - Intel SST Driver for audio engine |
---|
3 | 4 | * |
---|
.. | .. |
---|
7 | 8 | * Dharageswari R <dharageswari.r@intel.com> |
---|
8 | 9 | * KP Jeeja <jeeja.kp@intel.com> |
---|
9 | 10 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
10 | | - * |
---|
11 | | - * This program is free software; you can redistribute it and/or modify |
---|
12 | | - * it under the terms of the GNU General Public License as published by |
---|
13 | | - * the Free Software Foundation; version 2 of the License. |
---|
14 | | - * |
---|
15 | | - * This program is distributed in the hope that it will be useful, but |
---|
16 | | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
17 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
18 | | - * General Public License for more details. |
---|
19 | 11 | * |
---|
20 | 12 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
21 | 13 | * |
---|
.. | .. |
---|
41 | 33 | #define MRFLD_FW_DDR_BASE_OFFSET 0x0 |
---|
42 | 34 | #define MRFLD_FW_FEATURE_BASE_OFFSET 0x4 |
---|
43 | 35 | #define MRFLD_FW_BSS_RESET_BIT 0 |
---|
| 36 | + |
---|
| 37 | +/* SST Shim register map */ |
---|
| 38 | +#define SST_CSR 0x00 |
---|
| 39 | +#define SST_ISRX 0x18 |
---|
| 40 | +#define SST_IMRX 0x28 |
---|
| 41 | +#define SST_IPCX 0x38 /* IPC IA -> SST */ |
---|
| 42 | +#define SST_IPCD 0x40 /* IPC SST -> IA */ |
---|
44 | 43 | |
---|
45 | 44 | extern const struct dev_pm_ops intel_sst_pm; |
---|
46 | 45 | enum sst_states { |
---|
.. | .. |
---|
436 | 435 | }; |
---|
437 | 436 | |
---|
438 | 437 | int sst_realloc_stream(struct intel_sst_drv *sst_drv_ctx, int str_id); |
---|
439 | | -int sst_pause_stream(struct intel_sst_drv *sst_drv_ctx, int id); |
---|
440 | | -int sst_resume_stream(struct intel_sst_drv *sst_drv_ctx, int id); |
---|
441 | | -int sst_drop_stream(struct intel_sst_drv *sst_drv_ctx, int id); |
---|
442 | | -int sst_free_stream(struct intel_sst_drv *sst_drv_ctx, int id); |
---|
| 438 | +int sst_pause_stream(struct intel_sst_drv *sst_drv_ctx, int str_id); |
---|
| 439 | +int sst_resume_stream(struct intel_sst_drv *sst_drv_ctx, int str_id); |
---|
| 440 | +int sst_drop_stream(struct intel_sst_drv *sst_drv_ctx, int str_id); |
---|
| 441 | +int sst_free_stream(struct intel_sst_drv *sst_drv_ctx, int str_id); |
---|
443 | 442 | int sst_start_stream(struct intel_sst_drv *sst_drv_ctx, int str_id); |
---|
444 | | -int sst_send_byte_stream_mrfld(struct intel_sst_drv *ctx, |
---|
445 | | - struct snd_sst_bytes_v2 *sbytes); |
---|
| 443 | +int sst_send_byte_stream_mrfld(struct intel_sst_drv *sst_drv_ctx, |
---|
| 444 | + struct snd_sst_bytes_v2 *bytes); |
---|
446 | 445 | int sst_set_stream_param(int str_id, struct snd_sst_params *str_param); |
---|
447 | 446 | int sst_set_metadata(int str_id, char *params); |
---|
448 | | -int sst_get_stream(struct intel_sst_drv *sst_drv_ctx, |
---|
| 447 | +int sst_get_stream(struct intel_sst_drv *ctx, |
---|
449 | 448 | struct snd_sst_params *str_param); |
---|
450 | 449 | int sst_get_stream_allocated(struct intel_sst_drv *ctx, |
---|
451 | 450 | struct snd_sst_params *str_param, |
---|
452 | 451 | struct snd_sst_lib_download **lib_dnld); |
---|
453 | 452 | int sst_drain_stream(struct intel_sst_drv *sst_drv_ctx, |
---|
454 | 453 | int str_id, bool partial_drain); |
---|
455 | | -int sst_post_message_mrfld(struct intel_sst_drv *ctx, |
---|
456 | | - struct ipc_post *msg, bool sync); |
---|
457 | | -void sst_process_reply_mrfld(struct intel_sst_drv *ctx, struct ipc_post *msg); |
---|
458 | | -int sst_start_mrfld(struct intel_sst_drv *ctx); |
---|
459 | | -int intel_sst_reset_dsp_mrfld(struct intel_sst_drv *ctx); |
---|
460 | | -void intel_sst_clear_intr_mrfld(struct intel_sst_drv *ctx); |
---|
| 454 | +int sst_post_message_mrfld(struct intel_sst_drv *sst_drv_ctx, |
---|
| 455 | + struct ipc_post *ipc_msg, bool sync); |
---|
| 456 | +void sst_process_reply_mrfld(struct intel_sst_drv *sst_drv_ctx, struct ipc_post *msg); |
---|
| 457 | +int sst_start_mrfld(struct intel_sst_drv *sst_drv_ctx); |
---|
| 458 | +int intel_sst_reset_dsp_mrfld(struct intel_sst_drv *sst_drv_ctx); |
---|
| 459 | +void intel_sst_clear_intr_mrfld(struct intel_sst_drv *sst_drv_ctx); |
---|
461 | 460 | |
---|
462 | | -int sst_load_fw(struct intel_sst_drv *ctx); |
---|
| 461 | +int sst_load_fw(struct intel_sst_drv *sst_drv_ctx); |
---|
463 | 462 | int sst_load_library(struct snd_sst_lib_download *lib, u8 ops); |
---|
464 | 463 | void sst_post_download_mrfld(struct intel_sst_drv *ctx); |
---|
465 | 464 | int sst_get_block_stream(struct intel_sst_drv *sst_drv_ctx); |
---|
466 | | -void sst_memcpy_free_resources(struct intel_sst_drv *ctx); |
---|
| 465 | +void sst_memcpy_free_resources(struct intel_sst_drv *sst_drv_ctx); |
---|
467 | 466 | |
---|
468 | 467 | int sst_wait_interruptible(struct intel_sst_drv *sst_drv_ctx, |
---|
469 | 468 | struct sst_block *block); |
---|
.. | .. |
---|
498 | 497 | bool large, bool fill_dsp, bool sync, bool response); |
---|
499 | 498 | |
---|
500 | 499 | void sst_process_pending_msg(struct work_struct *work); |
---|
501 | | -int sst_assign_pvt_id(struct intel_sst_drv *sst_drv_ctx); |
---|
| 500 | +int sst_assign_pvt_id(struct intel_sst_drv *drv); |
---|
502 | 501 | int sst_validate_strid(struct intel_sst_drv *sst_drv_ctx, int str_id); |
---|
503 | 502 | struct stream_info *get_stream_info(struct intel_sst_drv *sst_drv_ctx, |
---|
504 | 503 | int str_id); |
---|