summaryrefslogtreecommitdiff
path: root/include/topology.h
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2019-12-14 19:20:02 +0100
committerJaroslav Kysela <perex@perex.cz>2020-01-03 23:38:08 +0100
commitbee8d4fcaa52d00950d035ec561513c2b9e7cac7 (patch)
treecd0e83ddbed59e3890be009f3e2c0581110a33da /include/topology.h
parent39fb37fef5bd3b3fa7a63e06a5f0a147197fddb9 (diff)
downloadalsa-lib-bee8d4fcaa52d00950d035ec561513c2b9e7cac7.tar.gz
topology: add binary output from the builder
- snd_tplg_build_bin() - snd_tplg_build_bin_file() Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'include/topology.h')
-rw-r--r--include/topology.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/include/topology.h b/include/topology.h
index 27da7308..c9ef554a 100644
--- a/include/topology.h
+++ b/include/topology.h
@@ -791,7 +791,18 @@ void snd_tplg_free(snd_tplg_t *tplg);
* \return Zero on success, otherwise a negative error code
*/
int snd_tplg_build_file(snd_tplg_t *tplg, const char *infile,
- const char *outfile);
+ const char *outfile);
+
+/**
+ * \brief Parse and build topology text file into binary file.
+ * \param tplg Topology instance.
+ * \param infile Topology text input file to be parsed
+ * \param bin Binary topology output buffer (malloc).
+ * \param size Binary topology output buffer size in bytes.
+ * \return Zero on success, otherwise a negative error code
+ */
+int snd_tplg_build_bin_file(snd_tplg_t *tplg, const char *infile,
+ void **bin, size_t *size);
/**
* \brief Enable verbose reporting of binary file output
@@ -1090,6 +1101,15 @@ int snd_tplg_add_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t);
int snd_tplg_build(snd_tplg_t *tplg, const char *outfile);
/**
+ * \brief Build all registered topology data into memory.
+ * \param tplg Topology instance.
+ * \param bin Binary topology output buffer (malloc).
+ * \param size Binary topology output buffer size in bytes.
+ * \return Zero on success, otherwise a negative error code
+ */
+int snd_tplg_build_bin(snd_tplg_t *tplg, void **bin, size_t *size);
+
+/**
* \brief Attach private data to topology manifest.
* \param tplg Topology instance.
* \param data Private data.