mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
topology: A API calls to directly build topology data from templates
Add some new API calls so that applications can directly build topology data using template structures. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
1b148ef590
commit
5b518c9159
6 changed files with 573 additions and 18 deletions
|
|
@ -664,6 +664,32 @@ typedef struct snd_tplg_obj_template {
|
|||
struct snd_tplg_graph_template *graph; /*!< Graph elements */
|
||||
};
|
||||
} snd_tplg_obj_template_t;
|
||||
|
||||
/**
|
||||
* \brief Register topology template object.
|
||||
* \param tplg Topology instance.
|
||||
* \param t Template object.
|
||||
* \return Zero on success, otherwise a negative error code
|
||||
*/
|
||||
int snd_tplg_add_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t);
|
||||
|
||||
/**
|
||||
* \brief Build all registered topology data into binary file.
|
||||
* \param tplg Topology instance.
|
||||
* \param outfile Binary topology output file.
|
||||
* \return Zero on success, otherwise a negative error code
|
||||
*/
|
||||
int snd_tplg_build(snd_tplg_t *tplg, const char *outfile);
|
||||
|
||||
/**
|
||||
* \brief Attach private data to topology manifest.
|
||||
* \param tplg Topology instance.
|
||||
* \param data Private data.
|
||||
* \param len Length of data in bytes.
|
||||
* \return Zero on success, otherwise a negative error code
|
||||
*/
|
||||
int snd_tplg_set_manifest_data(snd_tplg_t *tplg, const void *data, int len);
|
||||
|
||||
/* \} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue