]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - include/uapi/sound/asoc.h
ASoC: topology: Rename the function to create a FE link
[mirror_ubuntu-zesty-kernel.git] / include / uapi / sound / asoc.h
CommitLineData
c147c0e1
LG
1/*
2 * uapi/sound/asoc.h -- ALSA SoC Firmware Controls and DAPM
3 *
4 * Copyright (C) 2012 Texas Instruments Inc.
5 * Copyright (C) 2015 Intel Corporation.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * Simple file API to load FW that includes mixers, coefficients, DAPM graphs,
12 * algorithms, equalisers, DAIs, widgets etc.
13*/
14
15#ifndef __LINUX_UAPI_SND_ASOC_H
16#define __LINUX_UAPI_SND_ASOC_H
17
18#include <linux/types.h>
19#include <sound/asound.h>
20
8c90503b
MB
21#ifndef __KERNEL__
22#error This API is an early revision and not enabled in the current
23#error kernel release, it will be enabled in a future kernel version
24#error with incompatible changes to what is here.
25#endif
26
c147c0e1
LG
27/*
28 * Maximum number of channels topology kcontrol can represent.
29 */
30#define SND_SOC_TPLG_MAX_CHAN 8
31
32/*
33 * Maximum number of PCM formats capability
34 */
35#define SND_SOC_TPLG_MAX_FORMATS 16
36
37/*
38 * Maximum number of PCM stream configs
39 */
40#define SND_SOC_TPLG_STREAM_CONFIG_MAX 8
41
676c6b52
ML
42/*
43 * Maximum number of physical link's hardware configs
44 */
45#define SND_SOC_TPLG_HW_CONFIG_MAX 8
46
c147c0e1
LG
47/* individual kcontrol info types - can be mixed with other types */
48#define SND_SOC_TPLG_CTL_VOLSW 1
49#define SND_SOC_TPLG_CTL_VOLSW_SX 2
50#define SND_SOC_TPLG_CTL_VOLSW_XR_SX 3
51#define SND_SOC_TPLG_CTL_ENUM 4
52#define SND_SOC_TPLG_CTL_BYTES 5
53#define SND_SOC_TPLG_CTL_ENUM_VALUE 6
54#define SND_SOC_TPLG_CTL_RANGE 7
55#define SND_SOC_TPLG_CTL_STROBE 8
56
57
58/* individual widget kcontrol info types - can be mixed with other types */
59#define SND_SOC_TPLG_DAPM_CTL_VOLSW 64
60#define SND_SOC_TPLG_DAPM_CTL_ENUM_DOUBLE 65
61#define SND_SOC_TPLG_DAPM_CTL_ENUM_VIRT 66
62#define SND_SOC_TPLG_DAPM_CTL_ENUM_VALUE 67
63#define SND_SOC_TPLG_DAPM_CTL_PIN 68
64
65/* DAPM widget types - add new items to the end */
66#define SND_SOC_TPLG_DAPM_INPUT 0
67#define SND_SOC_TPLG_DAPM_OUTPUT 1
68#define SND_SOC_TPLG_DAPM_MUX 2
69#define SND_SOC_TPLG_DAPM_MIXER 3
70#define SND_SOC_TPLG_DAPM_PGA 4
71#define SND_SOC_TPLG_DAPM_OUT_DRV 5
72#define SND_SOC_TPLG_DAPM_ADC 6
73#define SND_SOC_TPLG_DAPM_DAC 7
74#define SND_SOC_TPLG_DAPM_SWITCH 8
75#define SND_SOC_TPLG_DAPM_PRE 9
76#define SND_SOC_TPLG_DAPM_POST 10
77#define SND_SOC_TPLG_DAPM_AIF_IN 11
78#define SND_SOC_TPLG_DAPM_AIF_OUT 12
79#define SND_SOC_TPLG_DAPM_DAI_IN 13
80#define SND_SOC_TPLG_DAPM_DAI_OUT 14
81#define SND_SOC_TPLG_DAPM_DAI_LINK 15
82#define SND_SOC_TPLG_DAPM_LAST SND_SOC_TPLG_DAPM_DAI_LINK
83
84/* Header magic number and string sizes */
85#define SND_SOC_TPLG_MAGIC 0x41536F43 /* ASoC */
86
87/* string sizes */
88#define SND_SOC_TPLG_NUM_TEXTS 16
89
90/* ABI version */
288b8da7
ML
91#define SND_SOC_TPLG_ABI_VERSION 0x5 /* current version */
92#define SND_SOC_TPLG_ABI_VERSION_MIN 0x4 /* oldest version supported */
c147c0e1
LG
93
94/* Max size of TLV data */
95#define SND_SOC_TPLG_TLV_SIZE 32
96
97/*
98 * File and Block header data types.
99 * Add new generic and vendor types to end of list.
100 * Generic types are handled by the core whilst vendors types are passed
101 * to the component drivers for handling.
102 */
103#define SND_SOC_TPLG_TYPE_MIXER 1
104#define SND_SOC_TPLG_TYPE_BYTES 2
105#define SND_SOC_TPLG_TYPE_ENUM 3
106#define SND_SOC_TPLG_TYPE_DAPM_GRAPH 4
107#define SND_SOC_TPLG_TYPE_DAPM_WIDGET 5
108#define SND_SOC_TPLG_TYPE_DAI_LINK 6
109#define SND_SOC_TPLG_TYPE_PCM 7
110#define SND_SOC_TPLG_TYPE_MANIFEST 8
111#define SND_SOC_TPLG_TYPE_CODEC_LINK 9
7c545b32
VP
112#define SND_SOC_TPLG_TYPE_BACKEND_LINK 10
113#define SND_SOC_TPLG_TYPE_PDATA 11
dc31e741
ML
114#define SND_SOC_TPLG_TYPE_BE_DAI 12
115#define SND_SOC_TPLG_TYPE_MAX SND_SOC_TPLG_TYPE_BE_DAI
c147c0e1
LG
116
117/* vendor block IDs - please add new vendor types to end */
118#define SND_SOC_TPLG_TYPE_VENDOR_FW 1000
119#define SND_SOC_TPLG_TYPE_VENDOR_CONFIG 1001
120#define SND_SOC_TPLG_TYPE_VENDOR_COEFF 1002
121#define SND_SOC_TPLG_TYPEVENDOR_CODEC 1003
122
123#define SND_SOC_TPLG_STREAM_PLAYBACK 0
124#define SND_SOC_TPLG_STREAM_CAPTURE 1
125
e42839b0
ML
126/* vendor tuple types */
127#define SND_SOC_TPLG_TUPLE_TYPE_UUID 0
128#define SND_SOC_TPLG_TUPLE_TYPE_STRING 1
129#define SND_SOC_TPLG_TUPLE_TYPE_BOOL 2
130#define SND_SOC_TPLG_TUPLE_TYPE_BYTE 3
131#define SND_SOC_TPLG_TUPLE_TYPE_WORD 4
132#define SND_SOC_TPLG_TUPLE_TYPE_SHORT 5
133
dc31e741
ML
134/* BE DAI flags */
135#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_RATES (1 << 0)
136#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_CHANNELS (1 << 1)
137#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2)
138
d2e3cb85
ML
139/* DAI physical PCM data formats.
140 * Add new formats to the end of the list.
141 */
142#define SND_SOC_DAI_FORMAT_I2S 1 /* I2S mode */
143#define SND_SOC_DAI_FORMAT_RIGHT_J 2 /* Right Justified mode */
144#define SND_SOC_DAI_FORMAT_LEFT_J 3 /* Left Justified mode */
145#define SND_SOC_DAI_FORMAT_DSP_A 4 /* L data MSB after FRM LRC */
146#define SND_SOC_DAI_FORMAT_DSP_B 5 /* L data MSB during FRM LRC */
147#define SND_SOC_DAI_FORMAT_AC97 6 /* AC97 */
148#define SND_SOC_DAI_FORMAT_PDM 7 /* Pulse density modulation */
149
150/* left and right justified also known as MSB and LSB respectively */
151#define SND_SOC_DAI_FORMAT_MSB SND_SOC_DAI_FORMAT_LEFT_J
152#define SND_SOC_DAI_FORMAT_LSB SND_SOC_DAI_FORMAT_RIGHT_J
153
717a8e72
ML
154/* DAI link flags */
155#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_RATES (1 << 0)
156#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_CHANNELS (1 << 1)
157#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2)
158
c147c0e1
LG
159/*
160 * Block Header.
9c3a4732 161 * This header precedes all object and object arrays below.
c147c0e1
LG
162 */
163struct snd_soc_tplg_hdr {
164 __le32 magic; /* magic number */
165 __le32 abi; /* ABI version */
166 __le32 version; /* optional vendor specific version details */
167 __le32 type; /* SND_SOC_TPLG_TYPE_ */
168 __le32 size; /* size of this structure */
169 __le32 vendor_type; /* optional vendor specific type info */
170 __le32 payload_size; /* data bytes, excluding this header */
171 __le32 index; /* identifier for block */
172 __le32 count; /* number of elements in block */
173} __attribute__((packed));
174
e42839b0
ML
175/* vendor tuple for uuid */
176struct snd_soc_tplg_vendor_uuid_elem {
177 __le32 token;
178 char uuid[16];
179} __attribute__((packed));
180
181/* vendor tuple for a bool/byte/short/word value */
182struct snd_soc_tplg_vendor_value_elem {
183 __le32 token;
184 __le32 value;
185} __attribute__((packed));
186
187/* vendor tuple for string */
188struct snd_soc_tplg_vendor_string_elem {
189 __le32 token;
190 char string[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
191} __attribute__((packed));
192
193struct snd_soc_tplg_vendor_array {
194 __le32 size; /* size in bytes of the array, including all elements */
195 __le32 type; /* SND_SOC_TPLG_TUPLE_TYPE_ */
196 __le32 num_elems; /* number of elements in array */
197 union {
198 struct snd_soc_tplg_vendor_uuid_elem uuid[0];
199 struct snd_soc_tplg_vendor_value_elem value[0];
200 struct snd_soc_tplg_vendor_string_elem string[0];
201 };
202} __attribute__((packed));
203
c147c0e1
LG
204/*
205 * Private data.
206 * All topology objects may have private data that can be used by the driver or
207 * firmware. Core will ignore this data.
208 */
209struct snd_soc_tplg_private {
210 __le32 size; /* in bytes of private data */
e42839b0
ML
211 union {
212 char data[0];
213 struct snd_soc_tplg_vendor_array array[0];
214 };
c147c0e1
LG
215} __attribute__((packed));
216
217/*
218 * Kcontrol TLV data.
219 */
28a87eeb
ML
220struct snd_soc_tplg_tlv_dbscale {
221 __le32 min;
222 __le32 step;
223 __le32 mute;
224} __attribute__((packed));
225
c147c0e1 226struct snd_soc_tplg_ctl_tlv {
28a87eeb
ML
227 __le32 size; /* in bytes of this structure */
228 __le32 type; /* SNDRV_CTL_TLVT_*, type of TLV */
229 union {
230 __le32 data[SND_SOC_TPLG_TLV_SIZE];
231 struct snd_soc_tplg_tlv_dbscale scale;
232 };
c147c0e1
LG
233} __attribute__((packed));
234
235/*
236 * Kcontrol channel data
237 */
238struct snd_soc_tplg_channel {
239 __le32 size; /* in bytes of this structure */
240 __le32 reg;
241 __le32 shift;
242 __le32 id; /* ID maps to Left, Right, LFE etc */
243} __attribute__((packed));
244
245/*
cb88498b
ML
246 * Genericl Operations IDs, for binding Kcontrol or Bytes ext ops
247 * Kcontrol ops need get/put/info.
248 * Bytes ext ops need get/put.
c147c0e1 249 */
cb88498b 250struct snd_soc_tplg_io_ops {
c147c0e1
LG
251 __le32 get;
252 __le32 put;
253 __le32 info;
254} __attribute__((packed));
255
256/*
257 * kcontrol header
258 */
259struct snd_soc_tplg_ctl_hdr {
260 __le32 size; /* in bytes of this structure */
261 __le32 type;
262 char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
263 __le32 access;
cb88498b 264 struct snd_soc_tplg_io_ops ops;
28a87eeb 265 struct snd_soc_tplg_ctl_tlv tlv;
c147c0e1
LG
266} __attribute__((packed));
267
268/*
269 * Stream Capabilities
270 */
271struct snd_soc_tplg_stream_caps {
272 __le32 size; /* in bytes of this structure */
273 char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
478d0d39 274 __le64 formats; /* supported formats SNDRV_PCM_FMTBIT_* */
c147c0e1
LG
275 __le32 rates; /* supported rates SNDRV_PCM_RATE_* */
276 __le32 rate_min; /* min rate */
277 __le32 rate_max; /* max rate */
278 __le32 channels_min; /* min channels */
279 __le32 channels_max; /* max channels */
280 __le32 periods_min; /* min number of periods */
281 __le32 periods_max; /* max number of periods */
282 __le32 period_size_min; /* min period size bytes */
283 __le32 period_size_max; /* max period size bytes */
284 __le32 buffer_size_min; /* min buffer size bytes */
285 __le32 buffer_size_max; /* max buffer size bytes */
f918e169 286 __le32 sig_bits; /* number of bits of content */
c147c0e1
LG
287} __attribute__((packed));
288
289/*
290 * FE or BE Stream configuration supported by SW/FW
291 */
292struct snd_soc_tplg_stream {
293 __le32 size; /* in bytes of this structure */
731324f5 294 char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* Name of the stream */
c147c0e1
LG
295 __le64 format; /* SNDRV_PCM_FMTBIT_* */
296 __le32 rate; /* SNDRV_PCM_RATE_* */
297 __le32 period_bytes; /* size of period in bytes */
298 __le32 buffer_bytes; /* size of buffer in bytes */
299 __le32 channels; /* channels */
c147c0e1
LG
300} __attribute__((packed));
301
676c6b52
ML
302
303/*
304 * Describes a physical link's runtime supported hardware config,
305 * i.e. hardware audio formats.
306 */
307struct snd_soc_tplg_hw_config {
308 __le32 size; /* in bytes of this structure */
309 __le32 id; /* unique ID - - used to match */
310 __le32 fmt; /* SND_SOC_DAI_FORMAT_ format value */
311 __u8 clock_gated; /* 1 if clock can be gated to save power */
312 __u8 invert_bclk; /* 1 for inverted BCLK, 0 for normal */
313 __u8 invert_fsync; /* 1 for inverted frame clock, 0 for normal */
314 __u8 bclk_master; /* 1 for master of BCLK, 0 for slave */
315 __u8 fsync_master; /* 1 for master of FSYNC, 0 for slave */
316 __u8 mclk_direction; /* 0 for input, 1 for output */
317 __le16 reserved; /* for 32bit alignment */
318 __le32 mclk_rate; /* MCLK or SYSCLK freqency in Hz */
319 __le32 bclk_rate; /* BCLK freqency in Hz */
320 __le32 fsync_rate; /* frame clock in Hz */
321 __le32 tdm_slots; /* number of TDM slots in use */
322 __le32 tdm_slot_width; /* width in bits for each slot */
323 __le32 tx_slots; /* bit mask for active Tx slots */
324 __le32 rx_slots; /* bit mask for active Rx slots */
325 __le32 tx_channels; /* number of Tx channels */
326 __le32 tx_chanmap[SND_SOC_TPLG_MAX_CHAN]; /* array of slot number */
327 __le32 rx_channels; /* number of Rx channels */
328 __le32 rx_chanmap[SND_SOC_TPLG_MAX_CHAN]; /* array of slot number */
329} __attribute__((packed));
330
c147c0e1
LG
331/*
332 * Manifest. List totals for each payload type. Not used in parsing, but will
333 * be passed to the component driver before any other objects in order for any
9c3a4732 334 * global component resource allocations.
c147c0e1
LG
335 *
336 * File block representation for manifest :-
337 * +-----------------------------------+----+
338 * | struct snd_soc_tplg_hdr | 1 |
339 * +-----------------------------------+----+
340 * | struct snd_soc_tplg_manifest | 1 |
341 * +-----------------------------------+----+
342 */
343struct snd_soc_tplg_manifest {
344 __le32 size; /* in bytes of this structure */
345 __le32 control_elems; /* number of control elements */
346 __le32 widget_elems; /* number of widget elements */
347 __le32 graph_elems; /* number of graph elements */
4b6c56c2 348 __le32 pcm_elems; /* number of PCM elements */
c147c0e1 349 __le32 dai_link_elems; /* number of DAI link elements */
dc31e741
ML
350 __le32 be_dai_elems; /* number of BE DAI elements */
351 __le32 reserved[20]; /* reserved for new ABI element types */
c3879956 352 struct snd_soc_tplg_private priv;
c147c0e1
LG
353} __attribute__((packed));
354
355/*
356 * Mixer kcontrol.
357 *
358 * File block representation for mixer kcontrol :-
359 * +-----------------------------------+----+
360 * | struct snd_soc_tplg_hdr | 1 |
361 * +-----------------------------------+----+
362 * | struct snd_soc_tplg_mixer_control | N |
363 * +-----------------------------------+----+
364 */
365struct snd_soc_tplg_mixer_control {
366 struct snd_soc_tplg_ctl_hdr hdr;
367 __le32 size; /* in bytes of this structure */
368 __le32 min;
369 __le32 max;
370 __le32 platform_max;
371 __le32 invert;
372 __le32 num_channels;
373 struct snd_soc_tplg_channel channel[SND_SOC_TPLG_MAX_CHAN];
c147c0e1
LG
374 struct snd_soc_tplg_private priv;
375} __attribute__((packed));
376
377/*
378 * Enumerated kcontrol
379 *
380 * File block representation for enum kcontrol :-
381 * +-----------------------------------+----+
382 * | struct snd_soc_tplg_hdr | 1 |
383 * +-----------------------------------+----+
384 * | struct snd_soc_tplg_enum_control | N |
385 * +-----------------------------------+----+
386 */
387struct snd_soc_tplg_enum_control {
388 struct snd_soc_tplg_ctl_hdr hdr;
389 __le32 size; /* in bytes of this structure */
390 __le32 num_channels;
391 struct snd_soc_tplg_channel channel[SND_SOC_TPLG_MAX_CHAN];
392 __le32 items;
393 __le32 mask;
394 __le32 count;
395 char texts[SND_SOC_TPLG_NUM_TEXTS][SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
396 __le32 values[SND_SOC_TPLG_NUM_TEXTS * SNDRV_CTL_ELEM_ID_NAME_MAXLEN / 4];
397 struct snd_soc_tplg_private priv;
398} __attribute__((packed));
399
400/*
401 * Bytes kcontrol
402 *
403 * File block representation for bytes kcontrol :-
404 * +-----------------------------------+----+
405 * | struct snd_soc_tplg_hdr | 1 |
406 * +-----------------------------------+----+
407 * | struct snd_soc_tplg_bytes_control | N |
408 * +-----------------------------------+----+
409 */
410struct snd_soc_tplg_bytes_control {
411 struct snd_soc_tplg_ctl_hdr hdr;
412 __le32 size; /* in bytes of this structure */
413 __le32 max;
414 __le32 mask;
415 __le32 base;
416 __le32 num_regs;
cb88498b 417 struct snd_soc_tplg_io_ops ext_ops;
c147c0e1
LG
418 struct snd_soc_tplg_private priv;
419} __attribute__((packed));
420
421/*
422 * DAPM Graph Element
423 *
424 * File block representation for DAPM graph elements :-
425 * +-------------------------------------+----+
426 * | struct snd_soc_tplg_hdr | 1 |
427 * +-------------------------------------+----+
428 * | struct snd_soc_tplg_dapm_graph_elem | N |
429 * +-------------------------------------+----+
430 */
431struct snd_soc_tplg_dapm_graph_elem {
432 char sink[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
433 char control[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
434 char source[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
435} __attribute__((packed));
436
437/*
438 * DAPM Widget.
439 *
440 * File block representation for DAPM widget :-
441 * +-------------------------------------+-----+
442 * | struct snd_soc_tplg_hdr | 1 |
443 * +-------------------------------------+-----+
444 * | struct snd_soc_tplg_dapm_widget | N |
445 * +-------------------------------------+-----+
446 * | struct snd_soc_tplg_enum_control | 0|1 |
447 * | struct snd_soc_tplg_mixer_control | 0|N |
448 * +-------------------------------------+-----+
449 *
450 * Optional enum or mixer control can be appended to the end of each widget
451 * in the block.
452 */
453struct snd_soc_tplg_dapm_widget {
454 __le32 size; /* in bytes of this structure */
455 __le32 id; /* SND_SOC_DAPM_CTL */
456 char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
457 char sname[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
458
459 __le32 reg; /* negative reg = no direct dapm */
460 __le32 shift; /* bits to shift */
461 __le32 mask; /* non-shifted mask */
6dc6db79 462 __le32 subseq; /* sort within widget type */
e8b3fe8f
VP
463 __le32 invert; /* invert the power bit */
464 __le32 ignore_suspend; /* kept enabled over suspend */
465 __le16 event_flags;
466 __le16 event_type;
467 __le32 num_kcontrols;
c147c0e1
LG
468 struct snd_soc_tplg_private priv;
469 /*
470 * kcontrols that relate to this widget
471 * follow here after widget private data
472 */
473} __attribute__((packed));
474
c147c0e1
LG
475
476/*
5b2688a5 477 * Describes SW/FW specific features of PCM (FE DAI & DAI link).
c147c0e1 478 *
5b2688a5 479 * File block representation for PCM :-
c147c0e1
LG
480 * +-----------------------------------+-----+
481 * | struct snd_soc_tplg_hdr | 1 |
482 * +-----------------------------------+-----+
5b2688a5 483 * | struct snd_soc_tplg_pcm | N |
c147c0e1
LG
484 * +-----------------------------------+-----+
485 */
5b2688a5 486struct snd_soc_tplg_pcm {
c147c0e1 487 __le32 size; /* in bytes of this structure */
5b2688a5
VP
488 char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
489 char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
b84fff5a 490 __le32 pcm_id; /* unique ID - used to match with DAI link */
5b2688a5
VP
491 __le32 dai_id; /* unique ID - used to match */
492 __le32 playback; /* supports playback mode */
493 __le32 capture; /* supports capture mode */
494 __le32 compress; /* 1 = compressed; 0 = PCM */
495 struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */
496 __le32 num_streams; /* number of streams */
497 struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */
717a8e72
ML
498 __le32 flag_mask; /* bitmask of flags to configure */
499 __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */
500 struct snd_soc_tplg_private priv;
c147c0e1
LG
501} __attribute__((packed));
502
e2a9df65
VP
503
504/*
676c6b52 505 * Describes the physical link runtime supported configs or params
e2a9df65 506 *
676c6b52 507 * File block representation for physical link config :-
e2a9df65
VP
508 * +-----------------------------------+-----+
509 * | struct snd_soc_tplg_hdr | 1 |
510 * +-----------------------------------+-----+
511 * | struct snd_soc_tplg_link_config | N |
512 * +-----------------------------------+-----+
513 */
514struct snd_soc_tplg_link_config {
515 __le32 size; /* in bytes of this structure */
516 __le32 id; /* unique ID - used to match */
676c6b52
ML
517 char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */
518 char stream_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* stream name - used to match */
e2a9df65
VP
519 struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */
520 __le32 num_streams; /* number of streams */
676c6b52
ML
521 struct snd_soc_tplg_hw_config hw_config[SND_SOC_TPLG_HW_CONFIG_MAX]; /* hw configs */
522 __le32 num_hw_configs; /* number of hw configs */
523 __le32 default_hw_config_id; /* default hw config ID for init */
524 __le32 flag_mask; /* bitmask of flags to configure */
525 __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */
526 struct snd_soc_tplg_private priv;
e2a9df65 527} __attribute__((packed));
dc31e741
ML
528
529/*
530 * Describes SW/FW specific features of BE DAI.
531 *
532 * File block representation for BE DAI :-
533 * +-----------------------------------+-----+
534 * | struct snd_soc_tplg_hdr | 1 |
535 * +-----------------------------------+-----+
536 * | struct snd_soc_tplg_be_dai | N |
537 * +-----------------------------------+-----+
538 */
539struct snd_soc_tplg_be_dai {
540 __le32 size; /* in bytes of this structure */
541 char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */
542 __le32 dai_id; /* unique ID - used to match */
543 __le32 playback; /* supports playback mode */
544 __le32 capture; /* supports capture mode */
545 struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */
546 __le32 flag_mask; /* bitmask of flags to configure */
547 __le32 flags; /* SND_SOC_TPLG_DAI_FLGBIT_* */
548 struct snd_soc_tplg_private priv;
549} __attribute__((packed));
c147c0e1 550#endif