Component ABI: Magic id for uapi/abi.h

This patch adds a define of 32 bit integer that equals to ASCII
string "SOF\0" to be used in checking for correct magic number in
binary data. The char type for the magic is changed to uint32_t for
simpler comparison.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
Seppo Ingalsuo 2017-09-22 18:11:54 +03:00 committed by Liam Girdwood
parent 8aa14a62cb
commit 94cd49734c
1 changed files with 2 additions and 1 deletions

View File

@ -32,6 +32,7 @@
#define __INCLUDE_UAPI_ABI_H__
#define SOF_ABI_VERSION 1
#define SOF_ABI_MAGIC 0x00464F53 /* "SOF\0" */
/*
* Header for all non IPC ABI data. Identifies data type, size and ABI.
@ -39,7 +40,7 @@
*/
struct sof_abi_hdr {
char magic[4]; /* 'S', 'O', 'F', '\0' */
uint32_t magic; /* 'S', 'O', 'F', '\0' */
uint32_t type; /* component specific type */
uint32_t size; /* size in bytes of data excluding this struct */
uint32_t abi; /* SOF ABI version */