| @@ -77,7 +77,7 @@ · 76 unmodified lines |
| 77 | 77 | #define SND_SOC_TPLG_NUM_TEXTS 16 |
| 78 | 78 | |
| 79 | 79 | /* ABI version */ |
| 80 | | −#define SND_SOC_TPLG_ABI_VERSION 0x2 |
| 80 | +#define SND_SOC_TPLG_ABI_VERSION 0x3 |
| 81 | 81 | |
| 82 | 82 | /* Max size of TLV data */ |
| 83 | 83 | #define SND_SOC_TPLG_TLV_SIZE 32 |
| @@ -97,7 +97,8 @@ · 13 unmodified lines |
| 97 | 97 | #define SND_SOC_TPLG_TYPE_PCM 7 |
| 98 | 98 | #define SND_SOC_TPLG_TYPE_MANIFEST 8 |
| 99 | 99 | #define SND_SOC_TPLG_TYPE_CODEC_LINK 9 |
| 100 | | −#define SND_SOC_TPLG_TYPE_MAX SND_SOC_TPLG_TYPE_CODEC_LINK |
| 100 | +#define SND_SOC_TPLG_TYPE_PDATA 10 |
| 101 | +#define SND_SOC_TPLG_TYPE_MAX SND_SOC_TPLG_TYPE_PDATA |
| 101 | 102 | |
| 102 | 103 | /* vendor block IDs - please add new vendor types to end */ |
| 103 | 104 | #define SND_SOC_TPLG_TYPE_VENDOR_FW 1000 |
| @@ -110,7 +111,7 @@ · 6 unmodified lines |
| 110 | 111 | |
| 111 | 112 | /* |
| 112 | 113 | * Block Header. |
| 113 | | − * This header preceeds all object and object arrays below. |
| 114 | + * This header precedes all object and object arrays below. |
| 114 | 115 | */ |
| 115 | 116 | struct snd_soc_tplg_hdr { |
| 116 | 117 | __le32 magic; /* magic number */ |
| @@ -137,11 +138,19 @@ struct snd_soc_tplg_private { · 20 unmodified lines |
| 137 | 138 | /* |
| 138 | 139 | * Kcontrol TLV data. |
| 139 | 140 | */ |
| 141 | +struct snd_soc_tplg_tlv_dbscale { |
| 142 | + __le32 min; |
| 143 | + __le32 step; |
| 144 | + __le32 mute; |
| 145 | +} __attribute__((packed)); |
| 146 | + |
| 140 | 147 | struct snd_soc_tplg_ctl_tlv { |
| 141 | | − __le32 size; /* in bytes aligned to 4 */ |
| 142 | | − __le32 numid; /* control element numeric identification */ |
| 143 | | − __le32 count; /* number of elem in data array */ |
| 144 | | − __le32 data[SND_SOC_TPLG_TLV_SIZE]; |
| 148 | + __le32 size; /* in bytes of this structure */ |
| 149 | + __le32 type; /* SNDRV_CTL_TLVT_*, type of TLV */ |
| 150 | + union { |
| 151 | + __le32 data[SND_SOC_TPLG_TLV_SIZE]; |
| 152 | + struct snd_soc_tplg_tlv_dbscale scale; |
| 153 | + }; |
| 145 | 154 | } __attribute__((packed)); |
| 146 | 155 | |
| 147 | 156 | /* |
| @@ -155,9 +164,11 @@ struct snd_soc_tplg_channel { · 7 unmodified lines |
| 155 | 164 | } __attribute__((packed)); |
| 156 | 165 | |
| 157 | 166 | /* |
| 158 | | − * Kcontrol Operations IDs |
| 167 | + * Genericl Operations IDs, for binding Kcontrol or Bytes ext ops |
| 168 | + * Kcontrol ops need get/put/info. |
| 169 | + * Bytes ext ops need get/put. |
| 159 | 170 | */ |
| 160 | | −struct snd_soc_tplg_kcontrol_ops_id { |
| 171 | +struct snd_soc_tplg_io_ops { |
| 161 | 172 | __le32 get; |
| 162 | 173 | __le32 put; |
| 163 | 174 | __le32 info; |
| @@ -171,8 +182,8 @@ struct snd_soc_tplg_ctl_hdr { · 7 unmodified lines |
| 171 | 182 | __le32 type; |
| 172 | 183 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
| 173 | 184 | __le32 access; |
| 174 | | − struct snd_soc_tplg_kcontrol_ops_id ops; |
| 175 | | − __le32 tlv_size; /* non zero means control has TLV data */ |
| 185 | + struct snd_soc_tplg_io_ops ops; |
| 186 | + struct snd_soc_tplg_ctl_tlv tlv; |
| 176 | 187 | } __attribute__((packed)); |
| 177 | 188 | |
| 178 | 189 | /* |
| @@ -222,7 +233,7 @@ struct snd_soc_tplg_stream_config { · 43 unmodified lines |
| 222 | 233 | /* |
| 223 | 234 | * Manifest. List totals for each payload type. Not used in parsing, but will |
| 224 | 235 | * be passed to the component driver before any other objects in order for any |
| 225 | | − * global componnent resource allocations. |
| 236 | + * global component resource allocations. |
| 226 | 237 | * |
| 227 | 238 | * File block representation for manifest :- |
| 228 | 239 | * +-----------------------------------+----+ |
| @@ -238,6 +249,7 @@ struct snd_soc_tplg_manifest { · 9 unmodified lines |
| 238 | 249 | __le32 graph_elems; /* number of graph elements */ |
| 239 | 250 | __le32 dai_elems; /* number of DAI elements */ |
| 240 | 251 | __le32 dai_link_elems; /* number of DAI link elements */ |
| 252 | + struct snd_soc_tplg_private priv; |
| 241 | 253 | } __attribute__((packed)); |
| 242 | 254 | |
| 243 | 255 | /* |
| @@ -259,7 +271,6 @@ struct snd_soc_tplg_mixer_control { · 15 unmodified lines |
| 259 | 271 | __le32 invert; |
| 260 | 272 | __le32 num_channels; |
| 261 | 273 | struct snd_soc_tplg_channel channel[SND_SOC_TPLG_MAX_CHAN]; |
| 262 | | − struct snd_soc_tplg_ctl_tlv tlv; |
| 263 | 274 | struct snd_soc_tplg_private priv; |
| 264 | 275 | } __attribute__((packed)); |
| 265 | 276 | |
| @@ -303,6 +314,7 @@ struct snd_soc_tplg_bytes_control { · 37 unmodified lines |
| 303 | 314 | __le32 mask; |
| 304 | 315 | __le32 base; |
| 305 | 316 | __le32 num_regs; |
| 317 | + struct snd_soc_tplg_io_ops ext_ops; |
| 306 | 318 | struct snd_soc_tplg_private priv; |
| 307 | 319 | } __attribute__((packed)); |
| 308 | 320 | |
| @@ -347,6 +359,7 @@ struct snd_soc_tplg_dapm_widget { · 38 unmodified lines |
| 347 | 359 | __le32 reg; /* negative reg = no direct dapm */ |
| 348 | 360 | __le32 shift; /* bits to shift */ |
| 349 | 361 | __le32 mask; /* non-shifted mask */ |
| 362 | + __le32 subseq; /* sort within widget type */ |
| 350 | 363 | __u32 invert; /* invert the power bit */ |
| 351 | 364 | __u32 ignore_suspend; /* kept enabled over suspend */ |
| 352 | 365 | __u16 event_flags; |