All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] ASoC: topology: configure more on DAI & DAI links
@ 2016-04-19  5:12 mengdong.lin
  2016-04-19  5:12 ` [PATCH 1/4] ASoC: Export snd_soc_find_dai() mengdong.lin
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: mengdong.lin @ 2016-04-19  5:12 UTC (permalink / raw)
  To: alsa-devel, broonie
  Cc: Mengdong Lin, vinod.koul, hardik.t.shah, guneshwor.o.singh,
	liam.r.girdwood, rakesh.a.ughreja, mengdong.lin

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

There is no ABI change in this series.

Two patches are small changes in ASoC core, to allow topology to further
configure DAI and DAI links.

In the other two patches, topology will configure more on FE DAI links.

Guneshwor Singh (1):
  ASoC: topology: Set CPU DAI name and enable DPCM by default for FE
    link

Mengdong Lin (3):
  ASoC: Export snd_soc_find_dai()
  ASoC: Change DAI link's be_id to a generic id
  ASoC: topology: Set the link ID when creating a FE DAI link

 include/sound/soc.h                             |  5 ++++-
 include/uapi/sound/asoc.h                       |  2 +-
 sound/soc/intel/boards/broadwell.c              |  2 +-
 sound/soc/intel/boards/bytcr_rt5640.c           |  2 +-
 sound/soc/intel/boards/bytcr_rt5651.c           |  2 +-
 sound/soc/intel/boards/cht_bsw_max98090_ti.c    |  2 +-
 sound/soc/intel/boards/cht_bsw_rt5645.c         |  2 +-
 sound/soc/intel/boards/cht_bsw_rt5672.c         |  2 +-
 sound/soc/intel/boards/haswell.c                |  2 +-
 sound/soc/intel/boards/skl_nau88l25_max98357a.c | 12 ++++++------
 sound/soc/intel/boards/skl_nau88l25_ssm4567.c   | 12 ++++++------
 sound/soc/intel/boards/skl_rt286.c              | 10 +++++-----
 sound/soc/soc-core.c                            |  3 ++-
 sound/soc/soc-topology.c                        | 11 +++++++++++
 14 files changed, 42 insertions(+), 27 deletions(-)

-- 
2.5.0

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

* [PATCH 1/4] ASoC: Export snd_soc_find_dai()
  2016-04-19  5:12 [PATCH 0/4] ASoC: topology: configure more on DAI & DAI links mengdong.lin
@ 2016-04-19  5:12 ` mengdong.lin
  2016-04-20 16:12   ` Mark Brown
  2016-04-20 16:19   ` Applied "ASoC: Export snd_soc_find_dai()" to the asoc tree Mark Brown
  2016-04-19  5:12 ` [PATCH 2/4] ASoC: Change DAI link's be_id to a generic id mengdong.lin
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 11+ messages in thread
From: mengdong.lin @ 2016-04-19  5:12 UTC (permalink / raw)
  To: alsa-devel, broonie
  Cc: Mengdong Lin, vinod.koul, hardik.t.shah, guneshwor.o.singh,
	liam.r.girdwood, rakesh.a.ughreja, mengdong.lin

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

This API can be used by topology to find an existing BE dai by name
and further configure it.

Topology will also check DAI ID to avoid wrong match.

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

diff --git a/include/sound/soc.h b/include/sound/soc.h
index 02b4a21..7687e2d 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1683,6 +1683,9 @@ void snd_soc_remove_dai_link(struct snd_soc_card *card,
 int snd_soc_register_dai(struct snd_soc_component *component,
 	struct snd_soc_dai_driver *dai_drv);
 
+struct snd_soc_dai *snd_soc_find_dai(
+	const struct snd_soc_dai_link_component *dlc);
+
 #include <sound/soc-dai.h>
 
 #ifdef CONFIG_DEBUG_FS
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index d2e62b15..07663de 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -930,7 +930,7 @@ static struct snd_soc_component *soc_find_component(
 	return NULL;
 }
 
-static struct snd_soc_dai *snd_soc_find_dai(
+struct snd_soc_dai *snd_soc_find_dai(
 	const struct snd_soc_dai_link_component *dlc)
 {
 	struct snd_soc_component *component;
@@ -959,6 +959,7 @@ static struct snd_soc_dai *snd_soc_find_dai(
 
 	return NULL;
 }
+EXPORT_SYMBOL_GPL(snd_soc_find_dai);
 
 static bool soc_is_dai_link_bound(struct snd_soc_card *card,
 		struct snd_soc_dai_link *dai_link)
-- 
2.5.0

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

* [PATCH 2/4] ASoC: Change DAI link's be_id to a generic id
  2016-04-19  5:12 [PATCH 0/4] ASoC: topology: configure more on DAI & DAI links mengdong.lin
  2016-04-19  5:12 ` [PATCH 1/4] ASoC: Export snd_soc_find_dai() mengdong.lin
@ 2016-04-19  5:12 ` mengdong.lin
  2016-04-20 16:19   ` Applied "ASoC: Change DAI link's be_id to a generic id" to the asoc tree Mark Brown
  2016-04-19  5:12 ` [PATCH 3/4] ASoC: topology: Set the link ID when creating a FE DAI link mengdong.lin
  2016-04-19  5:12 ` [PATCH 4/4] ASoC: topology: Set CPU DAI name and enable DPCM by default for FE link mengdong.lin
  3 siblings, 1 reply; 11+ messages in thread
From: mengdong.lin @ 2016-04-19  5:12 UTC (permalink / raw)
  To: alsa-devel, broonie
  Cc: Mengdong Lin, vinod.koul, hardik.t.shah, guneshwor.o.singh,
	liam.r.girdwood, rakesh.a.ughreja, mengdong.lin

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

The generic ID can be used by topology:
- Toplogy can create FE links and set their ID, machine drivers will
  be notified and check this ID for machine-specific init.
- Toplogy can use the ID to find existing BE & CC links and further
  configure them.

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

diff --git a/include/sound/soc.h b/include/sound/soc.h
index 7687e2d..fd7b58a 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1002,7 +1002,7 @@ struct snd_soc_dai_link {
 	 */
 	const char *platform_name;
 	struct device_node *platform_of_node;
-	int be_id;	/* optional ID for machine driver BE identification */
+	int id;	/* optional ID for machine driver link identification */
 
 	const struct snd_soc_pcm_stream *params;
 	unsigned int num_params;
diff --git a/sound/soc/intel/boards/broadwell.c b/sound/soc/intel/boards/broadwell.c
index 3f8a1e1..7486a00 100644
--- a/sound/soc/intel/boards/broadwell.c
+++ b/sound/soc/intel/boards/broadwell.c
@@ -201,7 +201,7 @@ static struct snd_soc_dai_link broadwell_rt286_dais[] = {
 	{
 		/* SSP0 - Codec */
 		.name = "Codec",
-		.be_id = 0,
+		.id = 0,
 		.cpu_dai_name = "snd-soc-dummy-dai",
 		.platform_name = "snd-soc-dummy",
 		.no_pcm = 1,
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index 032a2e7..88efb62 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -304,7 +304,7 @@ static struct snd_soc_dai_link byt_rt5640_dais[] = {
 		/* back ends */
 	{
 		.name = "SSP2-Codec",
-		.be_id = 1,
+		.id = 1,
 		.cpu_dai_name = "ssp2-port",
 		.platform_name = "sst-mfld-platform",
 		.no_pcm = 1,
diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 1c95ccc..35f591e 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -267,7 +267,7 @@ static struct snd_soc_dai_link byt_rt5651_dais[] = {
 	/* back ends */
 	{
 		.name = "SSP2-Codec",
-		.be_id = 1,
+		.id = 1,
 		.cpu_dai_name = "ssp2-port",
 		.platform_name = "sst-mfld-platform",
 		.no_pcm = 1,
diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
index e609f08..6260df6 100644
--- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c
+++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
@@ -255,7 +255,7 @@ static struct snd_soc_dai_link cht_dailink[] = {
 	/* back ends */
 	{
 		.name = "SSP2-Codec",
-		.be_id = 1,
+		.id = 1,
 		.cpu_dai_name = "ssp2-port",
 		.platform_name = "sst-mfld-platform",
 		.no_pcm = 1,
diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c
index 2a6f808..0618a7f 100644
--- a/sound/soc/intel/boards/cht_bsw_rt5645.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5645.c
@@ -295,7 +295,7 @@ static struct snd_soc_dai_link cht_dailink[] = {
 	/* back ends */
 	{
 		.name = "SSP2-Codec",
-		.be_id = 1,
+		.id = 1,
 		.cpu_dai_name = "ssp2-port",
 		.platform_name = "sst-mfld-platform",
 		.no_pcm = 1,
diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/intel/boards/cht_bsw_rt5672.c
index 2e5347f..df9d254 100644
--- a/sound/soc/intel/boards/cht_bsw_rt5672.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5672.c
@@ -273,7 +273,7 @@ static struct snd_soc_dai_link cht_dailink[] = {
 	{
 		/* SSP2 - Codec */
 		.name = "SSP2-Codec",
-		.be_id = 1,
+		.id = 1,
 		.cpu_dai_name = "ssp2-port",
 		.platform_name = "sst-mfld-platform",
 		.no_pcm = 1,
diff --git a/sound/soc/intel/boards/haswell.c b/sound/soc/intel/boards/haswell.c
index 2255857..863f1d5 100644
--- a/sound/soc/intel/boards/haswell.c
+++ b/sound/soc/intel/boards/haswell.c
@@ -156,7 +156,7 @@ static struct snd_soc_dai_link haswell_rt5640_dais[] = {
 	{
 		/* SSP0 - Codec */
 		.name = "Codec",
-		.be_id = 0,
+		.id = 0,
 		.cpu_dai_name = "snd-soc-dummy-dai",
 		.platform_name = "snd-soc-dummy",
 		.no_pcm = 1,
diff --git a/sound/soc/intel/boards/skl_nau88l25_max98357a.c b/sound/soc/intel/boards/skl_nau88l25_max98357a.c
index 72176b7..9cc9240 100644
--- a/sound/soc/intel/boards/skl_nau88l25_max98357a.c
+++ b/sound/soc/intel/boards/skl_nau88l25_max98357a.c
@@ -456,7 +456,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	{
 		/* SSP0 - Codec */
 		.name = "SSP0-Codec",
-		.be_id = 0,
+		.id = 0,
 		.cpu_dai_name = "SSP0 Pin",
 		.platform_name = "0000:00:1f.3",
 		.no_pcm = 1,
@@ -472,7 +472,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	{
 		/* SSP1 - Codec */
 		.name = "SSP1-Codec",
-		.be_id = 1,
+		.id = 1,
 		.cpu_dai_name = "SSP1 Pin",
 		.platform_name = "0000:00:1f.3",
 		.no_pcm = 1,
@@ -489,7 +489,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	},
 	{
 		.name = "dmic01",
-		.be_id = 2,
+		.id = 2,
 		.cpu_dai_name = "DMIC01 Pin",
 		.codec_name = "dmic-codec",
 		.codec_dai_name = "dmic-hifi",
@@ -501,7 +501,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	},
 	{
 		.name = "iDisp1",
-		.be_id = 3,
+		.id = 3,
 		.cpu_dai_name = "iDisp1 Pin",
 		.codec_name = "ehdaudio0D2",
 		.codec_dai_name = "intel-hdmi-hifi1",
@@ -512,7 +512,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	},
 	{
 		.name = "iDisp2",
-		.be_id = 4,
+		.id = 4,
 		.cpu_dai_name = "iDisp2 Pin",
 		.codec_name = "ehdaudio0D2",
 		.codec_dai_name = "intel-hdmi-hifi2",
@@ -523,7 +523,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	},
 	{
 		.name = "iDisp3",
-		.be_id = 5,
+		.id = 5,
 		.cpu_dai_name = "iDisp3 Pin",
 		.codec_name = "ehdaudio0D2",
 		.codec_dai_name = "intel-hdmi-hifi3",
diff --git a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
index 5f1ca99..53380b2 100644
--- a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
+++ b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
@@ -505,7 +505,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	{
 		/* SSP0 - Codec */
 		.name = "SSP0-Codec",
-		.be_id = 0,
+		.id = 0,
 		.cpu_dai_name = "SSP0 Pin",
 		.platform_name = "0000:00:1f.3",
 		.no_pcm = 1,
@@ -523,7 +523,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	{
 		/* SSP1 - Codec */
 		.name = "SSP1-Codec",
-		.be_id = 1,
+		.id = 1,
 		.cpu_dai_name = "SSP1 Pin",
 		.platform_name = "0000:00:1f.3",
 		.no_pcm = 1,
@@ -540,7 +540,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	},
 	{
 		.name = "dmic01",
-		.be_id = 2,
+		.id = 2,
 		.cpu_dai_name = "DMIC01 Pin",
 		.codec_name = "dmic-codec",
 		.codec_dai_name = "dmic-hifi",
@@ -552,7 +552,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	},
 	{
 		.name = "iDisp1",
-		.be_id = 3,
+		.id = 3,
 		.cpu_dai_name = "iDisp1 Pin",
 		.codec_name = "ehdaudio0D2",
 		.codec_dai_name = "intel-hdmi-hifi1",
@@ -563,7 +563,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	},
 	{
 		.name = "iDisp2",
-		.be_id = 4,
+		.id = 4,
 		.cpu_dai_name = "iDisp2 Pin",
 		.codec_name = "ehdaudio0D2",
 		.codec_dai_name = "intel-hdmi-hifi2",
@@ -574,7 +574,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	},
 	{
 		.name = "iDisp3",
-		.be_id = 5,
+		.id = 5,
 		.cpu_dai_name = "iDisp3 Pin",
 		.codec_name = "ehdaudio0D2",
 		.codec_dai_name = "intel-hdmi-hifi3",
diff --git a/sound/soc/intel/boards/skl_rt286.c b/sound/soc/intel/boards/skl_rt286.c
index 2016397..9e39fc1 100644
--- a/sound/soc/intel/boards/skl_rt286.c
+++ b/sound/soc/intel/boards/skl_rt286.c
@@ -375,7 +375,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = {
 	{
 		/* SSP0 - Codec */
 		.name = "SSP0-Codec",
-		.be_id = 0,
+		.id = 0,
 		.cpu_dai_name = "SSP0 Pin",
 		.platform_name = "0000:00:1f.3",
 		.no_pcm = 1,
@@ -393,7 +393,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = {
 	},
 	{
 		.name = "dmic01",
-		.be_id = 1,
+		.id = 1,
 		.cpu_dai_name = "DMIC01 Pin",
 		.codec_name = "dmic-codec",
 		.codec_dai_name = "dmic-hifi",
@@ -405,7 +405,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = {
 	},
 	{
 		.name = "iDisp1",
-		.be_id = 2,
+		.id = 2,
 		.cpu_dai_name = "iDisp1 Pin",
 		.codec_name = "ehdaudio0D2",
 		.codec_dai_name = "intel-hdmi-hifi1",
@@ -416,7 +416,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = {
 	},
 	{
 		.name = "iDisp2",
-		.be_id = 3,
+		.id = 3,
 		.cpu_dai_name = "iDisp2 Pin",
 		.codec_name = "ehdaudio0D2",
 		.codec_dai_name = "intel-hdmi-hifi2",
@@ -427,7 +427,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = {
 	},
 	{
 		.name = "iDisp3",
-		.be_id = 4,
+		.id = 4,
 		.cpu_dai_name = "iDisp3 Pin",
 		.codec_name = "ehdaudio0D2",
 		.codec_dai_name = "intel-hdmi-hifi3",
-- 
2.5.0

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

* [PATCH 3/4] ASoC: topology: Set the link ID when creating a FE DAI link
  2016-04-19  5:12 [PATCH 0/4] ASoC: topology: configure more on DAI & DAI links mengdong.lin
  2016-04-19  5:12 ` [PATCH 1/4] ASoC: Export snd_soc_find_dai() mengdong.lin
  2016-04-19  5:12 ` [PATCH 2/4] ASoC: Change DAI link's be_id to a generic id mengdong.lin
@ 2016-04-19  5:12 ` mengdong.lin
  2016-04-20 16:19   ` Applied "ASoC: topology: Set the link ID when creating a FE DAI link" to the asoc tree Mark Brown
  2016-04-19  5:12 ` [PATCH 4/4] ASoC: topology: Set CPU DAI name and enable DPCM by default for FE link mengdong.lin
  3 siblings, 1 reply; 11+ messages in thread
From: mengdong.lin @ 2016-04-19  5:12 UTC (permalink / raw)
  To: alsa-devel, broonie
  Cc: Mengdong Lin, vinod.koul, hardik.t.shah, guneshwor.o.singh,
	liam.r.girdwood, rakesh.a.ughreja, mengdong.lin

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

Topology will set the link's generic id when creating a FE link.
Device drivers can check the id for link specific initialization.

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

diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index e8def0b..fcdf5d7 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -480,7 +480,7 @@ struct snd_soc_tplg_pcm {
 	__le32 size;		/* in bytes of this structure */
 	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 pcm_id;		/* unique ID - used to match with DAI link */
 	__le32 dai_id;		/* unique ID - used to match */
 	__le32 playback;	/* supports playback mode */
 	__le32 capture;		/* supports capture mode */
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 1cf94d7..bdbfcef 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1598,6 +1598,7 @@ static int soc_tplg_link_create(struct soc_tplg *tplg,
 
 	link->name = pcm->pcm_name;
 	link->stream_name = pcm->pcm_name;
+	link->id = pcm->pcm_id;
 
 	/* pass control to component driver for optional further init */
 	ret = soc_tplg_dai_link_load(tplg, link);
-- 
2.5.0

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

* [PATCH 4/4] ASoC: topology: Set CPU DAI name and enable DPCM by default for FE link
  2016-04-19  5:12 [PATCH 0/4] ASoC: topology: configure more on DAI & DAI links mengdong.lin
                   ` (2 preceding siblings ...)
  2016-04-19  5:12 ` [PATCH 3/4] ASoC: topology: Set the link ID when creating a FE DAI link mengdong.lin
@ 2016-04-19  5:12 ` mengdong.lin
  2016-04-20 16:21   ` Applied "ASoC: topology: Set CPU DAI name and enable DPCM by default for FE link" to the asoc tree Mark Brown
  3 siblings, 1 reply; 11+ messages in thread
From: mengdong.lin @ 2016-04-19  5:12 UTC (permalink / raw)
  To: alsa-devel, broonie
  Cc: Mengdong Lin, vinod.koul, hardik.t.shah, guneshwor.o.singh,
	liam.r.girdwood, rakesh.a.ughreja, mengdong.lin

From: Guneshwor Singh <guneshwor.o.singh@intel.com>

When creating a FE link, the cpu_dai_name will come from topology and
dpcm will be enabled by default.

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

diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index bdbfcef..ca5f828 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1586,6 +1586,7 @@ static int soc_tplg_dai_create(struct soc_tplg *tplg,
 	return snd_soc_register_dai(tplg->comp, dai_drv);
 }
 
+/* create the FE DAI link */
 static int soc_tplg_link_create(struct soc_tplg *tplg,
 	struct snd_soc_tplg_pcm *pcm)
 {
@@ -1600,6 +1601,15 @@ static int soc_tplg_link_create(struct soc_tplg *tplg,
 	link->stream_name = pcm->pcm_name;
 	link->id = pcm->pcm_id;
 
+	link->cpu_dai_name = pcm->dai_name;
+	link->codec_name = "snd-soc-dummy";
+	link->codec_dai_name = "snd-soc-dummy-dai";
+
+	/* enable DPCM */
+	link->dynamic = 1;
+	link->dpcm_playback = pcm->playback;
+	link->dpcm_capture = pcm->capture;
+
 	/* pass control to component driver for optional further init */
 	ret = soc_tplg_dai_link_load(tplg, link);
 	if (ret < 0) {
-- 
2.5.0

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

* Re: [PATCH 1/4] ASoC: Export snd_soc_find_dai()
  2016-04-19  5:12 ` [PATCH 1/4] ASoC: Export snd_soc_find_dai() mengdong.lin
@ 2016-04-20 16:12   ` Mark Brown
  2016-04-21  6:55     ` Mengdong Lin
  2016-04-20 16:19   ` Applied "ASoC: Export snd_soc_find_dai()" to the asoc tree Mark Brown
  1 sibling, 1 reply; 11+ messages in thread
From: Mark Brown @ 2016-04-20 16:12 UTC (permalink / raw)
  To: mengdong.lin
  Cc: alsa-devel, vinod.koul, hardik.t.shah, guneshwor.o.singh,
	liam.r.girdwood, rakesh.a.ughreja, mengdong.lin


[-- Attachment #1.1: Type: text/plain, Size: 503 bytes --]

On Tue, Apr 19, 2016 at 01:12:25PM +0800, mengdong.lin@linux.intel.com wrote:

>  }
>  
> -static struct snd_soc_dai *snd_soc_find_dai(
> +struct snd_soc_dai *snd_soc_find_dai(
>  	const struct snd_soc_dai_link_component *dlc)
>  {
>  	struct snd_soc_component *component;
> @@ -959,6 +959,7 @@ static struct snd_soc_dai *snd_soc_find_dai(
>  
>  	return NULL;
>  }
> +EXPORT_SYMBOL_GPL(snd_soc_find_dai);

Can you please add a kerneldoc comment as well since this is getting
exported?

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Applied "ASoC: Export snd_soc_find_dai()" to the asoc tree
  2016-04-19  5:12 ` [PATCH 1/4] ASoC: Export snd_soc_find_dai() mengdong.lin
  2016-04-20 16:12   ` Mark Brown
@ 2016-04-20 16:19   ` Mark Brown
  1 sibling, 0 replies; 11+ messages in thread
From: Mark Brown @ 2016-04-20 16:19 UTC (permalink / raw)
  To: Mengdong Lin
  Cc: alsa-devel, vinod.koul, hardik.t.shah, guneshwor.o.singh,
	liam.r.girdwood, broonie, rakesh.a.ughreja, mengdong.lin

The patch

   ASoC: Export snd_soc_find_dai()

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 305e9020f09d28560373c0112682e6fd11e909f6 Mon Sep 17 00:00:00 2001
From: Mengdong Lin <mengdong.lin@linux.intel.com>
Date: Tue, 19 Apr 2016 13:12:25 +0800
Subject: [PATCH] ASoC: Export snd_soc_find_dai()

This API can be used by topology to find an existing BE dai by name
and further configure it.

Topology will also check DAI ID to avoid wrong match.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/sound/soc.h  | 3 +++
 sound/soc/soc-core.c | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index 02b4a215fd75..7687e2d4b0e4 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1683,6 +1683,9 @@ void snd_soc_remove_dai_link(struct snd_soc_card *card,
 int snd_soc_register_dai(struct snd_soc_component *component,
 	struct snd_soc_dai_driver *dai_drv);
 
+struct snd_soc_dai *snd_soc_find_dai(
+	const struct snd_soc_dai_link_component *dlc);
+
 #include <sound/soc-dai.h>
 
 #ifdef CONFIG_DEBUG_FS
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index d2e62b159610..07663def2db6 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -930,7 +930,7 @@ static struct snd_soc_component *soc_find_component(
 	return NULL;
 }
 
-static struct snd_soc_dai *snd_soc_find_dai(
+struct snd_soc_dai *snd_soc_find_dai(
 	const struct snd_soc_dai_link_component *dlc)
 {
 	struct snd_soc_component *component;
@@ -959,6 +959,7 @@ static struct snd_soc_dai *snd_soc_find_dai(
 
 	return NULL;
 }
+EXPORT_SYMBOL_GPL(snd_soc_find_dai);
 
 static bool soc_is_dai_link_bound(struct snd_soc_card *card,
 		struct snd_soc_dai_link *dai_link)
-- 
2.8.0.rc3

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

* Applied "ASoC: topology: Set the link ID when creating a FE DAI link" to the asoc tree
  2016-04-19  5:12 ` [PATCH 3/4] ASoC: topology: Set the link ID when creating a FE DAI link mengdong.lin
@ 2016-04-20 16:19   ` Mark Brown
  0 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2016-04-20 16:19 UTC (permalink / raw)
  To: Mengdong Lin
  Cc: alsa-devel, vinod.koul, hardik.t.shah, guneshwor.o.singh,
	liam.r.girdwood, broonie, rakesh.a.ughreja, mengdong.lin

The patch

   ASoC: topology: Set the link ID when creating a FE 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 b84fff5afb16627a8973256992f3951ac3e90d84 Mon Sep 17 00:00:00 2001
From: Mengdong Lin <mengdong.lin@linux.intel.com>
Date: Tue, 19 Apr 2016 13:12:43 +0800
Subject: [PATCH] ASoC: topology: Set the link ID when creating a FE DAI link

Topology will set the link's generic id when creating a FE link.
Device drivers can check the id for link specific initialization.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/uapi/sound/asoc.h | 2 +-
 sound/soc/soc-topology.c  | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index db86b447b515..e4701a3c6331 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -423,7 +423,7 @@ struct snd_soc_tplg_pcm {
 	__le32 size;		/* in bytes of this structure */
 	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 pcm_id;		/* unique ID - used to match with DAI link */
 	__le32 dai_id;		/* unique ID - used to match */
 	__le32 playback;	/* supports playback mode */
 	__le32 capture;		/* supports capture mode */
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 1cf94d7fb9f4..bdbfcef4c319 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1598,6 +1598,7 @@ static int soc_tplg_link_create(struct soc_tplg *tplg,
 
 	link->name = pcm->pcm_name;
 	link->stream_name = pcm->pcm_name;
+	link->id = pcm->pcm_id;
 
 	/* pass control to component driver for optional further init */
 	ret = soc_tplg_dai_link_load(tplg, link);
-- 
2.8.0.rc3

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

* Applied "ASoC: Change DAI link's be_id to a generic id" to the asoc tree
  2016-04-19  5:12 ` [PATCH 2/4] ASoC: Change DAI link's be_id to a generic id mengdong.lin
@ 2016-04-20 16:19   ` Mark Brown
  0 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2016-04-20 16:19 UTC (permalink / raw)
  To: Mengdong Lin
  Cc: alsa-devel, vinod.koul, hardik.t.shah, guneshwor.o.singh,
	liam.r.girdwood, broonie, rakesh.a.ughreja, mengdong.lin

The patch

   ASoC: Change DAI link's be_id to a generic id

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 2f0ad49104cbb19db24442af736614659363d2ab Mon Sep 17 00:00:00 2001
From: Mengdong Lin <mengdong.lin@linux.intel.com>
Date: Tue, 19 Apr 2016 13:12:35 +0800
Subject: [PATCH] ASoC: Change DAI link's be_id to a generic id

The generic ID can be used by topology:
- Toplogy can create FE links and set their ID, machine drivers will
  be notified and check this ID for machine-specific init.
- Toplogy can use the ID to find existing BE & CC links and further
  configure them.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/sound/soc.h                             |  2 +-
 sound/soc/intel/boards/broadwell.c              |  2 +-
 sound/soc/intel/boards/bytcr_rt5640.c           |  2 +-
 sound/soc/intel/boards/bytcr_rt5651.c           |  2 +-
 sound/soc/intel/boards/cht_bsw_max98090_ti.c    |  2 +-
 sound/soc/intel/boards/cht_bsw_rt5645.c         |  2 +-
 sound/soc/intel/boards/cht_bsw_rt5672.c         |  2 +-
 sound/soc/intel/boards/haswell.c                |  2 +-
 sound/soc/intel/boards/skl_nau88l25_max98357a.c | 12 ++++++------
 sound/soc/intel/boards/skl_nau88l25_ssm4567.c   | 12 ++++++------
 sound/soc/intel/boards/skl_rt286.c              | 10 +++++-----
 11 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index 02b4a215fd75..ef25e86d51ee 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1002,7 +1002,7 @@ struct snd_soc_dai_link {
 	 */
 	const char *platform_name;
 	struct device_node *platform_of_node;
-	int be_id;	/* optional ID for machine driver BE identification */
+	int id;	/* optional ID for machine driver link identification */
 
 	const struct snd_soc_pcm_stream *params;
 	unsigned int num_params;
diff --git a/sound/soc/intel/boards/broadwell.c b/sound/soc/intel/boards/broadwell.c
index 3f8a1e10bed0..7486a0022fde 100644
--- a/sound/soc/intel/boards/broadwell.c
+++ b/sound/soc/intel/boards/broadwell.c
@@ -201,7 +201,7 @@ static struct snd_soc_dai_link broadwell_rt286_dais[] = {
 	{
 		/* SSP0 - Codec */
 		.name = "Codec",
-		.be_id = 0,
+		.id = 0,
 		.cpu_dai_name = "snd-soc-dummy-dai",
 		.platform_name = "snd-soc-dummy",
 		.no_pcm = 1,
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index 032a2e753f0b..88efb62439ba 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -304,7 +304,7 @@ static struct snd_soc_dai_link byt_rt5640_dais[] = {
 		/* back ends */
 	{
 		.name = "SSP2-Codec",
-		.be_id = 1,
+		.id = 1,
 		.cpu_dai_name = "ssp2-port",
 		.platform_name = "sst-mfld-platform",
 		.no_pcm = 1,
diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 1c95ccc886c4..35f591eab3c9 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -267,7 +267,7 @@ static struct snd_soc_dai_link byt_rt5651_dais[] = {
 	/* back ends */
 	{
 		.name = "SSP2-Codec",
-		.be_id = 1,
+		.id = 1,
 		.cpu_dai_name = "ssp2-port",
 		.platform_name = "sst-mfld-platform",
 		.no_pcm = 1,
diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
index e609f089593a..6260df6bd49c 100644
--- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c
+++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
@@ -255,7 +255,7 @@ static struct snd_soc_dai_link cht_dailink[] = {
 	/* back ends */
 	{
 		.name = "SSP2-Codec",
-		.be_id = 1,
+		.id = 1,
 		.cpu_dai_name = "ssp2-port",
 		.platform_name = "sst-mfld-platform",
 		.no_pcm = 1,
diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c
index 2a6f80843bc9..0618a7f1025b 100644
--- a/sound/soc/intel/boards/cht_bsw_rt5645.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5645.c
@@ -295,7 +295,7 @@ static struct snd_soc_dai_link cht_dailink[] = {
 	/* back ends */
 	{
 		.name = "SSP2-Codec",
-		.be_id = 1,
+		.id = 1,
 		.cpu_dai_name = "ssp2-port",
 		.platform_name = "sst-mfld-platform",
 		.no_pcm = 1,
diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/intel/boards/cht_bsw_rt5672.c
index 2e5347f8f96c..df9d254baa18 100644
--- a/sound/soc/intel/boards/cht_bsw_rt5672.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5672.c
@@ -273,7 +273,7 @@ static struct snd_soc_dai_link cht_dailink[] = {
 	{
 		/* SSP2 - Codec */
 		.name = "SSP2-Codec",
-		.be_id = 1,
+		.id = 1,
 		.cpu_dai_name = "ssp2-port",
 		.platform_name = "sst-mfld-platform",
 		.no_pcm = 1,
diff --git a/sound/soc/intel/boards/haswell.c b/sound/soc/intel/boards/haswell.c
index 22558572cb9c..863f1d5e2a2c 100644
--- a/sound/soc/intel/boards/haswell.c
+++ b/sound/soc/intel/boards/haswell.c
@@ -156,7 +156,7 @@ static struct snd_soc_dai_link haswell_rt5640_dais[] = {
 	{
 		/* SSP0 - Codec */
 		.name = "Codec",
-		.be_id = 0,
+		.id = 0,
 		.cpu_dai_name = "snd-soc-dummy-dai",
 		.platform_name = "snd-soc-dummy",
 		.no_pcm = 1,
diff --git a/sound/soc/intel/boards/skl_nau88l25_max98357a.c b/sound/soc/intel/boards/skl_nau88l25_max98357a.c
index 72176b79a18d..9cc9240ed717 100644
--- a/sound/soc/intel/boards/skl_nau88l25_max98357a.c
+++ b/sound/soc/intel/boards/skl_nau88l25_max98357a.c
@@ -456,7 +456,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	{
 		/* SSP0 - Codec */
 		.name = "SSP0-Codec",
-		.be_id = 0,
+		.id = 0,
 		.cpu_dai_name = "SSP0 Pin",
 		.platform_name = "0000:00:1f.3",
 		.no_pcm = 1,
@@ -472,7 +472,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	{
 		/* SSP1 - Codec */
 		.name = "SSP1-Codec",
-		.be_id = 1,
+		.id = 1,
 		.cpu_dai_name = "SSP1 Pin",
 		.platform_name = "0000:00:1f.3",
 		.no_pcm = 1,
@@ -489,7 +489,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	},
 	{
 		.name = "dmic01",
-		.be_id = 2,
+		.id = 2,
 		.cpu_dai_name = "DMIC01 Pin",
 		.codec_name = "dmic-codec",
 		.codec_dai_name = "dmic-hifi",
@@ -501,7 +501,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	},
 	{
 		.name = "iDisp1",
-		.be_id = 3,
+		.id = 3,
 		.cpu_dai_name = "iDisp1 Pin",
 		.codec_name = "ehdaudio0D2",
 		.codec_dai_name = "intel-hdmi-hifi1",
@@ -512,7 +512,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	},
 	{
 		.name = "iDisp2",
-		.be_id = 4,
+		.id = 4,
 		.cpu_dai_name = "iDisp2 Pin",
 		.codec_name = "ehdaudio0D2",
 		.codec_dai_name = "intel-hdmi-hifi2",
@@ -523,7 +523,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	},
 	{
 		.name = "iDisp3",
-		.be_id = 5,
+		.id = 5,
 		.cpu_dai_name = "iDisp3 Pin",
 		.codec_name = "ehdaudio0D2",
 		.codec_dai_name = "intel-hdmi-hifi3",
diff --git a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
index 5f1ca99ae9b0..53380b2cb1a8 100644
--- a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
+++ b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
@@ -505,7 +505,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	{
 		/* SSP0 - Codec */
 		.name = "SSP0-Codec",
-		.be_id = 0,
+		.id = 0,
 		.cpu_dai_name = "SSP0 Pin",
 		.platform_name = "0000:00:1f.3",
 		.no_pcm = 1,
@@ -523,7 +523,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	{
 		/* SSP1 - Codec */
 		.name = "SSP1-Codec",
-		.be_id = 1,
+		.id = 1,
 		.cpu_dai_name = "SSP1 Pin",
 		.platform_name = "0000:00:1f.3",
 		.no_pcm = 1,
@@ -540,7 +540,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	},
 	{
 		.name = "dmic01",
-		.be_id = 2,
+		.id = 2,
 		.cpu_dai_name = "DMIC01 Pin",
 		.codec_name = "dmic-codec",
 		.codec_dai_name = "dmic-hifi",
@@ -552,7 +552,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	},
 	{
 		.name = "iDisp1",
-		.be_id = 3,
+		.id = 3,
 		.cpu_dai_name = "iDisp1 Pin",
 		.codec_name = "ehdaudio0D2",
 		.codec_dai_name = "intel-hdmi-hifi1",
@@ -563,7 +563,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	},
 	{
 		.name = "iDisp2",
-		.be_id = 4,
+		.id = 4,
 		.cpu_dai_name = "iDisp2 Pin",
 		.codec_name = "ehdaudio0D2",
 		.codec_dai_name = "intel-hdmi-hifi2",
@@ -574,7 +574,7 @@ static struct snd_soc_dai_link skylake_dais[] = {
 	},
 	{
 		.name = "iDisp3",
-		.be_id = 5,
+		.id = 5,
 		.cpu_dai_name = "iDisp3 Pin",
 		.codec_name = "ehdaudio0D2",
 		.codec_dai_name = "intel-hdmi-hifi3",
diff --git a/sound/soc/intel/boards/skl_rt286.c b/sound/soc/intel/boards/skl_rt286.c
index 2016397a8e75..9e39fc1b89d3 100644
--- a/sound/soc/intel/boards/skl_rt286.c
+++ b/sound/soc/intel/boards/skl_rt286.c
@@ -375,7 +375,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = {
 	{
 		/* SSP0 - Codec */
 		.name = "SSP0-Codec",
-		.be_id = 0,
+		.id = 0,
 		.cpu_dai_name = "SSP0 Pin",
 		.platform_name = "0000:00:1f.3",
 		.no_pcm = 1,
@@ -393,7 +393,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = {
 	},
 	{
 		.name = "dmic01",
-		.be_id = 1,
+		.id = 1,
 		.cpu_dai_name = "DMIC01 Pin",
 		.codec_name = "dmic-codec",
 		.codec_dai_name = "dmic-hifi",
@@ -405,7 +405,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = {
 	},
 	{
 		.name = "iDisp1",
-		.be_id = 2,
+		.id = 2,
 		.cpu_dai_name = "iDisp1 Pin",
 		.codec_name = "ehdaudio0D2",
 		.codec_dai_name = "intel-hdmi-hifi1",
@@ -416,7 +416,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = {
 	},
 	{
 		.name = "iDisp2",
-		.be_id = 3,
+		.id = 3,
 		.cpu_dai_name = "iDisp2 Pin",
 		.codec_name = "ehdaudio0D2",
 		.codec_dai_name = "intel-hdmi-hifi2",
@@ -427,7 +427,7 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = {
 	},
 	{
 		.name = "iDisp3",
-		.be_id = 4,
+		.id = 4,
 		.cpu_dai_name = "iDisp3 Pin",
 		.codec_name = "ehdaudio0D2",
 		.codec_dai_name = "intel-hdmi-hifi3",
-- 
2.8.0.rc3

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

* Applied "ASoC: topology: Set CPU DAI name and enable DPCM by default for FE link" to the asoc tree
  2016-04-19  5:12 ` [PATCH 4/4] ASoC: topology: Set CPU DAI name and enable DPCM by default for FE link mengdong.lin
@ 2016-04-20 16:21   ` Mark Brown
  0 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2016-04-20 16:21 UTC (permalink / raw)
  Cc: alsa-devel, Mengdong Lin, vinod.koul, hardik.t.shah,
	guneshwor.o.singh, liam.r.girdwood, broonie, rakesh.a.ughreja,
	mengdong.lin

The patch

   ASoC: topology: Set CPU DAI name and enable DPCM by default for FE 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 67d1c21e37301ca3cea3705951950ce21f2723e1 Mon Sep 17 00:00:00 2001
From: Guneshwor Singh <guneshwor.o.singh@intel.com>
Date: Tue, 19 Apr 2016 13:12:50 +0800
Subject: [PATCH] ASoC: topology: Set CPU DAI name and enable DPCM by default
 for FE link

When creating a FE link, the cpu_dai_name will come from topology and
dpcm will be enabled by default.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/soc-topology.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index bdbfcef4c319..ca5f82885031 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1586,6 +1586,7 @@ static int soc_tplg_dai_create(struct soc_tplg *tplg,
 	return snd_soc_register_dai(tplg->comp, dai_drv);
 }
 
+/* create the FE DAI link */
 static int soc_tplg_link_create(struct soc_tplg *tplg,
 	struct snd_soc_tplg_pcm *pcm)
 {
@@ -1600,6 +1601,15 @@ static int soc_tplg_link_create(struct soc_tplg *tplg,
 	link->stream_name = pcm->pcm_name;
 	link->id = pcm->pcm_id;
 
+	link->cpu_dai_name = pcm->dai_name;
+	link->codec_name = "snd-soc-dummy";
+	link->codec_dai_name = "snd-soc-dummy-dai";
+
+	/* enable DPCM */
+	link->dynamic = 1;
+	link->dpcm_playback = pcm->playback;
+	link->dpcm_capture = pcm->capture;
+
 	/* pass control to component driver for optional further init */
 	ret = soc_tplg_dai_link_load(tplg, link);
 	if (ret < 0) {
-- 
2.8.0.rc3

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

* Re: [PATCH 1/4] ASoC: Export snd_soc_find_dai()
  2016-04-20 16:12   ` Mark Brown
@ 2016-04-21  6:55     ` Mengdong Lin
  0 siblings, 0 replies; 11+ messages in thread
From: Mengdong Lin @ 2016-04-21  6:55 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, vinod.koul, hardik.t.shah, guneshwor.o.singh,
	liam.r.girdwood, rakesh.a.ughreja, mengdong.lin



On 04/21/2016 12:12 AM, Mark Brown wrote:
> On Tue, Apr 19, 2016 at 01:12:25PM +0800, mengdong.lin@linux.intel.com wrote:
>
>>   }
>>
>> -static struct snd_soc_dai *snd_soc_find_dai(
>> +struct snd_soc_dai *snd_soc_find_dai(
>>   	const struct snd_soc_dai_link_component *dlc)
>>   {
>>   	struct snd_soc_component *component;
>> @@ -959,6 +959,7 @@ static struct snd_soc_dai *snd_soc_find_dai(
>>
>>   	return NULL;
>>   }
>> +EXPORT_SYMBOL_GPL(snd_soc_find_dai);
>
> Can you please add a kerneldoc comment as well since this is getting
> exported?
>

Okay, I'll do this. Thanks for your reminding.

Regards
Mengdong

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

end of thread, other threads:[~2016-04-21  6:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-19  5:12 [PATCH 0/4] ASoC: topology: configure more on DAI & DAI links mengdong.lin
2016-04-19  5:12 ` [PATCH 1/4] ASoC: Export snd_soc_find_dai() mengdong.lin
2016-04-20 16:12   ` Mark Brown
2016-04-21  6:55     ` Mengdong Lin
2016-04-20 16:19   ` Applied "ASoC: Export snd_soc_find_dai()" to the asoc tree Mark Brown
2016-04-19  5:12 ` [PATCH 2/4] ASoC: Change DAI link's be_id to a generic id mengdong.lin
2016-04-20 16:19   ` Applied "ASoC: Change DAI link's be_id to a generic id" to the asoc tree Mark Brown
2016-04-19  5:12 ` [PATCH 3/4] ASoC: topology: Set the link ID when creating a FE DAI link mengdong.lin
2016-04-20 16:19   ` Applied "ASoC: topology: Set the link ID when creating a FE DAI link" to the asoc tree Mark Brown
2016-04-19  5:12 ` [PATCH 4/4] ASoC: topology: Set CPU DAI name and enable DPCM by default for FE link mengdong.lin
2016-04-20 16:21   ` Applied "ASoC: topology: Set CPU DAI name and enable DPCM by default for FE link" to the asoc tree Mark Brown

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.