Преглед изворни кода

ASoC: rsnd: make sure SRC In Rate feature enablement

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>
Kuninori Morimoto пре 10 година
родитељ
комит
7115cb913d
1 измењених фајлова са 7 додато и 0 уклоњено
  1. 7 0
      sound/soc/sh/rcar/src.c

+ 7 - 0
sound/soc/sh/rcar/src.c

@@ -923,6 +923,7 @@ static int rsnd_src_pcm_new_gen2(struct rsnd_mod *mod,
 			    struct snd_soc_pcm_runtime *rtd)
 			    struct snd_soc_pcm_runtime *rtd)
 {
 {
 	struct rsnd_dai *rdai = rsnd_io_to_rdai(io);
 	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);
 	struct rsnd_src *src = rsnd_mod_to_src(mod);
 	int ret;
 	int ret;
 
 
@@ -936,6 +937,12 @@ static int rsnd_src_pcm_new_gen2(struct rsnd_mod *mod,
 	if (!rsnd_rdai_is_clk_master(rdai))
 	if (!rsnd_rdai_is_clk_master(rdai))
 		return 0;
 		return 0;
 
 
+	/*
+	 * SRC In doesn't work if DVC was enabled
+	 */
+	if (dvc && !rsnd_io_is_play(io))
+		return 0;
+
 	/*
 	/*
 	 * enable sync convert
 	 * enable sync convert
 	 */
 	 */