]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ASoC: rsnd: make sure SRC In Rate feature enablement
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 10 Nov 2015 07:39:17 +0000 (07:39 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 10 Nov 2015 19:02:02 +0000 (19:02 +0000)
SRC In Rate convert feature cannot be used if data path is using DVC.
This patch judges it, and not allowed to use it in such case.

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

index 261b50217c48d94f0a66f44c513f685755ddae07..68b439ed22d7f4bb065bae68db731c4a844d40ac 100644 (file)
@@ -923,6 +923,7 @@ static int rsnd_src_pcm_new_gen2(struct rsnd_mod *mod,
                            struct snd_soc_pcm_runtime *rtd)
 {
        struct rsnd_dai *rdai = rsnd_io_to_rdai(io);
+       struct rsnd_mod *dvc = rsnd_io_to_mod_dvc(io);
        struct rsnd_src *src = rsnd_mod_to_src(mod);
        int ret;
 
@@ -936,6 +937,12 @@ static int rsnd_src_pcm_new_gen2(struct rsnd_mod *mod,
        if (!rsnd_rdai_is_clk_master(rdai))
                return 0;
 
+       /*
+        * SRC In doesn't work if DVC was enabled
+        */
+       if (dvc && !rsnd_io_is_play(io))
+               return 0;
+
        /*
         * enable sync convert
         */