forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/sound/soc/codecs/wmfw.h
....@@ -1,13 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * wmfw.h - Wolfson firmware format information
34 *
45 * Copyright 2012 Wolfson Microelectronics plc
56 *
67 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License version 2 as
10
- * published by the Free Software Foundation.
118 */
129
1310 #ifndef __WMFW_H
....@@ -73,6 +70,14 @@
7370 __be32 ver;
7471 } __packed;
7572
73
+struct wmfw_v3_id_hdr {
74
+ __be32 core_id;
75
+ __be32 block_rev;
76
+ __be32 vendor_id;
77
+ __be32 id;
78
+ __be32 ver;
79
+} __packed;
80
+
7681 struct wmfw_adsp1_id_hdr {
7782 struct wmfw_id_hdr fw;
7883 __be32 zm;
....@@ -85,6 +90,15 @@
8590 __be32 zm;
8691 __be32 xm;
8792 __be32 ym;
93
+ __be32 n_algs;
94
+} __packed;
95
+
96
+struct wmfw_halo_id_hdr {
97
+ struct wmfw_v3_id_hdr fw;
98
+ __be32 xm_base;
99
+ __be32 xm_size;
100
+ __be32 ym_base;
101
+ __be32 ym_size;
88102 __be32 n_algs;
89103 } __packed;
90104
....@@ -104,6 +118,14 @@
104118 __be32 zm;
105119 __be32 xm;
106120 __be32 ym;
121
+} __packed;
122
+
123
+struct wmfw_halo_alg_hdr {
124
+ struct wmfw_alg_hdr alg;
125
+ __be32 xm_base;
126
+ __be32 xm_size;
127
+ __be32 ym_base;
128
+ __be32 ym_size;
107129 } __packed;
108130
109131 struct wmfw_adsp_alg_data {
....@@ -154,9 +176,11 @@
154176
155177 #define WMFW_ADSP1 1
156178 #define WMFW_ADSP2 2
179
+#define WMFW_HALO 4
157180
158181 #define WMFW_ABSOLUTE 0xf0
159182 #define WMFW_ALGORITHM_DATA 0xf2
183
+#define WMFW_METADATA 0xfc
160184 #define WMFW_NAME_TEXT 0xfe
161185 #define WMFW_INFO_TEXT 0xff
162186
....@@ -169,4 +193,8 @@
169193 #define WMFW_ADSP2_XM 5
170194 #define WMFW_ADSP2_YM 6
171195
196
+#define WMFW_HALO_PM_PACKED 0x10
197
+#define WMFW_HALO_XM_PACKED 0x11
198
+#define WMFW_HALO_YM_PACKED 0x12
199
+
172200 #endif