ASoC: wm2200: Provide initial coefficient loading
[deliverable/linux.git] / sound / soc / codecs / wmfw.h
CommitLineData
e10f8711
MB
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
18struct wmfw_header {
19 char magic[4];
20 __le32 len;
21 __le16 rev;
22 u8 core;
23 u8 ver;
24} __packed;
25
26struct wmfw_footer {
27 __le64 timestamp;
28 __le32 checksum;
29} __packed;
30
31struct wmfw_adsp1_sizes {
32 __le32 dm;
33 __le32 pm;
34 __le32 zm;
35} __packed;
36
37struct wmfw_region {
38 union {
39 __be32 type;
40 __le32 offset;
41 };
42 __le32 len;
43 u8 data[];
44} __packed;
45
6e87badd
MB
46struct wmfw_id_hdr {
47 __be32 core_id;
48 __be32 core_rev;
49 __be32 id;
50 __be32 ver;
51} __packed;
52
53struct wmfw_adsp1_id_hdr {
54 struct wmfw_id_hdr fw;
55 __be32 zm;
56 __be32 dm;
57 __be32 algs;
58} __packed;
59
60struct wmfw_alg_hdr {
61 __be32 id;
62 __be32 ver;
63} __packed;
64
65struct wmfw_adsp1_alg_hdr {
66 struct wmfw_alg_hdr alg;
67 __be32 zm;
68 __be32 dm;
69} __packed;
70
71struct wmfw_coeff_hdr {
72 u8 magic[4];
73 __le32 len;
74 __le32 ver;
75 u8 data[];
76} __packed;
77
78struct wmfw_coeff_item {
79 union {
80 __be32 type;
81 __le32 offset;
82 };
83 __le32 id;
84 __le32 ver;
85 __le32 sr;
86 __le32 len;
87 u8 data[];
88} __packed;
e10f8711
MB
89#define WMFW_ADSP1 1
90
91#define WMFW_ABSOLUTE 0xf0
92#define WMFW_NAME_TEXT 0xfe
93#define WMFW_INFO_TEXT 0xff
94
95#define WMFW_ADSP1_PM 2
96#define WMFW_ADSP1_DM 3
97#define WMFW_ADSP1_ZM 4
98
99#endif
This page took 0.028916 seconds and 5 git commands to generate.