Liam Girdwood | c147c0e | 2015-05-29 19:06:13 +0100 | [diff] [blame] | 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 | |
Mark Brown | 8c90503 | 2015-08-17 22:59:25 -0700 | [diff] [blame] | 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 | |
Liam Girdwood | c147c0e | 2015-05-29 19:06:13 +0100 | [diff] [blame] | 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 | |
| 42 | /* individual kcontrol info types - can be mixed with other types */ |
| 43 | #define SND_SOC_TPLG_CTL_VOLSW 1 |
| 44 | #define SND_SOC_TPLG_CTL_VOLSW_SX 2 |
| 45 | #define SND_SOC_TPLG_CTL_VOLSW_XR_SX 3 |
| 46 | #define SND_SOC_TPLG_CTL_ENUM 4 |
| 47 | #define SND_SOC_TPLG_CTL_BYTES 5 |
| 48 | #define SND_SOC_TPLG_CTL_ENUM_VALUE 6 |
| 49 | #define SND_SOC_TPLG_CTL_RANGE 7 |
| 50 | #define SND_SOC_TPLG_CTL_STROBE 8 |
| 51 | |
| 52 | |
| 53 | /* individual widget kcontrol info types - can be mixed with other types */ |
| 54 | #define SND_SOC_TPLG_DAPM_CTL_VOLSW 64 |
| 55 | #define SND_SOC_TPLG_DAPM_CTL_ENUM_DOUBLE 65 |
| 56 | #define SND_SOC_TPLG_DAPM_CTL_ENUM_VIRT 66 |
| 57 | #define SND_SOC_TPLG_DAPM_CTL_ENUM_VALUE 67 |
| 58 | #define SND_SOC_TPLG_DAPM_CTL_PIN 68 |
| 59 | |
| 60 | /* DAPM widget types - add new items to the end */ |
| 61 | #define SND_SOC_TPLG_DAPM_INPUT 0 |
| 62 | #define SND_SOC_TPLG_DAPM_OUTPUT 1 |
| 63 | #define SND_SOC_TPLG_DAPM_MUX 2 |
| 64 | #define SND_SOC_TPLG_DAPM_MIXER 3 |
| 65 | #define SND_SOC_TPLG_DAPM_PGA 4 |
| 66 | #define SND_SOC_TPLG_DAPM_OUT_DRV 5 |
| 67 | #define SND_SOC_TPLG_DAPM_ADC 6 |
| 68 | #define SND_SOC_TPLG_DAPM_DAC 7 |
| 69 | #define SND_SOC_TPLG_DAPM_SWITCH 8 |
| 70 | #define SND_SOC_TPLG_DAPM_PRE 9 |
| 71 | #define SND_SOC_TPLG_DAPM_POST 10 |
| 72 | #define SND_SOC_TPLG_DAPM_AIF_IN 11 |
| 73 | #define SND_SOC_TPLG_DAPM_AIF_OUT 12 |
| 74 | #define SND_SOC_TPLG_DAPM_DAI_IN 13 |
| 75 | #define SND_SOC_TPLG_DAPM_DAI_OUT 14 |
| 76 | #define SND_SOC_TPLG_DAPM_DAI_LINK 15 |
| 77 | #define SND_SOC_TPLG_DAPM_LAST SND_SOC_TPLG_DAPM_DAI_LINK |
| 78 | |
| 79 | /* Header magic number and string sizes */ |
| 80 | #define SND_SOC_TPLG_MAGIC 0x41536F43 /* ASoC */ |
| 81 | |
| 82 | /* string sizes */ |
| 83 | #define SND_SOC_TPLG_NUM_TEXTS 16 |
| 84 | |
| 85 | /* ABI version */ |
Vedang Patel | 5b2688a | 2015-09-30 17:28:47 +0800 | [diff] [blame^] | 86 | #define SND_SOC_TPLG_ABI_VERSION 0x4 |
Liam Girdwood | c147c0e | 2015-05-29 19:06:13 +0100 | [diff] [blame] | 87 | |
| 88 | /* Max size of TLV data */ |
| 89 | #define SND_SOC_TPLG_TLV_SIZE 32 |
| 90 | |
| 91 | /* |
| 92 | * File and Block header data types. |
| 93 | * Add new generic and vendor types to end of list. |
| 94 | * Generic types are handled by the core whilst vendors types are passed |
| 95 | * to the component drivers for handling. |
| 96 | */ |
| 97 | #define SND_SOC_TPLG_TYPE_MIXER 1 |
| 98 | #define SND_SOC_TPLG_TYPE_BYTES 2 |
| 99 | #define SND_SOC_TPLG_TYPE_ENUM 3 |
| 100 | #define SND_SOC_TPLG_TYPE_DAPM_GRAPH 4 |
| 101 | #define SND_SOC_TPLG_TYPE_DAPM_WIDGET 5 |
| 102 | #define SND_SOC_TPLG_TYPE_DAI_LINK 6 |
| 103 | #define SND_SOC_TPLG_TYPE_PCM 7 |
| 104 | #define SND_SOC_TPLG_TYPE_MANIFEST 8 |
| 105 | #define SND_SOC_TPLG_TYPE_CODEC_LINK 9 |
Liam Girdwood | c7bcf87 | 2015-08-05 14:41:15 +0100 | [diff] [blame] | 106 | #define SND_SOC_TPLG_TYPE_PDATA 10 |
| 107 | #define SND_SOC_TPLG_TYPE_MAX SND_SOC_TPLG_TYPE_PDATA |
Liam Girdwood | c147c0e | 2015-05-29 19:06:13 +0100 | [diff] [blame] | 108 | |
| 109 | /* vendor block IDs - please add new vendor types to end */ |
| 110 | #define SND_SOC_TPLG_TYPE_VENDOR_FW 1000 |
| 111 | #define SND_SOC_TPLG_TYPE_VENDOR_CONFIG 1001 |
| 112 | #define SND_SOC_TPLG_TYPE_VENDOR_COEFF 1002 |
| 113 | #define SND_SOC_TPLG_TYPEVENDOR_CODEC 1003 |
| 114 | |
| 115 | #define SND_SOC_TPLG_STREAM_PLAYBACK 0 |
| 116 | #define SND_SOC_TPLG_STREAM_CAPTURE 1 |
| 117 | |
| 118 | /* |
| 119 | * Block Header. |
Vinod Koul | 9c3a473 | 2015-06-29 17:36:45 +0100 | [diff] [blame] | 120 | * This header precedes all object and object arrays below. |
Liam Girdwood | c147c0e | 2015-05-29 19:06:13 +0100 | [diff] [blame] | 121 | */ |
| 122 | struct snd_soc_tplg_hdr { |
| 123 | __le32 magic; /* magic number */ |
| 124 | __le32 abi; /* ABI version */ |
| 125 | __le32 version; /* optional vendor specific version details */ |
| 126 | __le32 type; /* SND_SOC_TPLG_TYPE_ */ |
| 127 | __le32 size; /* size of this structure */ |
| 128 | __le32 vendor_type; /* optional vendor specific type info */ |
| 129 | __le32 payload_size; /* data bytes, excluding this header */ |
| 130 | __le32 index; /* identifier for block */ |
| 131 | __le32 count; /* number of elements in block */ |
| 132 | } __attribute__((packed)); |
| 133 | |
| 134 | /* |
| 135 | * Private data. |
| 136 | * All topology objects may have private data that can be used by the driver or |
| 137 | * firmware. Core will ignore this data. |
| 138 | */ |
| 139 | struct snd_soc_tplg_private { |
| 140 | __le32 size; /* in bytes of private data */ |
| 141 | char data[0]; |
| 142 | } __attribute__((packed)); |
| 143 | |
| 144 | /* |
| 145 | * Kcontrol TLV data. |
| 146 | */ |
Mengdong Lin | 28a87ee | 2015-08-05 14:41:13 +0100 | [diff] [blame] | 147 | struct snd_soc_tplg_tlv_dbscale { |
| 148 | __le32 min; |
| 149 | __le32 step; |
| 150 | __le32 mute; |
| 151 | } __attribute__((packed)); |
| 152 | |
Liam Girdwood | c147c0e | 2015-05-29 19:06:13 +0100 | [diff] [blame] | 153 | struct snd_soc_tplg_ctl_tlv { |
Mengdong Lin | 28a87ee | 2015-08-05 14:41:13 +0100 | [diff] [blame] | 154 | __le32 size; /* in bytes of this structure */ |
| 155 | __le32 type; /* SNDRV_CTL_TLVT_*, type of TLV */ |
| 156 | union { |
| 157 | __le32 data[SND_SOC_TPLG_TLV_SIZE]; |
| 158 | struct snd_soc_tplg_tlv_dbscale scale; |
| 159 | }; |
Liam Girdwood | c147c0e | 2015-05-29 19:06:13 +0100 | [diff] [blame] | 160 | } __attribute__((packed)); |
| 161 | |
| 162 | /* |
| 163 | * Kcontrol channel data |
| 164 | */ |
| 165 | struct snd_soc_tplg_channel { |
| 166 | __le32 size; /* in bytes of this structure */ |
| 167 | __le32 reg; |
| 168 | __le32 shift; |
| 169 | __le32 id; /* ID maps to Left, Right, LFE etc */ |
| 170 | } __attribute__((packed)); |
| 171 | |
| 172 | /* |
Mengdong Lin | cb88498 | 2015-08-05 14:41:14 +0100 | [diff] [blame] | 173 | * Genericl Operations IDs, for binding Kcontrol or Bytes ext ops |
| 174 | * Kcontrol ops need get/put/info. |
| 175 | * Bytes ext ops need get/put. |
Liam Girdwood | c147c0e | 2015-05-29 19:06:13 +0100 | [diff] [blame] | 176 | */ |
Mengdong Lin | cb88498 | 2015-08-05 14:41:14 +0100 | [diff] [blame] | 177 | struct snd_soc_tplg_io_ops { |
Liam Girdwood | c147c0e | 2015-05-29 19:06:13 +0100 | [diff] [blame] | 178 | __le32 get; |
| 179 | __le32 put; |
| 180 | __le32 info; |
| 181 | } __attribute__((packed)); |
| 182 | |
| 183 | /* |
| 184 | * kcontrol header |
| 185 | */ |
| 186 | struct snd_soc_tplg_ctl_hdr { |
| 187 | __le32 size; /* in bytes of this structure */ |
| 188 | __le32 type; |
| 189 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
| 190 | __le32 access; |
Mengdong Lin | cb88498 | 2015-08-05 14:41:14 +0100 | [diff] [blame] | 191 | struct snd_soc_tplg_io_ops ops; |
Mengdong Lin | 28a87ee | 2015-08-05 14:41:13 +0100 | [diff] [blame] | 192 | struct snd_soc_tplg_ctl_tlv tlv; |
Liam Girdwood | c147c0e | 2015-05-29 19:06:13 +0100 | [diff] [blame] | 193 | } __attribute__((packed)); |
| 194 | |
| 195 | /* |
| 196 | * Stream Capabilities |
| 197 | */ |
| 198 | struct snd_soc_tplg_stream_caps { |
| 199 | __le32 size; /* in bytes of this structure */ |
| 200 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
| 201 | __le64 formats[SND_SOC_TPLG_MAX_FORMATS]; /* supported formats SNDRV_PCM_FMTBIT_* */ |
| 202 | __le32 rates; /* supported rates SNDRV_PCM_RATE_* */ |
| 203 | __le32 rate_min; /* min rate */ |
| 204 | __le32 rate_max; /* max rate */ |
| 205 | __le32 channels_min; /* min channels */ |
| 206 | __le32 channels_max; /* max channels */ |
| 207 | __le32 periods_min; /* min number of periods */ |
| 208 | __le32 periods_max; /* max number of periods */ |
| 209 | __le32 period_size_min; /* min period size bytes */ |
| 210 | __le32 period_size_max; /* max period size bytes */ |
| 211 | __le32 buffer_size_min; /* min buffer size bytes */ |
| 212 | __le32 buffer_size_max; /* max buffer size bytes */ |
| 213 | } __attribute__((packed)); |
| 214 | |
| 215 | /* |
| 216 | * FE or BE Stream configuration supported by SW/FW |
| 217 | */ |
| 218 | struct snd_soc_tplg_stream { |
| 219 | __le32 size; /* in bytes of this structure */ |
| 220 | __le64 format; /* SNDRV_PCM_FMTBIT_* */ |
| 221 | __le32 rate; /* SNDRV_PCM_RATE_* */ |
| 222 | __le32 period_bytes; /* size of period in bytes */ |
| 223 | __le32 buffer_bytes; /* size of buffer in bytes */ |
| 224 | __le32 channels; /* channels */ |
| 225 | __le32 tdm_slot; /* optional BE bitmask of supported TDM slots */ |
| 226 | __le32 dai_fmt; /* SND_SOC_DAIFMT_ */ |
| 227 | } __attribute__((packed)); |
| 228 | |
| 229 | /* |
| 230 | * Duplex stream configuration supported by SW/FW. |
| 231 | */ |
| 232 | struct snd_soc_tplg_stream_config { |
| 233 | __le32 size; /* in bytes of this structure */ |
| 234 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
| 235 | struct snd_soc_tplg_stream playback; |
| 236 | struct snd_soc_tplg_stream capture; |
| 237 | } __attribute__((packed)); |
| 238 | |
| 239 | /* |
| 240 | * Manifest. List totals for each payload type. Not used in parsing, but will |
| 241 | * be passed to the component driver before any other objects in order for any |
Vinod Koul | 9c3a473 | 2015-06-29 17:36:45 +0100 | [diff] [blame] | 242 | * global component resource allocations. |
Liam Girdwood | c147c0e | 2015-05-29 19:06:13 +0100 | [diff] [blame] | 243 | * |
| 244 | * File block representation for manifest :- |
| 245 | * +-----------------------------------+----+ |
| 246 | * | struct snd_soc_tplg_hdr | 1 | |
| 247 | * +-----------------------------------+----+ |
| 248 | * | struct snd_soc_tplg_manifest | 1 | |
| 249 | * +-----------------------------------+----+ |
| 250 | */ |
| 251 | struct snd_soc_tplg_manifest { |
| 252 | __le32 size; /* in bytes of this structure */ |
| 253 | __le32 control_elems; /* number of control elements */ |
| 254 | __le32 widget_elems; /* number of widget elements */ |
| 255 | __le32 graph_elems; /* number of graph elements */ |
| 256 | __le32 dai_elems; /* number of DAI elements */ |
| 257 | __le32 dai_link_elems; /* number of DAI link elements */ |
Vinod Koul | c387995 | 2015-06-29 17:36:46 +0100 | [diff] [blame] | 258 | struct snd_soc_tplg_private priv; |
Liam Girdwood | c147c0e | 2015-05-29 19:06:13 +0100 | [diff] [blame] | 259 | } __attribute__((packed)); |
| 260 | |
| 261 | /* |
| 262 | * Mixer kcontrol. |
| 263 | * |
| 264 | * File block representation for mixer kcontrol :- |
| 265 | * +-----------------------------------+----+ |
| 266 | * | struct snd_soc_tplg_hdr | 1 | |
| 267 | * +-----------------------------------+----+ |
| 268 | * | struct snd_soc_tplg_mixer_control | N | |
| 269 | * +-----------------------------------+----+ |
| 270 | */ |
| 271 | struct snd_soc_tplg_mixer_control { |
| 272 | struct snd_soc_tplg_ctl_hdr hdr; |
| 273 | __le32 size; /* in bytes of this structure */ |
| 274 | __le32 min; |
| 275 | __le32 max; |
| 276 | __le32 platform_max; |
| 277 | __le32 invert; |
| 278 | __le32 num_channels; |
| 279 | struct snd_soc_tplg_channel channel[SND_SOC_TPLG_MAX_CHAN]; |
Liam Girdwood | c147c0e | 2015-05-29 19:06:13 +0100 | [diff] [blame] | 280 | struct snd_soc_tplg_private priv; |
| 281 | } __attribute__((packed)); |
| 282 | |
| 283 | /* |
| 284 | * Enumerated kcontrol |
| 285 | * |
| 286 | * File block representation for enum kcontrol :- |
| 287 | * +-----------------------------------+----+ |
| 288 | * | struct snd_soc_tplg_hdr | 1 | |
| 289 | * +-----------------------------------+----+ |
| 290 | * | struct snd_soc_tplg_enum_control | N | |
| 291 | * +-----------------------------------+----+ |
| 292 | */ |
| 293 | struct snd_soc_tplg_enum_control { |
| 294 | struct snd_soc_tplg_ctl_hdr hdr; |
| 295 | __le32 size; /* in bytes of this structure */ |
| 296 | __le32 num_channels; |
| 297 | struct snd_soc_tplg_channel channel[SND_SOC_TPLG_MAX_CHAN]; |
| 298 | __le32 items; |
| 299 | __le32 mask; |
| 300 | __le32 count; |
| 301 | char texts[SND_SOC_TPLG_NUM_TEXTS][SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
| 302 | __le32 values[SND_SOC_TPLG_NUM_TEXTS * SNDRV_CTL_ELEM_ID_NAME_MAXLEN / 4]; |
| 303 | struct snd_soc_tplg_private priv; |
| 304 | } __attribute__((packed)); |
| 305 | |
| 306 | /* |
| 307 | * Bytes kcontrol |
| 308 | * |
| 309 | * File block representation for bytes kcontrol :- |
| 310 | * +-----------------------------------+----+ |
| 311 | * | struct snd_soc_tplg_hdr | 1 | |
| 312 | * +-----------------------------------+----+ |
| 313 | * | struct snd_soc_tplg_bytes_control | N | |
| 314 | * +-----------------------------------+----+ |
| 315 | */ |
| 316 | struct snd_soc_tplg_bytes_control { |
| 317 | struct snd_soc_tplg_ctl_hdr hdr; |
| 318 | __le32 size; /* in bytes of this structure */ |
| 319 | __le32 max; |
| 320 | __le32 mask; |
| 321 | __le32 base; |
| 322 | __le32 num_regs; |
Mengdong Lin | cb88498 | 2015-08-05 14:41:14 +0100 | [diff] [blame] | 323 | struct snd_soc_tplg_io_ops ext_ops; |
Liam Girdwood | c147c0e | 2015-05-29 19:06:13 +0100 | [diff] [blame] | 324 | struct snd_soc_tplg_private priv; |
| 325 | } __attribute__((packed)); |
| 326 | |
| 327 | /* |
| 328 | * DAPM Graph Element |
| 329 | * |
| 330 | * File block representation for DAPM graph elements :- |
| 331 | * +-------------------------------------+----+ |
| 332 | * | struct snd_soc_tplg_hdr | 1 | |
| 333 | * +-------------------------------------+----+ |
| 334 | * | struct snd_soc_tplg_dapm_graph_elem | N | |
| 335 | * +-------------------------------------+----+ |
| 336 | */ |
| 337 | struct snd_soc_tplg_dapm_graph_elem { |
| 338 | char sink[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
| 339 | char control[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
| 340 | char source[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
| 341 | } __attribute__((packed)); |
| 342 | |
| 343 | /* |
| 344 | * DAPM Widget. |
| 345 | * |
| 346 | * File block representation for DAPM widget :- |
| 347 | * +-------------------------------------+-----+ |
| 348 | * | struct snd_soc_tplg_hdr | 1 | |
| 349 | * +-------------------------------------+-----+ |
| 350 | * | struct snd_soc_tplg_dapm_widget | N | |
| 351 | * +-------------------------------------+-----+ |
| 352 | * | struct snd_soc_tplg_enum_control | 0|1 | |
| 353 | * | struct snd_soc_tplg_mixer_control | 0|N | |
| 354 | * +-------------------------------------+-----+ |
| 355 | * |
| 356 | * Optional enum or mixer control can be appended to the end of each widget |
| 357 | * in the block. |
| 358 | */ |
| 359 | struct snd_soc_tplg_dapm_widget { |
| 360 | __le32 size; /* in bytes of this structure */ |
| 361 | __le32 id; /* SND_SOC_DAPM_CTL */ |
| 362 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
| 363 | char sname[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
| 364 | |
| 365 | __le32 reg; /* negative reg = no direct dapm */ |
| 366 | __le32 shift; /* bits to shift */ |
| 367 | __le32 mask; /* non-shifted mask */ |
Subhransu S. Prusty | 6dc6db7 | 2015-06-29 17:36:44 +0100 | [diff] [blame] | 368 | __le32 subseq; /* sort within widget type */ |
Liam Girdwood | c147c0e | 2015-05-29 19:06:13 +0100 | [diff] [blame] | 369 | __u32 invert; /* invert the power bit */ |
| 370 | __u32 ignore_suspend; /* kept enabled over suspend */ |
| 371 | __u16 event_flags; |
| 372 | __u16 event_type; |
| 373 | __u16 num_kcontrols; |
| 374 | struct snd_soc_tplg_private priv; |
| 375 | /* |
| 376 | * kcontrols that relate to this widget |
| 377 | * follow here after widget private data |
| 378 | */ |
| 379 | } __attribute__((packed)); |
| 380 | |
Liam Girdwood | c147c0e | 2015-05-29 19:06:13 +0100 | [diff] [blame] | 381 | |
| 382 | /* |
Vedang Patel | 5b2688a | 2015-09-30 17:28:47 +0800 | [diff] [blame^] | 383 | * Describes SW/FW specific features of PCM (FE DAI & DAI link). |
Liam Girdwood | c147c0e | 2015-05-29 19:06:13 +0100 | [diff] [blame] | 384 | * |
Vedang Patel | 5b2688a | 2015-09-30 17:28:47 +0800 | [diff] [blame^] | 385 | * File block representation for PCM :- |
Liam Girdwood | c147c0e | 2015-05-29 19:06:13 +0100 | [diff] [blame] | 386 | * +-----------------------------------+-----+ |
| 387 | * | struct snd_soc_tplg_hdr | 1 | |
| 388 | * +-----------------------------------+-----+ |
Vedang Patel | 5b2688a | 2015-09-30 17:28:47 +0800 | [diff] [blame^] | 389 | * | struct snd_soc_tplg_pcm | N | |
Liam Girdwood | c147c0e | 2015-05-29 19:06:13 +0100 | [diff] [blame] | 390 | * +-----------------------------------+-----+ |
| 391 | */ |
Vedang Patel | 5b2688a | 2015-09-30 17:28:47 +0800 | [diff] [blame^] | 392 | struct snd_soc_tplg_pcm { |
Liam Girdwood | c147c0e | 2015-05-29 19:06:13 +0100 | [diff] [blame] | 393 | __le32 size; /* in bytes of this structure */ |
Vedang Patel | 5b2688a | 2015-09-30 17:28:47 +0800 | [diff] [blame^] | 394 | char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
| 395 | char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
| 396 | __le32 pcm_id; /* unique ID - used to match */ |
| 397 | __le32 dai_id; /* unique ID - used to match */ |
| 398 | __le32 playback; /* supports playback mode */ |
| 399 | __le32 capture; /* supports capture mode */ |
| 400 | __le32 compress; /* 1 = compressed; 0 = PCM */ |
| 401 | struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */ |
| 402 | __le32 num_streams; /* number of streams */ |
| 403 | struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */ |
Liam Girdwood | c147c0e | 2015-05-29 19:06:13 +0100 | [diff] [blame] | 404 | } __attribute__((packed)); |
| 405 | |
| 406 | #endif |