header.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. #ifndef __INCLUDE_UAPI_SOUND_SOF_USER_HEADER_H__
  9. #define __INCLUDE_UAPI_SOUND_SOF_USER_HEADER_H__
  10. #include <linux/types.h>
  11. /**
  12. * struct sof_abi_hdr - Header for all non IPC ABI data.
  13. * @magic: Magic number for validation
  14. * for IPC3 data: 0x00464F53 ('S', 'O', 'F', '\0')
  15. * for IPC4 data: 0x34464F53 ('S', 'O', 'F', '4')
  16. * @type: module specific parameter
  17. * for IPC3: Component specific type
  18. * for IPC4: parameter ID (param_id) of the data
  19. * @size: The size in bytes of the data, excluding this struct
  20. * @abi: SOF ABI version. The version is valid in scope of the 'magic', IPC3 and
  21. * IPC4 ABI version numbers have no relationship.
  22. * @reserved: Reserved for future use
  23. * @data: Component data - opaque to core
  24. *
  25. * Identifies data type, size and ABI.
  26. * Used by any bespoke component data structures or binary blobs.
  27. */
  28. struct sof_abi_hdr {
  29. __u32 magic;
  30. __u32 type;
  31. __u32 size;
  32. __u32 abi;
  33. __u32 reserved[4];
  34. __u32 data[];
  35. } __attribute__((packed));
  36. #define SOF_MANIFEST_DATA_TYPE_NHLT 1
  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. * struct sof_manifest - SOF topology manifest
  50. * @abi_major: Major ABI version
  51. * @abi_minor: Minor ABI version
  52. * @abi_patch: ABI patch
  53. * @count: count of tlv items
  54. * @items: consecutive variable size tlv items
  55. */
  56. struct sof_manifest {
  57. __le16 abi_major;
  58. __le16 abi_minor;
  59. __le16 abi_patch;
  60. __le16 count;
  61. struct sof_manifest_tlv items[];
  62. };
  63. #endif