1#ifndef __VSF_LINUX_SOUND_ASOC_H__
2#define __VSF_LINUX_SOUND_ASOC_H__
7#define SND_SOC_TPLG_MAX_CHAN 8
9#define SND_SOC_TPLG_MAX_FORMATS 16
11#define SND_SOC_TPLG_STREAM_CONFIG_MAX 8
13#define SND_SOC_TPLG_HW_CONFIG_MAX 8
15#define SND_SOC_TPLG_CTL_VOLSW 1
16#define SND_SOC_TPLG_CTL_VOLSW_SX 2
17#define SND_SOC_TPLG_CTL_VOLSW_XR_SX 3
18#define SND_SOC_TPLG_CTL_ENUM 4
19#define SND_SOC_TPLG_CTL_BYTES 5
20#define SND_SOC_TPLG_CTL_ENUM_VALUE 6
21#define SND_SOC_TPLG_CTL_RANGE 7
22#define SND_SOC_TPLG_CTL_STROBE 8
24#define SND_SOC_TPLG_MAGIC 0x41536F43
26#define SND_SOC_TPLG_NUM_TEXTS 16
28#define SND_SOC_TPLG_ABI_VERSION 0x5
30#define SND_SOC_TPLG_DAPM_INPUT 0
31#define SND_SOC_TPLG_DAPM_OUTPUT 1
32#define SND_SOC_TPLG_DAPM_MUX 2
33#define SND_SOC_TPLG_DAPM_MIXER 3
34#define SND_SOC_TPLG_DAPM_PGA 4
35#define SND_SOC_TPLG_DAPM_OUT_DRV 5
36#define SND_SOC_TPLG_DAPM_ADC 6
37#define SND_SOC_TPLG_DAPM_DAC 7
38#define SND_SOC_TPLG_DAPM_SWITCH 8
39#define SND_SOC_TPLG_DAPM_PRE 9
40#define SND_SOC_TPLG_DAPM_POST 10
41#define SND_SOC_TPLG_DAPM_AIF_IN 11
42#define SND_SOC_TPLG_DAPM_AIF_OUT 12
43#define SND_SOC_TPLG_DAPM_DAI_IN 13
44#define SND_SOC_TPLG_DAPM_DAI_OUT 14
45#define SND_SOC_TPLG_DAPM_DAI_LINK 15
46#define SND_SOC_TPLG_DAPM_BUFFER 16
47#define SND_SOC_TPLG_DAPM_SCHEDULER 17
48#define SND_SOC_TPLG_DAPM_EFFECT 18
49#define SND_SOC_TPLG_DAPM_SIGGEN 19
50#define SND_SOC_TPLG_DAPM_SRC 20
51#define SND_SOC_TPLG_DAPM_ASRC 21
52#define SND_SOC_TPLG_DAPM_ENCODER 22
53#define SND_SOC_TPLG_DAPM_DECODER 23
54#define SND_SOC_TPLG_DAPM_LAST SND_SOC_TPLG_DAPM_DECODER
56#define SND_SOC_TPLG_TLV_SIZE 32
58#define SND_SOC_TPLG_TYPE_MIXER 1
59#define SND_SOC_TPLG_TYPE_BYTES 2
60#define SND_SOC_TPLG_TYPE_ENUM 3
61#define SND_SOC_TPLG_TYPE_DAPM_GRAPH 4
62#define SND_SOC_TPLG_TYPE_DAPM_WIDGET 5
63#define SND_SOC_TPLG_TYPE_DAI_LINK 6
64#define SND_SOC_TPLG_TYPE_PCM 7
65#define SND_SOC_TPLG_TYPE_MANIFEST 8
66#define SND_SOC_TPLG_TYPE_CODEC_LINK 9
67#define SND_SOC_TPLG_TYPE_BACKEND_LINK 10
68#define SND_SOC_TPLG_TYPE_PDATA 11
69#define SND_SOC_TPLG_TYPE_DAI 12
70#define SND_SOC_TPLG_TYPE_MAX SND_SOC_TPLG_TYPE_DAI
72#define SND_SOC_TPLG_STREAM_PLAYBACK 0
73#define SND_SOC_TPLG_STREAM_CAPTURE 1
75#define SND_SOC_TPLG_TUPLE_TYPE_UUID 0
76#define SND_SOC_TPLG_TUPLE_TYPE_STRING 1
77#define SND_SOC_TPLG_TUPLE_TYPE_BOOL 2
78#define SND_SOC_TPLG_TUPLE_TYPE_BYTE 3
79#define SND_SOC_TPLG_TUPLE_TYPE_WORD 4
80#define SND_SOC_TPLG_TUPLE_TYPE_SHORT 5
82#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_RATES (1 << 0)
83#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_CHANNELS (1 << 1)
84#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2)
86#define SND_SOC_TPLG_DAI_CLK_GATE_UNDEFINED 0
87#define SND_SOC_TPLG_DAI_CLK_GATE_GATED 1
88#define SND_SOC_TPLG_DAI_CLK_GATE_CONT 2
90#define SND_SOC_TPLG_MCLK_CO 0
91#define SND_SOC_TPLG_MCLK_CI 1
93#define SND_SOC_DAI_FORMAT_I2S 1
94#define SND_SOC_DAI_FORMAT_RIGHT_J 2
95#define SND_SOC_DAI_FORMAT_LEFT_J 3
96#define SND_SOC_DAI_FORMAT_DSP_A 4
97#define SND_SOC_DAI_FORMAT_DSP_B 5
98#define SND_SOC_DAI_FORMAT_AC97 6
99#define SND_SOC_DAI_FORMAT_PDM 7
101#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_RATES (1 << 0)
102#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_CHANNELS (1 << 1)
103#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2)
104#define SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP (1 << 3)
106#define SND_SOC_TPLG_BCLK_CP 0
107#define SND_SOC_TPLG_BCLK_CC 1
108#define SND_SOC_TPLG_BCLK_CM SND_SOC_TPLG_BCLK_CP
109#define SND_SOC_TPLG_BCLK_CS SND_SOC_TPLG_BCLK_CC
111#define SND_SOC_TPLG_FSYNC_CP 0
112#define SND_SOC_TPLG_FSYNC_CC 1
113#define SND_SOC_TPLG_FSYNC_CM SND_SOC_TPLG_FSYNC_CP
114#define SND_SOC_TPLG_FSYNC_CS SND_SOC_TPLG_FSYNC_CC
#define SND_SOC_TPLG_MAX_CHAN
Definition asoc.h:7
struct snd_soc_tplg_hdr VSF_CAL_PACKED
#define SND_SOC_TPLG_NUM_TEXTS
Definition asoc.h:26
#define SND_SOC_TPLG_HW_CONFIG_MAX
Definition asoc.h:13
#define SND_SOC_TPLG_TLV_SIZE
Definition asoc.h:56
#define SND_SOC_TPLG_STREAM_CONFIG_MAX
Definition asoc.h:11
#define SNDRV_CTL_ELEM_ID_NAME_MAXLEN
Definition asound.h:649
__u64 __le64
Definition types.h:63
__u16 __le16
Definition types.h:59
uint8_t __u8
Definition types.h:51
__u32 __le32
Definition types.h:61
struct snd_soc_tplg_ctl_hdr hdr
Definition asoc.h:288
struct snd_soc_tplg_io_ops ext_ops
Definition asoc.h:294
__le32 mask
Definition asoc.h:291
__le32 base
Definition asoc.h:292
struct snd_soc_tplg_private priv
Definition asoc.h:295
__le32 size
Definition asoc.h:289
__le32 num_regs
Definition asoc.h:293
__le32 max
Definition asoc.h:290
__le32 reg
Definition asoc.h:179
__le32 size
Definition asoc.h:178
__le32 id
Definition asoc.h:181
__le32 shift
Definition asoc.h:180
char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]
Definition asoc.h:193
__le32 type
Definition asoc.h:192
__le32 access
Definition asoc.h:194
struct snd_soc_tplg_io_ops ops
Definition asoc.h:195
struct snd_soc_tplg_ctl_tlv tlv
Definition asoc.h:196
__le32 size
Definition asoc.h:191
__le32 data[SND_SOC_TPLG_TLV_SIZE]
Definition asoc.h:172
struct snd_soc_tplg_tlv_dbscale scale
Definition asoc.h:173
__le32 type
Definition asoc.h:170
__le32 size
Definition asoc.h:169
struct snd_soc_tplg_private priv
Definition asoc.h:363
struct snd_soc_tplg_stream_caps caps[2]
Definition asoc.h:360
__le32 size
Definition asoc.h:355
__le32 dai_id
Definition asoc.h:357
__le32 playback
Definition asoc.h:358
__le32 flag_mask
Definition asoc.h:361
char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]
Definition asoc.h:356
__le32 capture
Definition asoc.h:359
__le32 flags
Definition asoc.h:362
char sink[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]
Definition asoc.h:299
char control[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]
Definition asoc.h:300
char source[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]
Definition asoc.h:301
struct snd_soc_tplg_channel channel[SND_SOC_TPLG_MAX_CHAN]
Definition asoc.h:278
struct snd_soc_tplg_ctl_hdr hdr
Definition asoc.h:275
__le32 size
Definition asoc.h:276
struct snd_soc_tplg_private priv
Definition asoc.h:284
__le32 mask
Definition asoc.h:280
__le32 items
Definition asoc.h:279
__le32 count
Definition asoc.h:281
__le32 values[SND_SOC_TPLG_NUM_TEXTS *SNDRV_CTL_ELEM_ID_NAME_MAXLEN/4]
Definition asoc.h:283
__le32 num_channels
Definition asoc.h:277
char texts[SND_SOC_TPLG_NUM_TEXTS][SNDRV_CTL_ELEM_ID_NAME_MAXLEN]
Definition asoc.h:282
__le32 version
Definition asoc.h:119
__le32 vendor_type
Definition asoc.h:122
__le32 payload_size
Definition asoc.h:123
__le32 count
Definition asoc.h:125
__le32 magic
Definition asoc.h:117
__le32 size
Definition asoc.h:121
__le32 type
Definition asoc.h:120
__le32 index
Definition asoc.h:124
__le32 abi
Definition asoc.h:118
__le32 fsync_rate
Definition asoc.h:240
__u8 fsync_provider
Definition asoc.h:235
__u8 clock_gated
Definition asoc.h:231
__le32 bclk_rate
Definition asoc.h:239
__le32 rx_slots
Definition asoc.h:244
__le32 tdm_slot_width
Definition asoc.h:242
__le32 id
Definition asoc.h:229
__le32 tdm_slots
Definition asoc.h:241
__le32 tx_channels
Definition asoc.h:245
__le32 rx_channels
Definition asoc.h:247
__le16 reserved
Definition asoc.h:237
__u8 bclk_provider
Definition asoc.h:234
__le32 tx_slots
Definition asoc.h:243
__le32 tx_chanmap[SND_SOC_TPLG_MAX_CHAN]
Definition asoc.h:246
__le32 rx_chanmap[SND_SOC_TPLG_MAX_CHAN]
Definition asoc.h:248
__le32 fmt
Definition asoc.h:230
__u8 mclk_direction
Definition asoc.h:236
__u8 invert_bclk
Definition asoc.h:232
__le32 mclk_rate
Definition asoc.h:238
__u8 invert_fsync
Definition asoc.h:233
__le32 size
Definition asoc.h:228
__le32 put
Definition asoc.h:186
__le32 info
Definition asoc.h:187
__le32 get
Definition asoc.h:185
__le32 num_hw_configs
Definition asoc.h:347
struct snd_soc_tplg_hw_config hw_config[SND_SOC_TPLG_HW_CONFIG_MAX]
Definition asoc.h:346
__le32 size
Definition asoc.h:340
__le32 id
Definition asoc.h:341
__le32 default_hw_config_id
Definition asoc.h:348
char stream_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]
Definition asoc.h:343
__le32 flag_mask
Definition asoc.h:349
__le32 num_streams
Definition asoc.h:345
__le32 flags
Definition asoc.h:350
struct snd_soc_tplg_private priv
Definition asoc.h:351
char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]
Definition asoc.h:342
struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]
Definition asoc.h:344
__le32 pcm_elems
Definition asoc.h:256
struct snd_soc_tplg_private priv
Definition asoc.h:259
__le32 dai_elems
Definition asoc.h:258
__le32 widget_elems
Definition asoc.h:254
__le32 dai_link_elems
Definition asoc.h:257
__le32 size
Definition asoc.h:252
__le32 control_elems
Definition asoc.h:253
__le32 graph_elems
Definition asoc.h:255
struct snd_soc_tplg_private priv
Definition asoc.h:271
__le32 invert
Definition asoc.h:268
__le32 size
Definition asoc.h:264
__le32 num_channels
Definition asoc.h:269
__le32 min
Definition asoc.h:265
struct snd_soc_tplg_ctl_hdr hdr
Definition asoc.h:263
__le32 platform_max
Definition asoc.h:267
struct snd_soc_tplg_channel channel[SND_SOC_TPLG_MAX_CHAN]
Definition asoc.h:270
__le32 max
Definition asoc.h:266
__le32 flags
Definition asoc.h:335
struct snd_soc_tplg_stream_caps caps[2]
Definition asoc.h:333
__le32 size
Definition asoc.h:323
__le32 pcm_id
Definition asoc.h:326
struct snd_soc_tplg_private priv
Definition asoc.h:336
__le32 flag_mask
Definition asoc.h:334
struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]
Definition asoc.h:331
char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]
Definition asoc.h:325
__le32 capture
Definition asoc.h:329
__le32 playback
Definition asoc.h:328
char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]
Definition asoc.h:324
__le32 dai_id
Definition asoc.h:327
__le32 compress
Definition asoc.h:330
__le32 num_streams
Definition asoc.h:332
struct snd_soc_tplg_vendor_array array[0]
Definition asoc.h:158
char data[0]
Definition asoc.h:157
__le32 size
Definition asoc.h:155
__le32 rate_min
Definition asoc.h:204
__le32 rate_max
Definition asoc.h:205
__le32 size
Definition asoc.h:200
__le32 buffer_size_max
Definition asoc.h:213
__le32 buffer_size_min
Definition asoc.h:212
__le32 sig_bits
Definition asoc.h:214
__le32 channels_max
Definition asoc.h:207
__le64 formats
Definition asoc.h:202
__le32 channels_min
Definition asoc.h:206
char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]
Definition asoc.h:201
__le32 periods_min
Definition asoc.h:208
__le32 periods_max
Definition asoc.h:209
__le32 period_size_max
Definition asoc.h:211
__le32 rates
Definition asoc.h:203
__le32 period_size_min
Definition asoc.h:210
char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]
Definition asoc.h:219
__le32 buffer_bytes
Definition asoc.h:223
__le32 size
Definition asoc.h:218
__le32 rate
Definition asoc.h:221
__le64 format
Definition asoc.h:220
__le32 channels
Definition asoc.h:224
__le32 period_bytes
Definition asoc.h:222
__le32 step
Definition asoc.h:164
__le32 min
Definition asoc.h:163
__le32 mute
Definition asoc.h:165
struct snd_soc_tplg_vendor_value_elem value[0]
Definition asoc.h:149
struct snd_soc_tplg_vendor_string_elem string[0]
Definition asoc.h:150
__le32 size
Definition asoc.h:144
__le32 num_elems
Definition asoc.h:146
struct snd_soc_tplg_vendor_uuid_elem uuid[0]
Definition asoc.h:148
__le32 type
Definition asoc.h:145
__le32 token
Definition asoc.h:139
__le32 token
Definition asoc.h:129
char uuid[16]
Definition asoc.h:130
__le32 value
Definition asoc.h:135
__le32 token
Definition asoc.h:134