Merge remote-tracking branch 'sound-asoc/for-next'
[deliverable/linux.git] / include / uapi / sound / asoc.h
index e4701a3c633187c25a832580eb0af5fe70f2ade4..33d00a4ce6567f03f1cb52b08a5e72bda04efbaf 100644 (file)
@@ -83,7 +83,7 @@
 #define SND_SOC_TPLG_NUM_TEXTS         16
 
 /* ABI version */
-#define SND_SOC_TPLG_ABI_VERSION       0x4
+#define SND_SOC_TPLG_ABI_VERSION       0x5
 
 /* Max size of TLV data */
 #define SND_SOC_TPLG_TLV_SIZE          32
 #define SND_SOC_TPLG_TYPE_CODEC_LINK   9
 #define SND_SOC_TPLG_TYPE_BACKEND_LINK 10
 #define SND_SOC_TPLG_TYPE_PDATA                11
-#define SND_SOC_TPLG_TYPE_MAX  SND_SOC_TPLG_TYPE_PDATA
+#define SND_SOC_TPLG_TYPE_BE_DAI       12
+#define SND_SOC_TPLG_TYPE_MAX          SND_SOC_TPLG_TYPE_BE_DAI
 
 /* vendor block IDs - please add new vendor types to end */
 #define SND_SOC_TPLG_TYPE_VENDOR_FW    1000
 #define SND_SOC_TPLG_TUPLE_TYPE_WORD   4
 #define SND_SOC_TPLG_TUPLE_TYPE_SHORT  5
 
+/* BE DAI flags */
+#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_RATES         (1 << 0)
+#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_CHANNELS      (1 << 1)
+#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_SAMPLEBITS    (1 << 2)
+
 /*
  * Block Header.
  * This header precedes all object and object arrays below.
@@ -251,6 +257,7 @@ struct snd_soc_tplg_stream_caps {
        __le32 period_size_max; /* max period size bytes */
        __le32 buffer_size_min; /* min buffer size bytes */
        __le32 buffer_size_max; /* max buffer size bytes */
+       __le32 sig_bits;        /* number of bits of content */
 } __attribute__((packed));
 
 /*
@@ -285,6 +292,8 @@ struct snd_soc_tplg_manifest {
        __le32 graph_elems;     /* number of graph elements */
        __le32 pcm_elems;       /* number of PCM elements */
        __le32 dai_link_elems;  /* number of DAI link elements */
+       __le32 be_dai_elems;    /* number of BE DAI elements */
+       __le32 reserved[20];    /* reserved for new ABI element types */
        struct snd_soc_tplg_private priv;
 } __attribute__((packed));
 
@@ -450,4 +459,26 @@ struct snd_soc_tplg_link_config {
        struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */
        __le32 num_streams;     /* number of streams */
 } __attribute__((packed));
+
+/*
+ * Describes SW/FW specific features of BE DAI.
+ *
+ * File block representation for BE DAI :-
+ * +-----------------------------------+-----+
+ * | struct snd_soc_tplg_hdr           |  1  |
+ * +-----------------------------------+-----+
+ * | struct snd_soc_tplg_be_dai        |  N  |
+ * +-----------------------------------+-----+
+ */
+struct snd_soc_tplg_be_dai {
+       __le32 size;            /* in bytes of this structure */
+       char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */
+       __le32 dai_id;          /* unique ID - used to match */
+       __le32 playback;        /* supports playback mode */
+       __le32 capture;         /* supports capture mode */
+       struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */
+       __le32 flag_mask;       /* bitmask of flags to configure */
+       __le32 flags;           /* SND_SOC_TPLG_DAI_FLGBIT_* */
+       struct snd_soc_tplg_private priv;
+} __attribute__((packed));
 #endif
This page took 0.024817 seconds and 5 git commands to generate.