forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/sound/soc/intel/atom/sst/sst.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * sst.h - Intel SST Driver for audio engine
34 *
....@@ -7,15 +8,6 @@
78 * Dharageswari R <dharageswari.r@intel.com>
89 * KP Jeeja <jeeja.kp@intel.com>
910 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.
1911 *
2012 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2113 *
....@@ -41,6 +33,13 @@
4133 #define MRFLD_FW_DDR_BASE_OFFSET 0x0
4234 #define MRFLD_FW_FEATURE_BASE_OFFSET 0x4
4335 #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 */
4443
4544 extern const struct dev_pm_ops intel_sst_pm;
4645 enum sst_states {
....@@ -436,34 +435,34 @@
436435 };
437436
438437 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);
443442 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);
446445 int sst_set_stream_param(int str_id, struct snd_sst_params *str_param);
447446 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,
449448 struct snd_sst_params *str_param);
450449 int sst_get_stream_allocated(struct intel_sst_drv *ctx,
451450 struct snd_sst_params *str_param,
452451 struct snd_sst_lib_download **lib_dnld);
453452 int sst_drain_stream(struct intel_sst_drv *sst_drv_ctx,
454453 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);
461460
462
-int sst_load_fw(struct intel_sst_drv *ctx);
461
+int sst_load_fw(struct intel_sst_drv *sst_drv_ctx);
463462 int sst_load_library(struct snd_sst_lib_download *lib, u8 ops);
464463 void sst_post_download_mrfld(struct intel_sst_drv *ctx);
465464 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);
467466
468467 int sst_wait_interruptible(struct intel_sst_drv *sst_drv_ctx,
469468 struct sst_block *block);
....@@ -498,7 +497,7 @@
498497 bool large, bool fill_dsp, bool sync, bool response);
499498
500499 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);
502501 int sst_validate_strid(struct intel_sst_drv *sst_drv_ctx, int str_id);
503502 struct stream_info *get_stream_info(struct intel_sst_drv *sst_drv_ctx,
504503 int str_id);