All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] ASoC: topology: ABI - Add support for PCM, BE & CC link
@ 2015-09-30  9:02 mengdong.lin
  2015-09-30  9:03 ` [PATCH 1/8] ASoC: topology: ABI - Add PCM Support and bump ABI version to 4 mengdong.lin
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: mengdong.lin @ 2015-09-30  9:02 UTC (permalink / raw)
  To: alsa-devel, broonie, tiwai, liam.r.girdwood, vedang.patel,
	subhransu.s.prusty, vinod.koul, jeeja.kp
  Cc: Mengdong Lin

From: Mengdong Lin <mengdong.lin@intel.com>

This series includes topology ABI update to support PCM (FE DAI/DAI links),
BE and CC DAI links. Bump the ABI version to 4.

Mengdong Lin (2):
  ASoC: topology: ABI - Change stream formats to a bitwise flag
  ASoC: topology: ABI - Remove tdm_slot & dai_fmt from
    snd_soc_tplg_stream

Vedang Patel (6):
  ASoC: topology: ABI - Add PCM Support and bump ABI version to 4
  ASoC: topology: ABI - Remove unused struct snd_soc_tplg_stream_config
  ASoC: topology: ABI - Use __le32 instead of __u32 in
    snd_soc_tplg_dapm_widget
  ASoC: topology: ABI - Add name element to snd_soc_tplg_stream
  ASoC: topology: ABI - Add the type for BE DAI link
  ASoC: topology: ABI - Add configuration for BE & Codec-Codec DAI Links

 include/uapi/sound/asoc.h | 76 +++++++++++++++++++++++++----------------------
 sound/soc/soc-topology.c  |  4 +--
 2 files changed, 43 insertions(+), 37 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 1/8] ASoC: topology: ABI - Add PCM Support and bump ABI version to 4
  2015-09-30  9:02 [PATCH 0/8] ASoC: topology: ABI - Add support for PCM, BE & CC link mengdong.lin
@ 2015-09-30  9:03 ` mengdong.lin
  2015-10-02 17:13   ` Applied "ASoC: topology: ABI - Add PCM Support and bump ABI version to 4" to the asoc tree Mark Brown
  2015-09-30  9:04 ` [PATCH 2/8] ASoC: topology: ABI - Remove unused struct snd_soc_tplg_stream_config mengdong.lin
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 18+ messages in thread
From: mengdong.lin @ 2015-09-30  9:03 UTC (permalink / raw)
  To: alsa-devel, broonie, tiwai, liam.r.girdwood, vedang.patel,
	subhransu.s.prusty, vinod.koul, jeeja.kp
  Cc: Mengdong Lin

From: Vedang Patel <vedang.patel@intel.com>

The struct snd_soc_tplg_pcm_dai is renamed to snd_soc_tplg_pcm.
This struct will now be used to handle data related to PCMs
(FE DAI & DAI links). It's not for BE, because BE DAI mappings will be
provided by ACPI/FDT data.

Remove the unused struct snd_soc_tplg_pcm_cfg_caps. We are using
snd_soc_tplg_stream and snd_soc_stream_caps instead.

Bump ABI version to 4.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>

diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index 247c50b..2aa081c 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -83,7 +83,7 @@
 #define SND_SOC_TPLG_NUM_TEXTS		16
 
 /* ABI version */
-#define SND_SOC_TPLG_ABI_VERSION	0x3
+#define SND_SOC_TPLG_ABI_VERSION	0x4
 
 /* Max size of TLV data */
 #define SND_SOC_TPLG_TLV_SIZE		32
@@ -378,30 +378,29 @@ struct snd_soc_tplg_dapm_widget {
 	 */
 } __attribute__((packed));
 
-struct snd_soc_tplg_pcm_cfg_caps {
-	struct snd_soc_tplg_stream_caps caps;
-	struct snd_soc_tplg_stream_config configs[SND_SOC_TPLG_STREAM_CONFIG_MAX];
-	__le32 num_configs;	/* number of configs */
-} __attribute__((packed));
 
 /*
- * Describes SW/FW specific features of PCM or DAI link.
+ * Describes SW/FW specific features of PCM (FE DAI & DAI link).
  *
- * File block representation for PCM/DAI-Link :-
+ * File block representation for PCM :-
  * +-----------------------------------+-----+
  * | struct snd_soc_tplg_hdr           |  1  |
  * +-----------------------------------+-----+
- * | struct snd_soc_tplg_dapm_pcm_dai  |  N  |
+ * | struct snd_soc_tplg_pcm           |  N  |
  * +-----------------------------------+-----+
  */
-struct snd_soc_tplg_pcm_dai {
+struct snd_soc_tplg_pcm {
 	__le32 size;		/* in bytes of this structure */
-	char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
-	__le32 id;			/* unique ID - used to match */
-	__le32 playback;		/* supports playback mode */
-	__le32 capture;			/* supports capture mode */
-	__le32 compress;		/* 1 = compressed; 0 = PCM */
-	struct snd_soc_tplg_pcm_cfg_caps capconf[2];	/* capabilities and configs */
+	char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
+	char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
+	__le32 pcm_id;		/* unique ID - used to match */
+	__le32 dai_id;		/* unique ID - used to match */
+	__le32 playback;	/* supports playback mode */
+	__le32 capture;		/* supports capture mode */
+	__le32 compress;	/* 1 = compressed; 0 = PCM */
+	struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */
+	__le32 num_streams;	/* number of streams */
+	struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */
 } __attribute__((packed));
 
 #endif
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 69d01cd..8d7ec80 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1558,7 +1558,7 @@ static int soc_tplg_pcm_dai_elems_load(struct soc_tplg *tplg,
 	pcm_dai = (struct snd_soc_tplg_pcm_dai *)tplg->pos;
 
 	if (soc_tplg_check_elem_count(tplg,
-		sizeof(struct snd_soc_tplg_pcm_dai), count,
+		sizeof(struct snd_soc_tplg_pcm), count,
 		hdr->payload_size, "PCM DAI")) {
 		dev_err(tplg->dev, "ASoC: invalid count %d for PCM DAI elems\n",
 			count);
@@ -1566,7 +1566,7 @@ static int soc_tplg_pcm_dai_elems_load(struct soc_tplg *tplg,
 	}
 
 	dev_dbg(tplg->dev, "ASoC: adding %d PCM DAIs\n", count);
-	tplg->pos += sizeof(struct snd_soc_tplg_pcm_dai) * count;
+	tplg->pos += sizeof(struct snd_soc_tplg_pcm) * count;
 
 	dobj = kzalloc(sizeof(struct snd_soc_dobj), GFP_KERNEL);
 	if (dobj == NULL)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 2/8] ASoC: topology: ABI - Remove unused struct snd_soc_tplg_stream_config
  2015-09-30  9:02 [PATCH 0/8] ASoC: topology: ABI - Add support for PCM, BE & CC link mengdong.lin
  2015-09-30  9:03 ` [PATCH 1/8] ASoC: topology: ABI - Add PCM Support and bump ABI version to 4 mengdong.lin
@ 2015-09-30  9:04 ` mengdong.lin
  2015-10-02 17:13   ` Applied "ASoC: topology: ABI - Remove unused struct snd_soc_tplg_stream_config" to the asoc tree Mark Brown
  2015-09-30  9:05 ` [PATCH 3/8] ASoC: topology: ABI - Use __le32 instead of __u32 in snd_soc_tplg_dapm_widget mengdong.lin
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 18+ messages in thread
From: mengdong.lin @ 2015-09-30  9:04 UTC (permalink / raw)
  To: alsa-devel, broonie, tiwai, liam.r.girdwood, vedang.patel,
	subhransu.s.prusty, vinod.koul, jeeja.kp
  Cc: Mengdong Lin

From: Vedang Patel <vedang.patel@intel.com>

The struct snd_soc_tplg_stream_config is no longer used in the ABI.
We are using snd_soc_tplg_stream instead.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>

diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index 2aa081c..4bef63f 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -227,16 +227,6 @@ struct snd_soc_tplg_stream {
 } __attribute__((packed));
 
 /*
- * Duplex stream configuration supported by SW/FW.
- */
-struct snd_soc_tplg_stream_config {
-	__le32 size;		/* in bytes of this structure */
-	char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
-	struct snd_soc_tplg_stream playback;
-	struct snd_soc_tplg_stream capture;
-} __attribute__((packed));
-
-/*
  * Manifest. List totals for each payload type. Not used in parsing, but will
  * be passed to the component driver before any other objects in order for any
  * global component resource allocations.
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 3/8] ASoC: topology: ABI - Use __le32 instead of __u32 in snd_soc_tplg_dapm_widget
  2015-09-30  9:02 [PATCH 0/8] ASoC: topology: ABI - Add support for PCM, BE & CC link mengdong.lin
  2015-09-30  9:03 ` [PATCH 1/8] ASoC: topology: ABI - Add PCM Support and bump ABI version to 4 mengdong.lin
  2015-09-30  9:04 ` [PATCH 2/8] ASoC: topology: ABI - Remove unused struct snd_soc_tplg_stream_config mengdong.lin
@ 2015-09-30  9:05 ` mengdong.lin
  2015-10-02 17:13   ` Applied "ASoC: topology: ABI - Use __le32 instead of __u32 in snd_soc_tplg_dapm_widget" to the asoc tree Mark Brown
  2015-09-30  9:05 ` [PATCH 4/8] ASoC: topology: ABI - Add name element to snd_soc_tplg_stream mengdong.lin
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 18+ messages in thread
From: mengdong.lin @ 2015-09-30  9:05 UTC (permalink / raw)
  To: alsa-devel, broonie, tiwai, liam.r.girdwood, vedang.patel,
	subhransu.s.prusty, vinod.koul, jeeja.kp
  Cc: Mengdong Lin

From: Vedang Patel <vedang.patel@intel.com>

This fixes the endianness of the ABI parameters in the struct.
The field 'num_kcontrols' is also extended from 16 bits to 32 bits.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>

diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index 4bef63f..88210a8 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -356,11 +356,11 @@ struct snd_soc_tplg_dapm_widget {
 	__le32 shift;		/* bits to shift */
 	__le32 mask;		/* non-shifted mask */
 	__le32 subseq;		/* sort within widget type */
-	__u32 invert;		/* invert the power bit */
-	__u32 ignore_suspend;	/* kept enabled over suspend */
-	__u16 event_flags;
-	__u16 event_type;
-	__u16 num_kcontrols;
+	__le32 invert;		/* invert the power bit */
+	__le32 ignore_suspend;	/* kept enabled over suspend */
+	__le16 event_flags;
+	__le16 event_type;
+	__le32 num_kcontrols;
 	struct snd_soc_tplg_private priv;
 	/*
 	 * kcontrols that relate to this widget
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 4/8] ASoC: topology: ABI - Add name element to snd_soc_tplg_stream
  2015-09-30  9:02 [PATCH 0/8] ASoC: topology: ABI - Add support for PCM, BE & CC link mengdong.lin
                   ` (2 preceding siblings ...)
  2015-09-30  9:05 ` [PATCH 3/8] ASoC: topology: ABI - Use __le32 instead of __u32 in snd_soc_tplg_dapm_widget mengdong.lin
@ 2015-09-30  9:05 ` mengdong.lin
  2015-10-02 17:13   ` Applied "ASoC: topology: ABI - Add name element to snd_soc_tplg_stream" to the asoc tree Mark Brown
  2015-09-30  9:05 ` [PATCH 5/8] ASoC: topology: ABI - Change stream formats to a bitwise flag mengdong.lin
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 18+ messages in thread
From: mengdong.lin @ 2015-09-30  9:05 UTC (permalink / raw)
  To: alsa-devel, broonie, tiwai, liam.r.girdwood, vedang.patel,
	subhransu.s.prusty, vinod.koul, jeeja.kp
  Cc: Mengdong Lin

From: Vedang Patel <vedang.patel@intel.com>

For codec-codec links, this struct will be mapped to the DAI links's
params, which is struct snd_soc_pcm_stream and it needs a stream name.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>

diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index 88210a8..2181480 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -217,6 +217,7 @@ struct snd_soc_tplg_stream_caps {
  */
 struct snd_soc_tplg_stream {
 	__le32 size;		/* in bytes of this structure */
+	char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* Name of the stream */
 	__le64 format;		/* SNDRV_PCM_FMTBIT_* */
 	__le32 rate;		/* SNDRV_PCM_RATE_* */
 	__le32 period_bytes;	/* size of period in bytes */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 5/8] ASoC: topology: ABI - Change stream formats to a bitwise flag
  2015-09-30  9:02 [PATCH 0/8] ASoC: topology: ABI - Add support for PCM, BE & CC link mengdong.lin
                   ` (3 preceding siblings ...)
  2015-09-30  9:05 ` [PATCH 4/8] ASoC: topology: ABI - Add name element to snd_soc_tplg_stream mengdong.lin
@ 2015-09-30  9:05 ` mengdong.lin
  2015-10-02 17:13   ` Applied "ASoC: topology: ABI - Change stream formats to a bitwise flag" to the asoc tree Mark Brown
  2015-09-30  9:12 ` [PATCH 6/8] ASoC: topology: ABI - Add the type for BE DAI link mengdong.lin
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 18+ messages in thread
From: mengdong.lin @ 2015-09-30  9:05 UTC (permalink / raw)
  To: alsa-devel, broonie, tiwai, liam.r.girdwood, vedang.patel,
	subhransu.s.prusty, vinod.koul, jeeja.kp
  Cc: Mengdong Lin

From: Mengdong Lin <mengdong.lin@intel.com>

The toplogy user space tool will generate this bitwise flag by using
SNDRV_PCM_FORMAT_* exposed by asound.h, and the topology core will copy
this flag when generating DAI streams.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>

diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index 2181480..eeb74a9c 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -198,7 +198,7 @@ struct snd_soc_tplg_ctl_hdr {
 struct snd_soc_tplg_stream_caps {
 	__le32 size;		/* in bytes of this structure */
 	char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
-	__le64 formats[SND_SOC_TPLG_MAX_FORMATS];	/* supported formats SNDRV_PCM_FMTBIT_* */
+	__le64 formats;	/* supported formats SNDRV_PCM_FMTBIT_* */
 	__le32 rates;		/* supported rates SNDRV_PCM_RATE_* */
 	__le32 rate_min;	/* min rate */
 	__le32 rate_max;	/* max rate */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 6/8] ASoC: topology: ABI - Add the type for BE DAI link
  2015-09-30  9:02 [PATCH 0/8] ASoC: topology: ABI - Add support for PCM, BE & CC link mengdong.lin
                   ` (4 preceding siblings ...)
  2015-09-30  9:05 ` [PATCH 5/8] ASoC: topology: ABI - Change stream formats to a bitwise flag mengdong.lin
@ 2015-09-30  9:12 ` mengdong.lin
  2015-10-02 17:13   ` Applied "ASoC: topology: ABI - Add the type for BE DAI link" to the asoc tree Mark Brown
  2015-09-30  9:13 ` [PATCH 7/8] ASoC: topology: ABI - Add configuration for BE & Codec-Codec DAI Links mengdong.lin
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 18+ messages in thread
From: mengdong.lin @ 2015-09-30  9:12 UTC (permalink / raw)
  To: alsa-devel, broonie, tiwai, liam.r.girdwood, vedang.patel,
	subhransu.s.prusty, vinod.koul, jeeja.kp
  Cc: Mengdong Lin

From: Vedang Patel <vedang.patel@intel.com>

Define the topology type for BE DAI link: SND_SOC_TPLG_TYPE_BACKEND_LINK.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>

diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index eeb74a9c..f75fd29 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -103,7 +103,8 @@
 #define SND_SOC_TPLG_TYPE_PCM		7
 #define SND_SOC_TPLG_TYPE_MANIFEST	8
 #define SND_SOC_TPLG_TYPE_CODEC_LINK	9
-#define SND_SOC_TPLG_TYPE_PDATA		10
+#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
 
 /* vendor block IDs - please add new vendor types to end */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 7/8] ASoC: topology: ABI - Add configuration for BE & Codec-Codec DAI Links
  2015-09-30  9:02 [PATCH 0/8] ASoC: topology: ABI - Add support for PCM, BE & CC link mengdong.lin
                   ` (5 preceding siblings ...)
  2015-09-30  9:12 ` [PATCH 6/8] ASoC: topology: ABI - Add the type for BE DAI link mengdong.lin
@ 2015-09-30  9:13 ` mengdong.lin
  2015-10-02 17:13   ` Applied "ASoC: topology: ABI - Add configuration for BE & Codec-Codec DAI Links" to the asoc tree Mark Brown
  2015-09-30  9:13 ` [PATCH 8/8] ASoC: topology: ABI - Remove tdm_slot & dai_fmt from snd_soc_tplg_stream mengdong.lin
  2015-09-30  9:23 ` [PATCH 0/8] ASoC: topology: ABI - Add support for PCM, BE & CC link Lin, Mengdong
  8 siblings, 1 reply; 18+ messages in thread
From: mengdong.lin @ 2015-09-30  9:13 UTC (permalink / raw)
  To: alsa-devel, broonie, tiwai, liam.r.girdwood, vedang.patel,
	subhransu.s.prusty, vinod.koul, jeeja.kp
  Cc: Mengdong Lin

From: Vedang Patel <vedang.patel@intel.com>

struct snd_soc_tplg_link_config is defined to configure BE & CC links.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>

diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index f75fd29..538ea13 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -395,4 +395,21 @@ struct snd_soc_tplg_pcm {
 	struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */
 } __attribute__((packed));
 
+
+/*
+ * Describes the BE or CC link runtime supported configs or params
+ *
+ * File block representation for BE/CC link config :-
+ * +-----------------------------------+-----+
+ * | struct snd_soc_tplg_hdr           |  1  |
+ * +-----------------------------------+-----+
+ * | struct snd_soc_tplg_link_config   |  N  |
+ * +-----------------------------------+-----+
+ */
+struct snd_soc_tplg_link_config {
+	__le32 size;            /* in bytes of this structure */
+	__le32 id;              /* unique ID - used to match */
+	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));
 #endif
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 8/8] ASoC: topology: ABI - Remove tdm_slot & dai_fmt from snd_soc_tplg_stream
  2015-09-30  9:02 [PATCH 0/8] ASoC: topology: ABI - Add support for PCM, BE & CC link mengdong.lin
                   ` (6 preceding siblings ...)
  2015-09-30  9:13 ` [PATCH 7/8] ASoC: topology: ABI - Add configuration for BE & Codec-Codec DAI Links mengdong.lin
@ 2015-09-30  9:13 ` mengdong.lin
  2015-10-02 17:13   ` Applied "ASoC: topology: ABI - Remove tdm_slot & dai_fmt from snd_soc_tplg_stream" to the asoc tree Mark Brown
  2015-09-30  9:23 ` [PATCH 0/8] ASoC: topology: ABI - Add support for PCM, BE & CC link Lin, Mengdong
  8 siblings, 1 reply; 18+ messages in thread
From: mengdong.lin @ 2015-09-30  9:13 UTC (permalink / raw)
  To: alsa-devel, broonie, tiwai, liam.r.girdwood, vedang.patel,
	subhransu.s.prusty, vinod.koul, jeeja.kp
  Cc: Mengdong Lin

From: Mengdong Lin <mengdong.lin@intel.com>

These two fields are line parameters for BE/CC links and
should not be from toplogy but from ACPI.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>

diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index 538ea13..26539a7 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -224,8 +224,6 @@ struct snd_soc_tplg_stream {
 	__le32 period_bytes;	/* size of period in bytes */
 	__le32 buffer_bytes;	/* size of buffer in bytes */
 	__le32 channels;	/* channels */
-	__le32 tdm_slot;	/* optional BE bitmask of supported TDM slots */
-	__le32 dai_fmt;		/* SND_SOC_DAIFMT_  */
 } __attribute__((packed));
 
 /*
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/8] ASoC: topology: ABI - Add support for PCM, BE & CC link
  2015-09-30  9:02 [PATCH 0/8] ASoC: topology: ABI - Add support for PCM, BE & CC link mengdong.lin
                   ` (7 preceding siblings ...)
  2015-09-30  9:13 ` [PATCH 8/8] ASoC: topology: ABI - Remove tdm_slot & dai_fmt from snd_soc_tplg_stream mengdong.lin
@ 2015-09-30  9:23 ` Lin, Mengdong
  8 siblings, 0 replies; 18+ messages in thread
From: Lin, Mengdong @ 2015-09-30  9:23 UTC (permalink / raw)
  To: alsa-devel, broonie, tiwai, Girdwood, Liam R, Patel, Vedang,
	Koul, Vinod, Prusty, Subhransu S, Kp, Jeeja

Sorry, please overlook this version and see v2.

I sent some v1 patches twice by mistake. This seems to broke the v1 thread. So I sent v2.

Regards
Mengdong

> -----Original Message-----
> From: Lin, Mengdong
> Sent: Wednesday, September 30, 2015 5:03 PM
> To: alsa-devel@alsa-project.org; broonie@kernel.org; tiwai@suse.de;
> Girdwood, Liam R; Patel, Vedang; Prusty, Subhransu S; Koul, Vinod; Kp, Jeeja
> Cc: Lin, Mengdong
> Subject: [PATCH 0/8] ASoC: topology: ABI - Add support for PCM, BE & CC
> link
> 
> From: Mengdong Lin <mengdong.lin@intel.com>
> 
> This series includes topology ABI update to support PCM (FE DAI/DAI links),
> BE and CC DAI links. Bump the ABI version to 4.
> 
> Mengdong Lin (2):
>   ASoC: topology: ABI - Change stream formats to a bitwise flag
>   ASoC: topology: ABI - Remove tdm_slot & dai_fmt from
>     snd_soc_tplg_stream
> 
> Vedang Patel (6):
>   ASoC: topology: ABI - Add PCM Support and bump ABI version to 4
>   ASoC: topology: ABI - Remove unused struct snd_soc_tplg_stream_config
>   ASoC: topology: ABI - Use __le32 instead of __u32 in
>     snd_soc_tplg_dapm_widget
>   ASoC: topology: ABI - Add name element to snd_soc_tplg_stream
>   ASoC: topology: ABI - Add the type for BE DAI link
>   ASoC: topology: ABI - Add configuration for BE & Codec-Codec DAI Links
> 
>  include/uapi/sound/asoc.h | 76
> +++++++++++++++++++++++++----------------------
>  sound/soc/soc-topology.c  |  4 +--
>  2 files changed, 43 insertions(+), 37 deletions(-)
> 
> --
> 1.9.1

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Applied "ASoC: topology: ABI - Remove tdm_slot & dai_fmt from snd_soc_tplg_stream" to the asoc tree
  2015-09-30  9:13 ` [PATCH 8/8] ASoC: topology: ABI - Remove tdm_slot & dai_fmt from snd_soc_tplg_stream mengdong.lin
@ 2015-10-02 17:13   ` Mark Brown
  0 siblings, 0 replies; 18+ messages in thread
From: Mark Brown @ 2015-10-02 17:13 UTC (permalink / raw)
  To: Mengdong Lin, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: topology: ABI - Remove tdm_slot & dai_fmt from snd_soc_tplg_stream

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 76a822a6ae9c0c67309318bb60a4117329252fc4 Mon Sep 17 00:00:00 2001
From: Mengdong Lin <mengdong.lin@intel.com>
Date: Wed, 30 Sep 2015 17:32:40 +0800
Subject: [PATCH] ASoC: topology: ABI - Remove tdm_slot & dai_fmt from
 snd_soc_tplg_stream

These two fields are line parameters for BE/CC links and
should not be from toplogy but from ACPI.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/uapi/sound/asoc.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index 538ea13..26539a7 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -224,8 +224,6 @@ struct snd_soc_tplg_stream {
 	__le32 period_bytes;	/* size of period in bytes */
 	__le32 buffer_bytes;	/* size of buffer in bytes */
 	__le32 channels;	/* channels */
-	__le32 tdm_slot;	/* optional BE bitmask of supported TDM slots */
-	__le32 dai_fmt;		/* SND_SOC_DAIFMT_  */
 } __attribute__((packed));
 
 /*
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Applied "ASoC: topology: ABI - Add configuration for BE & Codec-Codec DAI Links" to the asoc tree
  2015-09-30  9:13 ` [PATCH 7/8] ASoC: topology: ABI - Add configuration for BE & Codec-Codec DAI Links mengdong.lin
@ 2015-10-02 17:13   ` Mark Brown
  0 siblings, 0 replies; 18+ messages in thread
From: Mark Brown @ 2015-10-02 17:13 UTC (permalink / raw)
  To: Vedang Patel, Mengdong Lin, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: topology: ABI - Add configuration for BE & Codec-Codec DAI Links

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From e2a9df656f28e42538562d090e2b6f3dec5b41f2 Mon Sep 17 00:00:00 2001
From: Vedang Patel <vedang.patel@intel.com>
Date: Wed, 30 Sep 2015 17:32:22 +0800
Subject: [PATCH] ASoC: topology: ABI - Add configuration for BE & Codec-Codec
 DAI Links

struct snd_soc_tplg_link_config is defined to configure BE & CC links.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/uapi/sound/asoc.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index f75fd29..538ea13 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -395,4 +395,21 @@ struct snd_soc_tplg_pcm {
 	struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */
 } __attribute__((packed));
 
+
+/*
+ * Describes the BE or CC link runtime supported configs or params
+ *
+ * File block representation for BE/CC link config :-
+ * +-----------------------------------+-----+
+ * | struct snd_soc_tplg_hdr           |  1  |
+ * +-----------------------------------+-----+
+ * | struct snd_soc_tplg_link_config   |  N  |
+ * +-----------------------------------+-----+
+ */
+struct snd_soc_tplg_link_config {
+	__le32 size;            /* in bytes of this structure */
+	__le32 id;              /* unique ID - used to match */
+	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));
 #endif
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Applied "ASoC: topology: ABI - Add the type for BE DAI link" to the asoc tree
  2015-09-30  9:12 ` [PATCH 6/8] ASoC: topology: ABI - Add the type for BE DAI link mengdong.lin
@ 2015-10-02 17:13   ` Mark Brown
  0 siblings, 0 replies; 18+ messages in thread
From: Mark Brown @ 2015-10-02 17:13 UTC (permalink / raw)
  To: Vedang Patel, Mengdong Lin, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: topology: ABI - Add the type for BE DAI link

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 7c545b327d54cdc3f693093f744459f6e0d8ce58 Mon Sep 17 00:00:00 2001
From: Vedang Patel <vedang.patel@intel.com>
Date: Wed, 30 Sep 2015 17:32:04 +0800
Subject: [PATCH] ASoC: topology: ABI - Add the type for BE DAI link

Define the topology type for BE DAI link: SND_SOC_TPLG_TYPE_BACKEND_LINK.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/uapi/sound/asoc.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index eeb74a9c..f75fd29 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -103,7 +103,8 @@
 #define SND_SOC_TPLG_TYPE_PCM		7
 #define SND_SOC_TPLG_TYPE_MANIFEST	8
 #define SND_SOC_TPLG_TYPE_CODEC_LINK	9
-#define SND_SOC_TPLG_TYPE_PDATA		10
+#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
 
 /* vendor block IDs - please add new vendor types to end */
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Applied "ASoC: topology: ABI - Change stream formats to a bitwise flag" to the asoc tree
  2015-09-30  9:05 ` [PATCH 5/8] ASoC: topology: ABI - Change stream formats to a bitwise flag mengdong.lin
@ 2015-10-02 17:13   ` Mark Brown
  0 siblings, 0 replies; 18+ messages in thread
From: Mark Brown @ 2015-10-02 17:13 UTC (permalink / raw)
  To: Mengdong Lin, Liam Girdwood, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: topology: ABI - Change stream formats to a bitwise flag

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 478d0d39719127c42f21ac85b8719a87b8fa7bd7 Mon Sep 17 00:00:00 2001
From: Mengdong Lin <mengdong.lin@intel.com>
Date: Wed, 30 Sep 2015 17:31:44 +0800
Subject: [PATCH] ASoC: topology: ABI - Change stream formats to a bitwise flag

The toplogy user space tool will generate this bitwise flag by using
SNDRV_PCM_FORMAT_* exposed by asound.h, and the topology core will copy
this flag when generating DAI streams.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/uapi/sound/asoc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index 2181480..eeb74a9c 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -198,7 +198,7 @@ struct snd_soc_tplg_ctl_hdr {
 struct snd_soc_tplg_stream_caps {
 	__le32 size;		/* in bytes of this structure */
 	char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
-	__le64 formats[SND_SOC_TPLG_MAX_FORMATS];	/* supported formats SNDRV_PCM_FMTBIT_* */
+	__le64 formats;	/* supported formats SNDRV_PCM_FMTBIT_* */
 	__le32 rates;		/* supported rates SNDRV_PCM_RATE_* */
 	__le32 rate_min;	/* min rate */
 	__le32 rate_max;	/* max rate */
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Applied "ASoC: topology: ABI - Add name element to snd_soc_tplg_stream" to the asoc tree
  2015-09-30  9:05 ` [PATCH 4/8] ASoC: topology: ABI - Add name element to snd_soc_tplg_stream mengdong.lin
@ 2015-10-02 17:13   ` Mark Brown
  0 siblings, 0 replies; 18+ messages in thread
From: Mark Brown @ 2015-10-02 17:13 UTC (permalink / raw)
  To: Vedang Patel, Mengdong Lin, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: topology: ABI - Add name element to snd_soc_tplg_stream

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 731324f5cee3caf230427f754701212961fe0bb1 Mon Sep 17 00:00:00 2001
From: Vedang Patel <vedang.patel@intel.com>
Date: Wed, 30 Sep 2015 17:31:34 +0800
Subject: [PATCH] ASoC: topology: ABI - Add name element to snd_soc_tplg_stream

For codec-codec links, this struct will be mapped to the DAI links's
params, which is struct snd_soc_pcm_stream and it needs a stream name.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/uapi/sound/asoc.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index 88210a8..2181480 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -217,6 +217,7 @@ struct snd_soc_tplg_stream_caps {
  */
 struct snd_soc_tplg_stream {
 	__le32 size;		/* in bytes of this structure */
+	char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* Name of the stream */
 	__le64 format;		/* SNDRV_PCM_FMTBIT_* */
 	__le32 rate;		/* SNDRV_PCM_RATE_* */
 	__le32 period_bytes;	/* size of period in bytes */
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Applied "ASoC: topology: ABI - Use __le32 instead of __u32 in snd_soc_tplg_dapm_widget" to the asoc tree
  2015-09-30  9:05 ` [PATCH 3/8] ASoC: topology: ABI - Use __le32 instead of __u32 in snd_soc_tplg_dapm_widget mengdong.lin
@ 2015-10-02 17:13   ` Mark Brown
  0 siblings, 0 replies; 18+ messages in thread
From: Mark Brown @ 2015-10-02 17:13 UTC (permalink / raw)
  To: Vedang Patel, Mengdong Lin, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: topology: ABI - Use __le32 instead of __u32 in snd_soc_tplg_dapm_widget

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From e8b3fe8f383bbf055cbd69b776fcbbb5ed3befcd Mon Sep 17 00:00:00 2001
From: Vedang Patel <vedang.patel@intel.com>
Date: Wed, 30 Sep 2015 17:30:05 +0800
Subject: [PATCH] ASoC: topology: ABI - Use __le32 instead of __u32 in
 snd_soc_tplg_dapm_widget

This fixes the endianness of the ABI parameters in the struct.
The field 'num_kcontrols' is also extended from 16 bits to 32 bits.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/uapi/sound/asoc.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index 4bef63f..88210a8 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -356,11 +356,11 @@ struct snd_soc_tplg_dapm_widget {
 	__le32 shift;		/* bits to shift */
 	__le32 mask;		/* non-shifted mask */
 	__le32 subseq;		/* sort within widget type */
-	__u32 invert;		/* invert the power bit */
-	__u32 ignore_suspend;	/* kept enabled over suspend */
-	__u16 event_flags;
-	__u16 event_type;
-	__u16 num_kcontrols;
+	__le32 invert;		/* invert the power bit */
+	__le32 ignore_suspend;	/* kept enabled over suspend */
+	__le16 event_flags;
+	__le16 event_type;
+	__le32 num_kcontrols;
 	struct snd_soc_tplg_private priv;
 	/*
 	 * kcontrols that relate to this widget
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Applied "ASoC: topology: ABI - Remove unused struct snd_soc_tplg_stream_config" to the asoc tree
  2015-09-30  9:04 ` [PATCH 2/8] ASoC: topology: ABI - Remove unused struct snd_soc_tplg_stream_config mengdong.lin
@ 2015-10-02 17:13   ` Mark Brown
  0 siblings, 0 replies; 18+ messages in thread
From: Mark Brown @ 2015-10-02 17:13 UTC (permalink / raw)
  To: Vedang Patel, Mengdong Lin, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: topology: ABI - Remove unused struct snd_soc_tplg_stream_config

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 7654855ef84d78079109bb38195a8db6b188117b Mon Sep 17 00:00:00 2001
From: Vedang Patel <vedang.patel@intel.com>
Date: Wed, 30 Sep 2015 17:29:47 +0800
Subject: [PATCH] ASoC: topology: ABI - Remove unused struct
 snd_soc_tplg_stream_config

The struct snd_soc_tplg_stream_config is no longer used in the ABI.
We are using snd_soc_tplg_stream instead.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/uapi/sound/asoc.h | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index 2aa081c..4bef63f 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -227,16 +227,6 @@ struct snd_soc_tplg_stream {
 } __attribute__((packed));
 
 /*
- * Duplex stream configuration supported by SW/FW.
- */
-struct snd_soc_tplg_stream_config {
-	__le32 size;		/* in bytes of this structure */
-	char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
-	struct snd_soc_tplg_stream playback;
-	struct snd_soc_tplg_stream capture;
-} __attribute__((packed));
-
-/*
  * Manifest. List totals for each payload type. Not used in parsing, but will
  * be passed to the component driver before any other objects in order for any
  * global component resource allocations.
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Applied "ASoC: topology: ABI - Add PCM Support and bump ABI version to 4" to the asoc tree
  2015-09-30  9:03 ` [PATCH 1/8] ASoC: topology: ABI - Add PCM Support and bump ABI version to 4 mengdong.lin
@ 2015-10-02 17:13   ` Mark Brown
  0 siblings, 0 replies; 18+ messages in thread
From: Mark Brown @ 2015-10-02 17:13 UTC (permalink / raw)
  To: Vedang Patel, Mengdong Lin, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: topology: ABI - Add PCM Support and bump ABI version to 4

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 5b2688a59af686f7c0a80edc49d7f190365ac090 Mon Sep 17 00:00:00 2001
From: Vedang Patel <vedang.patel@intel.com>
Date: Wed, 30 Sep 2015 17:28:47 +0800
Subject: [PATCH] ASoC: topology: ABI - Add PCM Support and bump ABI version to
 4

The struct snd_soc_tplg_pcm_dai is renamed to snd_soc_tplg_pcm.
This struct will now be used to handle data related to PCMs
(FE DAI & DAI links). It's not for BE, because BE DAI mappings will be
provided by ACPI/FDT data.

Remove the unused struct snd_soc_tplg_pcm_cfg_caps. We are using
snd_soc_tplg_stream and snd_soc_stream_caps instead.

Bump ABI version to 4.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/uapi/sound/asoc.h | 31 +++++++++++++++----------------
 sound/soc/soc-topology.c  |  4 ++--
 2 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index 247c50b..2aa081c 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -83,7 +83,7 @@
 #define SND_SOC_TPLG_NUM_TEXTS		16
 
 /* ABI version */
-#define SND_SOC_TPLG_ABI_VERSION	0x3
+#define SND_SOC_TPLG_ABI_VERSION	0x4
 
 /* Max size of TLV data */
 #define SND_SOC_TPLG_TLV_SIZE		32
@@ -378,30 +378,29 @@ struct snd_soc_tplg_dapm_widget {
 	 */
 } __attribute__((packed));
 
-struct snd_soc_tplg_pcm_cfg_caps {
-	struct snd_soc_tplg_stream_caps caps;
-	struct snd_soc_tplg_stream_config configs[SND_SOC_TPLG_STREAM_CONFIG_MAX];
-	__le32 num_configs;	/* number of configs */
-} __attribute__((packed));
 
 /*
- * Describes SW/FW specific features of PCM or DAI link.
+ * Describes SW/FW specific features of PCM (FE DAI & DAI link).
  *
- * File block representation for PCM/DAI-Link :-
+ * File block representation for PCM :-
  * +-----------------------------------+-----+
  * | struct snd_soc_tplg_hdr           |  1  |
  * +-----------------------------------+-----+
- * | struct snd_soc_tplg_dapm_pcm_dai  |  N  |
+ * | struct snd_soc_tplg_pcm           |  N  |
  * +-----------------------------------+-----+
  */
-struct snd_soc_tplg_pcm_dai {
+struct snd_soc_tplg_pcm {
 	__le32 size;		/* in bytes of this structure */
-	char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
-	__le32 id;			/* unique ID - used to match */
-	__le32 playback;		/* supports playback mode */
-	__le32 capture;			/* supports capture mode */
-	__le32 compress;		/* 1 = compressed; 0 = PCM */
-	struct snd_soc_tplg_pcm_cfg_caps capconf[2];	/* capabilities and configs */
+	char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
+	char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
+	__le32 pcm_id;		/* unique ID - used to match */
+	__le32 dai_id;		/* unique ID - used to match */
+	__le32 playback;	/* supports playback mode */
+	__le32 capture;		/* supports capture mode */
+	__le32 compress;	/* 1 = compressed; 0 = PCM */
+	struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */
+	__le32 num_streams;	/* number of streams */
+	struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */
 } __attribute__((packed));
 
 #endif
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 69d01cd..8d7ec80 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1558,7 +1558,7 @@ static int soc_tplg_pcm_dai_elems_load(struct soc_tplg *tplg,
 	pcm_dai = (struct snd_soc_tplg_pcm_dai *)tplg->pos;
 
 	if (soc_tplg_check_elem_count(tplg,
-		sizeof(struct snd_soc_tplg_pcm_dai), count,
+		sizeof(struct snd_soc_tplg_pcm), count,
 		hdr->payload_size, "PCM DAI")) {
 		dev_err(tplg->dev, "ASoC: invalid count %d for PCM DAI elems\n",
 			count);
@@ -1566,7 +1566,7 @@ static int soc_tplg_pcm_dai_elems_load(struct soc_tplg *tplg,
 	}
 
 	dev_dbg(tplg->dev, "ASoC: adding %d PCM DAIs\n", count);
-	tplg->pos += sizeof(struct snd_soc_tplg_pcm_dai) * count;
+	tplg->pos += sizeof(struct snd_soc_tplg_pcm) * count;
 
 	dobj = kzalloc(sizeof(struct snd_soc_dobj), GFP_KERNEL);
 	if (dobj == NULL)
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2015-10-02 17:13 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-30  9:02 [PATCH 0/8] ASoC: topology: ABI - Add support for PCM, BE & CC link mengdong.lin
2015-09-30  9:03 ` [PATCH 1/8] ASoC: topology: ABI - Add PCM Support and bump ABI version to 4 mengdong.lin
2015-10-02 17:13   ` Applied "ASoC: topology: ABI - Add PCM Support and bump ABI version to 4" to the asoc tree Mark Brown
2015-09-30  9:04 ` [PATCH 2/8] ASoC: topology: ABI - Remove unused struct snd_soc_tplg_stream_config mengdong.lin
2015-10-02 17:13   ` Applied "ASoC: topology: ABI - Remove unused struct snd_soc_tplg_stream_config" to the asoc tree Mark Brown
2015-09-30  9:05 ` [PATCH 3/8] ASoC: topology: ABI - Use __le32 instead of __u32 in snd_soc_tplg_dapm_widget mengdong.lin
2015-10-02 17:13   ` Applied "ASoC: topology: ABI - Use __le32 instead of __u32 in snd_soc_tplg_dapm_widget" to the asoc tree Mark Brown
2015-09-30  9:05 ` [PATCH 4/8] ASoC: topology: ABI - Add name element to snd_soc_tplg_stream mengdong.lin
2015-10-02 17:13   ` Applied "ASoC: topology: ABI - Add name element to snd_soc_tplg_stream" to the asoc tree Mark Brown
2015-09-30  9:05 ` [PATCH 5/8] ASoC: topology: ABI - Change stream formats to a bitwise flag mengdong.lin
2015-10-02 17:13   ` Applied "ASoC: topology: ABI - Change stream formats to a bitwise flag" to the asoc tree Mark Brown
2015-09-30  9:12 ` [PATCH 6/8] ASoC: topology: ABI - Add the type for BE DAI link mengdong.lin
2015-10-02 17:13   ` Applied "ASoC: topology: ABI - Add the type for BE DAI link" to the asoc tree Mark Brown
2015-09-30  9:13 ` [PATCH 7/8] ASoC: topology: ABI - Add configuration for BE & Codec-Codec DAI Links mengdong.lin
2015-10-02 17:13   ` Applied "ASoC: topology: ABI - Add configuration for BE & Codec-Codec DAI Links" to the asoc tree Mark Brown
2015-09-30  9:13 ` [PATCH 8/8] ASoC: topology: ABI - Remove tdm_slot & dai_fmt from snd_soc_tplg_stream mengdong.lin
2015-10-02 17:13   ` Applied "ASoC: topology: ABI - Remove tdm_slot & dai_fmt from snd_soc_tplg_stream" to the asoc tree Mark Brown
2015-09-30  9:23 ` [PATCH 0/8] ASoC: topology: ABI - Add support for PCM, BE & CC link Lin, Mengdong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.