~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/sound/asoc.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/uapi/sound/asoc.h (Version linux-6.12-rc7) and /include/uapi/sound/asoc.h (Version linux-5.19.17)


  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux      1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 /*                                                  2 /*
  3  * uapi/sound/asoc.h -- ALSA SoC Firmware Cont      3  * uapi/sound/asoc.h -- ALSA SoC Firmware Controls and DAPM
  4  *                                                  4  *
  5  * Copyright (C) 2012 Texas Instruments Inc.        5  * Copyright (C) 2012 Texas Instruments Inc.
  6  * Copyright (C) 2015 Intel Corporation.            6  * Copyright (C) 2015 Intel Corporation.
  7  *                                                  7  *
                                                   >>   8  * This program is free software; you can redistribute it and/or modify
                                                   >>   9  * it under the terms of the GNU General Public License version 2 as
                                                   >>  10  * published by the Free Software Foundation.
                                                   >>  11  *
  8  * Simple file API to load FW that includes mi     12  * Simple file API to load FW that includes mixers, coefficients, DAPM graphs,
  9  * algorithms, equalisers, DAIs, widgets etc.      13  * algorithms, equalisers, DAIs, widgets etc.
 10 */                                                 14 */
 11                                                    15 
 12 #ifndef __LINUX_UAPI_SND_ASOC_H                    16 #ifndef __LINUX_UAPI_SND_ASOC_H
 13 #define __LINUX_UAPI_SND_ASOC_H                    17 #define __LINUX_UAPI_SND_ASOC_H
 14                                                    18 
 15 #include <linux/types.h>                           19 #include <linux/types.h>
 16 #include <sound/asound.h>                          20 #include <sound/asound.h>
 17                                                    21 
 18 /*                                                 22 /*
 19  * Maximum number of channels topology kcontro     23  * Maximum number of channels topology kcontrol can represent.
 20  */                                                24  */
 21 #define SND_SOC_TPLG_MAX_CHAN           8          25 #define SND_SOC_TPLG_MAX_CHAN           8
 22                                                    26 
 23 /*                                                 27 /*
 24  * Maximum number of PCM formats capability        28  * Maximum number of PCM formats capability
 25  */                                                29  */
 26 #define SND_SOC_TPLG_MAX_FORMATS        16         30 #define SND_SOC_TPLG_MAX_FORMATS        16
 27                                                    31 
 28 /*                                                 32 /*
 29  * Maximum number of PCM stream configs            33  * Maximum number of PCM stream configs
 30  */                                                34  */
 31 #define SND_SOC_TPLG_STREAM_CONFIG_MAX  8          35 #define SND_SOC_TPLG_STREAM_CONFIG_MAX  8
 32                                                    36 
 33 /*                                                 37 /*
 34  * Maximum number of physical link's hardware      38  * Maximum number of physical link's hardware configs
 35  */                                                39  */
 36 #define SND_SOC_TPLG_HW_CONFIG_MAX      8          40 #define SND_SOC_TPLG_HW_CONFIG_MAX      8
 37                                                    41 
 38 /* individual kcontrol info types - can be mix     42 /* individual kcontrol info types - can be mixed with other types */
 39 #define SND_SOC_TPLG_CTL_VOLSW          1          43 #define SND_SOC_TPLG_CTL_VOLSW          1
 40 #define SND_SOC_TPLG_CTL_VOLSW_SX       2          44 #define SND_SOC_TPLG_CTL_VOLSW_SX       2
 41 #define SND_SOC_TPLG_CTL_VOLSW_XR_SX    3          45 #define SND_SOC_TPLG_CTL_VOLSW_XR_SX    3
 42 #define SND_SOC_TPLG_CTL_ENUM           4          46 #define SND_SOC_TPLG_CTL_ENUM           4
 43 #define SND_SOC_TPLG_CTL_BYTES          5          47 #define SND_SOC_TPLG_CTL_BYTES          5
 44 #define SND_SOC_TPLG_CTL_ENUM_VALUE     6          48 #define SND_SOC_TPLG_CTL_ENUM_VALUE     6
 45 #define SND_SOC_TPLG_CTL_RANGE          7          49 #define SND_SOC_TPLG_CTL_RANGE          7
 46 #define SND_SOC_TPLG_CTL_STROBE         8          50 #define SND_SOC_TPLG_CTL_STROBE         8
 47                                                    51 
 48                                                    52 
 49 /* individual widget kcontrol info types - can     53 /* individual widget kcontrol info types - can be mixed with other types */
 50 #define SND_SOC_TPLG_DAPM_CTL_VOLSW                54 #define SND_SOC_TPLG_DAPM_CTL_VOLSW             64
 51 #define SND_SOC_TPLG_DAPM_CTL_ENUM_DOUBLE          55 #define SND_SOC_TPLG_DAPM_CTL_ENUM_DOUBLE       65
 52 #define SND_SOC_TPLG_DAPM_CTL_ENUM_VIRT            56 #define SND_SOC_TPLG_DAPM_CTL_ENUM_VIRT         66
 53 #define SND_SOC_TPLG_DAPM_CTL_ENUM_VALUE           57 #define SND_SOC_TPLG_DAPM_CTL_ENUM_VALUE        67
 54 #define SND_SOC_TPLG_DAPM_CTL_PIN                  58 #define SND_SOC_TPLG_DAPM_CTL_PIN               68
 55                                                    59 
 56 /* DAPM widget types - add new items to the en     60 /* DAPM widget types - add new items to the end */
 57 #define SND_SOC_TPLG_DAPM_INPUT         0          61 #define SND_SOC_TPLG_DAPM_INPUT         0
 58 #define SND_SOC_TPLG_DAPM_OUTPUT        1          62 #define SND_SOC_TPLG_DAPM_OUTPUT        1
 59 #define SND_SOC_TPLG_DAPM_MUX           2          63 #define SND_SOC_TPLG_DAPM_MUX           2
 60 #define SND_SOC_TPLG_DAPM_MIXER         3          64 #define SND_SOC_TPLG_DAPM_MIXER         3
 61 #define SND_SOC_TPLG_DAPM_PGA           4          65 #define SND_SOC_TPLG_DAPM_PGA           4
 62 #define SND_SOC_TPLG_DAPM_OUT_DRV       5          66 #define SND_SOC_TPLG_DAPM_OUT_DRV       5
 63 #define SND_SOC_TPLG_DAPM_ADC           6          67 #define SND_SOC_TPLG_DAPM_ADC           6
 64 #define SND_SOC_TPLG_DAPM_DAC           7          68 #define SND_SOC_TPLG_DAPM_DAC           7
 65 #define SND_SOC_TPLG_DAPM_SWITCH        8          69 #define SND_SOC_TPLG_DAPM_SWITCH        8
 66 #define SND_SOC_TPLG_DAPM_PRE           9          70 #define SND_SOC_TPLG_DAPM_PRE           9
 67 #define SND_SOC_TPLG_DAPM_POST          10         71 #define SND_SOC_TPLG_DAPM_POST          10
 68 #define SND_SOC_TPLG_DAPM_AIF_IN        11         72 #define SND_SOC_TPLG_DAPM_AIF_IN        11
 69 #define SND_SOC_TPLG_DAPM_AIF_OUT       12         73 #define SND_SOC_TPLG_DAPM_AIF_OUT       12
 70 #define SND_SOC_TPLG_DAPM_DAI_IN        13         74 #define SND_SOC_TPLG_DAPM_DAI_IN        13
 71 #define SND_SOC_TPLG_DAPM_DAI_OUT       14         75 #define SND_SOC_TPLG_DAPM_DAI_OUT       14
 72 #define SND_SOC_TPLG_DAPM_DAI_LINK      15         76 #define SND_SOC_TPLG_DAPM_DAI_LINK      15
 73 #define SND_SOC_TPLG_DAPM_BUFFER        16         77 #define SND_SOC_TPLG_DAPM_BUFFER        16
 74 #define SND_SOC_TPLG_DAPM_SCHEDULER     17         78 #define SND_SOC_TPLG_DAPM_SCHEDULER     17
 75 #define SND_SOC_TPLG_DAPM_EFFECT        18         79 #define SND_SOC_TPLG_DAPM_EFFECT        18
 76 #define SND_SOC_TPLG_DAPM_SIGGEN        19         80 #define SND_SOC_TPLG_DAPM_SIGGEN        19
 77 #define SND_SOC_TPLG_DAPM_SRC           20         81 #define SND_SOC_TPLG_DAPM_SRC           20
 78 #define SND_SOC_TPLG_DAPM_ASRC          21         82 #define SND_SOC_TPLG_DAPM_ASRC          21
 79 #define SND_SOC_TPLG_DAPM_ENCODER       22         83 #define SND_SOC_TPLG_DAPM_ENCODER       22
 80 #define SND_SOC_TPLG_DAPM_DECODER       23         84 #define SND_SOC_TPLG_DAPM_DECODER       23
 81 #define SND_SOC_TPLG_DAPM_LAST          SND_SO     85 #define SND_SOC_TPLG_DAPM_LAST          SND_SOC_TPLG_DAPM_DECODER
 82                                                    86 
 83 /* Header magic number and string sizes */         87 /* Header magic number and string sizes */
 84 #define SND_SOC_TPLG_MAGIC              0x4153     88 #define SND_SOC_TPLG_MAGIC              0x41536F43 /* ASoC */
 85                                                    89 
 86 /* string sizes */                                 90 /* string sizes */
 87 #define SND_SOC_TPLG_NUM_TEXTS          16         91 #define SND_SOC_TPLG_NUM_TEXTS          16
 88                                                    92 
 89 /* ABI version */                                  93 /* ABI version */
 90 #define SND_SOC_TPLG_ABI_VERSION        0x5        94 #define SND_SOC_TPLG_ABI_VERSION        0x5     /* current version */
 91 #define SND_SOC_TPLG_ABI_VERSION_MIN    0x5    !!  95 #define SND_SOC_TPLG_ABI_VERSION_MIN    0x4     /* oldest version supported */
 92                                                    96 
 93 /* Max size of TLV data */                         97 /* Max size of TLV data */
 94 #define SND_SOC_TPLG_TLV_SIZE           32         98 #define SND_SOC_TPLG_TLV_SIZE           32
 95                                                    99 
 96 /*                                                100 /*
 97  * File and Block header data types.              101  * File and Block header data types.
 98  * Add new generic and vendor types to end of     102  * Add new generic and vendor types to end of list.
 99  * Generic types are handled by the core whils    103  * Generic types are handled by the core whilst vendors types are passed
100  * to the component drivers for handling.         104  * to the component drivers for handling.
101  */                                               105  */
102 #define SND_SOC_TPLG_TYPE_MIXER         1         106 #define SND_SOC_TPLG_TYPE_MIXER         1
103 #define SND_SOC_TPLG_TYPE_BYTES         2         107 #define SND_SOC_TPLG_TYPE_BYTES         2
104 #define SND_SOC_TPLG_TYPE_ENUM          3         108 #define SND_SOC_TPLG_TYPE_ENUM          3
105 #define SND_SOC_TPLG_TYPE_DAPM_GRAPH    4         109 #define SND_SOC_TPLG_TYPE_DAPM_GRAPH    4
106 #define SND_SOC_TPLG_TYPE_DAPM_WIDGET   5         110 #define SND_SOC_TPLG_TYPE_DAPM_WIDGET   5
107 #define SND_SOC_TPLG_TYPE_DAI_LINK      6         111 #define SND_SOC_TPLG_TYPE_DAI_LINK      6
108 #define SND_SOC_TPLG_TYPE_PCM           7         112 #define SND_SOC_TPLG_TYPE_PCM           7
109 #define SND_SOC_TPLG_TYPE_MANIFEST      8         113 #define SND_SOC_TPLG_TYPE_MANIFEST      8
110 #define SND_SOC_TPLG_TYPE_CODEC_LINK    9         114 #define SND_SOC_TPLG_TYPE_CODEC_LINK    9
111 #define SND_SOC_TPLG_TYPE_BACKEND_LINK  10        115 #define SND_SOC_TPLG_TYPE_BACKEND_LINK  10
112 #define SND_SOC_TPLG_TYPE_PDATA         11        116 #define SND_SOC_TPLG_TYPE_PDATA         11
113 #define SND_SOC_TPLG_TYPE_DAI           12        117 #define SND_SOC_TPLG_TYPE_DAI           12
114 #define SND_SOC_TPLG_TYPE_MAX           SND_SO    118 #define SND_SOC_TPLG_TYPE_MAX           SND_SOC_TPLG_TYPE_DAI
115                                                   119 
116 /* vendor block IDs - please add new vendor ty    120 /* vendor block IDs - please add new vendor types to end */
117 #define SND_SOC_TPLG_TYPE_VENDOR_FW     1000      121 #define SND_SOC_TPLG_TYPE_VENDOR_FW     1000
118 #define SND_SOC_TPLG_TYPE_VENDOR_CONFIG 1001      122 #define SND_SOC_TPLG_TYPE_VENDOR_CONFIG 1001
119 #define SND_SOC_TPLG_TYPE_VENDOR_COEFF  1002      123 #define SND_SOC_TPLG_TYPE_VENDOR_COEFF  1002
120 #define SND_SOC_TPLG_TYPEVENDOR_CODEC   1003      124 #define SND_SOC_TPLG_TYPEVENDOR_CODEC   1003
121                                                   125 
122 #define SND_SOC_TPLG_STREAM_PLAYBACK    0         126 #define SND_SOC_TPLG_STREAM_PLAYBACK    0
123 #define SND_SOC_TPLG_STREAM_CAPTURE     1         127 #define SND_SOC_TPLG_STREAM_CAPTURE     1
124                                                   128 
125 /* vendor tuple types */                          129 /* vendor tuple types */
126 #define SND_SOC_TPLG_TUPLE_TYPE_UUID    0         130 #define SND_SOC_TPLG_TUPLE_TYPE_UUID    0
127 #define SND_SOC_TPLG_TUPLE_TYPE_STRING  1         131 #define SND_SOC_TPLG_TUPLE_TYPE_STRING  1
128 #define SND_SOC_TPLG_TUPLE_TYPE_BOOL    2         132 #define SND_SOC_TPLG_TUPLE_TYPE_BOOL    2
129 #define SND_SOC_TPLG_TUPLE_TYPE_BYTE    3         133 #define SND_SOC_TPLG_TUPLE_TYPE_BYTE    3
130 #define SND_SOC_TPLG_TUPLE_TYPE_WORD    4         134 #define SND_SOC_TPLG_TUPLE_TYPE_WORD    4
131 #define SND_SOC_TPLG_TUPLE_TYPE_SHORT   5         135 #define SND_SOC_TPLG_TUPLE_TYPE_SHORT   5
132                                                   136 
133 /* DAI flags */                                   137 /* DAI flags */
134 #define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_RATE    138 #define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_RATES         (1 << 0)
135 #define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_CHAN    139 #define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_CHANNELS      (1 << 1)
136 #define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_SAMP    140 #define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_SAMPLEBITS    (1 << 2)
137                                                   141 
138 /* DAI clock gating */                            142 /* DAI clock gating */
139 #define SND_SOC_TPLG_DAI_CLK_GATE_UNDEFINED       143 #define SND_SOC_TPLG_DAI_CLK_GATE_UNDEFINED     0
140 #define SND_SOC_TPLG_DAI_CLK_GATE_GATED 1         144 #define SND_SOC_TPLG_DAI_CLK_GATE_GATED 1
141 #define SND_SOC_TPLG_DAI_CLK_GATE_CONT            145 #define SND_SOC_TPLG_DAI_CLK_GATE_CONT          2
142                                                   146 
143 /* DAI mclk_direction */                          147 /* DAI mclk_direction */
144 #define SND_SOC_TPLG_MCLK_CO            0 /* f    148 #define SND_SOC_TPLG_MCLK_CO            0 /* for codec, mclk is output */
145 #define SND_SOC_TPLG_MCLK_CI            1 /* f    149 #define SND_SOC_TPLG_MCLK_CI            1 /* for codec, mclk is input */
146                                                   150 
147 /* DAI physical PCM data formats.                 151 /* DAI physical PCM data formats.
148  * Add new formats to the end of the list.        152  * Add new formats to the end of the list.
149  */                                               153  */
150 #define SND_SOC_DAI_FORMAT_I2S          1 /* I    154 #define SND_SOC_DAI_FORMAT_I2S          1 /* I2S mode */
151 #define SND_SOC_DAI_FORMAT_RIGHT_J      2 /* R    155 #define SND_SOC_DAI_FORMAT_RIGHT_J      2 /* Right Justified mode */
152 #define SND_SOC_DAI_FORMAT_LEFT_J       3 /* L    156 #define SND_SOC_DAI_FORMAT_LEFT_J       3 /* Left Justified mode */
153 #define SND_SOC_DAI_FORMAT_DSP_A        4 /* L    157 #define SND_SOC_DAI_FORMAT_DSP_A        4 /* L data MSB after FRM LRC */
154 #define SND_SOC_DAI_FORMAT_DSP_B        5 /* L    158 #define SND_SOC_DAI_FORMAT_DSP_B        5 /* L data MSB during FRM LRC */
155 #define SND_SOC_DAI_FORMAT_AC97         6 /* A    159 #define SND_SOC_DAI_FORMAT_AC97         6 /* AC97 */
156 #define SND_SOC_DAI_FORMAT_PDM          7 /* P    160 #define SND_SOC_DAI_FORMAT_PDM          7 /* Pulse density modulation */
157                                                   161 
158 /* left and right justified also known as MSB     162 /* left and right justified also known as MSB and LSB respectively */
159 #define SND_SOC_DAI_FORMAT_MSB          SND_SO    163 #define SND_SOC_DAI_FORMAT_MSB          SND_SOC_DAI_FORMAT_LEFT_J
160 #define SND_SOC_DAI_FORMAT_LSB          SND_SO    164 #define SND_SOC_DAI_FORMAT_LSB          SND_SOC_DAI_FORMAT_RIGHT_J
161                                                   165 
162 /* DAI link flags */                              166 /* DAI link flags */
163 #define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_RATE    167 #define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_RATES         (1 << 0)
164 #define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_CHAN    168 #define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_CHANNELS      (1 << 1)
165 #define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMP    169 #define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS    (1 << 2)
166 #define SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP      170 #define SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP            (1 << 3)
167                                                   171 
168 /* DAI topology BCLK parameter                    172 /* DAI topology BCLK parameter
169  * For the backwards capability, by default co    173  * For the backwards capability, by default codec is bclk provider
170  */                                               174  */
171 #define SND_SOC_TPLG_BCLK_CP         0 /* code    175 #define SND_SOC_TPLG_BCLK_CP         0 /* codec is bclk provider */
172 #define SND_SOC_TPLG_BCLK_CC         1 /* code    176 #define SND_SOC_TPLG_BCLK_CC         1 /* codec is bclk consumer */
173 /* keep previous definitions for compatibility    177 /* keep previous definitions for compatibility */
174 #define SND_SOC_TPLG_BCLK_CM         SND_SOC_T    178 #define SND_SOC_TPLG_BCLK_CM         SND_SOC_TPLG_BCLK_CP
175 #define SND_SOC_TPLG_BCLK_CS         SND_SOC_T    179 #define SND_SOC_TPLG_BCLK_CS         SND_SOC_TPLG_BCLK_CC
176                                                   180 
177 /* DAI topology FSYNC parameter                   181 /* DAI topology FSYNC parameter
178  * For the backwards capability, by default co    182  * For the backwards capability, by default codec is fsync provider
179  */                                               183  */
180 #define SND_SOC_TPLG_FSYNC_CP         0 /* cod    184 #define SND_SOC_TPLG_FSYNC_CP         0 /* codec is fsync provider */
181 #define SND_SOC_TPLG_FSYNC_CC         1 /* cod    185 #define SND_SOC_TPLG_FSYNC_CC         1 /* codec is fsync consumer */
182 /* keep previous definitions for compatibility    186 /* keep previous definitions for compatibility */
183 #define SND_SOC_TPLG_FSYNC_CM         SND_SOC_    187 #define SND_SOC_TPLG_FSYNC_CM         SND_SOC_TPLG_FSYNC_CP
184 #define SND_SOC_TPLG_FSYNC_CS         SND_SOC_    188 #define SND_SOC_TPLG_FSYNC_CS         SND_SOC_TPLG_FSYNC_CC
185                                                   189 
186 /*                                                190 /*
187  * Block Header.                                  191  * Block Header.
188  * This header precedes all object and object     192  * This header precedes all object and object arrays below.
189  */                                               193  */
190 struct snd_soc_tplg_hdr {                         194 struct snd_soc_tplg_hdr {
191         __le32 magic;           /* magic numbe    195         __le32 magic;           /* magic number */
192         __le32 abi;             /* ABI version    196         __le32 abi;             /* ABI version */
193         __le32 version;         /* optional ve    197         __le32 version;         /* optional vendor specific version details */
194         __le32 type;            /* SND_SOC_TPL    198         __le32 type;            /* SND_SOC_TPLG_TYPE_ */
195         __le32 size;            /* size of thi    199         __le32 size;            /* size of this structure */
196         __le32 vendor_type;     /* optional ve    200         __le32 vendor_type;     /* optional vendor specific type info */
197         __le32 payload_size;    /* data bytes,    201         __le32 payload_size;    /* data bytes, excluding this header */
198         __le32 index;           /* identifier     202         __le32 index;           /* identifier for block */
199         __le32 count;           /* number of e    203         __le32 count;           /* number of elements in block */
200 } __attribute__((packed));                        204 } __attribute__((packed));
201                                                   205 
202 /* vendor tuple for uuid */                       206 /* vendor tuple for uuid */
203 struct snd_soc_tplg_vendor_uuid_elem {            207 struct snd_soc_tplg_vendor_uuid_elem {
204         __le32 token;                             208         __le32 token;
205         char uuid[16];                            209         char uuid[16];
206 } __attribute__((packed));                        210 } __attribute__((packed));
207                                                   211 
208 /* vendor tuple for a bool/byte/short/word val    212 /* vendor tuple for a bool/byte/short/word value */
209 struct snd_soc_tplg_vendor_value_elem {           213 struct snd_soc_tplg_vendor_value_elem {
210         __le32 token;                             214         __le32 token;
211         __le32 value;                             215         __le32 value;
212 } __attribute__((packed));                        216 } __attribute__((packed));
213                                                   217 
214 /* vendor tuple for string */                     218 /* vendor tuple for string */
215 struct snd_soc_tplg_vendor_string_elem {          219 struct snd_soc_tplg_vendor_string_elem {
216         __le32 token;                             220         __le32 token;
217         char string[SNDRV_CTL_ELEM_ID_NAME_MAX    221         char string[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
218 } __attribute__((packed));                        222 } __attribute__((packed));
219                                                   223 
220 struct snd_soc_tplg_vendor_array {                224 struct snd_soc_tplg_vendor_array {
221         __le32 size;    /* size in bytes of th    225         __le32 size;    /* size in bytes of the array, including all elements */
222         __le32 type;    /* SND_SOC_TPLG_TUPLE_    226         __le32 type;    /* SND_SOC_TPLG_TUPLE_TYPE_ */
223         __le32 num_elems;       /* number of e    227         __le32 num_elems;       /* number of elements in array */
224         union {                                   228         union {
225                 __DECLARE_FLEX_ARRAY(struct sn !! 229                 struct snd_soc_tplg_vendor_uuid_elem uuid[0];
226                 __DECLARE_FLEX_ARRAY(struct sn !! 230                 struct snd_soc_tplg_vendor_value_elem value[0];
227                 __DECLARE_FLEX_ARRAY(struct sn !! 231                 struct snd_soc_tplg_vendor_string_elem string[0];
228         };                                        232         };
229 } __attribute__((packed));                        233 } __attribute__((packed));
230                                                   234 
231 /*                                                235 /*
232  * Private data.                                  236  * Private data.
233  * All topology objects may have private data     237  * All topology objects may have private data that can be used by the driver or
234  * firmware. Core will ignore this data.          238  * firmware. Core will ignore this data.
235  */                                               239  */
236 struct snd_soc_tplg_private {                     240 struct snd_soc_tplg_private {
237         __le32 size;    /* in bytes of private    241         __le32 size;    /* in bytes of private data */
238         union {                                   242         union {
239                 __DECLARE_FLEX_ARRAY(char, dat    243                 __DECLARE_FLEX_ARRAY(char, data);
240                 __DECLARE_FLEX_ARRAY(struct sn    244                 __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_array, array);
241         };                                        245         };
242 } __attribute__((packed));                        246 } __attribute__((packed));
243                                                   247 
244 /*                                                248 /*
245  * Kcontrol TLV data.                             249  * Kcontrol TLV data.
246  */                                               250  */
247 struct snd_soc_tplg_tlv_dbscale {                 251 struct snd_soc_tplg_tlv_dbscale {
248         __le32 min;                               252         __le32 min;
249         __le32 step;                              253         __le32 step;
250         __le32 mute;                              254         __le32 mute;
251 } __attribute__((packed));                        255 } __attribute__((packed));
252                                                   256 
253 struct snd_soc_tplg_ctl_tlv {                     257 struct snd_soc_tplg_ctl_tlv {
254         __le32 size;    /* in bytes of this st    258         __le32 size;    /* in bytes of this structure */
255         __le32 type;    /* SNDRV_CTL_TLVT_*, t    259         __le32 type;    /* SNDRV_CTL_TLVT_*, type of TLV */
256         union {                                   260         union {
257                 __le32 data[SND_SOC_TPLG_TLV_S    261                 __le32 data[SND_SOC_TPLG_TLV_SIZE];
258                 struct snd_soc_tplg_tlv_dbscal    262                 struct snd_soc_tplg_tlv_dbscale scale;
259         };                                        263         };
260 } __attribute__((packed));                        264 } __attribute__((packed));
261                                                   265 
262 /*                                                266 /*
263  * Kcontrol channel data                          267  * Kcontrol channel data
264  */                                               268  */
265 struct snd_soc_tplg_channel {                     269 struct snd_soc_tplg_channel {
266         __le32 size;    /* in bytes of this st    270         __le32 size;    /* in bytes of this structure */
267         __le32 reg;                               271         __le32 reg;
268         __le32 shift;                             272         __le32 shift;
269         __le32 id;      /* ID maps to Left, Ri    273         __le32 id;      /* ID maps to Left, Right, LFE etc */
270 } __attribute__((packed));                        274 } __attribute__((packed));
271                                                   275 
272 /*                                                276 /*
273  * Genericl Operations IDs, for binding Kcontr    277  * Genericl Operations IDs, for binding Kcontrol or Bytes ext ops
274  * Kcontrol ops need get/put/info.                278  * Kcontrol ops need get/put/info.
275  * Bytes ext ops need get/put.                    279  * Bytes ext ops need get/put.
276  */                                               280  */
277 struct snd_soc_tplg_io_ops {                      281 struct snd_soc_tplg_io_ops {
278         __le32 get;                               282         __le32 get;
279         __le32 put;                               283         __le32 put;
280         __le32 info;                              284         __le32 info;
281 } __attribute__((packed));                        285 } __attribute__((packed));
282                                                   286 
283 /*                                                287 /*
284  * kcontrol header                                288  * kcontrol header
285  */                                               289  */
286 struct snd_soc_tplg_ctl_hdr {                     290 struct snd_soc_tplg_ctl_hdr {
287         __le32 size;    /* in bytes of this st    291         __le32 size;    /* in bytes of this structure */
288         __le32 type;                              292         __le32 type;
289         char name[SNDRV_CTL_ELEM_ID_NAME_MAXLE    293         char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
290         __le32 access;                            294         __le32 access;
291         struct snd_soc_tplg_io_ops ops;           295         struct snd_soc_tplg_io_ops ops;
292         struct snd_soc_tplg_ctl_tlv tlv;          296         struct snd_soc_tplg_ctl_tlv tlv;
293 } __attribute__((packed));                        297 } __attribute__((packed));
294                                                   298 
295 /*                                                299 /*
296  * Stream Capabilities                            300  * Stream Capabilities
297  */                                               301  */
298 struct snd_soc_tplg_stream_caps {                 302 struct snd_soc_tplg_stream_caps {
299         __le32 size;            /* in bytes of    303         __le32 size;            /* in bytes of this structure */
300         char name[SNDRV_CTL_ELEM_ID_NAME_MAXLE    304         char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
301         __le64 formats; /* supported formats S    305         __le64 formats; /* supported formats SNDRV_PCM_FMTBIT_* */
302         __le32 rates;           /* supported r    306         __le32 rates;           /* supported rates SNDRV_PCM_RATE_* */
303         __le32 rate_min;        /* min rate */    307         __le32 rate_min;        /* min rate */
304         __le32 rate_max;        /* max rate */    308         __le32 rate_max;        /* max rate */
305         __le32 channels_min;    /* min channel    309         __le32 channels_min;    /* min channels */
306         __le32 channels_max;    /* max channel    310         __le32 channels_max;    /* max channels */
307         __le32 periods_min;     /* min number     311         __le32 periods_min;     /* min number of periods */
308         __le32 periods_max;     /* max number     312         __le32 periods_max;     /* max number of periods */
309         __le32 period_size_min; /* min period     313         __le32 period_size_min; /* min period size bytes */
310         __le32 period_size_max; /* max period     314         __le32 period_size_max; /* max period size bytes */
311         __le32 buffer_size_min; /* min buffer     315         __le32 buffer_size_min; /* min buffer size bytes */
312         __le32 buffer_size_max; /* max buffer     316         __le32 buffer_size_max; /* max buffer size bytes */
313         __le32 sig_bits;        /* number of b    317         __le32 sig_bits;        /* number of bits of content */
314 } __attribute__((packed));                        318 } __attribute__((packed));
315                                                   319 
316 /*                                                320 /*
317  * FE or BE Stream configuration supported by     321  * FE or BE Stream configuration supported by SW/FW
318  */                                               322  */
319 struct snd_soc_tplg_stream {                      323 struct snd_soc_tplg_stream {
320         __le32 size;            /* in bytes of    324         __le32 size;            /* in bytes of this structure */
321         char name[SNDRV_CTL_ELEM_ID_NAME_MAXLE    325         char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* Name of the stream */
322         __le64 format;          /* SNDRV_PCM_F    326         __le64 format;          /* SNDRV_PCM_FMTBIT_* */
323         __le32 rate;            /* SNDRV_PCM_R    327         __le32 rate;            /* SNDRV_PCM_RATE_* */
324         __le32 period_bytes;    /* size of per    328         __le32 period_bytes;    /* size of period in bytes */
325         __le32 buffer_bytes;    /* size of buf    329         __le32 buffer_bytes;    /* size of buffer in bytes */
326         __le32 channels;        /* channels */    330         __le32 channels;        /* channels */
327 } __attribute__((packed));                        331 } __attribute__((packed));
328                                                   332 
329                                                   333 
330 /*                                                334 /*
331  * Describes a physical link's runtime support    335  * Describes a physical link's runtime supported hardware config,
332  * i.e. hardware audio formats.                   336  * i.e. hardware audio formats.
333  */                                               337  */
334 struct snd_soc_tplg_hw_config {                   338 struct snd_soc_tplg_hw_config {
335         __le32 size;            /* in bytes of    339         __le32 size;            /* in bytes of this structure */
336         __le32 id;              /* unique ID -    340         __le32 id;              /* unique ID - - used to match */
337         __le32 fmt;             /* SND_SOC_DAI    341         __le32 fmt;             /* SND_SOC_DAI_FORMAT_ format value */
338         __u8 clock_gated;       /* SND_SOC_TPL    342         __u8 clock_gated;       /* SND_SOC_TPLG_DAI_CLK_GATE_ value */
339         __u8 invert_bclk;       /* 1 for inver    343         __u8 invert_bclk;       /* 1 for inverted BCLK, 0 for normal */
340         __u8 invert_fsync;      /* 1 for inver    344         __u8 invert_fsync;      /* 1 for inverted frame clock, 0 for normal */
341         __u8 bclk_provider;     /* SND_SOC_TPL    345         __u8 bclk_provider;     /* SND_SOC_TPLG_BCLK_ value */
342         __u8 fsync_provider;    /* SND_SOC_TPL    346         __u8 fsync_provider;    /* SND_SOC_TPLG_FSYNC_ value */
343         __u8 mclk_direction;    /* SND_SOC_TPL    347         __u8 mclk_direction;    /* SND_SOC_TPLG_MCLK_ value */
344         __le16 reserved;        /* for 32bit a    348         __le16 reserved;        /* for 32bit alignment */
345         __le32 mclk_rate;       /* MCLK or SYS    349         __le32 mclk_rate;       /* MCLK or SYSCLK freqency in Hz */
346         __le32 bclk_rate;       /* BCLK freqen    350         __le32 bclk_rate;       /* BCLK freqency in Hz */
347         __le32 fsync_rate;      /* frame clock    351         __le32 fsync_rate;      /* frame clock in Hz */
348         __le32 tdm_slots;       /* number of T    352         __le32 tdm_slots;       /* number of TDM slots in use */
349         __le32 tdm_slot_width;  /* width in bi    353         __le32 tdm_slot_width;  /* width in bits for each slot */
350         __le32 tx_slots;        /* bit mask fo    354         __le32 tx_slots;        /* bit mask for active Tx slots */
351         __le32 rx_slots;        /* bit mask fo    355         __le32 rx_slots;        /* bit mask for active Rx slots */
352         __le32 tx_channels;     /* number of T    356         __le32 tx_channels;     /* number of Tx channels */
353         __le32 tx_chanmap[SND_SOC_TPLG_MAX_CHA    357         __le32 tx_chanmap[SND_SOC_TPLG_MAX_CHAN]; /* array of slot number */
354         __le32 rx_channels;     /* number of R    358         __le32 rx_channels;     /* number of Rx channels */
355         __le32 rx_chanmap[SND_SOC_TPLG_MAX_CHA    359         __le32 rx_chanmap[SND_SOC_TPLG_MAX_CHAN]; /* array of slot number */
356 } __attribute__((packed));                        360 } __attribute__((packed));
357                                                   361 
358 /*                                                362 /*
359  * Manifest. List totals for each payload type    363  * Manifest. List totals for each payload type. Not used in parsing, but will
360  * be passed to the component driver before an    364  * be passed to the component driver before any other objects in order for any
361  * global component resource allocations.         365  * global component resource allocations.
362  *                                                366  *
363  * File block representation for manifest :-      367  * File block representation for manifest :-
364  * +-----------------------------------+----+     368  * +-----------------------------------+----+
365  * | struct snd_soc_tplg_hdr           |  1 |     369  * | struct snd_soc_tplg_hdr           |  1 |
366  * +-----------------------------------+----+     370  * +-----------------------------------+----+
367  * | struct snd_soc_tplg_manifest      |  1 |     371  * | struct snd_soc_tplg_manifest      |  1 |
368  * +-----------------------------------+----+     372  * +-----------------------------------+----+
369  */                                               373  */
370 struct snd_soc_tplg_manifest {                    374 struct snd_soc_tplg_manifest {
371         __le32 size;            /* in bytes of    375         __le32 size;            /* in bytes of this structure */
372         __le32 control_elems;   /* number of c    376         __le32 control_elems;   /* number of control elements */
373         __le32 widget_elems;    /* number of w    377         __le32 widget_elems;    /* number of widget elements */
374         __le32 graph_elems;     /* number of g    378         __le32 graph_elems;     /* number of graph elements */
375         __le32 pcm_elems;       /* number of P    379         __le32 pcm_elems;       /* number of PCM elements */
376         __le32 dai_link_elems;  /* number of D    380         __le32 dai_link_elems;  /* number of DAI link elements */
377         __le32 dai_elems;       /* number of p    381         __le32 dai_elems;       /* number of physical DAI elements */
378         __le32 reserved[20];    /* reserved fo    382         __le32 reserved[20];    /* reserved for new ABI element types */
379         struct snd_soc_tplg_private priv;         383         struct snd_soc_tplg_private priv;
380 } __attribute__((packed));                        384 } __attribute__((packed));
381                                                   385 
382 /*                                                386 /*
383  * Mixer kcontrol.                                387  * Mixer kcontrol.
384  *                                                388  *
385  * File block representation for mixer kcontro    389  * File block representation for mixer kcontrol :-
386  * +-----------------------------------+----+     390  * +-----------------------------------+----+
387  * | struct snd_soc_tplg_hdr           |  1 |     391  * | struct snd_soc_tplg_hdr           |  1 |
388  * +-----------------------------------+----+     392  * +-----------------------------------+----+
389  * | struct snd_soc_tplg_mixer_control |  N |     393  * | struct snd_soc_tplg_mixer_control |  N |
390  * +-----------------------------------+----+     394  * +-----------------------------------+----+
391  */                                               395  */
392 struct snd_soc_tplg_mixer_control {               396 struct snd_soc_tplg_mixer_control {
393         struct snd_soc_tplg_ctl_hdr hdr;          397         struct snd_soc_tplg_ctl_hdr hdr;
394         __le32 size;    /* in bytes of this st    398         __le32 size;    /* in bytes of this structure */
395         __le32 min;                               399         __le32 min;
396         __le32 max;                               400         __le32 max;
397         __le32 platform_max;                      401         __le32 platform_max;
398         __le32 invert;                            402         __le32 invert;
399         __le32 num_channels;                      403         __le32 num_channels;
400         struct snd_soc_tplg_channel channel[SN    404         struct snd_soc_tplg_channel channel[SND_SOC_TPLG_MAX_CHAN];
401         struct snd_soc_tplg_private priv;         405         struct snd_soc_tplg_private priv;
402 } __attribute__((packed));                        406 } __attribute__((packed));
403                                                   407 
404 /*                                                408 /*
405  * Enumerated kcontrol                            409  * Enumerated kcontrol
406  *                                                410  *
407  * File block representation for enum kcontrol    411  * File block representation for enum kcontrol :-
408  * +-----------------------------------+----+     412  * +-----------------------------------+----+
409  * | struct snd_soc_tplg_hdr           |  1 |     413  * | struct snd_soc_tplg_hdr           |  1 |
410  * +-----------------------------------+----+     414  * +-----------------------------------+----+
411  * | struct snd_soc_tplg_enum_control  |  N |     415  * | struct snd_soc_tplg_enum_control  |  N |
412  * +-----------------------------------+----+     416  * +-----------------------------------+----+
413  */                                               417  */
414 struct snd_soc_tplg_enum_control {                418 struct snd_soc_tplg_enum_control {
415         struct snd_soc_tplg_ctl_hdr hdr;          419         struct snd_soc_tplg_ctl_hdr hdr;
416         __le32 size;    /* in bytes of this st    420         __le32 size;    /* in bytes of this structure */
417         __le32 num_channels;                      421         __le32 num_channels;
418         struct snd_soc_tplg_channel channel[SN    422         struct snd_soc_tplg_channel channel[SND_SOC_TPLG_MAX_CHAN];
419         __le32 items;                             423         __le32 items;
420         __le32 mask;                              424         __le32 mask;
421         __le32 count;                             425         __le32 count;
422         char texts[SND_SOC_TPLG_NUM_TEXTS][SND    426         char texts[SND_SOC_TPLG_NUM_TEXTS][SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
423         __le32 values[SND_SOC_TPLG_NUM_TEXTS *    427         __le32 values[SND_SOC_TPLG_NUM_TEXTS * SNDRV_CTL_ELEM_ID_NAME_MAXLEN / 4];
424         struct snd_soc_tplg_private priv;         428         struct snd_soc_tplg_private priv;
425 } __attribute__((packed));                        429 } __attribute__((packed));
426                                                   430 
427 /*                                                431 /*
428  * Bytes kcontrol                                 432  * Bytes kcontrol
429  *                                                433  *
430  * File block representation for bytes kcontro    434  * File block representation for bytes kcontrol :-
431  * +-----------------------------------+----+     435  * +-----------------------------------+----+
432  * | struct snd_soc_tplg_hdr           |  1 |     436  * | struct snd_soc_tplg_hdr           |  1 |
433  * +-----------------------------------+----+     437  * +-----------------------------------+----+
434  * | struct snd_soc_tplg_bytes_control |  N |     438  * | struct snd_soc_tplg_bytes_control |  N |
435  * +-----------------------------------+----+     439  * +-----------------------------------+----+
436  */                                               440  */
437 struct snd_soc_tplg_bytes_control {               441 struct snd_soc_tplg_bytes_control {
438         struct snd_soc_tplg_ctl_hdr hdr;          442         struct snd_soc_tplg_ctl_hdr hdr;
439         __le32 size;    /* in bytes of this st    443         __le32 size;    /* in bytes of this structure */
440         __le32 max;                               444         __le32 max;
441         __le32 mask;                              445         __le32 mask;
442         __le32 base;                              446         __le32 base;
443         __le32 num_regs;                          447         __le32 num_regs;
444         struct snd_soc_tplg_io_ops ext_ops;       448         struct snd_soc_tplg_io_ops ext_ops;
445         struct snd_soc_tplg_private priv;         449         struct snd_soc_tplg_private priv;
446 } __attribute__((packed));                        450 } __attribute__((packed));
447                                                   451 
448 /*                                                452 /*
449  * DAPM Graph Element                             453  * DAPM Graph Element
450  *                                                454  *
451  * File block representation for DAPM graph el    455  * File block representation for DAPM graph elements :-
452  * +-------------------------------------+----    456  * +-------------------------------------+----+
453  * | struct snd_soc_tplg_hdr             |  1     457  * | struct snd_soc_tplg_hdr             |  1 |
454  * +-------------------------------------+----    458  * +-------------------------------------+----+
455  * | struct snd_soc_tplg_dapm_graph_elem |  N     459  * | struct snd_soc_tplg_dapm_graph_elem |  N |
456  * +-------------------------------------+----    460  * +-------------------------------------+----+
457  */                                               461  */
458 struct snd_soc_tplg_dapm_graph_elem {             462 struct snd_soc_tplg_dapm_graph_elem {
459         char sink[SNDRV_CTL_ELEM_ID_NAME_MAXLE    463         char sink[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
460         char control[SNDRV_CTL_ELEM_ID_NAME_MA    464         char control[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
461         char source[SNDRV_CTL_ELEM_ID_NAME_MAX    465         char source[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
462 } __attribute__((packed));                        466 } __attribute__((packed));
463                                                   467 
464 /*                                                468 /*
465  * DAPM Widget.                                   469  * DAPM Widget.
466  *                                                470  *
467  * File block representation for DAPM widget :    471  * File block representation for DAPM widget :-
468  * +-------------------------------------+----    472  * +-------------------------------------+-----+
469  * | struct snd_soc_tplg_hdr             |  1     473  * | struct snd_soc_tplg_hdr             |  1  |
470  * +-------------------------------------+----    474  * +-------------------------------------+-----+
471  * | struct snd_soc_tplg_dapm_widget     |  N     475  * | struct snd_soc_tplg_dapm_widget     |  N  |
472  * +-------------------------------------+----    476  * +-------------------------------------+-----+
473  * |   struct snd_soc_tplg_enum_control  | 0|1    477  * |   struct snd_soc_tplg_enum_control  | 0|1 |
474  * |   struct snd_soc_tplg_mixer_control | 0|N    478  * |   struct snd_soc_tplg_mixer_control | 0|N |
475  * +-------------------------------------+----    479  * +-------------------------------------+-----+
476  *                                                480  *
477  * Optional enum or mixer control can be appen    481  * Optional enum or mixer control can be appended to the end of each widget
478  * in the block.                                  482  * in the block.
479  */                                               483  */
480 struct snd_soc_tplg_dapm_widget {                 484 struct snd_soc_tplg_dapm_widget {
481         __le32 size;            /* in bytes of    485         __le32 size;            /* in bytes of this structure */
482         __le32 id;              /* SND_SOC_DAP    486         __le32 id;              /* SND_SOC_DAPM_CTL */
483         char name[SNDRV_CTL_ELEM_ID_NAME_MAXLE    487         char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
484         char sname[SNDRV_CTL_ELEM_ID_NAME_MAXL    488         char sname[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
485                                                   489 
486         __le32 reg;             /* negative re    490         __le32 reg;             /* negative reg = no direct dapm */
487         __le32 shift;           /* bits to shi    491         __le32 shift;           /* bits to shift */
488         __le32 mask;            /* non-shifted    492         __le32 mask;            /* non-shifted mask */
489         __le32 subseq;          /* sort within    493         __le32 subseq;          /* sort within widget type */
490         __le32 invert;          /* invert the     494         __le32 invert;          /* invert the power bit */
491         __le32 ignore_suspend;  /* kept enable    495         __le32 ignore_suspend;  /* kept enabled over suspend */
492         __le16 event_flags;                       496         __le16 event_flags;
493         __le16 event_type;                        497         __le16 event_type;
494         __le32 num_kcontrols;                     498         __le32 num_kcontrols;
495         struct snd_soc_tplg_private priv;         499         struct snd_soc_tplg_private priv;
496         /*                                        500         /*
497          * kcontrols that relate to this widge    501          * kcontrols that relate to this widget
498          * follow here after widget private da    502          * follow here after widget private data
499          */                                       503          */
500 } __attribute__((packed));                        504 } __attribute__((packed));
501                                                   505 
502                                                   506 
503 /*                                                507 /*
504  * Describes SW/FW specific features of PCM (F    508  * Describes SW/FW specific features of PCM (FE DAI & DAI link).
505  *                                                509  *
506  * File block representation for PCM :-           510  * File block representation for PCM :-
507  * +-----------------------------------+-----+    511  * +-----------------------------------+-----+
508  * | struct snd_soc_tplg_hdr           |  1  |    512  * | struct snd_soc_tplg_hdr           |  1  |
509  * +-----------------------------------+-----+    513  * +-----------------------------------+-----+
510  * | struct snd_soc_tplg_pcm           |  N  |    514  * | struct snd_soc_tplg_pcm           |  N  |
511  * +-----------------------------------+-----+    515  * +-----------------------------------+-----+
512  */                                               516  */
513 struct snd_soc_tplg_pcm {                         517 struct snd_soc_tplg_pcm {
514         __le32 size;            /* in bytes of    518         __le32 size;            /* in bytes of this structure */
515         char pcm_name[SNDRV_CTL_ELEM_ID_NAME_M    519         char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
516         char dai_name[SNDRV_CTL_ELEM_ID_NAME_M    520         char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
517         __le32 pcm_id;          /* unique ID -    521         __le32 pcm_id;          /* unique ID - used to match with DAI link */
518         __le32 dai_id;          /* unique ID -    522         __le32 dai_id;          /* unique ID - used to match */
519         __le32 playback;        /* supports pl    523         __le32 playback;        /* supports playback mode */
520         __le32 capture;         /* supports ca    524         __le32 capture;         /* supports capture mode */
521         __le32 compress;        /* 1 = compres    525         __le32 compress;        /* 1 = compressed; 0 = PCM */
522         struct snd_soc_tplg_stream stream[SND_    526         struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */
523         __le32 num_streams;     /* number of s    527         __le32 num_streams;     /* number of streams */
524         struct snd_soc_tplg_stream_caps caps[2    528         struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */
525         __le32 flag_mask;       /* bitmask of     529         __le32 flag_mask;       /* bitmask of flags to configure */
526         __le32 flags;           /* SND_SOC_TPL    530         __le32 flags;           /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */
527         struct snd_soc_tplg_private priv;         531         struct snd_soc_tplg_private priv;
528 } __attribute__((packed));                        532 } __attribute__((packed));
529                                                   533 
530                                                   534 
531 /*                                                535 /*
532  * Describes the physical link runtime support    536  * Describes the physical link runtime supported configs or params
533  *                                                537  *
534  * File block representation for physical link    538  * File block representation for physical link config :-
535  * +-----------------------------------+-----+    539  * +-----------------------------------+-----+
536  * | struct snd_soc_tplg_hdr           |  1  |    540  * | struct snd_soc_tplg_hdr           |  1  |
537  * +-----------------------------------+-----+    541  * +-----------------------------------+-----+
538  * | struct snd_soc_tplg_link_config   |  N  |    542  * | struct snd_soc_tplg_link_config   |  N  |
539  * +-----------------------------------+-----+    543  * +-----------------------------------+-----+
540  */                                               544  */
541 struct snd_soc_tplg_link_config {                 545 struct snd_soc_tplg_link_config {
542         __le32 size;            /* in bytes of    546         __le32 size;            /* in bytes of this structure */
543         __le32 id;              /* unique ID -    547         __le32 id;              /* unique ID - used to match */
544         char name[SNDRV_CTL_ELEM_ID_NAME_MAXLE    548         char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */
545         char stream_name[SNDRV_CTL_ELEM_ID_NAM    549         char stream_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* stream name - used to match */
546         struct snd_soc_tplg_stream stream[SND_    550         struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */
547         __le32 num_streams;     /* number of s    551         __le32 num_streams;     /* number of streams */
548         struct snd_soc_tplg_hw_config hw_confi    552         struct snd_soc_tplg_hw_config hw_config[SND_SOC_TPLG_HW_CONFIG_MAX]; /* hw configs */
549         __le32 num_hw_configs;         /* numb    553         __le32 num_hw_configs;         /* number of hw configs */
550         __le32 default_hw_config_id;   /* defa    554         __le32 default_hw_config_id;   /* default hw config ID for init */
551         __le32 flag_mask;       /* bitmask of     555         __le32 flag_mask;       /* bitmask of flags to configure */
552         __le32 flags;           /* SND_SOC_TPL    556         __le32 flags;           /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */
553         struct snd_soc_tplg_private priv;         557         struct snd_soc_tplg_private priv;
554 } __attribute__((packed));                        558 } __attribute__((packed));
555                                                   559 
556 /*                                                560 /*
557  * Describes SW/FW specific features of physic    561  * Describes SW/FW specific features of physical DAI.
558  * It can be used to configure backend DAIs fo    562  * It can be used to configure backend DAIs for DPCM.
559  *                                                563  *
560  * File block representation for physical DAI     564  * File block representation for physical DAI :-
561  * +-----------------------------------+-----+    565  * +-----------------------------------+-----+
562  * | struct snd_soc_tplg_hdr           |  1  |    566  * | struct snd_soc_tplg_hdr           |  1  |
563  * +-----------------------------------+-----+    567  * +-----------------------------------+-----+
564  * | struct snd_soc_tplg_dai           |  N  |    568  * | struct snd_soc_tplg_dai           |  N  |
565  * +-----------------------------------+-----+    569  * +-----------------------------------+-----+
566  */                                               570  */
567 struct snd_soc_tplg_dai {                         571 struct snd_soc_tplg_dai {
568         __le32 size;            /* in bytes of    572         __le32 size;            /* in bytes of this structure */
569         char dai_name[SNDRV_CTL_ELEM_ID_NAME_M    573         char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */
570         __le32 dai_id;          /* unique ID -    574         __le32 dai_id;          /* unique ID - used to match */
571         __le32 playback;        /* supports pl    575         __le32 playback;        /* supports playback mode */
572         __le32 capture;         /* supports ca    576         __le32 capture;         /* supports capture mode */
573         struct snd_soc_tplg_stream_caps caps[2    577         struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */
574         __le32 flag_mask;       /* bitmask of     578         __le32 flag_mask;       /* bitmask of flags to configure */
575         __le32 flags;           /* SND_SOC_TPL    579         __le32 flags;           /* SND_SOC_TPLG_DAI_FLGBIT_* */
576         struct snd_soc_tplg_private priv;         580         struct snd_soc_tplg_private priv;
577 } __attribute__((packed));                        581 } __attribute__((packed));
                                                   >> 582 
                                                   >> 583 /*
                                                   >> 584  * Old version of ABI structs, supported for backward compatibility.
                                                   >> 585  */
                                                   >> 586 
                                                   >> 587 /* Manifest v4 */
                                                   >> 588 struct snd_soc_tplg_manifest_v4 {
                                                   >> 589         __le32 size;            /* in bytes of this structure */
                                                   >> 590         __le32 control_elems;   /* number of control elements */
                                                   >> 591         __le32 widget_elems;    /* number of widget elements */
                                                   >> 592         __le32 graph_elems;     /* number of graph elements */
                                                   >> 593         __le32 pcm_elems;       /* number of PCM elements */
                                                   >> 594         __le32 dai_link_elems;  /* number of DAI link elements */
                                                   >> 595         struct snd_soc_tplg_private priv;
                                                   >> 596 } __packed;
                                                   >> 597 
                                                   >> 598 /* Stream Capabilities v4 */
                                                   >> 599 struct snd_soc_tplg_stream_caps_v4 {
                                                   >> 600         __le32 size;            /* in bytes of this structure */
                                                   >> 601         char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
                                                   >> 602         __le64 formats; /* supported formats SNDRV_PCM_FMTBIT_* */
                                                   >> 603         __le32 rates;           /* supported rates SNDRV_PCM_RATE_* */
                                                   >> 604         __le32 rate_min;        /* min rate */
                                                   >> 605         __le32 rate_max;        /* max rate */
                                                   >> 606         __le32 channels_min;    /* min channels */
                                                   >> 607         __le32 channels_max;    /* max channels */
                                                   >> 608         __le32 periods_min;     /* min number of periods */
                                                   >> 609         __le32 periods_max;     /* max number of periods */
                                                   >> 610         __le32 period_size_min; /* min period size bytes */
                                                   >> 611         __le32 period_size_max; /* max period size bytes */
                                                   >> 612         __le32 buffer_size_min; /* min buffer size bytes */
                                                   >> 613         __le32 buffer_size_max; /* max buffer size bytes */
                                                   >> 614 } __packed;
                                                   >> 615 
                                                   >> 616 /* PCM v4 */
                                                   >> 617 struct snd_soc_tplg_pcm_v4 {
                                                   >> 618         __le32 size;            /* in bytes of this structure */
                                                   >> 619         char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
                                                   >> 620         char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
                                                   >> 621         __le32 pcm_id;          /* unique ID - used to match with DAI link */
                                                   >> 622         __le32 dai_id;          /* unique ID - used to match */
                                                   >> 623         __le32 playback;        /* supports playback mode */
                                                   >> 624         __le32 capture;         /* supports capture mode */
                                                   >> 625         __le32 compress;        /* 1 = compressed; 0 = PCM */
                                                   >> 626         struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */
                                                   >> 627         __le32 num_streams;     /* number of streams */
                                                   >> 628         struct snd_soc_tplg_stream_caps_v4 caps[2]; /* playback and capture for DAI */
                                                   >> 629 } __packed;
                                                   >> 630 
                                                   >> 631 /* Physical link config v4 */
                                                   >> 632 struct snd_soc_tplg_link_config_v4 {
                                                   >> 633         __le32 size;            /* in bytes of this structure */
                                                   >> 634         __le32 id;              /* unique ID - used to match */
                                                   >> 635         struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */
                                                   >> 636         __le32 num_streams;     /* number of streams */
                                                   >> 637 } __packed;
578                                                   638 
579 #endif                                            639 #endif
580                                                   640 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php