~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/soc/codecs/wmfw.h

Version: ~ [ linux-5.3 ] ~ [ linux-5.2.14 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.72 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.143 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.192 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.192 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.73 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  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 #define WMFW_MAX_ALG_NAME         256
 19 #define WMFW_MAX_ALG_DESCR_NAME   256
 20 
 21 #define WMFW_MAX_COEFF_NAME       256
 22 #define WMFW_MAX_COEFF_DESCR_NAME 256
 23 
 24 #define WMFW_CTL_FLAG_SYS         0x8000
 25 #define WMFW_CTL_FLAG_VOLATILE    0x0004
 26 #define WMFW_CTL_FLAG_WRITEABLE   0x0002
 27 #define WMFW_CTL_FLAG_READABLE    0x0001
 28 
 29 /* Non-ALSA coefficient types start at 0x1000 */
 30 #define WMFW_CTL_TYPE_ACKED       0x1000 /* acked control */
 31 #define WMFW_CTL_TYPE_HOSTEVENT   0x1001 /* event control */
 32 
 33 struct wmfw_header {
 34         char magic[4];
 35         __le32 len;
 36         __le16 rev;
 37         u8 core;
 38         u8 ver;
 39 } __packed;
 40 
 41 struct wmfw_footer {
 42         __le64 timestamp;
 43         __le32 checksum;
 44 } __packed;
 45 
 46 struct wmfw_adsp1_sizes {
 47         __le32 dm;
 48         __le32 pm;
 49         __le32 zm;
 50 } __packed;
 51 
 52 struct wmfw_adsp2_sizes {
 53         __le32 xm;
 54         __le32 ym;
 55         __le32 pm;
 56         __le32 zm;
 57 } __packed;
 58 
 59 struct wmfw_region {
 60         union {
 61                 __be32 type;
 62                 __le32 offset;
 63         };
 64         __le32 len;
 65         u8 data[];
 66 } __packed;
 67 
 68 struct wmfw_id_hdr {
 69         __be32 core_id;
 70         __be32 core_rev;
 71         __be32 id;
 72         __be32 ver;
 73 } __packed;
 74 
 75 struct wmfw_adsp1_id_hdr {
 76         struct wmfw_id_hdr fw;
 77         __be32 zm;
 78         __be32 dm;
 79         __be32 n_algs;
 80 } __packed;
 81 
 82 struct wmfw_adsp2_id_hdr {
 83         struct wmfw_id_hdr fw;
 84         __be32 zm;
 85         __be32 xm;
 86         __be32 ym;
 87         __be32 n_algs;
 88 } __packed;
 89 
 90 struct wmfw_alg_hdr {
 91         __be32 id;
 92         __be32 ver;
 93 } __packed;
 94 
 95 struct wmfw_adsp1_alg_hdr {
 96         struct wmfw_alg_hdr alg;
 97         __be32 zm;
 98         __be32 dm;
 99 } __packed;
100 
101 struct wmfw_adsp2_alg_hdr {
102         struct wmfw_alg_hdr alg;
103         __be32 zm;
104         __be32 xm;
105         __be32 ym;
106 } __packed;
107 
108 struct wmfw_adsp_alg_data {
109         __le32 id;
110         u8 name[WMFW_MAX_ALG_NAME];
111         u8 descr[WMFW_MAX_ALG_DESCR_NAME];
112         __le32 ncoeff;
113         u8 data[];
114 } __packed;
115 
116 struct wmfw_adsp_coeff_data {
117         struct {
118                 __le16 offset;
119                 __le16 type;
120                 __le32 size;
121         } hdr;
122         u8 name[WMFW_MAX_COEFF_NAME];
123         u8 descr[WMFW_MAX_COEFF_DESCR_NAME];
124         __le16 ctl_type;
125         __le16 flags;
126         __le32 len;
127         u8 data[];
128 } __packed;
129 
130 struct wmfw_coeff_hdr {
131         u8 magic[4];
132         __le32 len;
133         union {
134                 __be32 rev;
135                 __le32 ver;
136         };
137         union {
138                 __be32 core;
139                 __le32 core_ver;
140         };
141         u8 data[];
142 } __packed;
143 
144 struct wmfw_coeff_item {
145         __le16 offset;
146         __le16 type;
147         __le32 id;
148         __le32 ver;
149         __le32 sr;
150         __le32 len;
151         u8 data[];
152 } __packed;
153 
154 #define WMFW_ADSP1 1
155 #define WMFW_ADSP2 2
156 
157 #define WMFW_ABSOLUTE         0xf0
158 #define WMFW_ALGORITHM_DATA   0xf2
159 #define WMFW_NAME_TEXT        0xfe
160 #define WMFW_INFO_TEXT        0xff
161 
162 #define WMFW_ADSP1_PM 2
163 #define WMFW_ADSP1_DM 3
164 #define WMFW_ADSP1_ZM 4
165 
166 #define WMFW_ADSP2_PM 2
167 #define WMFW_ADSP2_ZM 4
168 #define WMFW_ADSP2_XM 5
169 #define WMFW_ADSP2_YM 6
170 
171 #endif
172 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp