Skip to content

Commit

Permalink
ASoC: don't flip master of DT-instantiated DAI links
Browse files Browse the repository at this point in the history
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@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Stephen Warren authored and Mark Brown committed May 16, 2012
1 parent 018a455 commit fe33d4c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fe33d4c

Please sign in to comment.