Message ID | 87ppm87z3i.wl%kuninori.morimoto.gx@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | f687d900d30a61dda38db2a99239f5284a86a309 |
Headers | show |
On Thu, Feb 27, 2014 at 06:25:24PM -0800, Kuninori Morimoto wrote: > + * see > + * fmt_single_name() > + * fmt_multiple_name() > + */ > + dai_link->cpu_dai_name = NULL; > + Why do this by overwriting rather than at the point where the variable gets assigned?
Hi Mark > > + * see > > + * fmt_single_name() > > + * fmt_multiple_name() > > + */ > > + dai_link->cpu_dai_name = NULL; > > + > > Why do this by overwriting rather than at the point where the variable > gets assigned? Do you mean why I did it end of asoc_simple_card_parse_of() ? Because this cpu_dai_name itself is used for dai_link->name, dai_link->stream_name; This patch set NULL after that.
On Thu, Feb 27, 2014 at 08:31:45PM -0800, Kuninori Morimoto wrote: > Do you mean why I did it end of asoc_simple_card_parse_of() ? > Because this cpu_dai_name itself is used for > dai_link->name, dai_link->stream_name; > This patch set NULL after that. OK, makes sense. Applied, thanks.
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index bdd176d..034a2b7 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -234,6 +234,17 @@ static int asoc_simple_card_parse_of(struct device_node *node, priv->codec_dai.fmt, priv->codec_dai.sysclk); + /* + * soc_bind_dai_link() will check cpu name + * after of_node matching if dai_link has cpu_dai_name. + * but, it will never match if name was created by fmt_single_name() + * remove cpu_dai_name to escape name matching. + * see + * fmt_single_name() + * fmt_multiple_name() + */ + dai_link->cpu_dai_name = NULL; + return 0; }