xref: /linux-6.15/include/uapi/sound/sof/header.h (revision 2e4ef6f4)
1 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
2 /*
3  * This file is provided under a dual BSD/GPLv2 license.  When using or
4  * redistributing this file, you may do so under either license.
5  *
6  * Copyright(c) 2018 Intel Corporation. All rights reserved.
7  */
8 
9 #ifndef __INCLUDE_UAPI_SOUND_SOF_USER_HEADER_H__
10 #define __INCLUDE_UAPI_SOUND_SOF_USER_HEADER_H__
11 
12 #include <linux/types.h>
13 
14 /**
15  * struct sof_abi_hdr - Header for all non IPC ABI data.
16  * @magic: Magic number for validation: 0x00464F53 ('S', 'O', 'F', '\0')
17  * @type: Component specific type
18  * @size: The size in bytes of the data, excluding this struct
19  * @abi: SOF ABI version
20  * @reserved: Reserved for future use
21  * @data: Component data - opaque to core
22  *
23  * Identifies data type, size and ABI.
24  * Used by any bespoke component data structures or binary blobs.
25  */
26 struct sof_abi_hdr {
27 	__u32 magic;
28 	__u32 type;
29 	__u32 size;
30 	__u32 abi;
31 	__u32 reserved[4];
32 	__u32 data[];
33 }  __packed;
34 
35 #define SOF_MANIFEST_DATA_TYPE_NHLT 1
36 
37 /**
38  * struct sof_manifest_tlv - SOF manifest TLV data
39  * @type: type of data
40  * @size: data size (not including the size of this struct)
41  * @data: payload data
42  */
43 struct sof_manifest_tlv {
44 	__le32 type;
45 	__le32 size;
46 	__u8 data[];
47 };
48 
49 /**
50  * struct sof_manifest - SOF topology manifest
51  * @abi_major: Major ABI version
52  * @abi_minor: Minor ABI version
53  * @abi_patch: ABI patch
54  * @count: count of tlv items
55  * @items: consecutive variable size tlv items
56  */
57 struct sof_manifest {
58 	__le16 abi_major;
59 	__le16 abi_minor;
60 	__le16 abi_patch;
61 	__le16 count;
62 	struct sof_manifest_tlv items[];
63 };
64 
65 #endif
66