alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: pascal.huerst@gmail.com
To: lars@metafoo.de
Cc: alsa-devel@alsa-project.org, Pascal Huerst <pascal.huerst@gmail.com>
Subject: [PATCH] ASoC: adau1701: Add 44.1 KHz to supported sample rates
Date: Thu, 15 Oct 2015 13:16:06 +0200	[thread overview]
Message-ID: <1444907766-9892-1-git-send-email-pascal.huerst@gmail.com> (raw)

From: Pascal Huerst <pascal.huerst@gmail.com>

According to the datasheet, this device does also support 44.1 KHz
as sample rate. This adds the necessary changes to support this.

See Datasheet: Rev. B / page 39 / SR[1:0]

Signed-off-by: Pascal Huerst <pascal.huerst@gmail.com>
---
 sound/soc/codecs/adau1701.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c
index de53c0d..8b3ba51 100644
--- a/sound/soc/codecs/adau1701.c
+++ b/sound/soc/codecs/adau1701.c
@@ -459,6 +459,7 @@ static int adau1701_hw_params(struct snd_pcm_substream *substream,
 	case 96000:
 		val = ADAU1701_DSPCTRL_SR_96;
 		break;
+	case 44100:
 	case 48000:
 		val = ADAU1701_DSPCTRL_SR_48;
 		break;
@@ -623,8 +624,8 @@ static int adau1701_startup(struct snd_pcm_substream *substream,
 	return sigmadsp_restrict_params(adau1701->sigmadsp, substream);
 }
 
-#define ADAU1701_RATES (SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000 | \
-	SNDRV_PCM_RATE_192000)
+#define ADAU1701_RATES (SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |\
+	SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_192000)
 
 #define ADAU1701_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
 	SNDRV_PCM_FMTBIT_S24_LE)
-- 
2.4.3

             reply	other threads:[~2015-10-15 11:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-15 11:16 pascal.huerst [this message]
2015-10-20  9:10 ` [PATCH] ASoC: adau1701: Add 44.1 KHz to supported sample rates Lars-Peter Clausen
2015-11-11 11:40   ` Pascal Huerst
2015-11-11 11:49     ` Lars-Peter Clausen
2015-11-11 12:42       ` Pascal Huerst
2015-11-19 13:30   ` Pascal Huerst

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=1444907766-9892-1-git-send-email-pascal.huerst@gmail.com \
    --to=pascal.huerst@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lars@metafoo.de \
    /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;
as well as URLs for NNTP newsgroup(s).