summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKarol Trzcinski <karolx.trzcinski@linux.intel.com>2020-05-20 19:59:09 +0300
committerMark Brown <broonie@kernel.org>2020-05-25 14:59:35 +0100
commit3e2a89d3ee052ef5346ba933e557c807333ced11 (patch)
treef832d571af906bdeb000e96afc24c0db892ea66f /include
parenta80cf1987a6e728b4d5c8e5041132d46e89c7a45 (diff)
ASoC: SOF: ext_manifest: parse firmware version
The firmware version can be extracted from the extended manifest content. This information known at build time does not need to be provided in a mailbox. Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20200520165911.21696-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/sound/sof/ext_manifest.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/sound/sof/ext_manifest.h b/include/sound/sof/ext_manifest.h
index 5c1f03603919..6ed787eb788c 100644
--- a/include/sound/sof/ext_manifest.h
+++ b/include/sound/sof/ext_manifest.h
@@ -19,6 +19,7 @@
#include <linux/bits.h>
#include <linux/compiler.h>
#include <linux/types.h>
+#include <sound/sof/info.h>
/* In ASCII `XMan` */
#define SOF_EXT_MAN_MAGIC_NUMBER 0x6e614d58
@@ -54,6 +55,11 @@ struct sof_ext_man_header {
/* Now define extended manifest elements */
+/* Extended manifest elements types */
+enum sof_ext_man_elem_type {
+ SOF_EXT_MAN_ELEM_FW_VERSION = 0,
+};
+
/* extended manifest element header */
struct sof_ext_man_elem_header {
uint32_t type; /*< SOF_EXT_MAN_ELEM_ */
@@ -62,4 +68,12 @@ struct sof_ext_man_elem_header {
/* just after this header should be type dependent content */
} __packed;
+/* FW version */
+struct sof_ext_man_fw_version {
+ struct sof_ext_man_elem_header hdr;
+ /* use sof_ipc struct because of code re-use */
+ struct sof_ipc_fw_version version;
+ uint32_t flags;
+} __packed;
+
#endif /* __SOF_FIRMWARE_EXT_MANIFEST_H__ */