mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jacob Siverskog <jacob@teenage.engineering>
To: Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Michael Trimarchi <michael@amarulasolutions.com>,
	Johan Hovold <johan@kernel.org>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	Jacob Siverskog <jacob@teenage.engineering>
Subject: [PATCH v2 3/3] ASoC: pcm179x: Support continuous rates
Date: Tue, 19 Jan 2016 11:29:48 +0100	[thread overview]
Message-ID: <1453199388-8354-4-git-send-email-jacob@teenage.engineering> (raw)
In-Reply-To: <1453199388-8354-1-git-send-email-jacob@teenage.engineering>

According to the PCM179x data sheets sampling frequencies between 10
kHz and 200 kHz are supported. Specify support in the driver.

Tested with PCM1791A.

References:
http://www.ti.com/lit/ds/symlink/pcm1791a.pdf
http://www.ti.com/lit/ds/symlink/pcm1792a.pdf
http://www.ti.com/lit/ds/symlink/pcm1795.pdf
http://www.ti.com/lit/ds/symlink/pcm1796.pdf

Reviewed-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
---
 sound/soc/codecs/pcm179x.c | 4 +++-
 sound/soc/codecs/pcm179x.h | 4 ----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/pcm179x.c b/sound/soc/codecs/pcm179x.c
index d35d2ae..6e40be2 100644
--- a/sound/soc/codecs/pcm179x.c
+++ b/sound/soc/codecs/pcm179x.c
@@ -181,7 +181,9 @@ static struct snd_soc_dai_driver pcm179x_dai = {
 		.stream_name = "Playback",
 		.channels_min = 2,
 		.channels_max = 2,
-		.rates = PCM1792A_RATES,
+		.rates = SNDRV_PCM_RATE_CONTINUOUS,
+		.rate_min = 10000,
+		.rate_max = 200000,
 		.formats = PCM1792A_FORMATS, },
 	.ops = &pcm179x_dai_ops,
 };
diff --git a/sound/soc/codecs/pcm179x.h b/sound/soc/codecs/pcm179x.h
index d1536e0..7829157 100644
--- a/sound/soc/codecs/pcm179x.h
+++ b/sound/soc/codecs/pcm179x.h
@@ -24,10 +24,6 @@ struct pcm179x_private {
 	unsigned int rate;
 };
 
-#define PCM1792A_RATES (SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_8000_48000 | \
-			SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 | \
-			SNDRV_PCM_RATE_192000)
-
 #define PCM1792A_FORMATS (SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S24_LE | \
 			  SNDRV_PCM_FMTBIT_S16_LE)
 
-- 
2.7.0

      parent reply	other threads:[~2016-01-19 10:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-19 10:29 [PATCH v2 0/3] ASoC: pcm179x: Add I2C support, declare support for " Jacob Siverskog
2016-01-19 10:29 ` [PATCH v2 1/3] ASoC: pcm179x: Split into core and SPI parts Jacob Siverskog
2016-01-19 10:29 ` [PATCH v2 2/3] ASoC: pcm179x: Add I2C interface driver Jacob Siverskog
2016-01-19 10:50   ` Michael Trimarchi
2016-01-19 13:51     ` Johan Hovold
2016-01-20  4:58       ` Michael Trimarchi
2016-01-20 17:26         ` Johan Hovold
2016-01-19 10:29 ` Jacob Siverskog [this message]

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=1453199388-8354-4-git-send-email-jacob@teenage.engineering \
    --to=jacob@teenage.engineering \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=johan@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael@amarulasolutions.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

all inboxes | Powered by JetHome®