ASoC: rcar: fixup SND_SOC_DAIFMT_CBx_CFx flags
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 14 Mar 2014 00:56:43 +0000 (17:56 -0700)
committerMark Brown <broonie@linaro.org>
Fri, 14 Mar 2014 19:34:10 +0000 (19:34 +0000)
SND_SOC_DAIFMT_CBx_CFx means "codec" side master/slave mode.
Then, rcar will be master mode if it was SND_SOC_DAIFMT_CBS_CFS.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/sh/rcar/core.c

index 743de5e3b1e1ed4cba8f5dcfce3a5d3cfd9471bf..3a4fe9d0d4f243e1f4989496f7823bf0e367a562 100644 (file)
@@ -486,10 +486,10 @@ static int rsnd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
        /* set master/slave audio interface */
        switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
        case SND_SOC_DAIFMT_CBM_CFM:
-               rdai->clk_master = 1;
+               rdai->clk_master = 0;
                break;
        case SND_SOC_DAIFMT_CBS_CFS:
-               rdai->clk_master = 0;
+               rdai->clk_master = 1; /* codec is slave, cpu is master */
                break;
        default:
                return -EINVAL;