mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: SAMSUNG: Don't clear clock setting during i2s_startup
@ 2014-04-23  8:04 Tushar Behera
  2014-04-23 11:30 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Tushar Behera @ 2014-04-23  8:04 UTC (permalink / raw)
  To: linux-kernel, alsa-devel, linux-samsung-soc
  Cc: broonie, lgirdwood, sbkim73, jassisinghbrar, kgene.kim

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>
---
The patch is based on v3.15-rc2.

 sound/soc/samsung/i2s.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index 048ead9..6e61db7 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -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 @@ probe_exit:
 	/* 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);
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: SAMSUNG: Don't clear clock setting during i2s_startup
  2014-04-23  8:04 [PATCH] ASoC: SAMSUNG: Don't clear clock setting during i2s_startup Tushar Behera
@ 2014-04-23 11:30 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-04-23 11:30 UTC (permalink / raw)
  To: Tushar Behera
  Cc: linux-kernel, alsa-devel, linux-samsung-soc, lgirdwood, sbkim73,
	jassisinghbrar, kgene.kim

[-- Attachment #1: Type: text/plain, Size: 246 bytes --]

On Wed, Apr 23, 2014 at 01:34:24PM +0530, Tushar Behera wrote:
> 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.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-23 11:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-23  8:04 [PATCH] ASoC: SAMSUNG: Don't clear clock setting during i2s_startup Tushar Behera
2014-04-23 11:30 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®