header.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. * Header for all non IPC ABI data.
  13. *
  14. * Identifies data type, size and ABI.
  15. * Used by any bespoke component data structures or binary blobs.
  16. */
  17. struct sof_abi_hdr {
  18. __u32 magic; /**< 'S', 'O', 'F', '\0' */
  19. __u32 type; /**< component specific type */
  20. __u32 size; /**< size in bytes of data excl. this struct */
  21. __u32 abi; /**< SOF ABI version */
  22. __u32 reserved[4]; /**< reserved for future use */
  23. __u32 data[]; /**< Component data - opaque to core */
  24. } __packed;
  25. #define SOF_MANIFEST_DATA_TYPE_NHLT 1
  26. /**
  27. * struct sof_manifest_tlv - SOF manifest TLV data
  28. * @type: type of data
  29. * @size: data size (not including the size of this struct)
  30. * @data: payload data
  31. */
  32. struct sof_manifest_tlv {
  33. __le32 type;
  34. __le32 size;
  35. __u8 data[];
  36. };
  37. /**
  38. * struct sof_manifest - SOF topology manifest
  39. * @abi_major: Major ABI version
  40. * @abi_minor: Minor ABI version
  41. * @abi_patch: ABI patch
  42. * @count: count of tlv items
  43. * @items: consecutive variable size tlv items
  44. */
  45. struct sof_manifest {
  46. __le16 abi_major;
  47. __le16 abi_minor;
  48. __le16 abi_patch;
  49. __le16 count;
  50. struct sof_manifest_tlv items[];
  51. };
  52. #endif