1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * wmfw.h - Wolfson firmware format information
5 * Copyright 2012 Wolfson Microelectronics plc
7 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 #include <linux/types.h>
15 #define WMFW_MAX_ALG_NAME 256
16 #define WMFW_MAX_ALG_DESCR_NAME 256
18 #define WMFW_MAX_COEFF_NAME 256
19 #define WMFW_MAX_COEFF_DESCR_NAME 256
21 #define WMFW_CTL_FLAG_SYS 0x8000
22 #define WMFW_CTL_FLAG_VOLATILE 0x0004
23 #define WMFW_CTL_FLAG_WRITEABLE 0x0002
24 #define WMFW_CTL_FLAG_READABLE 0x0001
26 /* Non-ALSA coefficient types start at 0x1000 */
27 #define WMFW_CTL_TYPE_ACKED 0x1000 /* acked control */
28 #define WMFW_CTL_TYPE_HOSTEVENT 0x1001 /* event control */
29 #define WMFW_CTL_TYPE_HOST_BUFFER 0x1002 /* host buffer pointer */
44 struct wmfw_adsp1_sizes
{
50 struct wmfw_adsp2_sizes
{
73 struct wmfw_v3_id_hdr
{
81 struct wmfw_adsp1_id_hdr
{
82 struct wmfw_id_hdr fw
;
88 struct wmfw_adsp2_id_hdr
{
89 struct wmfw_id_hdr fw
;
96 struct wmfw_halo_id_hdr
{
97 struct wmfw_v3_id_hdr fw
;
105 struct wmfw_alg_hdr
{
110 struct wmfw_adsp1_alg_hdr
{
111 struct wmfw_alg_hdr alg
;
116 struct wmfw_adsp2_alg_hdr
{
117 struct wmfw_alg_hdr alg
;
123 struct wmfw_halo_alg_hdr
{
124 struct wmfw_alg_hdr alg
;
131 struct wmfw_adsp_alg_data
{
133 u8 name
[WMFW_MAX_ALG_NAME
];
134 u8 descr
[WMFW_MAX_ALG_DESCR_NAME
];
139 struct wmfw_adsp_coeff_data
{
145 u8 name
[WMFW_MAX_COEFF_NAME
];
146 u8 descr
[WMFW_MAX_COEFF_DESCR_NAME
];
153 struct wmfw_coeff_hdr
{
167 struct wmfw_coeff_item
{
181 #define WMFW_ABSOLUTE 0xf0
182 #define WMFW_ALGORITHM_DATA 0xf2
183 #define WMFW_NAME_TEXT 0xfe
184 #define WMFW_INFO_TEXT 0xff
186 #define WMFW_ADSP1_PM 2
187 #define WMFW_ADSP1_DM 3
188 #define WMFW_ADSP1_ZM 4
190 #define WMFW_ADSP2_PM 2
191 #define WMFW_ADSP2_ZM 4
192 #define WMFW_ADSP2_XM 5
193 #define WMFW_ADSP2_YM 6
195 #define WMFW_HALO_PM_PACKED 0x10
196 #define WMFW_HALO_XM_PACKED 0x11
197 #define WMFW_HALO_YM_PACKED 0x12