mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: atmel: Fix the 8K sample parameter in I2SC master
@ 2023-07-15  3:06 Guiting Shen
  2023-07-25 17:54 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Guiting Shen @ 2023-07-15  3:06 UTC (permalink / raw)
  To: codrin.ciubotariu
  Cc: lgirdwood, broonie, perex, tiwai, nicolas.ferre,
	alexandre.belloni, claudiu.beznea, linux-arm-kernel,
	linux-kernel, Guiting Shen

The 8K sample parameter of 12.288Mhz main system bus clock doesn't work
because the I2SC_MR.IMCKDIV must not be 0 according to the sama5d2
series datasheet(I2SC Mode Register of Register Summary).

So use the 6.144Mhz instead of 12.288Mhz to support 8K sample.

Signed-off-by: Guiting Shen <aarongt.shen@gmail.com>
---
 sound/soc/atmel/atmel-i2s.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sound/soc/atmel/atmel-i2s.c b/sound/soc/atmel/atmel-i2s.c
index 425d66edbf86..5e43ff0b537a 100644
--- a/sound/soc/atmel/atmel-i2s.c
+++ b/sound/soc/atmel/atmel-i2s.c
@@ -163,11 +163,14 @@ struct atmel_i2s_gck_param {
 
 #define I2S_MCK_12M288		12288000UL
 #define I2S_MCK_11M2896		11289600UL
+#define I2S_MCK_6M144		6144000UL
 
 /* mck = (32 * (imckfs+1) / (imckdiv+1)) * fs */
 static const struct atmel_i2s_gck_param gck_params[] = {
+	/* mck = 6.144Mhz */
+	{  8000, I2S_MCK_6M144,  1, 47},	/* mck =  768 fs */
+
 	/* mck = 12.288MHz */
-	{  8000, I2S_MCK_12M288, 0, 47},	/* mck = 1536 fs */
 	{ 16000, I2S_MCK_12M288, 1, 47},	/* mck =  768 fs */
 	{ 24000, I2S_MCK_12M288, 3, 63},	/* mck =  512 fs */
 	{ 32000, I2S_MCK_12M288, 3, 47},	/* mck =  384 fs */
-- 
2.25.1


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

* Re: [PATCH] ASoC: atmel: Fix the 8K sample parameter in I2SC master
  2023-07-15  3:06 [PATCH] ASoC: atmel: Fix the 8K sample parameter in I2SC master Guiting Shen
@ 2023-07-25 17:54 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2023-07-25 17:54 UTC (permalink / raw)
  To: codrin.ciubotariu, Guiting Shen
  Cc: lgirdwood, perex, tiwai, nicolas.ferre, alexandre.belloni,
	claudiu.beznea, linux-arm-kernel, linux-kernel

On Sat, 15 Jul 2023 11:06:20 +0800, Guiting Shen wrote:
> The 8K sample parameter of 12.288Mhz main system bus clock doesn't work
> because the I2SC_MR.IMCKDIV must not be 0 according to the sama5d2
> series datasheet(I2SC Mode Register of Register Summary).
> 
> So use the 6.144Mhz instead of 12.288Mhz to support 8K sample.
> 
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: atmel: Fix the 8K sample parameter in I2SC master
      commit: f85739c0b2b0d98a32f5ca4fcc5501d2b76df4f6

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


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

end of thread, other threads:[~2023-07-25 17:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-15  3:06 [PATCH] ASoC: atmel: Fix the 8K sample parameter in I2SC master Guiting Shen
2023-07-25 17:54 ` 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®