ASoC: samsung: Don't clear clock setting during i2s_startup
authorTushar Behera <tushar.behera@linaro.org>
Wed, 23 Apr 2014 08:04:24 +0000 (13:34 +0530)
committerMark Brown <broonie@linaro.org>
Wed, 23 Apr 2014 11:30:12 +0000 (12:30 +0100)
commitd66eac3e2b09690e28f9ac405969d6857325ee9d
treed7edb2746a5774b3a400df5321b2d0b08238624e
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5
ASoC: samsung: Don't clear clock setting during i2s_startup

In exiting kernel, if DAIFMT flags are set in dai_link and I2S is
set to run in master mode, the I2S clocks are not getting configured
resulting in no output.

Existing code clears the current I2S clock settings during i2s_startup
and requires that the clocks are reconfigured. It then assumes that
sound-card driver would call snd_soc_dai_{set_sysclk/set_fmt} to
configure the root clock.

1. Since I2S clock settings remain fixed for a board, it would be better
to set the clocks once during sound-card probe.

2. Also if the DAIFMT flags are set in dai_link, snd_soc_dai_set_fmt is
called during DAI probe.

If both these conditions are true, then I2S clock remains unconfigured
during audio playback. Fix this by removing the code to clear
rclk_srcrate in i2s_startup. Instead, reset this during DAI probe.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/samsung/i2s.c