Commit dc31e741 authored by Mengdong Lin's avatar Mengdong Lin Committed by Mark Brown

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: default avatarGuneshwor Singh <guneshwor.o.singh@intel.com>
Signed-off-by: default avatarMengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 29b4817d
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
#define SND_SOC_TPLG_NUM_TEXTS 16 #define SND_SOC_TPLG_NUM_TEXTS 16
/* ABI version */ /* ABI version */
#define SND_SOC_TPLG_ABI_VERSION 0x4 #define SND_SOC_TPLG_ABI_VERSION 0x5
/* Max size of TLV data */ /* Max size of TLV data */
#define SND_SOC_TPLG_TLV_SIZE 32 #define SND_SOC_TPLG_TLV_SIZE 32
...@@ -105,7 +105,8 @@ ...@@ -105,7 +105,8 @@
#define SND_SOC_TPLG_TYPE_CODEC_LINK 9 #define SND_SOC_TPLG_TYPE_CODEC_LINK 9
#define SND_SOC_TPLG_TYPE_BACKEND_LINK 10 #define SND_SOC_TPLG_TYPE_BACKEND_LINK 10
#define SND_SOC_TPLG_TYPE_PDATA 11 #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 */ /* vendor block IDs - please add new vendor types to end */
#define SND_SOC_TPLG_TYPE_VENDOR_FW 1000 #define SND_SOC_TPLG_TYPE_VENDOR_FW 1000
...@@ -124,6 +125,11 @@ ...@@ -124,6 +125,11 @@
#define SND_SOC_TPLG_TUPLE_TYPE_WORD 4 #define SND_SOC_TPLG_TUPLE_TYPE_WORD 4
#define SND_SOC_TPLG_TUPLE_TYPE_SHORT 5 #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. * Block Header.
* This header precedes all object and object arrays below. * This header precedes all object and object arrays below.
...@@ -285,6 +291,8 @@ struct snd_soc_tplg_manifest { ...@@ -285,6 +291,8 @@ struct snd_soc_tplg_manifest {
__le32 graph_elems; /* number of graph elements */ __le32 graph_elems; /* number of graph elements */
__le32 pcm_elems; /* number of PCM elements */ __le32 pcm_elems; /* number of PCM elements */
__le32 dai_link_elems; /* number of DAI link 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; struct snd_soc_tplg_private priv;
} __attribute__((packed)); } __attribute__((packed));
...@@ -450,4 +458,26 @@ struct snd_soc_tplg_link_config { ...@@ -450,4 +458,26 @@ struct snd_soc_tplg_link_config {
struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */ struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */
__le32 num_streams; /* number of streams */ __le32 num_streams; /* number of streams */
} __attribute__((packed)); } __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 #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment