blob: 8718b46e41ee6b557431dbfae584771d989303de [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Christopher Ferris05d08e92016-02-04 13:16:38 -08007#ifndef __LINUX_UAPI_SND_ASOC_H
8#define __LINUX_UAPI_SND_ASOC_H
9#include <linux/types.h>
Christopher Ferrisaf09c702020-06-01 20:29:29 -070010#include <sound/asound.h>
Christopher Ferris05d08e92016-02-04 13:16:38 -080011#define SND_SOC_TPLG_MAX_CHAN 8
Christopher Ferris05d08e92016-02-04 13:16:38 -080012#define SND_SOC_TPLG_MAX_FORMATS 16
13#define SND_SOC_TPLG_STREAM_CONFIG_MAX 8
Christopher Ferris48af7cb2017-02-21 12:35:09 -080014#define SND_SOC_TPLG_HW_CONFIG_MAX 8
Christopher Ferris48af7cb2017-02-21 12:35:09 -080015#define SND_SOC_TPLG_CTL_VOLSW 1
Christopher Ferris6a9755d2017-01-13 14:09:31 -080016#define SND_SOC_TPLG_CTL_VOLSW_SX 2
Christopher Ferris05d08e92016-02-04 13:16:38 -080017#define SND_SOC_TPLG_CTL_VOLSW_XR_SX 3
18#define SND_SOC_TPLG_CTL_ENUM 4
Christopher Ferris48af7cb2017-02-21 12:35:09 -080019#define SND_SOC_TPLG_CTL_BYTES 5
Christopher Ferris6a9755d2017-01-13 14:09:31 -080020#define SND_SOC_TPLG_CTL_ENUM_VALUE 6
Christopher Ferris05d08e92016-02-04 13:16:38 -080021#define SND_SOC_TPLG_CTL_RANGE 7
22#define SND_SOC_TPLG_CTL_STROBE 8
Christopher Ferris48af7cb2017-02-21 12:35:09 -080023#define SND_SOC_TPLG_DAPM_CTL_VOLSW 64
Christopher Ferris6a9755d2017-01-13 14:09:31 -080024#define SND_SOC_TPLG_DAPM_CTL_ENUM_DOUBLE 65
Christopher Ferris05d08e92016-02-04 13:16:38 -080025#define SND_SOC_TPLG_DAPM_CTL_ENUM_VIRT 66
26#define SND_SOC_TPLG_DAPM_CTL_ENUM_VALUE 67
Christopher Ferris48af7cb2017-02-21 12:35:09 -080027#define SND_SOC_TPLG_DAPM_CTL_PIN 68
Christopher Ferris6a9755d2017-01-13 14:09:31 -080028#define SND_SOC_TPLG_DAPM_INPUT 0
Christopher Ferris05d08e92016-02-04 13:16:38 -080029#define SND_SOC_TPLG_DAPM_OUTPUT 1
30#define SND_SOC_TPLG_DAPM_MUX 2
Christopher Ferris48af7cb2017-02-21 12:35:09 -080031#define SND_SOC_TPLG_DAPM_MIXER 3
Christopher Ferris6a9755d2017-01-13 14:09:31 -080032#define SND_SOC_TPLG_DAPM_PGA 4
Christopher Ferris05d08e92016-02-04 13:16:38 -080033#define SND_SOC_TPLG_DAPM_OUT_DRV 5
34#define SND_SOC_TPLG_DAPM_ADC 6
Christopher Ferris48af7cb2017-02-21 12:35:09 -080035#define SND_SOC_TPLG_DAPM_DAC 7
Christopher Ferris6a9755d2017-01-13 14:09:31 -080036#define SND_SOC_TPLG_DAPM_SWITCH 8
Christopher Ferris05d08e92016-02-04 13:16:38 -080037#define SND_SOC_TPLG_DAPM_PRE 9
38#define SND_SOC_TPLG_DAPM_POST 10
Christopher Ferris48af7cb2017-02-21 12:35:09 -080039#define SND_SOC_TPLG_DAPM_AIF_IN 11
Christopher Ferris6a9755d2017-01-13 14:09:31 -080040#define SND_SOC_TPLG_DAPM_AIF_OUT 12
Christopher Ferris05d08e92016-02-04 13:16:38 -080041#define SND_SOC_TPLG_DAPM_DAI_IN 13
42#define SND_SOC_TPLG_DAPM_DAI_OUT 14
Christopher Ferris48af7cb2017-02-21 12:35:09 -080043#define SND_SOC_TPLG_DAPM_DAI_LINK 15
Christopher Ferris1308ad32017-11-14 17:32:13 -080044#define SND_SOC_TPLG_DAPM_BUFFER 16
45#define SND_SOC_TPLG_DAPM_SCHEDULER 17
46#define SND_SOC_TPLG_DAPM_EFFECT 18
47#define SND_SOC_TPLG_DAPM_SIGGEN 19
48#define SND_SOC_TPLG_DAPM_SRC 20
49#define SND_SOC_TPLG_DAPM_ASRC 21
50#define SND_SOC_TPLG_DAPM_ENCODER 22
51#define SND_SOC_TPLG_DAPM_DECODER 23
52#define SND_SOC_TPLG_DAPM_LAST SND_SOC_TPLG_DAPM_DECODER
Christopher Ferris05d08e92016-02-04 13:16:38 -080053#define SND_SOC_TPLG_MAGIC 0x41536F43
54#define SND_SOC_TPLG_NUM_TEXTS 16
Christopher Ferris48af7cb2017-02-21 12:35:09 -080055#define SND_SOC_TPLG_ABI_VERSION 0x5
56#define SND_SOC_TPLG_ABI_VERSION_MIN 0x4
Christopher Ferris6a9755d2017-01-13 14:09:31 -080057#define SND_SOC_TPLG_TLV_SIZE 32
Christopher Ferris05d08e92016-02-04 13:16:38 -080058#define SND_SOC_TPLG_TYPE_MIXER 1
59#define SND_SOC_TPLG_TYPE_BYTES 2
60#define SND_SOC_TPLG_TYPE_ENUM 3
Christopher Ferris6a9755d2017-01-13 14:09:31 -080061#define SND_SOC_TPLG_TYPE_DAPM_GRAPH 4
Christopher Ferris05d08e92016-02-04 13:16:38 -080062#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
Christopher Ferris6a9755d2017-01-13 14:09:31 -080065#define SND_SOC_TPLG_TYPE_MANIFEST 8
Christopher Ferris05d08e92016-02-04 13:16:38 -080066#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
Christopher Ferris48af7cb2017-02-21 12:35:09 -080069#define SND_SOC_TPLG_TYPE_DAI 12
70#define SND_SOC_TPLG_TYPE_MAX SND_SOC_TPLG_TYPE_DAI
Christopher Ferris05d08e92016-02-04 13:16:38 -080071#define SND_SOC_TPLG_TYPE_VENDOR_FW 1000
72#define SND_SOC_TPLG_TYPE_VENDOR_CONFIG 1001
73#define SND_SOC_TPLG_TYPE_VENDOR_COEFF 1002
74#define SND_SOC_TPLG_TYPEVENDOR_CODEC 1003
Christopher Ferris05d08e92016-02-04 13:16:38 -080075#define SND_SOC_TPLG_STREAM_PLAYBACK 0
76#define SND_SOC_TPLG_STREAM_CAPTURE 1
Christopher Ferris106b3a82016-08-24 12:15:38 -070077#define SND_SOC_TPLG_TUPLE_TYPE_UUID 0
78#define SND_SOC_TPLG_TUPLE_TYPE_STRING 1
Christopher Ferris106b3a82016-08-24 12:15:38 -070079#define SND_SOC_TPLG_TUPLE_TYPE_BOOL 2
80#define SND_SOC_TPLG_TUPLE_TYPE_BYTE 3
81#define SND_SOC_TPLG_TUPLE_TYPE_WORD 4
82#define SND_SOC_TPLG_TUPLE_TYPE_SHORT 5
Christopher Ferris6a9755d2017-01-13 14:09:31 -080083#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_RATES (1 << 0)
84#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_CHANNELS (1 << 1)
Christopher Ferris6a9755d2017-01-13 14:09:31 -080085#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2)
Christopher Ferris9ce28842018-10-25 12:11:39 -070086#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
89#define SND_SOC_TPLG_MCLK_CO 0
90#define SND_SOC_TPLG_MCLK_CI 1
Christopher Ferris48af7cb2017-02-21 12:35:09 -080091#define SND_SOC_DAI_FORMAT_I2S 1
Christopher Ferris48af7cb2017-02-21 12:35:09 -080092#define SND_SOC_DAI_FORMAT_RIGHT_J 2
93#define SND_SOC_DAI_FORMAT_LEFT_J 3
94#define SND_SOC_DAI_FORMAT_DSP_A 4
95#define SND_SOC_DAI_FORMAT_DSP_B 5
Christopher Ferris48af7cb2017-02-21 12:35:09 -080096#define SND_SOC_DAI_FORMAT_AC97 6
97#define SND_SOC_DAI_FORMAT_PDM 7
98#define SND_SOC_DAI_FORMAT_MSB SND_SOC_DAI_FORMAT_LEFT_J
99#define SND_SOC_DAI_FORMAT_LSB SND_SOC_DAI_FORMAT_RIGHT_J
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800100#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_RATES (1 << 0)
101#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_CHANNELS (1 << 1)
102#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2)
103#define SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP (1 << 3)
Christopher Ferris05667cd2021-02-16 16:01:34 -0800104#define SND_SOC_TPLG_BCLK_CP 0
105#define SND_SOC_TPLG_BCLK_CC 1
106#define SND_SOC_TPLG_BCLK_CM SND_SOC_TPLG_BCLK_CP
107#define SND_SOC_TPLG_BCLK_CS SND_SOC_TPLG_BCLK_CC
108#define SND_SOC_TPLG_FSYNC_CP 0
109#define SND_SOC_TPLG_FSYNC_CC 1
110#define SND_SOC_TPLG_FSYNC_CM SND_SOC_TPLG_FSYNC_CP
111#define SND_SOC_TPLG_FSYNC_CS SND_SOC_TPLG_FSYNC_CC
Christopher Ferris05d08e92016-02-04 13:16:38 -0800112struct snd_soc_tplg_hdr {
113 __le32 magic;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800114 __le32 abi;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800115 __le32 version;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800116 __le32 type;
117 __le32 size;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800118 __le32 vendor_type;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800119 __le32 payload_size;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800120 __le32 index;
121 __le32 count;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700122} __attribute__((packed));
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800123struct snd_soc_tplg_vendor_uuid_elem {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700124 __le32 token;
125 char uuid[16];
126} __attribute__((packed));
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800127struct snd_soc_tplg_vendor_value_elem {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700128 __le32 token;
129 __le32 value;
130} __attribute__((packed));
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800131struct snd_soc_tplg_vendor_string_elem {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700132 __le32 token;
133 char string[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
134} __attribute__((packed));
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800135struct snd_soc_tplg_vendor_array {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700136 __le32 size;
137 __le32 type;
138 __le32 num_elems;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800139 union {
Christopher Ferris37c3f3c2023-07-10 10:59:05 -0700140 __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_uuid_elem, uuid);
141 __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_value_elem, value);
142 __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_string_elem, string);
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800143 };
Christopher Ferris05d08e92016-02-04 13:16:38 -0800144} __attribute__((packed));
145struct snd_soc_tplg_private {
146 __le32 size;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800147 union {
Christopher Ferrisa4792612022-01-10 13:51:15 -0800148 __DECLARE_FLEX_ARRAY(char, data);
149 __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_array, array);
Christopher Ferris106b3a82016-08-24 12:15:38 -0700150 };
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800151} __attribute__((packed));
Christopher Ferris05d08e92016-02-04 13:16:38 -0800152struct snd_soc_tplg_tlv_dbscale {
153 __le32 min;
154 __le32 step;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800155 __le32 mute;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800156} __attribute__((packed));
157struct snd_soc_tplg_ctl_tlv {
158 __le32 size;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800159 __le32 type;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800160 union {
161 __le32 data[SND_SOC_TPLG_TLV_SIZE];
162 struct snd_soc_tplg_tlv_dbscale scale;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800163 };
Christopher Ferris05d08e92016-02-04 13:16:38 -0800164} __attribute__((packed));
165struct snd_soc_tplg_channel {
166 __le32 size;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800167 __le32 reg;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800168 __le32 shift;
169 __le32 id;
170} __attribute__((packed));
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800171struct snd_soc_tplg_io_ops {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800172 __le32 get;
173 __le32 put;
174 __le32 info;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800175} __attribute__((packed));
Christopher Ferris05d08e92016-02-04 13:16:38 -0800176struct snd_soc_tplg_ctl_hdr {
177 __le32 size;
178 __le32 type;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800179 char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800180 __le32 access;
181 struct snd_soc_tplg_io_ops ops;
182 struct snd_soc_tplg_ctl_tlv tlv;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800183} __attribute__((packed));
Christopher Ferris05d08e92016-02-04 13:16:38 -0800184struct snd_soc_tplg_stream_caps {
185 __le32 size;
186 char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800187 __le64 formats;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800188 __le32 rates;
189 __le32 rate_min;
190 __le32 rate_max;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800191 __le32 channels_min;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800192 __le32 channels_max;
193 __le32 periods_min;
194 __le32 periods_max;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800195 __le32 period_size_min;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800196 __le32 period_size_max;
197 __le32 buffer_size_min;
198 __le32 buffer_size_max;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800199 __le32 sig_bits;
200} __attribute__((packed));
Christopher Ferris05d08e92016-02-04 13:16:38 -0800201struct snd_soc_tplg_stream {
202 __le32 size;
203 char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800204 __le64 format;
205 __le32 rate;
206 __le32 period_bytes;
207 __le32 buffer_bytes;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800208 __le32 channels;
209} __attribute__((packed));
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800210struct snd_soc_tplg_hw_config {
211 __le32 size;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800212 __le32 id;
213 __le32 fmt;
214 __u8 clock_gated;
215 __u8 invert_bclk;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800216 __u8 invert_fsync;
Christopher Ferris05667cd2021-02-16 16:01:34 -0800217 __u8 bclk_provider;
218 __u8 fsync_provider;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800219 __u8 mclk_direction;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800220 __le16 reserved;
221 __le32 mclk_rate;
222 __le32 bclk_rate;
223 __le32 fsync_rate;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800224 __le32 tdm_slots;
225 __le32 tdm_slot_width;
226 __le32 tx_slots;
227 __le32 rx_slots;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800228 __le32 tx_channels;
229 __le32 tx_chanmap[SND_SOC_TPLG_MAX_CHAN];
230 __le32 rx_channels;
231 __le32 rx_chanmap[SND_SOC_TPLG_MAX_CHAN];
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800232} __attribute__((packed));
233struct snd_soc_tplg_manifest {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800234 __le32 size;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800235 __le32 control_elems;
236 __le32 widget_elems;
237 __le32 graph_elems;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700238 __le32 pcm_elems;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800239 __le32 dai_link_elems;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800240 __le32 dai_elems;
241 __le32 reserved[20];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800242 struct snd_soc_tplg_private priv;
243} __attribute__((packed));
244struct snd_soc_tplg_mixer_control {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800245 struct snd_soc_tplg_ctl_hdr hdr;
246 __le32 size;
247 __le32 min;
248 __le32 max;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800249 __le32 platform_max;
250 __le32 invert;
251 __le32 num_channels;
252 struct snd_soc_tplg_channel channel[SND_SOC_TPLG_MAX_CHAN];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800253 struct snd_soc_tplg_private priv;
254} __attribute__((packed));
255struct snd_soc_tplg_enum_control {
256 struct snd_soc_tplg_ctl_hdr hdr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800257 __le32 size;
258 __le32 num_channels;
259 struct snd_soc_tplg_channel channel[SND_SOC_TPLG_MAX_CHAN];
260 __le32 items;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800261 __le32 mask;
262 __le32 count;
263 char texts[SND_SOC_TPLG_NUM_TEXTS][SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
264 __le32 values[SND_SOC_TPLG_NUM_TEXTS * SNDRV_CTL_ELEM_ID_NAME_MAXLEN / 4];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800265 struct snd_soc_tplg_private priv;
266} __attribute__((packed));
267struct snd_soc_tplg_bytes_control {
268 struct snd_soc_tplg_ctl_hdr hdr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800269 __le32 size;
270 __le32 max;
271 __le32 mask;
272 __le32 base;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800273 __le32 num_regs;
274 struct snd_soc_tplg_io_ops ext_ops;
275 struct snd_soc_tplg_private priv;
276} __attribute__((packed));
Christopher Ferris05d08e92016-02-04 13:16:38 -0800277struct snd_soc_tplg_dapm_graph_elem {
278 char sink[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
279 char control[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
280 char source[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800281} __attribute__((packed));
282struct snd_soc_tplg_dapm_widget {
283 __le32 size;
284 __le32 id;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800285 char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
286 char sname[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
287 __le32 reg;
288 __le32 shift;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800289 __le32 mask;
290 __le32 subseq;
291 __le32 invert;
292 __le32 ignore_suspend;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800293 __le16 event_flags;
294 __le16 event_type;
295 __le32 num_kcontrols;
296 struct snd_soc_tplg_private priv;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800297} __attribute__((packed));
298struct snd_soc_tplg_pcm {
299 __le32 size;
300 char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800301 char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
302 __le32 pcm_id;
303 __le32 dai_id;
304 __le32 playback;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800305 __le32 capture;
306 __le32 compress;
307 struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX];
308 __le32 num_streams;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800309 struct snd_soc_tplg_stream_caps caps[2];
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800310 __le32 flag_mask;
311 __le32 flags;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800312 struct snd_soc_tplg_private priv;
313} __attribute__((packed));
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800314struct snd_soc_tplg_link_config {
315 __le32 size;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800316 __le32 id;
317 char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
318 char stream_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
319 struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX];
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800320 __le32 num_streams;
321 struct snd_soc_tplg_hw_config hw_config[SND_SOC_TPLG_HW_CONFIG_MAX];
322 __le32 num_hw_configs;
323 __le32 default_hw_config_id;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800324 __le32 flag_mask;
325 __le32 flags;
326 struct snd_soc_tplg_private priv;
327} __attribute__((packed));
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800328struct snd_soc_tplg_dai {
329 __le32 size;
330 char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
331 __le32 dai_id;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800332 __le32 playback;
333 __le32 capture;
334 struct snd_soc_tplg_stream_caps caps[2];
335 __le32 flag_mask;
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800336 __le32 flags;
337 struct snd_soc_tplg_private priv;
338} __attribute__((packed));
Christopher Ferris9ce28842018-10-25 12:11:39 -0700339struct snd_soc_tplg_manifest_v4 {
340 __le32 size;
341 __le32 control_elems;
342 __le32 widget_elems;
343 __le32 graph_elems;
344 __le32 pcm_elems;
345 __le32 dai_link_elems;
346 struct snd_soc_tplg_private priv;
Colin Cross4ac33222022-12-15 15:45:35 -0800347} __attribute__((__packed__));
Christopher Ferris9ce28842018-10-25 12:11:39 -0700348struct snd_soc_tplg_stream_caps_v4 {
349 __le32 size;
350 char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
351 __le64 formats;
352 __le32 rates;
353 __le32 rate_min;
354 __le32 rate_max;
355 __le32 channels_min;
356 __le32 channels_max;
357 __le32 periods_min;
358 __le32 periods_max;
359 __le32 period_size_min;
360 __le32 period_size_max;
361 __le32 buffer_size_min;
362 __le32 buffer_size_max;
Colin Cross4ac33222022-12-15 15:45:35 -0800363} __attribute__((__packed__));
Christopher Ferris9ce28842018-10-25 12:11:39 -0700364struct snd_soc_tplg_pcm_v4 {
365 __le32 size;
366 char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
367 char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
368 __le32 pcm_id;
369 __le32 dai_id;
370 __le32 playback;
371 __le32 capture;
372 __le32 compress;
373 struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX];
374 __le32 num_streams;
375 struct snd_soc_tplg_stream_caps_v4 caps[2];
Colin Cross4ac33222022-12-15 15:45:35 -0800376} __attribute__((__packed__));
Christopher Ferris9ce28842018-10-25 12:11:39 -0700377struct snd_soc_tplg_link_config_v4 {
378 __le32 size;
379 __le32 id;
380 struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX];
381 __le32 num_streams;
Colin Cross4ac33222022-12-15 15:45:35 -0800382} __attribute__((__packed__));
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800383#endif