[Sound-open-firmware] [PATCH] sof: abi: Add component ABI header for host configuration
Liam Girdwood
liam.r.girdwood at linux.intel.com
Mon Sep 4 13:36:38 CEST 2017
Add an ABI header to be pre-pended to all binary blobs or bespoke
component data structures that will be passed from host to DSP component
or vice versa (i.e via binary kcontrols).
Signed-off-by: Liam Girdwood <liam.r.girdwood at linux.intel.com>
---
src/include/uapi/Makefile.am | 3 ++-
src/include/uapi/abi.h | 50 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+), 1 deletion(-)
create mode 100644 src/include/uapi/abi.h
diff --git a/src/include/uapi/Makefile.am b/src/include/uapi/Makefile.am
index b49560c..c4c2fe6 100644
--- a/src/include/uapi/Makefile.am
+++ b/src/include/uapi/Makefile.am
@@ -1,2 +1,3 @@
include_HEADERS = \
- ipc.h
+ ipc.h \
+ abi.h
diff --git a/src/include/uapi/abi.h b/src/include/uapi/abi.h
new file mode 100644
index 0000000..66ec16a
--- /dev/null
+++ b/src/include/uapi/abi.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2016, Intel Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Intel Corporation nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Author: Liam Girdwood <liam.r.girdwood at linux.intel.com>
+ */
+
+#ifndef __INCLUDE_UAPI_ABI_H__
+#define __INCLUDE_UAPI_ABI_H__
+
+#define SOF_ABI_VERSION 1
+
+/*
+ * Header for all non IPC ABI data. Identifies data type, size and ABI.
+ * Used by any bespoke component data structures or binary blobs.
+ */
+
+struct sof_abi_hdr {
+ char magic[4]; /* '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 */
+ uint32_t comp_abi; /* component specific ABI version */
+} __attribute__((packed));
+
+#endif
+
--
2.11.0
More information about the Sound-open-firmware
mailing list