1
2
3
4
5
6
7
8
9
10
11
12
13 #ifndef __INCLUDE_UAPI_SOF_FW_H__
14 #define __INCLUDE_UAPI_SOF_FW_H__
15
16 #include <linux/types.h>
17
18 #define SND_SOF_FW_SIG_SIZE 4
19 #define SND_SOF_FW_ABI 1
20 #define SND_SOF_FW_SIG "Reef"
21
22
23
24
25
26
27 enum snd_sof_fw_blk_type {
28 SOF_FW_BLK_TYPE_INVALID = -1,
29 SOF_FW_BLK_TYPE_START = 0,
30 SOF_FW_BLK_TYPE_RSRVD0 = SOF_FW_BLK_TYPE_START,
31 SOF_FW_BLK_TYPE_IRAM = 1,
32 SOF_FW_BLK_TYPE_DRAM = 2,
33 SOF_FW_BLK_TYPE_SRAM = 3,
34 SOF_FW_BLK_TYPE_ROM = 4,
35 SOF_FW_BLK_TYPE_IMR = 5,
36 SOF_FW_BLK_TYPE_RSRVD6 = 6,
37 SOF_FW_BLK_TYPE_RSRVD7 = 7,
38 SOF_FW_BLK_TYPE_RSRVD8 = 8,
39 SOF_FW_BLK_TYPE_RSRVD9 = 9,
40 SOF_FW_BLK_TYPE_RSRVD10 = 10,
41 SOF_FW_BLK_TYPE_RSRVD11 = 11,
42 SOF_FW_BLK_TYPE_RSRVD12 = 12,
43 SOF_FW_BLK_TYPE_RSRVD13 = 13,
44 SOF_FW_BLK_TYPE_RSRVD14 = 14,
45
46 SOF_FW_BLK_TYPE_NUM
47 };
48
49 struct snd_sof_blk_hdr {
50 enum snd_sof_fw_blk_type type;
51 __u32 size;
52 __u32 offset;
53 } __packed;
54
55
56
57
58
59 enum snd_sof_fw_mod_type {
60 SOF_FW_BASE = 0,
61 SOF_FW_MODULE = 1,
62 };
63
64 struct snd_sof_mod_hdr {
65 enum snd_sof_fw_mod_type type;
66 __u32 size;
67 __u32 num_blocks;
68 } __packed;
69
70
71
72
73 struct snd_sof_fw_header {
74 unsigned char sig[SND_SOF_FW_SIG_SIZE];
75 __u32 file_size;
76 __u32 num_modules;
77 __u32 abi;
78 } __packed;
79
80 #endif