Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

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