ASoC: rsnd: print error if there is SRC settings mismatch
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 12 Feb 2014 05:05:26 +0000 (21:05 -0800)
committerMark Brown <broonie@linaro.org>
Wed, 12 Feb 2014 11:59:35 +0000 (11:59 +0000)
rsnd request clock master if SRC is used

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

index 6e5c763e1040b3800da2ed0b1491afec1f29977f..3984d4b4f2df5d16f1d95d83b297ea5cdca0d455 100644 (file)
@@ -122,6 +122,14 @@ static int rsnd_scu_ssi_mode_init(struct rsnd_mod *mod,
        struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
        struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
        int id = rsnd_mod_id(mod);
+       u32 convert_rate = rsnd_scu_convert_rate(scu);
+
+       if (convert_rate && !rsnd_dai_is_clk_master(rdai)) {
+               struct device *dev = rsnd_priv_to_dev(priv);
+
+               dev_err(dev, "rsnd should be clk master when you rate convert\n");
+               return -EINVAL;
+       }
 
        /*
         * SSI_MODE0