Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Trimarchi <michael@amarulasolutions.com>
To: Mark Brown <broonie@kernel.org>,
	Peter Ujfalusi <peter.ujfalusi@ti.com>,
	Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: [RFC PATCH] ASoC: omap-mcbsp: Add support for highter rate up to 384000
Date: Wed, 7 Aug 2013 20:28:41 +0200	[thread overview]
Message-ID: <20130807182841.GA7823@panicking> (raw)

Add support for highter rate up to 384000Khz. There are codecs in the
market that can play up to this frequency.
Test was done just with:

#define OMAP_MCBSP_RATES	(SNDRV_PCM_RATE_8000_192000)

playing wav file 32bit/192000Khz stereo. Some glitch has observed
but this should depend on the selected min buffer bytes that was
left untouched in aplay and in the omap-pcm driver.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
 sound/soc/omap/omap-mcbsp.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index 7483efb..1e95f6a 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -39,7 +39,9 @@
 #include "mcbsp.h"
 #include "omap-mcbsp.h"
 
-#define OMAP_MCBSP_RATES	(SNDRV_PCM_RATE_8000_96000)
+#define OMAP_MCBSP_RATES	(SNDRV_PCM_RATE_8000_192000 |		\
+				 SNDRV_PCM_RATE_CONTINUOUS |		\
+				 SNDRV_PCM_RATE_KNOT)
 
 #define OMAP_MCBSP_SOC_SINGLE_S16_EXT(xname, xmin, xmax, \
 	xhandler_get, xhandler_put) \
@@ -574,11 +576,15 @@ static struct snd_soc_dai_driver omap_mcbsp_dai = {
 		.channels_max = 16,
 		.rates = OMAP_MCBSP_RATES,
 		.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE,
+		.rate_min = 8000,
+		.rate_max = 384000,
 	},
 	.capture = {
 		.channels_min = 1,
 		.channels_max = 16,
 		.rates = OMAP_MCBSP_RATES,
+		.rate_min = 8000,
+		.rate_max = 384000,
 		.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE,
 	},
 	.ops = &mcbsp_dai_ops,
-- 
1.7.9.5

             reply	other threads:[~2013-08-07 18:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-07 18:28 Michael Trimarchi [this message]
2013-08-08 10:51 ` [RFC PATCH] ASoC: omap-mcbsp: Add support for highter rate up to 384000 Peter Ujfalusi
2013-08-08 11:04   ` Michael Trimarchi
2013-08-09  5:18     ` Peter Ujfalusi
2013-08-09  7:43       ` Michael Trimarchi
2013-08-10  7:53       ` Michael Trimarchi
2013-08-12 15:36         ` Peter Ujfalusi
2013-08-12 15:57           ` Michael Trimarchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130807182841.GA7823@panicking \
    --to=michael@amarulasolutions.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=peter.ujfalusi@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox