ASoC: Samsung: Set default rclk source rate
authorJassi Brar <jassi.brar@samsung.com>
Mon, 20 Dec 2010 02:05:46 +0000 (11:05 +0900)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 20 Dec 2010 13:45:27 +0000 (13:45 +0000)
Since the rclk_srcrate is cleared upon startup, it should be
initialized upon second and later 'open' calls to the device
with same root-clock source. The bug is otherwise visible in
Codec-Slave mode.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/samsung/i2s.c

index d6de3f0eeff8c8d3ebb52ada360b8882378bafab..26b4bdf42c5bdb3f2c8eb430049e4f9c24462628 100644 (file)
@@ -525,6 +525,8 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai,
                                        clk_disable(i2s->op_clk);
                                        clk_put(i2s->op_clk);
                                } else {
+                                       i2s->rclk_srcrate =
+                                               clk_get_rate(i2s->op_clk);
                                        return 0;
                                }
                        }