History

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.

Mengdong Lin committed 10 years ago

Commit dc31e741 parent 29b48171 file · +32 −2Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/sound/asoc.h+32−2
@@ -83,7 +83,7 @@ · 82 unmodified lines
8383 #define SND_SOC_TPLG_NUM_TEXTS 16
8484
8585 /* ABI version */
86−#define SND_SOC_TPLG_ABI_VERSION 0x4
86+#define SND_SOC_TPLG_ABI_VERSION 0x5
8787
8888 /* Max size of TLV data */
8989 #define SND_SOC_TPLG_TLV_SIZE 32
@@ -105,7 +105,8 @@ · 15 unmodified lines
105105 #define SND_SOC_TPLG_TYPE_CODEC_LINK 9
106106 #define SND_SOC_TPLG_TYPE_BACKEND_LINK 10
107107 #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
109110
110111 /* vendor block IDs - please add new vendor types to end */
111112 #define SND_SOC_TPLG_TYPE_VENDOR_FW 1000
@@ -124,6 +125,11 @@ · 12 unmodified lines
124125 #define SND_SOC_TPLG_TUPLE_TYPE_WORD 4
125126 #define SND_SOC_TPLG_TUPLE_TYPE_SHORT 5
126127
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+
127133 /*
128134 * Block Header.
129135 * This header precedes all object and object arrays below.
@@ -285,6 +291,8 @@ struct snd_soc_tplg_manifest { · 155 unmodified lines
285291 __le32 graph_elems; /* number of graph elements */
286292 __le32 pcm_elems; /* number of PCM elements */
287293 __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 */
288296 struct snd_soc_tplg_private priv;
289297 } __attribute__((packed));
290298
@@ -450,4 +458,26 @@ struct snd_soc_tplg_link_config { · 159 unmodified lines
450458 struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */
451459 __le32 num_streams; /* number of streams */
452460 } __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+ */
472+struct 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));
453483 #endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t