All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>,
	Simon <horms@verge.net.au>, Liam Girdwood <lgirdwood@gmail.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Subject: [PATCH 3/4 v2] ASoC: simple-card: dai_link->init should be cared when multi DAI
Date: Wed, 27 Aug 2014 20:08:27 -0700 (PDT)	[thread overview]
Message-ID: <871ts1ia53.wl%kuninori.morimoto.gx@gmail.com> (raw)
In-Reply-To: <8761hdia86.wl%kuninori.morimoto.gx@gmail.com>

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

6a91a17bd7b92b2d2aa9ece85457f52a62fd7708
(ASoC: simple-card: Handle many DAI links)
added multi DAI support on simple-card.
This means priv->dai_link might be pointer of multi DAI.
dai_link->init is needed for all DAI.
This patch cares it for all DAIs on DT/non-DT

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v1 -> v2

 - no change

 sound/soc/generic/simple-card.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index e8185a0..8902704 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -274,6 +274,7 @@ static int asoc_simple_card_dai_link_of(struct device_node *node,
 				dai_link->codec_dai_name);
 	dai_link->name = dai_link->stream_name = name;
 	dai_link->ops = &asoc_simple_card_ops;
+	dai_link->init = asoc_simple_card_dai_init;
 
 	dev_dbg(dev, "\tname : %s\n", dai_link->stream_name);
 	dev_dbg(dev, "\tcpu : %s / %04x / %d\n",
@@ -465,6 +466,7 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
 		dai_link->codec_name	= cinfo->codec;
 		dai_link->cpu_dai_name	= cinfo->cpu_dai.name;
 		dai_link->codec_dai_name = cinfo->codec_dai.name;
+		dai_link->init		= asoc_simple_card_dai_init;
 		memcpy(&priv->dai_props->cpu_dai, &cinfo->cpu_dai,
 					sizeof(priv->dai_props->cpu_dai));
 		memcpy(&priv->dai_props->codec_dai, &cinfo->codec_dai,
@@ -474,11 +476,6 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
 		priv->dai_props->codec_dai.fmt	|= cinfo->daifmt;
 	}
 
-	/*
-	 * init snd_soc_dai_link
-	 */
-	dai_link->init = asoc_simple_card_dai_init;
-
 	snd_soc_card_set_drvdata(&priv->snd_card, priv);
 
 	ret = devm_snd_soc_register_card(&pdev->dev, &priv->snd_card);
-- 
1.7.9.5

  parent reply	other threads:[~2014-08-28  3:08 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-20  7:06 [PATCH 0/8] ASoC: simple-card: DPCM support Kuninori Morimoto
     [not found] ` <87fvgriqrb.wl%kuninori.morimoto.gx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-20  7:07   ` [PATCH 1/8] ASoC: simple-card: use asoc_simple_xxx prefix Kuninori Morimoto
2014-08-20  7:07   ` [PATCH 2/8] ASoC: simple-card: remove dai_link->cpu_dai_name when DT Kuninori Morimoto
2014-08-20  7:09   ` [PATCH 3/8] ASoC: simple-card: dai_link->init should be cared when multi DAI Kuninori Morimoto
2014-08-20  7:09   ` [PATCH 4/8] ASoC: simple-card: use common for_each_child_of_node() for loop Kuninori Morimoto
2014-08-20  7:11   ` [PATCH 5/8] ASoC: simple-card: add DPCM support when DT case Kuninori Morimoto
2014-08-20  7:11   ` [PATCH 6/8] ASoC: simple-card: remove is_top_level_node from asoc_simple_card_sub_parse_of() Kuninori Morimoto
2014-08-20  7:11   ` [PATCH 7/8] ASoC: rsnd: add dai_link stream name Kuninori Morimoto
2014-08-20  7:13   ` [PATCH 8/8] ASoC: add snd-soc-dummy DT support Kuninori Morimoto
     [not found]     ` <874mx7iqgt.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2014-08-24  8:48       ` [alsa-devel] " Lars-Peter Clausen
     [not found]         ` <53F9A6EE.5070005-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2014-08-26  0:04           ` Kuninori Morimoto
     [not found]             ` <871ts4nmki.wl%kuninori.morimoto.gx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-26  6:25               ` Mark Brown
     [not found]                 ` <20140826062558.GR17528-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-08-26  8:34                   ` Kuninori Morimoto
     [not found]                     ` <87wq9vmyyc.wl%kuninori.morimoto.gx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-26  9:11                       ` Mark Brown
     [not found]                         ` <20140826091120.GC17528-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-08-26  9:19                           ` Lars-Peter Clausen
     [not found]                             ` <53FC5105.6070901-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2014-08-26  9:42                               ` Mark Brown
     [not found]                                 ` <20140826094211.GF17528-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-08-26 10:31                                   ` Kuninori Morimoto
     [not found]                                     ` <87r403mtip.wl%kuninori.morimoto.gx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-26 10:50                                       ` Mark Brown
     [not found]                                         ` <20140826105028.GK17528-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-08-27  1:11                                           ` Kuninori Morimoto
     [not found]                                             ` <87d2bmpwi2.wl%kuninori.morimoto.gx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-27  3:14                                               ` Kuninori Morimoto
     [not found]                                                 ` <87a96qpqsy.wl%kuninori.morimoto.gx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-27  8:24                                                   ` Lars-Peter Clausen
     [not found]                                                     ` <53FD95AB.6080903-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2014-08-28  0:33                                                       ` Kuninori Morimoto
     [not found]                                                         ` <87fvghihaq.wl%kuninori.morimoto.gx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-28  7:23                                                           ` Lars-Peter Clausen
     [not found]                                                             ` <53FED90B.8070308-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2014-08-28 10:41                                                               ` Kuninori Morimoto
2014-08-28  8:02                                                           ` Mark Brown
     [not found]                                                             ` <20140828080251.GG17528-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-08-28 10:56                                                               ` Kuninori Morimoto
     [not found]                                                                 ` <87sikghohq.wl%kuninori.morimoto.gx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-29  0:41                                                                   ` Kuninori Morimoto
2014-08-26  0:08   ` [PATCH 0/8] ASoC: simple-card: DPCM support Kuninori Morimoto
     [not found]     ` <87zjesm7sp.wl%kuninori.morimoto.gx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-28  3:04       ` Kuninori Morimoto
2014-08-28  3:06 ` [PATCH 0/4 v2] ASoC: simple-card: fixup for DT Kuninori Morimoto
2014-08-28  3:07   ` [PATCH 1/4 v2] ASoC: simple-card: use asoc_simple_xxx prefix Kuninori Morimoto
2014-08-29 11:49     ` Mark Brown
2014-08-28  3:08   ` [PATCH 2/4 v2] ASoC: simple-card: remove dai_link->cpu_dai_name when DT Kuninori Morimoto
2014-08-29 11:51     ` Mark Brown
2014-08-28  3:08   ` Kuninori Morimoto [this message]
2014-08-29 11:51     ` [PATCH 3/4 v2] ASoC: simple-card: dai_link->init should be cared when multi DAI Mark Brown
2014-08-28  3:08   ` [PATCH 4/4 v2] ASoC: simple-card: use common for_each_child_of_node() for loop Kuninori Morimoto
2014-08-29 11:51     ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871ts1ia53.wl%kuninori.morimoto.gx@gmail.com \
    --to=kuninori.morimoto.gx@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=horms@verge.net.au \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.