alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Vishal Thanki <vishalthanki@gmail.com>
To: alsa-devel@alsa-project.org, lgirdwood@gmail.com,
	broonie@kernel.org, perex@perex.cz, tiwai@suse.com,
	jic23@kernel.org, afd@ti.com, kuninori.morimoto.gx@renesas.com
Cc: Vishal Thanki <vishalthanki@gmail.com>
Subject: [PATCH] ASoC: ak4104: Limit the supported sample rates
Date: Mon, 26 Sep 2016 15:34:19 +0200	[thread overview]
Message-ID: <1474896859-31069-1-git-send-email-vishalthanki@gmail.com> (raw)

Currently the driver exposes range of sample rates between 8KHz to
192KHz as a part of dai_driver. This does not hold true as the limited
number sample rates are allowed in hw_params DAI callback. This patch
limits the sample rates exposed via dai_driver.

Signed-off-by: Vishal Thanki <vishalthanki@gmail.com>
---
 sound/soc/codecs/ak4104.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/ak4104.c b/sound/soc/codecs/ak4104.c
index bdca879..1a9d233 100644
--- a/sound/soc/codecs/ak4104.c
+++ b/sound/soc/codecs/ak4104.c
@@ -163,7 +163,10 @@ static struct snd_soc_dai_driver ak4104_dai = {
 		.stream_name = "Playback",
 		.channels_min = 2,
 		.channels_max = 2,
-		.rates = SNDRV_PCM_RATE_8000_192000,
+		.rates = SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 |
+			 SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |
+			 SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 |
+			 SNDRV_PCM_RATE_176400 | SNDRV_PCM_RATE_192000,
 		.formats = SNDRV_PCM_FMTBIT_S16_LE  |
 			   SNDRV_PCM_FMTBIT_S24_3LE |
 			   SNDRV_PCM_FMTBIT_S24_LE
-- 
2.4.11

             reply	other threads:[~2016-09-26 13:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-26 13:34 Vishal Thanki [this message]
2016-09-26 16:43 ` Applied "ASoC: ak4104: Limit the supported sample rates" to the asoc tree Mark Brown

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=1474896859-31069-1-git-send-email-vishalthanki@gmail.com \
    --to=vishalthanki@gmail.com \
    --cc=afd@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=jic23@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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;
as well as URLs for NNTP newsgroup(s).