Skip to content

Commit

Permalink
ASoC: twl6040: Support other sample rates.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Olaya, Margarita authored and Liam Girdwood committed Dec 14, 2010
1 parent 4e624d0 commit 60ea4ce
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion sound/soc/codecs/twl6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

#include "twl6040.h"

#define TWL6040_RATES (SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000)
#define TWL6040_RATES SNDRV_PCM_RATE_8000_96000
#define TWL6040_FORMATS (SNDRV_PCM_FMTBIT_S32_LE)

struct twl6040_jack_data {
Expand Down Expand Up @@ -890,10 +890,17 @@ static int twl6040_hw_params(struct snd_pcm_substream *substream,

rate = params_rate(params);
switch (rate) {
case 11250:
case 22500:
case 44100:
case 88200:
lppllctl |= TWL6040_LPLLFIN;
priv->sysclk = 17640000;
break;
case 8000:
case 16000:
case 32000:
case 48000:
case 96000:
lppllctl &= ~TWL6040_LPLLFIN;
priv->sysclk = 19200000;
Expand Down

0 comments on commit 60ea4ce

Please sign in to comment.