Commit d66eac3e authored by Tushar Behera's avatar Tushar Behera Committed by Mark Brown

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: default avatarTushar Behera <tushar.behera@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent c9eaa447
......@@ -724,9 +724,6 @@ static int i2s_startup(struct snd_pcm_substream *substream,
else
i2s->mode |= DAI_MANAGER;
/* Enforce set_sysclk in Master mode */
i2s->rclk_srcrate = 0;
if (!any_active(i2s) && (i2s->quirks & QUIRK_NEED_RSTCLR))
writel(CON_RSTCLR, i2s->addr + I2SCON);
......@@ -984,6 +981,7 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai)
/* Reset any constraint on RFS and BFS */
i2s->rfs = 0;
i2s->bfs = 0;
i2s->rclk_srcrate = 0;
i2s_txctrl(i2s, 0);
i2s_rxctrl(i2s, 0);
i2s_fifo(i2s, FIC_TXFLUSH);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment