ASoC: rsnd: fixup reset timing of sync convert_rate
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 2 Feb 2017 05:01:05 +0000 (05:01 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 3 Feb 2017 11:24:23 +0000 (12:24 +0100)
Sync convert rate settings should be availabled *after* Playing.
Thus, src->sync should be reset first of init function.
Otherwise, it will set remaining settings when it start playing.
This patch fixes it. Thanks to Yokoyama-san

Reported-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
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 3a8f65bd1bf95c17afbe3a0f43b7ad1b94409792..42db48db09ba9a36abfbc807469e038ad86d3eaf 100644 (file)
@@ -390,6 +390,9 @@ static int rsnd_src_init(struct rsnd_mod *mod,
 {
        struct rsnd_src *src = rsnd_mod_to_src(mod);
 
+       /* reset sync convert_rate */
+       src->sync.val = 0;
+
        rsnd_mod_power_on(mod);
 
        rsnd_src_activation(mod);
@@ -398,9 +401,6 @@ static int rsnd_src_init(struct rsnd_mod *mod,
 
        rsnd_src_status_clear(mod);
 
-       /* reset sync convert_rate */
-       src->sync.val = 0;
-
        return 0;
 }