ASoC: wm8962: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
[deliverable/linux.git] / sound / soc / codecs / wmfw.h
1 /*
2 * wmfw.h - Wolfson firmware format information
3 *
4 * Copyright 2012 Wolfson Microelectronics plc
5 *
6 * 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.
11 */
12
13 #ifndef __WMFW_H
14 #define __WMFW_H
15
16 #include <linux/types.h>
17
18 struct wmfw_header {
19 char magic[4];
20 __le32 len;
21 __le16 rev;
22 u8 core;
23 u8 ver;
24 } __packed;
25
26 struct wmfw_footer {
27 __le64 timestamp;
28 __le32 checksum;
29 } __packed;
30
31 struct wmfw_adsp1_sizes {
32 __le32 dm;
33 __le32 pm;
34 __le32 zm;
35 } __packed;
36
37 struct wmfw_adsp2_sizes {
38 __le32 xm;
39 __le32 ym;
40 __le32 pm;
41 __le32 zm;
42 } __packed;
43
44 struct wmfw_region {
45 union {
46 __be32 type;
47 __le32 offset;
48 };
49 __le32 len;
50 u8 data[];
51 } __packed;
52
53 struct wmfw_id_hdr {
54 __be32 core_id;
55 __be32 core_rev;
56 __be32 id;
57 __be32 ver;
58 } __packed;
59
60 struct wmfw_adsp1_id_hdr {
61 struct wmfw_id_hdr fw;
62 __be32 zm;
63 __be32 dm;
64 __be32 algs;
65 } __packed;
66
67 struct wmfw_adsp2_id_hdr {
68 struct wmfw_id_hdr fw;
69 __be32 zm;
70 __be32 xm;
71 __be32 ym;
72 __be32 algs;
73 } __packed;
74
75 struct wmfw_alg_hdr {
76 __be32 id;
77 __be32 ver;
78 } __packed;
79
80 struct wmfw_adsp1_alg_hdr {
81 struct wmfw_alg_hdr alg;
82 __be32 zm;
83 __be32 dm;
84 } __packed;
85
86 struct wmfw_adsp2_alg_hdr {
87 struct wmfw_alg_hdr alg;
88 __be32 zm;
89 __be32 xm;
90 __be32 ym;
91 } __packed;
92
93 struct wmfw_coeff_hdr {
94 u8 magic[4];
95 __le32 len;
96 union {
97 __be32 rev;
98 __le32 ver;
99 };
100 union {
101 __be32 core;
102 __le32 core_ver;
103 };
104 u8 data[];
105 } __packed;
106
107 struct wmfw_coeff_item {
108 __le16 offset;
109 __le16 type;
110 __le32 id;
111 __le32 ver;
112 __le32 sr;
113 __le32 len;
114 u8 data[];
115 } __packed;
116
117 #define WMFW_ADSP1 1
118 #define WMFW_ADSP2 2
119
120 #define WMFW_ABSOLUTE 0xf0
121 #define WMFW_NAME_TEXT 0xfe
122 #define WMFW_INFO_TEXT 0xff
123
124 #define WMFW_ADSP1_PM 2
125 #define WMFW_ADSP1_DM 3
126 #define WMFW_ADSP1_ZM 4
127
128 #define WMFW_ADSP2_PM 2
129 #define WMFW_ADSP2_ZM 4
130 #define WMFW_ADSP2_XM 5
131 #define WMFW_ADSP2_YM 6
132
133 #endif
This page took 0.032235 seconds and 5 git commands to generate.