ASoC: simple-card: Fix breakage on kontron-sl28-var3-ads2
Mark Brown
maintainerPATCH 1/1 ASoC: simple-card: Fix breakage on kontron-sl28-var3-ads2
A KernelCI bisection identified 59c35c44a9cf89 "ASoC: simple-card: add simple_parse_node()" as causing simple-card to fail to instantiate on kontron-sl28-var3-ads2 systems. Since the merge window is expected to open over the weekend drop that commit and subsequent ones which depend on it for now in case other systems are affected too.
The boot log showed the error as:
<4>[ 9.948821] sysfs: cannot create duplicate filename '/devices/platform/sound/(null)-wm8904-hifi'
(backtrace)
<3>[ 10.191982] kobject_add_internal failed for (null)-wm8904-hifi with -EEXIST, don't try to register things with the same name in the same directory.
The dropped commits are:
73371bacf0475a20ab6 "ASoC: audio-graph: tidyup graph_dai_link_of_dpcm()" 434392271afcff350fe "ASoC: simple-card: add simple_link_init()" 59c35c44a9cf89a83a9 "ASoC: simple-card: add simple_parse_node()"
Reported-by Guillaume Tucker <[email protected]>
Reported-by "kernelci.org bot" <[email protected]>
Signed-off-by Mark Brown <[email protected]>
--- sound/soc/generic/audio-graph-card.c | 30 ++--- sound/soc/generic/simple-card.c | 178 ++++++++++++++------------- 2 files changed, 106 insertions(+), 102 deletions(-)
sound/soc/generic/audio-graph-card.c +16 -14
@@ -276,19 +276,24 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv, struct link_info *li) {struct device *dev =simple_priv_to_dev (priv); +struct snd_soc_card *card =simple_priv_to_card (priv);struct snd_soc_dai_link *dai_link =simple_priv_to_link (priv, li->link);struct simple_dai_props *dai_props =simple_priv_to_props (priv, li->link);struct device_node *top = dev->of_node;struct device_node *ep = li->cpu ? cpu_ep : codec_ep; +struct device_node *port; +struct device_node *ports; +struct snd_soc_dai_link_component *cpus =asoc_link_to_cpu (dai_link,0 ); +struct snd_soc_dai_link_component *codecs =asoc_link_to_codec (dai_link,0 );char dai_name[64 ];int ret; + port =of_get_parent (ep); + ports =of_get_parent (port); +dev_dbg (dev,"link_of DPCM (%pOF)\n" , ep);if (li->cpu) { -struct snd_soc_card *card =simple_priv_to_card (priv); -struct snd_soc_dai_link_component *cpus =asoc_link_to_cpu (dai_link,0 ); -/* Codec is dummy */ /* FE settings */
@@ -297,7 +302,7 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv, ret =graph_parse_node (priv, cpu_ep, li,1 );if (ret) -return ret; + goto out_put_node;snprintf (dai_name,sizeof (dai_name),"fe.%pOFP.%s" , cpus->of_node, cpus->dai_name);
@@ -314,10 +319,7 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv,if (card->component_chaining && !soc_component_is_pcm (cpus)) dai_link->no_pcm =1 ; }else { -struct snd_soc_codec_conf *cconf =simple_props_to_codec_conf (dai_props,0 ); -struct snd_soc_dai_link_component *codecs =asoc_link_to_codec (dai_link,0 ); -struct device_node *port; -struct device_node *ports; +struct snd_soc_codec_conf *cconf;/* CPU is dummy */
@@ -325,25 +327,22 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv, dai_link->no_pcm =1 ; dai_link->be_hw_params_fixup = asoc_simple_be_hw_params_fixup; + cconf =simple_props_to_codec_conf (dai_props,0 ); + ret =graph_parse_node (priv, codec_ep, li,0 );if (ret <0 ) -return ret; + goto out_put_node;snprintf (dai_name,sizeof (dai_name),"be.%pOFP.%s" , codecs->of_node, codecs->dai_name);/* check "prefix" from top node */ - port =of_get_parent (ep); - ports =of_get_parent (port);snd_soc_of_parse_node_prefix (top, cconf, codecs->of_node,"prefix" );if (of_node_name_eq (ports,"ports" ))snd_soc_of_parse_node_prefix (ports, cconf, codecs->of_node,"prefix" );snd_soc_of_parse_node_prefix (port, cconf, codecs->of_node,"prefix" ); - -of_node_put (ports); -of_node_put (port); }graph_parse_convert (dev, ep, &dai_props->adata);
@@ -352,8 +351,11 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv, ret =graph_link_init (priv, cpu_ep, codec_ep, li, dai_name); +out_put_node: li->link++; +of_node_put (ports); +of_node_put (port);return ret; }
sound/soc/generic/simple-card.c +90 -88
287 lines not on this page · raw message
Signature · 1 line
2.20.1