ALSA project - the C library reference
|
21 #ifndef __ALSA_TOPOLOGY_H
22 #define __ALSA_TOPOLOGY_H
743 #define SND_TPLG_MAX_CHAN 8
772 #define SND_TPLG_INDEX_ALL 0
775 #define SND_TPLG_CREATE_VERBOSE (1<<0)
776 #define SND_TPLG_CREATE_DAPM_NOSORT (1<<1)
782 const char *snd_tplg_version(void);
819 const char *outfile);
904 struct snd_soc_tplg_private *
priv;
917 struct snd_soc_tplg_private *
priv;
930 struct snd_soc_tplg_private *
priv;
965 struct snd_soc_tplg_private *
priv;
1028 unsigned char clock_gated;
1029 unsigned char invert_bclk;
1030 unsigned char invert_fsync;
1031 unsigned char bclk_master;
1032 unsigned char fsync_master;
1033 unsigned char mclk_direction;
1034 unsigned short reserved;
1035 unsigned int mclk_rate;
1036 unsigned int bclk_rate;
1037 unsigned int fsync_rate;
1038 unsigned int tdm_slots;
1039 unsigned int tdm_slot_width;
1040 unsigned int tx_slots;
1041 unsigned int rx_slots;
1042 unsigned int tx_channels;
1043 unsigned int *tx_chanmap;
1044 unsigned int rx_channels;
1045 unsigned int *rx_chanmap;
1077 int default_hw_config_id;
1079 unsigned int flag_mask;
1102 } snd_tplg_obj_template_t;
1149 #define SND_TPLG_SAVE_SORT (1<<0)
1150 #define SND_TPLG_SAVE_GROUPS (1<<1)
1151 #define SND_TPLG_SAVE_NOCHECK (1<<16)
1159 int snd_tplg_save(snd_tplg_t *tplg, char **dst, int flags);
int reg
Definition: topology.h:850
unsigned int sig_bits
Definition: topology.h:999
Stream Capabilities.
Definition: topology.h:985
struct snd_soc_tplg_private * priv
Definition: topology.h:1081
struct snd_soc_tplg_private * priv
Definition: topology.h:965
int version
Definition: topology.h:1090
const char * name
Definition: topology.h:955
int num_streams
Definition: topology.h:1017
int invert
Definition: topology.h:903
const char * dai_name
Definition: topology.h:1007
Template type for array of DAPM graph elements.
Definition: topology.h:945
@ SND_TPLG_TYPE_STREAM_CAPS
Definition: topology.h:757
Definition: topology.h:848
unsigned int channels_min
Definition: topology.h:991
const char * name
Definition: topology.h:885
unsigned int playback
Definition: topology.h:1055
const char * ctl
Definition: topology.h:938
unsigned int pcm_id
Definition: topology.h:1008
Template type for TLV Scale objects.
Definition: topology.h:838
snd_tplg_t * snd_tplg_create(int flags)
Create a new topology parser instance.
Definition: parser.c:438
@ SND_TPLG_TYPE_TUPLE
Definition: topology.h:765
@ SND_TPLG_TYPE_LINK
Definition: topology.h:766
@ SND_TPLG_TYPE_STREAM_CONFIG
Definition: topology.h:756
Template type for object operations mapping.
Definition: topology.h:874
int max
Definition: topology.h:925
struct snd_soc_tplg_private * priv
Definition: topology.h:1060
int mask
Definition: topology.h:914
Template type for enumerated control objects.
Definition: topology.h:910
unsigned int len
Definition: seq_event.h:198
struct snd_tplg_ctl_template hdr
Definition: topology.h:898
int snd_tplg_build_bin(snd_tplg_t *tplg, void **bin, size_t *size)
Build all registered topology data into memory.
Definition: parser.c:381
int period_bytes
Definition: topology.h:977
unsigned short event_flags
Definition: topology.h:963
struct snd_tplg_channel_map_template * map
Definition: topology.h:912
struct snd_tplg_channel_elem channel[SND_TPLG_MAX_CHAN]
Definition: topology.h:860
struct snd_tplg_graph_template * graph
Definition: topology.h:1097
@ SND_TPLG_TYPE_ENUM
Definition: topology.h:752
int max
Definition: topology.h:901
unsigned int channels_max
Definition: topology.h:992
const char * name
Definition: topology.h:1068
struct snd_tplg_bytes_template * bytes_ctl
Definition: topology.h:1095
Template type for single DAPM graph element.
Definition: topology.h:936
@ SND_TPLG_TYPE_TEXT
Definition: topology.h:753
unsigned int dai_id
Definition: topology.h:1009
struct snd_tplg_io_ops_template ops
Definition: topology.h:887
@ SND_TPLG_TYPE_TLV
Definition: topology.h:750
struct snd_tplg_graph_elem elem[0]
Definition: topology.h:947
struct snd_tplg_ctl_template * ctl[0]
Definition: topology.h:967
unsigned short event_type
Definition: topology.h:964
int base
Definition: topology.h:927
int mute
Definition: topology.h:842
@ SND_TPLG_TYPE_TOKEN
Definition: topology.h:764
snd_tplg_type
Definition: topology.h:749
Generic Template Object.
Definition: topology.h:1087
unsigned int buffer_size_min
Definition: topology.h:997
unsigned int capture
Definition: topology.h:1056
int items
Definition: topology.h:913
int info
Definition: topology.h:877
int snd_tplg_add_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t)
Register topology template object.
Definition: parser.c:326
Template type for PCM (FE DAI & DAI links).
Definition: topology.h:1005
int count
Definition: topology.h:946
const char * src
Definition: topology.h:937
Template type for mixer control objects.
Definition: topology.h:897
unsigned int periods_min
Definition: topology.h:993
unsigned int length
Definition: topology.h:867
unsigned int flags
Definition: topology.h:1015
struct snd_tplg_stream_template stream[0]
Definition: topology.h:1018
@ SND_TPLG_TYPE_BYTES
Definition: topology.h:755
int format
Definition: topology.h:975
@ SND_TPLG_TYPE_MIXER
Definition: topology.h:751
uint64_t formats
Definition: topology.h:987
struct snd_tplg snd_tplg_t
Definition: topology.h:746
int rate
Definition: topology.h:976
unsigned int capture
Definition: topology.h:1011
struct snd_soc_tplg_private * priv
Definition: topology.h:930
int num_regs
Definition: topology.h:928
int min
Definition: topology.h:840
int num_channels
Definition: topology.h:859
#define SND_TPLG_MAX_CHAN
Definition: topology.h:743
Template type for control objects.
Definition: topology.h:883
unsigned int dai_id
Definition: topology.h:1054
struct snd_soc_tplg_private * priv
Definition: topology.h:917
int mask
Definition: topology.h:926
struct snd_tplg_stream_caps_template * caps[2]
Definition: topology.h:1013
struct snd_tplg_link_template * link
Definition: topology.h:1099
const char * name
Definition: topology.h:974
unsigned int rates
Definition: topology.h:988
@ SND_TPLG_TYPE_BE
Definition: topology.h:761
const int ** values
Definition: topology.h:916
struct snd_tplg_ctl_template hdr
Definition: topology.h:924
int snd_tplg_set_version(snd_tplg_t *tplg, unsigned int version)
Set an optional vendor specific version number.
Definition: parser.c:416
snd_tplg_t * snd_tplg_new(void)
Create a new topology parser instance.
Definition: parser.c:478
struct snd_tplg_hw_config_template * hw_config
Definition: topology.h:1075
int id
Definition: topology.h:954
@ SND_TPLG_TYPE_DAPM_WIDGET
Definition: topology.h:759
struct snd_tplg_io_ops_template ext_ops
Definition: topology.h:929
int num_ctls
Definition: topology.h:966
const char * stream_name
Definition: topology.h:1070
const char * sink
Definition: topology.h:939
struct snd_tplg_enum_template * enum_ctl
Definition: topology.h:1096
struct snd_soc_tplg_private * priv
Definition: topology.h:1016
int buffer_bytes
Definition: topology.h:978
int channels
Definition: topology.h:979
unsigned int buffer_size_max
Definition: topology.h:998
Template type to describe a physical link runtime supported hardware config, i.e. hardware audio form...
Definition: topology.h:1025
int shift
Definition: topology.h:958
Template type for physical DAI Links.
Definition: topology.h:1067
@ SND_TPLG_TYPE_DATA
Definition: topology.h:754
unsigned int flag_mask
Definition: topology.h:1058
struct snd_tplg_widget_template * widget
Definition: topology.h:1093
int reg
Definition: topology.h:957
void snd_tplg_free(snd_tplg_t *tplg)
Free a topology parser instance.
Definition: parser.c:483
@ SND_TPLG_TYPE_MANIFEST
Definition: topology.h:763
Template type for TLV Scale objects.
Definition: topology.h:923
unsigned int playback
Definition: topology.h:1010
struct snd_tplg_stream_caps_template * caps[2]
Definition: topology.h:1057
Template type for channel mapping.
Definition: topology.h:858
unsigned int flags
Definition: topology.h:1059
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:297
@ SND_TPLG_TYPE_DAPM_GRAPH
Definition: topology.h:760
unsigned int compress
Definition: topology.h:1012
@ SND_TPLG_TYPE_HW_CONFIG
Definition: topology.h:767
Stream configurations.
Definition: topology.h:973
int min
Definition: topology.h:900
int vendor_type
Definition: topology.h:1091
struct snd_tplg_channel_map_template * map
Definition: topology.h:899
const char * dai_name
Definition: topology.h:1053
int type
Definition: topology.h:832
void snd_tplg_verbose(snd_tplg_t *tplg, int verbose)
Enable verbose reporting of binary file output.
Definition: parser.c:423
struct snd_tplg_tlv_template * tlv
Definition: topology.h:889
int platform_max
Definition: topology.h:902
const char * name
Definition: topology.h:986
Template type for all TLV objects.
Definition: topology.h:831
struct snd_tplg_tlv_template hdr
Definition: topology.h:839
struct snd_tplg_dai_template * dai
Definition: topology.h:1100
const char * sname
Definition: topology.h:956
int snd_tplg_set_manifest_data(snd_tplg_t *tplg, const void *data, int len)
Attach private data to topology manifest.
Definition: parser.c:397
int index
Definition: topology.h:1089
unsigned int rate_max
Definition: topology.h:990
int id
Definition: topology.h:1069
int access
Definition: topology.h:886
const void * data
Definition: topology.h:868
unsigned int period_size_min
Definition: topology.h:995
int snd_tplg_build(snd_tplg_t *tplg, const char *outfile)
Build all registered topology data into binary file.
Definition: parser.c:353
const char * pcm_name
Definition: topology.h:1006
Template type for private data objects.
Definition: topology.h:866
Template type for physical DAI. It can be used to configure backend DAIs for DPCM.
Definition: topology.h:1052
int size
Definition: topology.h:849
int get
Definition: topology.h:875
struct snd_tplg_mixer_template * mixer
Definition: topology.h:1094
struct snd_tplg_stream_template * stream
Definition: topology.h:1073
struct snd_tplg_tlv_dbscale_template * tlv_scale
Definition: topology.h:890
int id
Definition: topology.h:852
int put
Definition: topology.h:876
int mask
Definition: topology.h:959
int snd_tplg_load(snd_tplg_t *tplg, const char *buf, size_t size)
Load topology from the text buffer.
Definition: parser.c:263
@ SND_TPLG_TYPE_DAI
Definition: topology.h:768
int num_streams
Definition: topology.h:1072
unsigned int invert
Definition: topology.h:961
unsigned int ignore_suspend
Definition: topology.h:962
struct snd_soc_tplg_private * priv
Definition: topology.h:904
unsigned int rate_min
Definition: topology.h:989
const char ** texts
Definition: topology.h:915
@ SND_TPLG_TYPE_CC
Definition: topology.h:762
int snd_tplg_decode(snd_tplg_t *tplg, void *bin, size_t size, int dflags)
Decode the binary topology contents.
Definition: decoder.c:44
unsigned int period_size_max
Definition: topology.h:996
struct snd_tplg_ctl_template hdr
Definition: topology.h:911
int type
Definition: topology.h:884
enum snd_tplg_type type
Definition: topology.h:1088
unsigned int periods_max
Definition: topology.h:994
struct snd_tplg_pcm_template * pcm
Definition: topology.h:1098
int subseq
Definition: topology.h:960
int step
Definition: topology.h:841
unsigned int flag_mask
Definition: topology.h:1014
@ SND_TPLG_TYPE_PCM
Definition: topology.h:758
int shift
Definition: topology.h:851