All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH] ASoC: cs42l73: Fix Output [X|A|V]SP_SCLK Sourcing Mode setting for master mode
@ 2012-01-31  1:49 Axel Lin
  2012-01-31 15:53 ` Brian Austin
  2012-02-01 10:49 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2012-01-31  1:49 UTC (permalink / raw)
  To: alsa-devel; +Cc: Brian Austin, Mark Brown, Liam Girdwood

For master mode, set Output [X|A|V]SP_SCLK Sourcing Mode to MCLK Mode.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
Hi Brian,
I think current code of setting priv->config[id].spc for master mode is wrong:
priv->config[id].spc &= MCK_SCLK_64FS; will set priv->config[id].spc to be 0.

I don't have this hardware, I'd appreciate you can review and test this patch.

Regards,
Axel
 sound/soc/codecs/cs42l73.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index 9d38db8..78979b3 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1113,7 +1113,7 @@ static int cs42l73_pcm_hw_params(struct snd_pcm_substream *substream,
 		priv->config[id].mmcc &= 0xC0;
 		priv->config[id].mmcc |= cs42l73_mclk_coeffs[mclk_coeff].mmcc;
 		priv->config[id].spc &= 0xFC;
-		priv->config[id].spc &= MCK_SCLK_64FS;
+		priv->config[id].spc |= MCK_SCLK_MCLK;
 	} else {
 		/* CS42L73 Slave */
 		priv->config[id].spc &= 0xFC;
-- 
1.7.5.4

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

* Re: [RFC][PATCH] ASoC: cs42l73: Fix Output [X|A|V]SP_SCLK Sourcing Mode setting for master mode
  2012-01-31  1:49 [RFC][PATCH] ASoC: cs42l73: Fix Output [X|A|V]SP_SCLK Sourcing Mode setting for master mode Axel Lin
@ 2012-01-31 15:53 ` Brian Austin
  2012-02-01 10:49 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Brian Austin @ 2012-01-31 15:53 UTC (permalink / raw)
  To: Axel Lin; +Cc: Brian Austin, alsa-devel, Mark Brown, Liam Girdwood


> For master mode, set Output [X|A|V]SP_SCLK Sourcing Mode to MCLK Mode.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
> Hi Brian,
> I think current code of setting priv->config[id].spc for master mode is wrong:
> priv->config[id].spc &= MCK_SCLK_64FS; will set priv->config[id].spc to be 0.
>
> I don't have this hardware, I'd appreciate you can review and test this patch.

Hey Axel,

Thanks for the catch.  Yes, for most normal slave operations where sclk = 
mclk you would set it the way you have it.

There is however another case where the SCLK = PREMCLK that puts 
constraints on the supported rates for the MCLK.  Your fix catches the 
majority of uses for Codec slave mode though.

Acked-by:Brian Austin <brian.austin@cirrus.com>

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

* Re: [RFC][PATCH] ASoC: cs42l73: Fix Output [X|A|V]SP_SCLK Sourcing Mode setting for master mode
  2012-01-31  1:49 [RFC][PATCH] ASoC: cs42l73: Fix Output [X|A|V]SP_SCLK Sourcing Mode setting for master mode Axel Lin
  2012-01-31 15:53 ` Brian Austin
@ 2012-02-01 10:49 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2012-02-01 10:49 UTC (permalink / raw)
  To: Axel Lin; +Cc: Brian Austin, alsa-devel, Liam Girdwood


[-- Attachment #1.1: Type: text/plain, Size: 149 bytes --]

On Tue, Jan 31, 2012 at 09:49:04AM +0800, Axel Lin wrote:
> For master mode, set Output [X|A|V]SP_SCLK Sourcing Mode to MCLK Mode.

Applied, thanks.

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

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

end of thread, other threads:[~2012-02-01 10:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-31  1:49 [RFC][PATCH] ASoC: cs42l73: Fix Output [X|A|V]SP_SCLK Sourcing Mode setting for master mode Axel Lin
2012-01-31 15:53 ` Brian Austin
2012-02-01 10:49 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.