All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] ASoC: bcm2835-i2s: Support 384k sample rate
@ 2016-06-19 17:52 ` Clive Messer
  0 siblings, 0 replies; 5+ messages in thread
From: Clive Messer @ 2016-06-19 17:52 UTC (permalink / raw)
  To: linux-rpi-kernel; +Cc: alsa-devel, Clive Messer, linux-arm-kernel

Add support for sample rates up to 384k to bcm2835-i2s driver,
with SNDRV_PCM_RATE_CONTINUOUS and specifying 8k min and 384k max,
for both playback and capture.

Signed-off-by: Clive Messer <clive.messer@digitaldreamtime.co.uk>
---
 sound/soc/bcm/bcm2835-i2s.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c
index 6ba2049..4a67db2 100644
--- a/sound/soc/bcm/bcm2835-i2s.c
+++ b/sound/soc/bcm/bcm2835-i2s.c
@@ -578,7 +578,9 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = {
 	.playback = {
 		.channels_min = 2,
 		.channels_max = 2,
-		.rates =	SNDRV_PCM_RATE_8000_192000,
+		.rates =	SNDRV_PCM_RATE_CONTINUOUS,
+		.rate_min =	8000,
+		.rate_max =	384000,
 		.formats =	SNDRV_PCM_FMTBIT_S16_LE
 				| SNDRV_PCM_FMTBIT_S24_LE
 				| SNDRV_PCM_FMTBIT_S32_LE
@@ -586,7 +588,9 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = {
 	.capture = {
 		.channels_min = 2,
 		.channels_max = 2,
-		.rates =	SNDRV_PCM_RATE_8000_192000,
+		.rates =	SNDRV_PCM_RATE_CONTINUOUS,
+		.rate_min =	8000,
+		.rate_max =	384000,
 		.formats =	SNDRV_PCM_FMTBIT_S16_LE
 				| SNDRV_PCM_FMTBIT_S24_LE
 				| SNDRV_PCM_FMTBIT_S32_LE
-- 
2.5.5

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

* [PATCH 1/1] ASoC: bcm2835-i2s: Support 384k sample rate
@ 2016-06-19 17:52 ` Clive Messer
  0 siblings, 0 replies; 5+ messages in thread
From: Clive Messer @ 2016-06-19 17:52 UTC (permalink / raw)
  To: linux-arm-kernel

Add support for sample rates up to 384k to bcm2835-i2s driver,
with SNDRV_PCM_RATE_CONTINUOUS and specifying 8k min and 384k max,
for both playback and capture.

Signed-off-by: Clive Messer <clive.messer@digitaldreamtime.co.uk>
---
 sound/soc/bcm/bcm2835-i2s.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c
index 6ba2049..4a67db2 100644
--- a/sound/soc/bcm/bcm2835-i2s.c
+++ b/sound/soc/bcm/bcm2835-i2s.c
@@ -578,7 +578,9 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = {
 	.playback = {
 		.channels_min = 2,
 		.channels_max = 2,
-		.rates =	SNDRV_PCM_RATE_8000_192000,
+		.rates =	SNDRV_PCM_RATE_CONTINUOUS,
+		.rate_min =	8000,
+		.rate_max =	384000,
 		.formats =	SNDRV_PCM_FMTBIT_S16_LE
 				| SNDRV_PCM_FMTBIT_S24_LE
 				| SNDRV_PCM_FMTBIT_S32_LE
@@ -586,7 +588,9 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = {
 	.capture = {
 		.channels_min = 2,
 		.channels_max = 2,
-		.rates =	SNDRV_PCM_RATE_8000_192000,
+		.rates =	SNDRV_PCM_RATE_CONTINUOUS,
+		.rate_min =	8000,
+		.rate_max =	384000,
 		.formats =	SNDRV_PCM_FMTBIT_S16_LE
 				| SNDRV_PCM_FMTBIT_S24_LE
 				| SNDRV_PCM_FMTBIT_S32_LE
-- 
2.5.5

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

* Re: [PATCH 1/1] ASoC: bcm2835-i2s: Support 384k sample rate
  2016-06-19 17:52 ` Clive Messer
@ 2016-07-14  1:37   ` Eric Anholt
  -1 siblings, 0 replies; 5+ messages in thread
From: Eric Anholt @ 2016-07-14  1:37 UTC (permalink / raw)
  To: linux-rpi-kernel; +Cc: alsa-devel, Clive Messer, linux-arm-kernel


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

Clive Messer <clive.messer@digitaldreamtime.co.uk> writes:

> Add support for sample rates up to 384k to bcm2835-i2s driver,
> with SNDRV_PCM_RATE_CONTINUOUS and specifying 8k min and 384k max,
> for both playback and capture.

It looks like this should be OK -- the PCM clock should max out at
25Mhz, and that divided by 2*32 (max bclk_ratio) is just over 384k.

Reviewed-by: Eric Anholt <eric@anholt.net>

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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



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

* [PATCH 1/1] ASoC: bcm2835-i2s: Support 384k sample rate
@ 2016-07-14  1:37   ` Eric Anholt
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Anholt @ 2016-07-14  1:37 UTC (permalink / raw)
  To: linux-arm-kernel

Clive Messer <clive.messer@digitaldreamtime.co.uk> writes:

> Add support for sample rates up to 384k to bcm2835-i2s driver,
> with SNDRV_PCM_RATE_CONTINUOUS and specifying 8k min and 384k max,
> for both playback and capture.

It looks like this should be OK -- the PCM clock should max out at
25Mhz, and that divided by 2*32 (max bclk_ratio) is just over 384k.

Reviewed-by: Eric Anholt <eric@anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160713/2b525964/attachment.sig>

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

* Applied "ASoC: bcm2835: Support additional samplerates up to 384kHz" to the asoc tree
  2016-06-19 17:52 ` Clive Messer
  (?)
  (?)
@ 2017-11-10 21:29 ` Mark Brown
  -1 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2017-11-10 21:29 UTC (permalink / raw)
  To: Matthias Reichl
  Cc: Clive Messer, alsa-devel, Mark Brown, linux-rpi-kernel, linux-arm-kernel

The patch

   ASoC: bcm2835: Support additional samplerates up to 384kHz

has been applied to the asoc tree at

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

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

>From 675c0ee514f56ea39f6f550299621aafe9a53fc0 Mon Sep 17 00:00:00 2001
From: Matthias Reichl <hias@horus.com>
Date: Wed, 8 Nov 2017 21:03:31 +0100
Subject: [PATCH] ASoC: bcm2835: Support additional samplerates up to 384kHz

Sample rates are only restricted by the capabilities of the
clock driver, so use SNDRV_PCM_RATE_CONTINUOUS instead of
SNDRV_PCM_RATE_8000_192000.

Tests (eg with pcm5122) have shown that bcm2835 works fine
in 384kHz/32bit stereo mode, so change the maximum allowed
rate from 192kHz to 384kHz.

Signed-off-by: Matthias Reichl <hias@horus.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/bcm/bcm2835-i2s.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c
index dcacf7f83c93..f4b778ed350b 100644
--- a/sound/soc/bcm/bcm2835-i2s.c
+++ b/sound/soc/bcm/bcm2835-i2s.c
@@ -719,7 +719,9 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = {
 	.playback = {
 		.channels_min = 2,
 		.channels_max = 2,
-		.rates =	SNDRV_PCM_RATE_8000_192000,
+		.rates =	SNDRV_PCM_RATE_CONTINUOUS,
+		.rate_min =	8000,
+		.rate_max =	384000,
 		.formats =	SNDRV_PCM_FMTBIT_S16_LE
 				| SNDRV_PCM_FMTBIT_S24_LE
 				| SNDRV_PCM_FMTBIT_S32_LE
@@ -727,7 +729,9 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = {
 	.capture = {
 		.channels_min = 2,
 		.channels_max = 2,
-		.rates =	SNDRV_PCM_RATE_8000_192000,
+		.rates =	SNDRV_PCM_RATE_CONTINUOUS,
+		.rate_min =	8000,
+		.rate_max =	384000,
 		.formats =	SNDRV_PCM_FMTBIT_S16_LE
 				| SNDRV_PCM_FMTBIT_S24_LE
 				| SNDRV_PCM_FMTBIT_S32_LE
-- 
2.15.0

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

end of thread, other threads:[~2017-11-10 21:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-19 17:52 [PATCH 1/1] ASoC: bcm2835-i2s: Support 384k sample rate Clive Messer
2016-06-19 17:52 ` Clive Messer
2016-07-14  1:37 ` Eric Anholt
2016-07-14  1:37   ` Eric Anholt
2017-11-10 21:29 ` Applied "ASoC: bcm2835: Support additional samplerates up to 384kHz" to the asoc tree 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.