ASoC: pcm179x: Support continuous rates
authorJacob Siverskog <jacob@teenage.engineering>
Fri, 22 Jan 2016 12:39:55 +0000 (13:39 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 28 Jan 2016 23:36:26 +0000 (00:36 +0100)
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

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
Reviewed-by: Johan Hovold <johan@kernel.org>
Acked-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/pcm179x.c
sound/soc/codecs/pcm179x.h

index 8f20f70af23ef975d3e8e7c13f58fdbd440f9a75..06a66579ca6d34964044c0ac297333a805b2a3c3 100644 (file)
@@ -187,7 +187,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,
 };
index c4eea4df915b777c77bb1b806652e75d8a581af0..11e331268aae27c2523a9e12dfb4c44ce3967dd0 100644 (file)
 #ifndef __PCM179X_H__
 #define __PCM179X_H__
 
-#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)