linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: don't flip master of DT-instantiated DAI links
@ 2012-05-14 20:47 Stephen Warren
       [not found] ` <1337028442-5603-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Warren @ 2012-05-14 20:47 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren

From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Commit 4924082 "ASoC: core: Flip master for CODECs in the CPU slot of a
CODEC<->CODEC link" added code that was conditional on there being no
PCM/DMA driver for the link. However, it failed to cover the case where
the link was instantiated from device tree, and hence was specified by
DT node rather than name.

This prevents the following error on Toshiba AC100:
aplay: pcm_write:1603: write error: Input/output error

Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
I tested this fix on AC100 (ALC5632), Harmony (WM8903), and TrimSlice
(TLV320AIC23). I'm not sure why the issue only affected AC100. Perhaps
the other codecs support being the I2S master but the ALC5632 driver
doesn't?
---
 sound/soc/soc-core.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 2783d2b..b37ee80 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1612,7 +1612,8 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
 		}
 
 		/* If this is a regular CPU link there will be a platform */
-		if (dai_fmt && dai_link->platform_name) {
+		if (dai_fmt &&
+		    (dai_link->platform_name || dai_link->platform_of_node)) {
 			ret = snd_soc_dai_set_fmt(card->rtd[i].cpu_dai,
 						  dai_fmt);
 			if (ret != 0 && ret != -ENOTSUPP)
-- 
1.7.0.4

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

* Re: [PATCH] ASoC: don't flip master of DT-instantiated DAI links
       [not found] ` <1337028442-5603-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
@ 2012-05-16  8:45   ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-05-16  8:45 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Liam Girdwood, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren

[-- Attachment #1: Type: text/plain, Size: 489 bytes --]

On Mon, May 14, 2012 at 02:47:22PM -0600, Stephen Warren wrote:
> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> 
> Commit 4924082 "ASoC: core: Flip master for CODECs in the CPU slot of a
> CODEC<->CODEC link" added code that was conditional on there being no
> PCM/DMA driver for the link. However, it failed to cover the case where
> the link was instantiated from device tree, and hence was specified by
> DT node rather than name.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2012-05-16  8:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-14 20:47 [PATCH] ASoC: don't flip master of DT-instantiated DAI links Stephen Warren
     [not found] ` <1337028442-5603-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-05-16  8:45   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).