Skip to content

Commit

Permalink
ASoC: simple-card: Restore original configuration of DAI format
Browse files Browse the repository at this point in the history
Revert commit 069d037 ("ASoC: simple-card: Fix configuration of
DAI format"). During further review, it turns out that the actual issue
was caused by an incorrectly formatted device-tree node describing the
soundcard.

The following is incorrect because the simple-audio-card
'bitclock-master' and 'frame-master' properties should not reference the
actual codec phandle ...

	sound {
		compatible = "simple-audio-card";
		...
	=>	simple-audio-card,bitclock-master = <&codec>;
	=>	simple-audio-card,frame-master = <&codec>;
		...

		simple-audio-card,cpu {
			sound-dai = <&xxx>;
		};

		simple-audio-card,codec {
	=>		sound-dai = <&codec>;
		};
	};

Rather, these properties should reference the phandle to the
'simple-audio-card,codec' property as shown below ...

	sound {
		compatible = "simple-audio-card";
		...
	=>	simple-audio-card,bitclock-master = <&codec>;
	=>	simple-audio-card,frame-master = <&codec>;
		...

		simple-audio-card,cpu {
			sound-dai = <&xxx>;
		};

	=>	codec: simple-audio-card,codec { /* simple-card wants here */
			sound-dai = <&xxx>;	 /* not here */
		};
	};

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Jon Hunter authored and Mark Brown committed May 24, 2019
1 parent df93661 commit 4819d06
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sound/soc/generic/simple-card.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,11 @@ static int simple_dai_link_of(struct asoc_simple_priv *priv,
codec_dai =
dai_props->codec_dai = &priv->dais[li->dais++];

ret = asoc_simple_parse_daifmt(dev, node, codec,
prefix, &dai_link->dai_fmt);
if (ret < 0)
goto dai_link_of_err;

simple_parse_mclk_fs(top, cpu, codec, dai_props, prefix);

ret = asoc_simple_parse_cpu(cpu, dai_link, &single_cpu);
Expand All @@ -293,11 +298,6 @@ static int simple_dai_link_of(struct asoc_simple_priv *priv,
if (ret < 0)
goto dai_link_of_err;

ret = asoc_simple_parse_daifmt(dev, node, dai_link->codecs->of_node,
prefix, &dai_link->dai_fmt);
if (ret < 0)
goto dai_link_of_err;

ret = asoc_simple_parse_platform(plat, dai_link);
if (ret < 0)
goto dai_link_of_err;
Expand Down

0 comments on commit 4819d06

Please sign in to comment.