21#ifndef __ALSA_TOPOLOGY_H
22#define __ALSA_TOPOLOGY_H
741#define SND_TPLG_MAX_CHAN 8
770#define SND_TPLG_INDEX_ALL 0
773#define SND_TPLG_CREATE_VERBOSE (1<<0)
774#define SND_TPLG_CREATE_DAPM_NOSORT (1<<1)
817 const char *outfile);
902 struct snd_soc_tplg_private *
priv;
915 struct snd_soc_tplg_private *
priv;
928 struct snd_soc_tplg_private *
priv;
963 struct snd_soc_tplg_private *
priv;
1085typedef struct snd_tplg_obj_template {
1147#define SND_TPLG_SAVE_SORT (1<<0)
1148#define SND_TPLG_SAVE_GROUPS (1<<1)
1149#define SND_TPLG_SAVE_NOCHECK (1<<16)
int snd_tplg_save(snd_tplg_t *tplg, char **dst, int flags)
Save the topology to the text configuration string.
Definition save.c:557
int snd_tplg_add_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t)
Register topology template object.
Definition parser.c:324
snd_tplg_t * snd_tplg_new(void)
Create a new topology parser instance.
Definition parser.c:474
#define SND_TPLG_MAX_CHAN
Definition topology.h:741
const char * snd_tplg_version(void)
Return the version of the topology library.
Definition parser.c:506
int snd_tplg_build_file(snd_tplg_t *tplg, const char *infile, const char *outfile)
Parse and build topology text file into binary file.
Definition parser.c:295
int snd_tplg_set_version(snd_tplg_t *tplg, unsigned int version)
Set an optional vendor specific version number.
Definition parser.c:414
int snd_tplg_build_bin(snd_tplg_t *tplg, void **bin, size_t *size)
Build all registered topology data into memory.
Definition parser.c:379
snd_tplg_type
Definition topology.h:747
int snd_tplg_decode(snd_tplg_t *tplg, void *bin, size_t size, int dflags)
Decode the binary topology contents.
Definition decoder.c:43
int snd_tplg_build(snd_tplg_t *tplg, const char *outfile)
Build all registered topology data into binary file.
Definition parser.c:351
struct snd_tplg snd_tplg_t
Definition topology.h:744
snd_tplg_t * snd_tplg_create(int flags)
Create a new topology parser instance.
Definition parser.c:434
int snd_tplg_set_manifest_data(snd_tplg_t *tplg, const void *data, int len)
Attach private data to topology manifest.
Definition parser.c:395
void snd_tplg_verbose(snd_tplg_t *tplg, int verbose)
Enable verbose reporting of binary file output.
Definition parser.c:421
int snd_tplg_load(snd_tplg_t *tplg, const char *buf, size_t size)
Load topology from the text buffer.
Definition parser.c:261
void snd_tplg_free(snd_tplg_t *tplg)
Free a topology parser instance.
Definition parser.c:479
@ SND_TPLG_TYPE_TEXT
Definition topology.h:751
@ SND_TPLG_TYPE_MANIFEST
Definition topology.h:761
@ SND_TPLG_TYPE_STREAM_CAPS
Definition topology.h:755
@ SND_TPLG_TYPE_STREAM_CONFIG
Definition topology.h:754
@ SND_TPLG_TYPE_TOKEN
Definition topology.h:762
@ SND_TPLG_TYPE_HW_CONFIG
Definition topology.h:765
@ SND_TPLG_TYPE_DATA
Definition topology.h:752
@ SND_TPLG_TYPE_DAPM_GRAPH
Definition topology.h:758
@ SND_TPLG_TYPE_DAI
Definition topology.h:766
@ SND_TPLG_TYPE_LINK
Definition topology.h:764
@ SND_TPLG_TYPE_CC
Definition topology.h:760
@ SND_TPLG_TYPE_BE
Definition topology.h:759
@ SND_TPLG_TYPE_MIXER
Definition topology.h:749
@ SND_TPLG_TYPE_TLV
Definition topology.h:748
@ SND_TPLG_TYPE_PCM
Definition topology.h:756
@ SND_TPLG_TYPE_BYTES
Definition topology.h:753
@ SND_TPLG_TYPE_TUPLE
Definition topology.h:763
@ SND_TPLG_TYPE_ENUM
Definition topology.h:750
@ SND_TPLG_TYPE_DAPM_WIDGET
Definition topology.h:757
Template type for TLV Scale objects.
Definition topology.h:921
struct snd_soc_tplg_private * priv
Definition topology.h:928
int base
Definition topology.h:925
int max
Definition topology.h:923
struct snd_tplg_ctl_template hdr
Definition topology.h:922
struct snd_tplg_io_ops_template ext_ops
Definition topology.h:927
int mask
Definition topology.h:924
int num_regs
Definition topology.h:926
Template type for single channel mapping.
Definition topology.h:846
int size
Definition topology.h:847
int shift
Definition topology.h:849
int id
Definition topology.h:850
int reg
Definition topology.h:848
Template type for channel mapping.
Definition topology.h:856
int num_channels
Definition topology.h:857
struct snd_tplg_channel_elem channel[SND_TPLG_MAX_CHAN]
Definition topology.h:858
Template type for control objects.
Definition topology.h:881
int access
Definition topology.h:884
int type
Definition topology.h:882
struct snd_tplg_io_ops_template ops
Definition topology.h:885
struct snd_tplg_tlv_dbscale_template * tlv_scale
Definition topology.h:888
const char * name
Definition topology.h:883
struct snd_tplg_tlv_template * tlv
Definition topology.h:887
Template type for physical DAI. It can be used to configure backend DAIs for DPCM.
Definition topology.h:1050
unsigned int flags
Definition topology.h:1057
struct snd_soc_tplg_private * priv
Definition topology.h:1058
const char * dai_name
Definition topology.h:1051
unsigned int capture
Definition topology.h:1054
unsigned int dai_id
Definition topology.h:1052
unsigned int playback
Definition topology.h:1053
struct snd_tplg_stream_caps_template * caps[2]
Definition topology.h:1055
unsigned int flag_mask
Definition topology.h:1056
Template type for enumerated control objects.
Definition topology.h:908
const int ** values
Definition topology.h:914
struct snd_soc_tplg_private * priv
Definition topology.h:915
const char ** texts
Definition topology.h:913
struct snd_tplg_ctl_template hdr
Definition topology.h:909
struct snd_tplg_channel_map_template * map
Definition topology.h:910
int mask
Definition topology.h:912
int items
Definition topology.h:911
Template type for single DAPM graph element.
Definition topology.h:934
const char * src
Definition topology.h:935
const char * sink
Definition topology.h:937
const char * ctl
Definition topology.h:936
Template type for array of DAPM graph elements.
Definition topology.h:943
struct snd_tplg_graph_elem elem[0]
Definition topology.h:945
int count
Definition topology.h:944
Template type to describe a physical link runtime supported hardware config, i.e. hardware audio form...
Definition topology.h:1023
unsigned int * rx_chanmap
Definition topology.h:1043
unsigned char fsync_provider
Definition topology.h:1030
unsigned int tx_channels
Definition topology.h:1040
unsigned int rx_slots
Definition topology.h:1039
unsigned int tdm_slot_width
Definition topology.h:1037
unsigned int fmt
Definition topology.h:1025
unsigned int mclk_rate
Definition topology.h:1033
unsigned int tdm_slots
Definition topology.h:1036
unsigned char bclk_provider
Definition topology.h:1029
unsigned int bclk_rate
Definition topology.h:1034
unsigned int rx_channels
Definition topology.h:1042
unsigned char invert_bclk
Definition topology.h:1027
unsigned short reserved
Definition topology.h:1032
unsigned char clock_gated
Definition topology.h:1026
unsigned int * tx_chanmap
Definition topology.h:1041
unsigned char mclk_direction
Definition topology.h:1031
int id
Definition topology.h:1024
unsigned int fsync_rate
Definition topology.h:1035
unsigned int tx_slots
Definition topology.h:1038
unsigned char invert_fsync
Definition topology.h:1028
Template type for object operations mapping.
Definition topology.h:872
int info
Definition topology.h:875
int get
Definition topology.h:873
int put
Definition topology.h:874
Template type for physical DAI Links.
Definition topology.h:1065
struct snd_tplg_hw_config_template * hw_config
Definition topology.h:1073
const char * name
Definition topology.h:1066
int default_hw_config_id
Definition topology.h:1075
const char * stream_name
Definition topology.h:1068
int id
Definition topology.h:1067
int num_streams
Definition topology.h:1070
int num_hw_configs
Definition topology.h:1074
struct snd_soc_tplg_private * priv
Definition topology.h:1079
unsigned int flag_mask
Definition topology.h:1077
unsigned int flags
Definition topology.h:1078
struct snd_tplg_stream_template * stream
Definition topology.h:1071
Template type for mixer control objects.
Definition topology.h:895
struct snd_soc_tplg_private * priv
Definition topology.h:902
struct snd_tplg_ctl_template hdr
Definition topology.h:896
int invert
Definition topology.h:901
int min
Definition topology.h:898
int max
Definition topology.h:899
int platform_max
Definition topology.h:900
struct snd_tplg_channel_map_template * map
Definition topology.h:897
Generic Template Object.
Definition topology.h:1085
struct snd_tplg_link_template * link
Definition topology.h:1097
struct snd_tplg_dai_template * dai
Definition topology.h:1098
int version
Definition topology.h:1088
struct snd_tplg_bytes_template * bytes_ctl
Definition topology.h:1093
enum snd_tplg_type type
Definition topology.h:1086
struct snd_tplg_pcm_template * pcm
Definition topology.h:1096
struct snd_tplg_graph_template * graph
Definition topology.h:1095
int vendor_type
Definition topology.h:1089
struct snd_tplg_enum_template * enum_ctl
Definition topology.h:1094
struct snd_tplg_widget_template * widget
Definition topology.h:1091
struct snd_tplg_mixer_template * mixer
Definition topology.h:1092
int index
Definition topology.h:1087
Template type for PCM (FE DAI & DAI links).
Definition topology.h:1003
unsigned int playback
Definition topology.h:1008
unsigned int flags
Definition topology.h:1013
const char * pcm_name
Definition topology.h:1004
const char * dai_name
Definition topology.h:1005
int num_streams
Definition topology.h:1015
unsigned int capture
Definition topology.h:1009
struct snd_tplg_stream_caps_template * caps[2]
Definition topology.h:1011
struct snd_soc_tplg_private * priv
Definition topology.h:1014
struct snd_tplg_stream_template stream[0]
Definition topology.h:1016
unsigned int dai_id
Definition topology.h:1007
unsigned int flag_mask
Definition topology.h:1012
unsigned int compress
Definition topology.h:1010
unsigned int pcm_id
Definition topology.h:1006
Template type for private data objects.
Definition topology.h:864
const void * data
Definition topology.h:866
unsigned int length
Definition topology.h:865
Stream Capabilities.
Definition topology.h:983
unsigned int periods_min
Definition topology.h:991
unsigned int rate_max
Definition topology.h:988
unsigned int rates
Definition topology.h:986
unsigned int buffer_size_max
Definition topology.h:996
unsigned int period_size_max
Definition topology.h:994
unsigned int periods_max
Definition topology.h:992
uint64_t formats
Definition topology.h:985
unsigned int period_size_min
Definition topology.h:993
unsigned int channels_min
Definition topology.h:989
unsigned int channels_max
Definition topology.h:990
unsigned int sig_bits
Definition topology.h:997
const char * name
Definition topology.h:984
unsigned int rate_min
Definition topology.h:987
unsigned int buffer_size_min
Definition topology.h:995
Stream configurations.
Definition topology.h:971
int period_bytes
Definition topology.h:975
const char * name
Definition topology.h:972
int format
Definition topology.h:973
int channels
Definition topology.h:977
int rate
Definition topology.h:974
int buffer_bytes
Definition topology.h:976
Template type for TLV Scale objects.
Definition topology.h:836
struct snd_tplg_tlv_template hdr
Definition topology.h:837
int min
Definition topology.h:838
int mute
Definition topology.h:840
int step
Definition topology.h:839
Template type for all TLV objects.
Definition topology.h:829
int type
Definition topology.h:830
uint8_t data
Definition ump_msg.h:6
uint8_t flags
Definition ump_msg.h:6