aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorOlaya, Margarita <magi.olaya@ti.com>2010-12-10 22:05:58 -0500
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-12-14 15:36:38 -0500
commit60ea4cecddd03ed86b91bc8c057d3d305dc678be (patch)
tree9b9936500b1e91ff3cfb28bf9e591c44c17578fe /sound
parent4e624d0609081e4394695fba3d7c3b7ebb6171ce (diff)
ASoC: twl6040: Support other sample rates.
The twl6040 can support more sample rates other than 88.2 and 96k. Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/twl6040.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index fd9a3ab91a19..b59d947d0bfe 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -39,7 +39,7 @@
39 39
40#include "twl6040.h" 40#include "twl6040.h"
41 41
42#define TWL6040_RATES (SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000) 42#define TWL6040_RATES SNDRV_PCM_RATE_8000_96000
43#define TWL6040_FORMATS (SNDRV_PCM_FMTBIT_S32_LE) 43#define TWL6040_FORMATS (SNDRV_PCM_FMTBIT_S32_LE)
44 44
45struct twl6040_jack_data { 45struct twl6040_jack_data {
@@ -890,10 +890,17 @@ static int twl6040_hw_params(struct snd_pcm_substream *substream,
890 890
891 rate = params_rate(params); 891 rate = params_rate(params);
892 switch (rate) { 892 switch (rate) {
893 case 11250:
894 case 22500:
895 case 44100:
893 case 88200: 896 case 88200:
894 lppllctl |= TWL6040_LPLLFIN; 897 lppllctl |= TWL6040_LPLLFIN;
895 priv->sysclk = 17640000; 898 priv->sysclk = 17640000;
896 break; 899 break;
900 case 8000:
901 case 16000:
902 case 32000:
903 case 48000:
897 case 96000: 904 case 96000:
898 lppllctl &= ~TWL6040_LPLLFIN; 905 lppllctl &= ~TWL6040_LPLLFIN;
899 priv->sysclk = 19200000; 906 priv->sysclk = 19200000;