aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorMengdong Lin <mengdong.lin@linux.intel.com>2016-07-26 02:32:18 -0400
committerMark Brown <broonie@kernel.org>2016-08-08 06:55:27 -0400
commitdc31e741db49e35e8b99d293dcc7afbbe9418fa7 (patch)
tree81fff5a6170089c1ec69d52d8277cb55484773ce /include/uapi
parent29b4817d4018df78086157ea3a55c1d9424a7cfc (diff)
ASoC: topology: ABI - Add the types for BE DAI
Define the type and ABI struct for Backend DAIs. Add the number of BE DAIs to manifest, and some reserved fields for future extensions. Pump the version number to 5. Topology core will check size of ABI objects to detect version mismatch between user space and kernel. Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com> Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/sound/asoc.h34
1 files changed, 32 insertions, 2 deletions
diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index e4701a3c6331..f734bea9a032 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -83,7 +83,7 @@
83#define SND_SOC_TPLG_NUM_TEXTS 16 83#define SND_SOC_TPLG_NUM_TEXTS 16
84 84
85/* ABI version */ 85/* ABI version */
86#define SND_SOC_TPLG_ABI_VERSION 0x4 86#define SND_SOC_TPLG_ABI_VERSION 0x5
87 87
88/* Max size of TLV data */ 88/* Max size of TLV data */
89#define SND_SOC_TPLG_TLV_SIZE 32 89#define SND_SOC_TPLG_TLV_SIZE 32
@@ -105,7 +105,8 @@
105#define SND_SOC_TPLG_TYPE_CODEC_LINK 9 105#define SND_SOC_TPLG_TYPE_CODEC_LINK 9
106#define SND_SOC_TPLG_TYPE_BACKEND_LINK 10 106#define SND_SOC_TPLG_TYPE_BACKEND_LINK 10
107#define SND_SOC_TPLG_TYPE_PDATA 11 107#define SND_SOC_TPLG_TYPE_PDATA 11
108#define SND_SOC_TPLG_TYPE_MAX SND_SOC_TPLG_TYPE_PDATA 108#define SND_SOC_TPLG_TYPE_BE_DAI 12
109#define SND_SOC_TPLG_TYPE_MAX SND_SOC_TPLG_TYPE_BE_DAI
109 110
110/* vendor block IDs - please add new vendor types to end */ 111/* vendor block IDs - please add new vendor types to end */
111#define SND_SOC_TPLG_TYPE_VENDOR_FW 1000 112#define SND_SOC_TPLG_TYPE_VENDOR_FW 1000
@@ -124,6 +125,11 @@
124#define SND_SOC_TPLG_TUPLE_TYPE_WORD 4 125#define SND_SOC_TPLG_TUPLE_TYPE_WORD 4
125#define SND_SOC_TPLG_TUPLE_TYPE_SHORT 5 126#define SND_SOC_TPLG_TUPLE_TYPE_SHORT 5
126 127
128/* BE DAI flags */
129#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_RATES (1 << 0)
130#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_CHANNELS (1 << 1)
131#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2)
132
127/* 133/*
128 * Block Header. 134 * Block Header.
129 * This header precedes all object and object arrays below. 135 * This header precedes all object and object arrays below.
@@ -285,6 +291,8 @@ struct snd_soc_tplg_manifest {
285 __le32 graph_elems; /* number of graph elements */ 291 __le32 graph_elems; /* number of graph elements */
286 __le32 pcm_elems; /* number of PCM elements */ 292 __le32 pcm_elems; /* number of PCM elements */
287 __le32 dai_link_elems; /* number of DAI link elements */ 293 __le32 dai_link_elems; /* number of DAI link elements */
294 __le32 be_dai_elems; /* number of BE DAI elements */
295 __le32 reserved[20]; /* reserved for new ABI element types */
288 struct snd_soc_tplg_private priv; 296 struct snd_soc_tplg_private priv;
289} __attribute__((packed)); 297} __attribute__((packed));
290 298
@@ -450,4 +458,26 @@ struct snd_soc_tplg_link_config {
450 struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */ 458 struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */
451 __le32 num_streams; /* number of streams */ 459 __le32 num_streams; /* number of streams */
452} __attribute__((packed)); 460} __attribute__((packed));
461
462/*
463 * Describes SW/FW specific features of BE DAI.
464 *
465 * File block representation for BE DAI :-
466 * +-----------------------------------+-----+
467 * | struct snd_soc_tplg_hdr | 1 |
468 * +-----------------------------------+-----+
469 * | struct snd_soc_tplg_be_dai | N |
470 * +-----------------------------------+-----+
471 */
472struct snd_soc_tplg_be_dai {
473 __le32 size; /* in bytes of this structure */
474 char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */
475 __le32 dai_id; /* unique ID - used to match */
476 __le32 playback; /* supports playback mode */
477 __le32 capture; /* supports capture mode */
478 struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */
479 __le32 flag_mask; /* bitmask of flags to configure */
480 __le32 flags; /* SND_SOC_TPLG_DAI_FLGBIT_* */
481 struct snd_soc_tplg_private priv;
482} __attribute__((packed));
453#endif 483#endif