1e2be04c7SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2c147c0e1SLiam Girdwood /* 3c147c0e1SLiam Girdwood * uapi/sound/asoc.h -- ALSA SoC Firmware Controls and DAPM 4c147c0e1SLiam Girdwood * 5c147c0e1SLiam Girdwood * Copyright (C) 2012 Texas Instruments Inc. 6c147c0e1SLiam Girdwood * Copyright (C) 2015 Intel Corporation. 7c147c0e1SLiam Girdwood * 8c147c0e1SLiam Girdwood * Simple file API to load FW that includes mixers, coefficients, DAPM graphs, 9c147c0e1SLiam Girdwood * algorithms, equalisers, DAIs, widgets etc. 10c147c0e1SLiam Girdwood */ 11c147c0e1SLiam Girdwood 12c147c0e1SLiam Girdwood #ifndef __LINUX_UAPI_SND_ASOC_H 13c147c0e1SLiam Girdwood #define __LINUX_UAPI_SND_ASOC_H 14c147c0e1SLiam Girdwood 15c147c0e1SLiam Girdwood #include <linux/types.h> 16b6f69c79STakashi Iwai #include <sound/asound.h> 17c147c0e1SLiam Girdwood 18c147c0e1SLiam Girdwood /* 19c147c0e1SLiam Girdwood * Maximum number of channels topology kcontrol can represent. 20c147c0e1SLiam Girdwood */ 21c147c0e1SLiam Girdwood #define SND_SOC_TPLG_MAX_CHAN 8 22c147c0e1SLiam Girdwood 23c147c0e1SLiam Girdwood /* 24c147c0e1SLiam Girdwood * Maximum number of PCM formats capability 25c147c0e1SLiam Girdwood */ 26c147c0e1SLiam Girdwood #define SND_SOC_TPLG_MAX_FORMATS 16 27c147c0e1SLiam Girdwood 28c147c0e1SLiam Girdwood /* 29c147c0e1SLiam Girdwood * Maximum number of PCM stream configs 30c147c0e1SLiam Girdwood */ 31c147c0e1SLiam Girdwood #define SND_SOC_TPLG_STREAM_CONFIG_MAX 8 32c147c0e1SLiam Girdwood 33676c6b52SMengdong Lin /* 34676c6b52SMengdong Lin * Maximum number of physical link's hardware configs 35676c6b52SMengdong Lin */ 36676c6b52SMengdong Lin #define SND_SOC_TPLG_HW_CONFIG_MAX 8 37676c6b52SMengdong Lin 38c147c0e1SLiam Girdwood /* individual kcontrol info types - can be mixed with other types */ 39c147c0e1SLiam Girdwood #define SND_SOC_TPLG_CTL_VOLSW 1 40c147c0e1SLiam Girdwood #define SND_SOC_TPLG_CTL_VOLSW_SX 2 41c147c0e1SLiam Girdwood #define SND_SOC_TPLG_CTL_VOLSW_XR_SX 3 42c147c0e1SLiam Girdwood #define SND_SOC_TPLG_CTL_ENUM 4 43c147c0e1SLiam Girdwood #define SND_SOC_TPLG_CTL_BYTES 5 44c147c0e1SLiam Girdwood #define SND_SOC_TPLG_CTL_ENUM_VALUE 6 45c147c0e1SLiam Girdwood #define SND_SOC_TPLG_CTL_RANGE 7 46c147c0e1SLiam Girdwood #define SND_SOC_TPLG_CTL_STROBE 8 47c147c0e1SLiam Girdwood 48c147c0e1SLiam Girdwood 49c147c0e1SLiam Girdwood /* individual widget kcontrol info types - can be mixed with other types */ 50c147c0e1SLiam Girdwood #define SND_SOC_TPLG_DAPM_CTL_VOLSW 64 51c147c0e1SLiam Girdwood #define SND_SOC_TPLG_DAPM_CTL_ENUM_DOUBLE 65 52c147c0e1SLiam Girdwood #define SND_SOC_TPLG_DAPM_CTL_ENUM_VIRT 66 53c147c0e1SLiam Girdwood #define SND_SOC_TPLG_DAPM_CTL_ENUM_VALUE 67 54c147c0e1SLiam Girdwood #define SND_SOC_TPLG_DAPM_CTL_PIN 68 55c147c0e1SLiam Girdwood 56c147c0e1SLiam Girdwood /* DAPM widget types - add new items to the end */ 57c147c0e1SLiam Girdwood #define SND_SOC_TPLG_DAPM_INPUT 0 58c147c0e1SLiam Girdwood #define SND_SOC_TPLG_DAPM_OUTPUT 1 59c147c0e1SLiam Girdwood #define SND_SOC_TPLG_DAPM_MUX 2 60c147c0e1SLiam Girdwood #define SND_SOC_TPLG_DAPM_MIXER 3 61c147c0e1SLiam Girdwood #define SND_SOC_TPLG_DAPM_PGA 4 62c147c0e1SLiam Girdwood #define SND_SOC_TPLG_DAPM_OUT_DRV 5 63c147c0e1SLiam Girdwood #define SND_SOC_TPLG_DAPM_ADC 6 64c147c0e1SLiam Girdwood #define SND_SOC_TPLG_DAPM_DAC 7 65c147c0e1SLiam Girdwood #define SND_SOC_TPLG_DAPM_SWITCH 8 66c147c0e1SLiam Girdwood #define SND_SOC_TPLG_DAPM_PRE 9 67c147c0e1SLiam Girdwood #define SND_SOC_TPLG_DAPM_POST 10 68c147c0e1SLiam Girdwood #define SND_SOC_TPLG_DAPM_AIF_IN 11 69c147c0e1SLiam Girdwood #define SND_SOC_TPLG_DAPM_AIF_OUT 12 70c147c0e1SLiam Girdwood #define SND_SOC_TPLG_DAPM_DAI_IN 13 71c147c0e1SLiam Girdwood #define SND_SOC_TPLG_DAPM_DAI_OUT 14 72c147c0e1SLiam Girdwood #define SND_SOC_TPLG_DAPM_DAI_LINK 15 738a70b454SLiam Girdwood #define SND_SOC_TPLG_DAPM_BUFFER 16 748a70b454SLiam Girdwood #define SND_SOC_TPLG_DAPM_SCHEDULER 17 758a70b454SLiam Girdwood #define SND_SOC_TPLG_DAPM_EFFECT 18 768a70b454SLiam Girdwood #define SND_SOC_TPLG_DAPM_SIGGEN 19 778a70b454SLiam Girdwood #define SND_SOC_TPLG_DAPM_SRC 20 788a70b454SLiam Girdwood #define SND_SOC_TPLG_DAPM_ASRC 21 798a70b454SLiam Girdwood #define SND_SOC_TPLG_DAPM_ENCODER 22 808a70b454SLiam Girdwood #define SND_SOC_TPLG_DAPM_DECODER 23 818a70b454SLiam Girdwood #define SND_SOC_TPLG_DAPM_LAST SND_SOC_TPLG_DAPM_DECODER 82c147c0e1SLiam Girdwood 83c147c0e1SLiam Girdwood /* Header magic number and string sizes */ 84c147c0e1SLiam Girdwood #define SND_SOC_TPLG_MAGIC 0x41536F43 /* ASoC */ 85c147c0e1SLiam Girdwood 86c147c0e1SLiam Girdwood /* string sizes */ 87c147c0e1SLiam Girdwood #define SND_SOC_TPLG_NUM_TEXTS 16 88c147c0e1SLiam Girdwood 89c147c0e1SLiam Girdwood /* ABI version */ 90288b8da7SMengdong Lin #define SND_SOC_TPLG_ABI_VERSION 0x5 /* current version */ 91288b8da7SMengdong Lin #define SND_SOC_TPLG_ABI_VERSION_MIN 0x4 /* oldest version supported */ 92c147c0e1SLiam Girdwood 93c147c0e1SLiam Girdwood /* Max size of TLV data */ 94c147c0e1SLiam Girdwood #define SND_SOC_TPLG_TLV_SIZE 32 95c147c0e1SLiam Girdwood 96c147c0e1SLiam Girdwood /* 97c147c0e1SLiam Girdwood * File and Block header data types. 98c147c0e1SLiam Girdwood * Add new generic and vendor types to end of list. 99c147c0e1SLiam Girdwood * Generic types are handled by the core whilst vendors types are passed 100c147c0e1SLiam Girdwood * to the component drivers for handling. 101c147c0e1SLiam Girdwood */ 102c147c0e1SLiam Girdwood #define SND_SOC_TPLG_TYPE_MIXER 1 103c147c0e1SLiam Girdwood #define SND_SOC_TPLG_TYPE_BYTES 2 104c147c0e1SLiam Girdwood #define SND_SOC_TPLG_TYPE_ENUM 3 105c147c0e1SLiam Girdwood #define SND_SOC_TPLG_TYPE_DAPM_GRAPH 4 106c147c0e1SLiam Girdwood #define SND_SOC_TPLG_TYPE_DAPM_WIDGET 5 107c147c0e1SLiam Girdwood #define SND_SOC_TPLG_TYPE_DAI_LINK 6 108c147c0e1SLiam Girdwood #define SND_SOC_TPLG_TYPE_PCM 7 109c147c0e1SLiam Girdwood #define SND_SOC_TPLG_TYPE_MANIFEST 8 110c147c0e1SLiam Girdwood #define SND_SOC_TPLG_TYPE_CODEC_LINK 9 1117c545b32SVedang Patel #define SND_SOC_TPLG_TYPE_BACKEND_LINK 10 1127c545b32SVedang Patel #define SND_SOC_TPLG_TYPE_PDATA 11 1133fbf7935SMengdong Lin #define SND_SOC_TPLG_TYPE_DAI 12 1143fbf7935SMengdong Lin #define SND_SOC_TPLG_TYPE_MAX SND_SOC_TPLG_TYPE_DAI 115c147c0e1SLiam Girdwood 116c147c0e1SLiam Girdwood /* vendor block IDs - please add new vendor types to end */ 117c147c0e1SLiam Girdwood #define SND_SOC_TPLG_TYPE_VENDOR_FW 1000 118c147c0e1SLiam Girdwood #define SND_SOC_TPLG_TYPE_VENDOR_CONFIG 1001 119c147c0e1SLiam Girdwood #define SND_SOC_TPLG_TYPE_VENDOR_COEFF 1002 120c147c0e1SLiam Girdwood #define SND_SOC_TPLG_TYPEVENDOR_CODEC 1003 121c147c0e1SLiam Girdwood 122c147c0e1SLiam Girdwood #define SND_SOC_TPLG_STREAM_PLAYBACK 0 123c147c0e1SLiam Girdwood #define SND_SOC_TPLG_STREAM_CAPTURE 1 124c147c0e1SLiam Girdwood 125e42839b0SMengdong Lin /* vendor tuple types */ 126e42839b0SMengdong Lin #define SND_SOC_TPLG_TUPLE_TYPE_UUID 0 127e42839b0SMengdong Lin #define SND_SOC_TPLG_TUPLE_TYPE_STRING 1 128e42839b0SMengdong Lin #define SND_SOC_TPLG_TUPLE_TYPE_BOOL 2 129e42839b0SMengdong Lin #define SND_SOC_TPLG_TUPLE_TYPE_BYTE 3 130e42839b0SMengdong Lin #define SND_SOC_TPLG_TUPLE_TYPE_WORD 4 131e42839b0SMengdong Lin #define SND_SOC_TPLG_TUPLE_TYPE_SHORT 5 132e42839b0SMengdong Lin 1333fbf7935SMengdong Lin /* DAI flags */ 134dc31e741SMengdong Lin #define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_RATES (1 << 0) 135dc31e741SMengdong Lin #define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_CHANNELS (1 << 1) 136dc31e741SMengdong Lin #define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2) 137dc31e741SMengdong Lin 138933e1c4aSKirill Marinushkin /* DAI clock gating */ 139933e1c4aSKirill Marinushkin #define SND_SOC_TPLG_DAI_CLK_GATE_UNDEFINED 0 140933e1c4aSKirill Marinushkin #define SND_SOC_TPLG_DAI_CLK_GATE_GATED 1 141933e1c4aSKirill Marinushkin #define SND_SOC_TPLG_DAI_CLK_GATE_CONT 2 142933e1c4aSKirill Marinushkin 143e590522aSKirill Marinushkin /* DAI mclk_direction */ 144e590522aSKirill Marinushkin #define SND_SOC_TPLG_MCLK_CO 0 /* for codec, mclk is output */ 145e590522aSKirill Marinushkin #define SND_SOC_TPLG_MCLK_CI 1 /* for codec, mclk is input */ 146e590522aSKirill Marinushkin 147d2e3cb85SMengdong Lin /* DAI physical PCM data formats. 148d2e3cb85SMengdong Lin * Add new formats to the end of the list. 149d2e3cb85SMengdong Lin */ 150d2e3cb85SMengdong Lin #define SND_SOC_DAI_FORMAT_I2S 1 /* I2S mode */ 151d2e3cb85SMengdong Lin #define SND_SOC_DAI_FORMAT_RIGHT_J 2 /* Right Justified mode */ 152d2e3cb85SMengdong Lin #define SND_SOC_DAI_FORMAT_LEFT_J 3 /* Left Justified mode */ 153d2e3cb85SMengdong Lin #define SND_SOC_DAI_FORMAT_DSP_A 4 /* L data MSB after FRM LRC */ 154d2e3cb85SMengdong Lin #define SND_SOC_DAI_FORMAT_DSP_B 5 /* L data MSB during FRM LRC */ 155d2e3cb85SMengdong Lin #define SND_SOC_DAI_FORMAT_AC97 6 /* AC97 */ 156d2e3cb85SMengdong Lin #define SND_SOC_DAI_FORMAT_PDM 7 /* Pulse density modulation */ 157d2e3cb85SMengdong Lin 158d2e3cb85SMengdong Lin /* left and right justified also known as MSB and LSB respectively */ 159d2e3cb85SMengdong Lin #define SND_SOC_DAI_FORMAT_MSB SND_SOC_DAI_FORMAT_LEFT_J 160d2e3cb85SMengdong Lin #define SND_SOC_DAI_FORMAT_LSB SND_SOC_DAI_FORMAT_RIGHT_J 161d2e3cb85SMengdong Lin 162717a8e72SMengdong Lin /* DAI link flags */ 163717a8e72SMengdong Lin #define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_RATES (1 << 0) 164717a8e72SMengdong Lin #define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_CHANNELS (1 << 1) 165717a8e72SMengdong Lin #define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2) 1666ff67ccaSMengdong Lin #define SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP (1 << 3) 167717a8e72SMengdong Lin 168a941e2faSKirill Marinushkin /* DAI topology BCLK parameter 169f026c123SPierre-Louis Bossart * For the backwards capability, by default codec is bclk provider 170a941e2faSKirill Marinushkin */ 171f026c123SPierre-Louis Bossart #define SND_SOC_TPLG_BCLK_CP 0 /* codec is bclk provider */ 172f026c123SPierre-Louis Bossart #define SND_SOC_TPLG_BCLK_CC 1 /* codec is bclk consumer */ 173f026c123SPierre-Louis Bossart /* keep previous definitions for compatibility */ 174f026c123SPierre-Louis Bossart #define SND_SOC_TPLG_BCLK_CM SND_SOC_TPLG_BCLK_CP 175f026c123SPierre-Louis Bossart #define SND_SOC_TPLG_BCLK_CS SND_SOC_TPLG_BCLK_CC 176a941e2faSKirill Marinushkin 177a941e2faSKirill Marinushkin /* DAI topology FSYNC parameter 178f026c123SPierre-Louis Bossart * For the backwards capability, by default codec is fsync provider 179a941e2faSKirill Marinushkin */ 180f026c123SPierre-Louis Bossart #define SND_SOC_TPLG_FSYNC_CP 0 /* codec is fsync provider */ 181f026c123SPierre-Louis Bossart #define SND_SOC_TPLG_FSYNC_CC 1 /* codec is fsync consumer */ 182f026c123SPierre-Louis Bossart /* keep previous definitions for compatibility */ 183f026c123SPierre-Louis Bossart #define SND_SOC_TPLG_FSYNC_CM SND_SOC_TPLG_FSYNC_CP 184f026c123SPierre-Louis Bossart #define SND_SOC_TPLG_FSYNC_CS SND_SOC_TPLG_FSYNC_CC 185a941e2faSKirill Marinushkin 186c147c0e1SLiam Girdwood /* 187c147c0e1SLiam Girdwood * Block Header. 1889c3a4732SVinod Koul * This header precedes all object and object arrays below. 189c147c0e1SLiam Girdwood */ 190c147c0e1SLiam Girdwood struct snd_soc_tplg_hdr { 191c147c0e1SLiam Girdwood __le32 magic; /* magic number */ 192c147c0e1SLiam Girdwood __le32 abi; /* ABI version */ 193c147c0e1SLiam Girdwood __le32 version; /* optional vendor specific version details */ 194c147c0e1SLiam Girdwood __le32 type; /* SND_SOC_TPLG_TYPE_ */ 195c147c0e1SLiam Girdwood __le32 size; /* size of this structure */ 196c147c0e1SLiam Girdwood __le32 vendor_type; /* optional vendor specific type info */ 197c147c0e1SLiam Girdwood __le32 payload_size; /* data bytes, excluding this header */ 198c147c0e1SLiam Girdwood __le32 index; /* identifier for block */ 199c147c0e1SLiam Girdwood __le32 count; /* number of elements in block */ 200c147c0e1SLiam Girdwood } __attribute__((packed)); 201c147c0e1SLiam Girdwood 202e42839b0SMengdong Lin /* vendor tuple for uuid */ 203e42839b0SMengdong Lin struct snd_soc_tplg_vendor_uuid_elem { 204e42839b0SMengdong Lin __le32 token; 205e42839b0SMengdong Lin char uuid[16]; 206e42839b0SMengdong Lin } __attribute__((packed)); 207e42839b0SMengdong Lin 208e42839b0SMengdong Lin /* vendor tuple for a bool/byte/short/word value */ 209e42839b0SMengdong Lin struct snd_soc_tplg_vendor_value_elem { 210e42839b0SMengdong Lin __le32 token; 211e42839b0SMengdong Lin __le32 value; 212e42839b0SMengdong Lin } __attribute__((packed)); 213e42839b0SMengdong Lin 214e42839b0SMengdong Lin /* vendor tuple for string */ 215e42839b0SMengdong Lin struct snd_soc_tplg_vendor_string_elem { 216e42839b0SMengdong Lin __le32 token; 217e42839b0SMengdong Lin char string[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; 218e42839b0SMengdong Lin } __attribute__((packed)); 219e42839b0SMengdong Lin 220e42839b0SMengdong Lin struct snd_soc_tplg_vendor_array { 221e42839b0SMengdong Lin __le32 size; /* size in bytes of the array, including all elements */ 222e42839b0SMengdong Lin __le32 type; /* SND_SOC_TPLG_TUPLE_TYPE_ */ 223e42839b0SMengdong Lin __le32 num_elems; /* number of elements in array */ 224e42839b0SMengdong Lin union { 225*97ab4c11SGustavo A. R. Silva __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_uuid_elem, uuid); 226*97ab4c11SGustavo A. R. Silva __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_value_elem, value); 227*97ab4c11SGustavo A. R. Silva __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_string_elem, string); 228e42839b0SMengdong Lin }; 229e42839b0SMengdong Lin } __attribute__((packed)); 230e42839b0SMengdong Lin 231c147c0e1SLiam Girdwood /* 232c147c0e1SLiam Girdwood * Private data. 233c147c0e1SLiam Girdwood * All topology objects may have private data that can be used by the driver or 234c147c0e1SLiam Girdwood * firmware. Core will ignore this data. 235c147c0e1SLiam Girdwood */ 236c147c0e1SLiam Girdwood struct snd_soc_tplg_private { 237c147c0e1SLiam Girdwood __le32 size; /* in bytes of private data */ 238e42839b0SMengdong Lin union { 239fa7845cfSKees Cook __DECLARE_FLEX_ARRAY(char, data); 240fa7845cfSKees Cook __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_array, array); 241e42839b0SMengdong Lin }; 242c147c0e1SLiam Girdwood } __attribute__((packed)); 243c147c0e1SLiam Girdwood 244c147c0e1SLiam Girdwood /* 245c147c0e1SLiam Girdwood * Kcontrol TLV data. 246c147c0e1SLiam Girdwood */ 24728a87eebSMengdong Lin struct snd_soc_tplg_tlv_dbscale { 24828a87eebSMengdong Lin __le32 min; 24928a87eebSMengdong Lin __le32 step; 25028a87eebSMengdong Lin __le32 mute; 25128a87eebSMengdong Lin } __attribute__((packed)); 25228a87eebSMengdong Lin 253c147c0e1SLiam Girdwood struct snd_soc_tplg_ctl_tlv { 25428a87eebSMengdong Lin __le32 size; /* in bytes of this structure */ 25528a87eebSMengdong Lin __le32 type; /* SNDRV_CTL_TLVT_*, type of TLV */ 25628a87eebSMengdong Lin union { 257c147c0e1SLiam Girdwood __le32 data[SND_SOC_TPLG_TLV_SIZE]; 25828a87eebSMengdong Lin struct snd_soc_tplg_tlv_dbscale scale; 25928a87eebSMengdong Lin }; 260c147c0e1SLiam Girdwood } __attribute__((packed)); 261c147c0e1SLiam Girdwood 262c147c0e1SLiam Girdwood /* 263c147c0e1SLiam Girdwood * Kcontrol channel data 264c147c0e1SLiam Girdwood */ 265c147c0e1SLiam Girdwood struct snd_soc_tplg_channel { 266c147c0e1SLiam Girdwood __le32 size; /* in bytes of this structure */ 267c147c0e1SLiam Girdwood __le32 reg; 268c147c0e1SLiam Girdwood __le32 shift; 269c147c0e1SLiam Girdwood __le32 id; /* ID maps to Left, Right, LFE etc */ 270c147c0e1SLiam Girdwood } __attribute__((packed)); 271c147c0e1SLiam Girdwood 272c147c0e1SLiam Girdwood /* 273cb88498bSMengdong Lin * Genericl Operations IDs, for binding Kcontrol or Bytes ext ops 274cb88498bSMengdong Lin * Kcontrol ops need get/put/info. 275cb88498bSMengdong Lin * Bytes ext ops need get/put. 276c147c0e1SLiam Girdwood */ 277cb88498bSMengdong Lin struct snd_soc_tplg_io_ops { 278c147c0e1SLiam Girdwood __le32 get; 279c147c0e1SLiam Girdwood __le32 put; 280c147c0e1SLiam Girdwood __le32 info; 281c147c0e1SLiam Girdwood } __attribute__((packed)); 282c147c0e1SLiam Girdwood 283c147c0e1SLiam Girdwood /* 284c147c0e1SLiam Girdwood * kcontrol header 285c147c0e1SLiam Girdwood */ 286c147c0e1SLiam Girdwood struct snd_soc_tplg_ctl_hdr { 287c147c0e1SLiam Girdwood __le32 size; /* in bytes of this structure */ 288c147c0e1SLiam Girdwood __le32 type; 289c147c0e1SLiam Girdwood char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; 290c147c0e1SLiam Girdwood __le32 access; 291cb88498bSMengdong Lin struct snd_soc_tplg_io_ops ops; 29228a87eebSMengdong Lin struct snd_soc_tplg_ctl_tlv tlv; 293c147c0e1SLiam Girdwood } __attribute__((packed)); 294c147c0e1SLiam Girdwood 295c147c0e1SLiam Girdwood /* 296c147c0e1SLiam Girdwood * Stream Capabilities 297c147c0e1SLiam Girdwood */ 298c147c0e1SLiam Girdwood struct snd_soc_tplg_stream_caps { 299c147c0e1SLiam Girdwood __le32 size; /* in bytes of this structure */ 300c147c0e1SLiam Girdwood char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; 301478d0d39SMengdong Lin __le64 formats; /* supported formats SNDRV_PCM_FMTBIT_* */ 302c147c0e1SLiam Girdwood __le32 rates; /* supported rates SNDRV_PCM_RATE_* */ 303c147c0e1SLiam Girdwood __le32 rate_min; /* min rate */ 304c147c0e1SLiam Girdwood __le32 rate_max; /* max rate */ 305c147c0e1SLiam Girdwood __le32 channels_min; /* min channels */ 306c147c0e1SLiam Girdwood __le32 channels_max; /* max channels */ 307c147c0e1SLiam Girdwood __le32 periods_min; /* min number of periods */ 308c147c0e1SLiam Girdwood __le32 periods_max; /* max number of periods */ 309c147c0e1SLiam Girdwood __le32 period_size_min; /* min period size bytes */ 310c147c0e1SLiam Girdwood __le32 period_size_max; /* max period size bytes */ 311c147c0e1SLiam Girdwood __le32 buffer_size_min; /* min buffer size bytes */ 312c147c0e1SLiam Girdwood __le32 buffer_size_max; /* max buffer size bytes */ 313f918e169SMengdong Lin __le32 sig_bits; /* number of bits of content */ 314c147c0e1SLiam Girdwood } __attribute__((packed)); 315c147c0e1SLiam Girdwood 316c147c0e1SLiam Girdwood /* 317c147c0e1SLiam Girdwood * FE or BE Stream configuration supported by SW/FW 318c147c0e1SLiam Girdwood */ 319c147c0e1SLiam Girdwood struct snd_soc_tplg_stream { 320c147c0e1SLiam Girdwood __le32 size; /* in bytes of this structure */ 321731324f5SVedang Patel char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* Name of the stream */ 322c147c0e1SLiam Girdwood __le64 format; /* SNDRV_PCM_FMTBIT_* */ 323c147c0e1SLiam Girdwood __le32 rate; /* SNDRV_PCM_RATE_* */ 324c147c0e1SLiam Girdwood __le32 period_bytes; /* size of period in bytes */ 325c147c0e1SLiam Girdwood __le32 buffer_bytes; /* size of buffer in bytes */ 326c147c0e1SLiam Girdwood __le32 channels; /* channels */ 327c147c0e1SLiam Girdwood } __attribute__((packed)); 328c147c0e1SLiam Girdwood 329676c6b52SMengdong Lin 330676c6b52SMengdong Lin /* 331676c6b52SMengdong Lin * Describes a physical link's runtime supported hardware config, 332676c6b52SMengdong Lin * i.e. hardware audio formats. 333676c6b52SMengdong Lin */ 334676c6b52SMengdong Lin struct snd_soc_tplg_hw_config { 335676c6b52SMengdong Lin __le32 size; /* in bytes of this structure */ 336676c6b52SMengdong Lin __le32 id; /* unique ID - - used to match */ 337676c6b52SMengdong Lin __le32 fmt; /* SND_SOC_DAI_FORMAT_ format value */ 338933e1c4aSKirill Marinushkin __u8 clock_gated; /* SND_SOC_TPLG_DAI_CLK_GATE_ value */ 339676c6b52SMengdong Lin __u8 invert_bclk; /* 1 for inverted BCLK, 0 for normal */ 340676c6b52SMengdong Lin __u8 invert_fsync; /* 1 for inverted frame clock, 0 for normal */ 341f026c123SPierre-Louis Bossart __u8 bclk_provider; /* SND_SOC_TPLG_BCLK_ value */ 342f026c123SPierre-Louis Bossart __u8 fsync_provider; /* SND_SOC_TPLG_FSYNC_ value */ 343e590522aSKirill Marinushkin __u8 mclk_direction; /* SND_SOC_TPLG_MCLK_ value */ 344676c6b52SMengdong Lin __le16 reserved; /* for 32bit alignment */ 345676c6b52SMengdong Lin __le32 mclk_rate; /* MCLK or SYSCLK freqency in Hz */ 346676c6b52SMengdong Lin __le32 bclk_rate; /* BCLK freqency in Hz */ 347676c6b52SMengdong Lin __le32 fsync_rate; /* frame clock in Hz */ 348676c6b52SMengdong Lin __le32 tdm_slots; /* number of TDM slots in use */ 349676c6b52SMengdong Lin __le32 tdm_slot_width; /* width in bits for each slot */ 350676c6b52SMengdong Lin __le32 tx_slots; /* bit mask for active Tx slots */ 351676c6b52SMengdong Lin __le32 rx_slots; /* bit mask for active Rx slots */ 352676c6b52SMengdong Lin __le32 tx_channels; /* number of Tx channels */ 353676c6b52SMengdong Lin __le32 tx_chanmap[SND_SOC_TPLG_MAX_CHAN]; /* array of slot number */ 354676c6b52SMengdong Lin __le32 rx_channels; /* number of Rx channels */ 355676c6b52SMengdong Lin __le32 rx_chanmap[SND_SOC_TPLG_MAX_CHAN]; /* array of slot number */ 356676c6b52SMengdong Lin } __attribute__((packed)); 357676c6b52SMengdong Lin 358c147c0e1SLiam Girdwood /* 359c147c0e1SLiam Girdwood * Manifest. List totals for each payload type. Not used in parsing, but will 360c147c0e1SLiam Girdwood * be passed to the component driver before any other objects in order for any 3619c3a4732SVinod Koul * global component resource allocations. 362c147c0e1SLiam Girdwood * 363c147c0e1SLiam Girdwood * File block representation for manifest :- 364c147c0e1SLiam Girdwood * +-----------------------------------+----+ 365c147c0e1SLiam Girdwood * | struct snd_soc_tplg_hdr | 1 | 366c147c0e1SLiam Girdwood * +-----------------------------------+----+ 367c147c0e1SLiam Girdwood * | struct snd_soc_tplg_manifest | 1 | 368c147c0e1SLiam Girdwood * +-----------------------------------+----+ 369c147c0e1SLiam Girdwood */ 370c147c0e1SLiam Girdwood struct snd_soc_tplg_manifest { 371c147c0e1SLiam Girdwood __le32 size; /* in bytes of this structure */ 372c147c0e1SLiam Girdwood __le32 control_elems; /* number of control elements */ 373c147c0e1SLiam Girdwood __le32 widget_elems; /* number of widget elements */ 374c147c0e1SLiam Girdwood __le32 graph_elems; /* number of graph elements */ 3754b6c56c2SMengdong Lin __le32 pcm_elems; /* number of PCM elements */ 376c147c0e1SLiam Girdwood __le32 dai_link_elems; /* number of DAI link elements */ 37717e593e3SMengdong Lin __le32 dai_elems; /* number of physical DAI elements */ 378dc31e741SMengdong Lin __le32 reserved[20]; /* reserved for new ABI element types */ 379c3879956SVinod Koul struct snd_soc_tplg_private priv; 380c147c0e1SLiam Girdwood } __attribute__((packed)); 381c147c0e1SLiam Girdwood 382c147c0e1SLiam Girdwood /* 383c147c0e1SLiam Girdwood * Mixer kcontrol. 384c147c0e1SLiam Girdwood * 385c147c0e1SLiam Girdwood * File block representation for mixer kcontrol :- 386c147c0e1SLiam Girdwood * +-----------------------------------+----+ 387c147c0e1SLiam Girdwood * | struct snd_soc_tplg_hdr | 1 | 388c147c0e1SLiam Girdwood * +-----------------------------------+----+ 389c147c0e1SLiam Girdwood * | struct snd_soc_tplg_mixer_control | N | 390c147c0e1SLiam Girdwood * +-----------------------------------+----+ 391c147c0e1SLiam Girdwood */ 392c147c0e1SLiam Girdwood struct snd_soc_tplg_mixer_control { 393c147c0e1SLiam Girdwood struct snd_soc_tplg_ctl_hdr hdr; 394c147c0e1SLiam Girdwood __le32 size; /* in bytes of this structure */ 395c147c0e1SLiam Girdwood __le32 min; 396c147c0e1SLiam Girdwood __le32 max; 397c147c0e1SLiam Girdwood __le32 platform_max; 398c147c0e1SLiam Girdwood __le32 invert; 399c147c0e1SLiam Girdwood __le32 num_channels; 400c147c0e1SLiam Girdwood struct snd_soc_tplg_channel channel[SND_SOC_TPLG_MAX_CHAN]; 401c147c0e1SLiam Girdwood struct snd_soc_tplg_private priv; 402c147c0e1SLiam Girdwood } __attribute__((packed)); 403c147c0e1SLiam Girdwood 404c147c0e1SLiam Girdwood /* 405c147c0e1SLiam Girdwood * Enumerated kcontrol 406c147c0e1SLiam Girdwood * 407c147c0e1SLiam Girdwood * File block representation for enum kcontrol :- 408c147c0e1SLiam Girdwood * +-----------------------------------+----+ 409c147c0e1SLiam Girdwood * | struct snd_soc_tplg_hdr | 1 | 410c147c0e1SLiam Girdwood * +-----------------------------------+----+ 411c147c0e1SLiam Girdwood * | struct snd_soc_tplg_enum_control | N | 412c147c0e1SLiam Girdwood * +-----------------------------------+----+ 413c147c0e1SLiam Girdwood */ 414c147c0e1SLiam Girdwood struct snd_soc_tplg_enum_control { 415c147c0e1SLiam Girdwood struct snd_soc_tplg_ctl_hdr hdr; 416c147c0e1SLiam Girdwood __le32 size; /* in bytes of this structure */ 417c147c0e1SLiam Girdwood __le32 num_channels; 418c147c0e1SLiam Girdwood struct snd_soc_tplg_channel channel[SND_SOC_TPLG_MAX_CHAN]; 419c147c0e1SLiam Girdwood __le32 items; 420c147c0e1SLiam Girdwood __le32 mask; 421c147c0e1SLiam Girdwood __le32 count; 422c147c0e1SLiam Girdwood char texts[SND_SOC_TPLG_NUM_TEXTS][SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; 423c147c0e1SLiam Girdwood __le32 values[SND_SOC_TPLG_NUM_TEXTS * SNDRV_CTL_ELEM_ID_NAME_MAXLEN / 4]; 424c147c0e1SLiam Girdwood struct snd_soc_tplg_private priv; 425c147c0e1SLiam Girdwood } __attribute__((packed)); 426c147c0e1SLiam Girdwood 427c147c0e1SLiam Girdwood /* 428c147c0e1SLiam Girdwood * Bytes kcontrol 429c147c0e1SLiam Girdwood * 430c147c0e1SLiam Girdwood * File block representation for bytes kcontrol :- 431c147c0e1SLiam Girdwood * +-----------------------------------+----+ 432c147c0e1SLiam Girdwood * | struct snd_soc_tplg_hdr | 1 | 433c147c0e1SLiam Girdwood * +-----------------------------------+----+ 434c147c0e1SLiam Girdwood * | struct snd_soc_tplg_bytes_control | N | 435c147c0e1SLiam Girdwood * +-----------------------------------+----+ 436c147c0e1SLiam Girdwood */ 437c147c0e1SLiam Girdwood struct snd_soc_tplg_bytes_control { 438c147c0e1SLiam Girdwood struct snd_soc_tplg_ctl_hdr hdr; 439c147c0e1SLiam Girdwood __le32 size; /* in bytes of this structure */ 440c147c0e1SLiam Girdwood __le32 max; 441c147c0e1SLiam Girdwood __le32 mask; 442c147c0e1SLiam Girdwood __le32 base; 443c147c0e1SLiam Girdwood __le32 num_regs; 444cb88498bSMengdong Lin struct snd_soc_tplg_io_ops ext_ops; 445c147c0e1SLiam Girdwood struct snd_soc_tplg_private priv; 446c147c0e1SLiam Girdwood } __attribute__((packed)); 447c147c0e1SLiam Girdwood 448c147c0e1SLiam Girdwood /* 449c147c0e1SLiam Girdwood * DAPM Graph Element 450c147c0e1SLiam Girdwood * 451c147c0e1SLiam Girdwood * File block representation for DAPM graph elements :- 452c147c0e1SLiam Girdwood * +-------------------------------------+----+ 453c147c0e1SLiam Girdwood * | struct snd_soc_tplg_hdr | 1 | 454c147c0e1SLiam Girdwood * +-------------------------------------+----+ 455c147c0e1SLiam Girdwood * | struct snd_soc_tplg_dapm_graph_elem | N | 456c147c0e1SLiam Girdwood * +-------------------------------------+----+ 457c147c0e1SLiam Girdwood */ 458c147c0e1SLiam Girdwood struct snd_soc_tplg_dapm_graph_elem { 459c147c0e1SLiam Girdwood char sink[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; 460c147c0e1SLiam Girdwood char control[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; 461c147c0e1SLiam Girdwood char source[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; 462c147c0e1SLiam Girdwood } __attribute__((packed)); 463c147c0e1SLiam Girdwood 464c147c0e1SLiam Girdwood /* 465c147c0e1SLiam Girdwood * DAPM Widget. 466c147c0e1SLiam Girdwood * 467c147c0e1SLiam Girdwood * File block representation for DAPM widget :- 468c147c0e1SLiam Girdwood * +-------------------------------------+-----+ 469c147c0e1SLiam Girdwood * | struct snd_soc_tplg_hdr | 1 | 470c147c0e1SLiam Girdwood * +-------------------------------------+-----+ 471c147c0e1SLiam Girdwood * | struct snd_soc_tplg_dapm_widget | N | 472c147c0e1SLiam Girdwood * +-------------------------------------+-----+ 473c147c0e1SLiam Girdwood * | struct snd_soc_tplg_enum_control | 0|1 | 474c147c0e1SLiam Girdwood * | struct snd_soc_tplg_mixer_control | 0|N | 475c147c0e1SLiam Girdwood * +-------------------------------------+-----+ 476c147c0e1SLiam Girdwood * 477c147c0e1SLiam Girdwood * Optional enum or mixer control can be appended to the end of each widget 478c147c0e1SLiam Girdwood * in the block. 479c147c0e1SLiam Girdwood */ 480c147c0e1SLiam Girdwood struct snd_soc_tplg_dapm_widget { 481c147c0e1SLiam Girdwood __le32 size; /* in bytes of this structure */ 482c147c0e1SLiam Girdwood __le32 id; /* SND_SOC_DAPM_CTL */ 483c147c0e1SLiam Girdwood char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; 484c147c0e1SLiam Girdwood char sname[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; 485c147c0e1SLiam Girdwood 486c147c0e1SLiam Girdwood __le32 reg; /* negative reg = no direct dapm */ 487c147c0e1SLiam Girdwood __le32 shift; /* bits to shift */ 488c147c0e1SLiam Girdwood __le32 mask; /* non-shifted mask */ 4896dc6db79SSubhransu S. Prusty __le32 subseq; /* sort within widget type */ 490e8b3fe8fSVedang Patel __le32 invert; /* invert the power bit */ 491e8b3fe8fSVedang Patel __le32 ignore_suspend; /* kept enabled over suspend */ 492e8b3fe8fSVedang Patel __le16 event_flags; 493e8b3fe8fSVedang Patel __le16 event_type; 494e8b3fe8fSVedang Patel __le32 num_kcontrols; 495c147c0e1SLiam Girdwood struct snd_soc_tplg_private priv; 496c147c0e1SLiam Girdwood /* 497c147c0e1SLiam Girdwood * kcontrols that relate to this widget 498c147c0e1SLiam Girdwood * follow here after widget private data 499c147c0e1SLiam Girdwood */ 500c147c0e1SLiam Girdwood } __attribute__((packed)); 501c147c0e1SLiam Girdwood 502c147c0e1SLiam Girdwood 503c147c0e1SLiam Girdwood /* 5045b2688a5SVedang Patel * Describes SW/FW specific features of PCM (FE DAI & DAI link). 505c147c0e1SLiam Girdwood * 5065b2688a5SVedang Patel * File block representation for PCM :- 507c147c0e1SLiam Girdwood * +-----------------------------------+-----+ 508c147c0e1SLiam Girdwood * | struct snd_soc_tplg_hdr | 1 | 509c147c0e1SLiam Girdwood * +-----------------------------------+-----+ 5105b2688a5SVedang Patel * | struct snd_soc_tplg_pcm | N | 511c147c0e1SLiam Girdwood * +-----------------------------------+-----+ 512c147c0e1SLiam Girdwood */ 5135b2688a5SVedang Patel struct snd_soc_tplg_pcm { 514c147c0e1SLiam Girdwood __le32 size; /* in bytes of this structure */ 5155b2688a5SVedang Patel char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; 5165b2688a5SVedang Patel char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; 517b84fff5aSMengdong Lin __le32 pcm_id; /* unique ID - used to match with DAI link */ 5185b2688a5SVedang Patel __le32 dai_id; /* unique ID - used to match */ 519c147c0e1SLiam Girdwood __le32 playback; /* supports playback mode */ 520c147c0e1SLiam Girdwood __le32 capture; /* supports capture mode */ 521c147c0e1SLiam Girdwood __le32 compress; /* 1 = compressed; 0 = PCM */ 5225b2688a5SVedang Patel struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */ 5235b2688a5SVedang Patel __le32 num_streams; /* number of streams */ 5245b2688a5SVedang Patel struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */ 525717a8e72SMengdong Lin __le32 flag_mask; /* bitmask of flags to configure */ 526717a8e72SMengdong Lin __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */ 527717a8e72SMengdong Lin struct snd_soc_tplg_private priv; 528c147c0e1SLiam Girdwood } __attribute__((packed)); 529c147c0e1SLiam Girdwood 530e2a9df65SVedang Patel 531e2a9df65SVedang Patel /* 532676c6b52SMengdong Lin * Describes the physical link runtime supported configs or params 533e2a9df65SVedang Patel * 534676c6b52SMengdong Lin * File block representation for physical link config :- 535e2a9df65SVedang Patel * +-----------------------------------+-----+ 536e2a9df65SVedang Patel * | struct snd_soc_tplg_hdr | 1 | 537e2a9df65SVedang Patel * +-----------------------------------+-----+ 538e2a9df65SVedang Patel * | struct snd_soc_tplg_link_config | N | 539e2a9df65SVedang Patel * +-----------------------------------+-----+ 540e2a9df65SVedang Patel */ 541e2a9df65SVedang Patel struct snd_soc_tplg_link_config { 542e2a9df65SVedang Patel __le32 size; /* in bytes of this structure */ 543e2a9df65SVedang Patel __le32 id; /* unique ID - used to match */ 544676c6b52SMengdong Lin char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */ 545676c6b52SMengdong Lin char stream_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* stream name - used to match */ 546e2a9df65SVedang Patel struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */ 547e2a9df65SVedang Patel __le32 num_streams; /* number of streams */ 548676c6b52SMengdong Lin struct snd_soc_tplg_hw_config hw_config[SND_SOC_TPLG_HW_CONFIG_MAX]; /* hw configs */ 549676c6b52SMengdong Lin __le32 num_hw_configs; /* number of hw configs */ 550676c6b52SMengdong Lin __le32 default_hw_config_id; /* default hw config ID for init */ 551676c6b52SMengdong Lin __le32 flag_mask; /* bitmask of flags to configure */ 552676c6b52SMengdong Lin __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */ 553676c6b52SMengdong Lin struct snd_soc_tplg_private priv; 554e2a9df65SVedang Patel } __attribute__((packed)); 555dc31e741SMengdong Lin 556dc31e741SMengdong Lin /* 5573fbf7935SMengdong Lin * Describes SW/FW specific features of physical DAI. 5583fbf7935SMengdong Lin * It can be used to configure backend DAIs for DPCM. 559dc31e741SMengdong Lin * 5603fbf7935SMengdong Lin * File block representation for physical DAI :- 561dc31e741SMengdong Lin * +-----------------------------------+-----+ 562dc31e741SMengdong Lin * | struct snd_soc_tplg_hdr | 1 | 563dc31e741SMengdong Lin * +-----------------------------------+-----+ 5643fbf7935SMengdong Lin * | struct snd_soc_tplg_dai | N | 565dc31e741SMengdong Lin * +-----------------------------------+-----+ 566dc31e741SMengdong Lin */ 5673fbf7935SMengdong Lin struct snd_soc_tplg_dai { 568dc31e741SMengdong Lin __le32 size; /* in bytes of this structure */ 569dc31e741SMengdong Lin char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */ 570dc31e741SMengdong Lin __le32 dai_id; /* unique ID - used to match */ 571dc31e741SMengdong Lin __le32 playback; /* supports playback mode */ 572dc31e741SMengdong Lin __le32 capture; /* supports capture mode */ 573dc31e741SMengdong Lin struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */ 574dc31e741SMengdong Lin __le32 flag_mask; /* bitmask of flags to configure */ 575dc31e741SMengdong Lin __le32 flags; /* SND_SOC_TPLG_DAI_FLGBIT_* */ 576dc31e741SMengdong Lin struct snd_soc_tplg_private priv; 577dc31e741SMengdong Lin } __attribute__((packed)); 578348f4822SGuenter Roeck 579348f4822SGuenter Roeck /* 580348f4822SGuenter Roeck * Old version of ABI structs, supported for backward compatibility. 581348f4822SGuenter Roeck */ 582348f4822SGuenter Roeck 583348f4822SGuenter Roeck /* Manifest v4 */ 584348f4822SGuenter Roeck struct snd_soc_tplg_manifest_v4 { 585348f4822SGuenter Roeck __le32 size; /* in bytes of this structure */ 586348f4822SGuenter Roeck __le32 control_elems; /* number of control elements */ 587348f4822SGuenter Roeck __le32 widget_elems; /* number of widget elements */ 588348f4822SGuenter Roeck __le32 graph_elems; /* number of graph elements */ 589348f4822SGuenter Roeck __le32 pcm_elems; /* number of PCM elements */ 590348f4822SGuenter Roeck __le32 dai_link_elems; /* number of DAI link elements */ 591348f4822SGuenter Roeck struct snd_soc_tplg_private priv; 592348f4822SGuenter Roeck } __packed; 593348f4822SGuenter Roeck 594348f4822SGuenter Roeck /* Stream Capabilities v4 */ 595348f4822SGuenter Roeck struct snd_soc_tplg_stream_caps_v4 { 596348f4822SGuenter Roeck __le32 size; /* in bytes of this structure */ 597348f4822SGuenter Roeck char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; 598348f4822SGuenter Roeck __le64 formats; /* supported formats SNDRV_PCM_FMTBIT_* */ 599348f4822SGuenter Roeck __le32 rates; /* supported rates SNDRV_PCM_RATE_* */ 600348f4822SGuenter Roeck __le32 rate_min; /* min rate */ 601348f4822SGuenter Roeck __le32 rate_max; /* max rate */ 602348f4822SGuenter Roeck __le32 channels_min; /* min channels */ 603348f4822SGuenter Roeck __le32 channels_max; /* max channels */ 604348f4822SGuenter Roeck __le32 periods_min; /* min number of periods */ 605348f4822SGuenter Roeck __le32 periods_max; /* max number of periods */ 606348f4822SGuenter Roeck __le32 period_size_min; /* min period size bytes */ 607348f4822SGuenter Roeck __le32 period_size_max; /* max period size bytes */ 608348f4822SGuenter Roeck __le32 buffer_size_min; /* min buffer size bytes */ 609348f4822SGuenter Roeck __le32 buffer_size_max; /* max buffer size bytes */ 610348f4822SGuenter Roeck } __packed; 611348f4822SGuenter Roeck 612348f4822SGuenter Roeck /* PCM v4 */ 613348f4822SGuenter Roeck struct snd_soc_tplg_pcm_v4 { 614348f4822SGuenter Roeck __le32 size; /* in bytes of this structure */ 615348f4822SGuenter Roeck char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; 616348f4822SGuenter Roeck char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; 617348f4822SGuenter Roeck __le32 pcm_id; /* unique ID - used to match with DAI link */ 618348f4822SGuenter Roeck __le32 dai_id; /* unique ID - used to match */ 619348f4822SGuenter Roeck __le32 playback; /* supports playback mode */ 620348f4822SGuenter Roeck __le32 capture; /* supports capture mode */ 621348f4822SGuenter Roeck __le32 compress; /* 1 = compressed; 0 = PCM */ 622348f4822SGuenter Roeck struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */ 623348f4822SGuenter Roeck __le32 num_streams; /* number of streams */ 624348f4822SGuenter Roeck struct snd_soc_tplg_stream_caps_v4 caps[2]; /* playback and capture for DAI */ 625348f4822SGuenter Roeck } __packed; 626348f4822SGuenter Roeck 627348f4822SGuenter Roeck /* Physical link config v4 */ 628348f4822SGuenter Roeck struct snd_soc_tplg_link_config_v4 { 629348f4822SGuenter Roeck __le32 size; /* in bytes of this structure */ 630348f4822SGuenter Roeck __le32 id; /* unique ID - used to match */ 631348f4822SGuenter Roeck struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */ 632348f4822SGuenter Roeck __le32 num_streams; /* number of streams */ 633348f4822SGuenter Roeck } __packed; 634348f4822SGuenter Roeck 635c147c0e1SLiam Girdwood #endif 636