diff options
Diffstat (limited to 'sound/soc/codecs/twl6040.c')
-rw-r--r-- | sound/soc/codecs/twl6040.c | 59 |
1 files changed, 31 insertions, 28 deletions
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index 879bd6e..d10f988 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c @@ -1338,6 +1338,33 @@ static int twl6040_add_widgets(struct snd_soc_codec *codec) return 0; } +/* set of rates for each pll: low-power and high-performance */ + +static unsigned int lp_rates[] = { + 8000, + 11250, + 16000, + 22500, + 32000, + 44100, + 48000, + 88200, + 96000, +}; + +static struct snd_pcm_hw_constraint_list lp_constraints = { + .count = ARRAY_SIZE(lp_rates), + .list = lp_rates, +}; + +static unsigned int hp_rates[] = { + 8000, + 16000, + 32000, + 48000, + 96000, +}; + static int twl6040_set_bias_level(struct snd_soc_codec *codec, enum snd_soc_bias_level level) { @@ -1356,6 +1383,8 @@ static int twl6040_set_bias_level(struct snd_soc_codec *codec, twl6040_enable(twl6040); priv->codec_powered = 1; + priv->sysclk_constraints = &lp_constraints; + /* initialize vdd/vss registers with reg_cache */ twl6040_init_vdd_regs(codec); @@ -1377,32 +1406,6 @@ static int twl6040_set_bias_level(struct snd_soc_codec *codec, return 0; } -/* set of rates for each pll: low-power and high-performance */ - -static unsigned int lp_rates[] = { - 8000, - 11250, - 16000, - 22500, - 32000, - 44100, - 48000, - 88200, - 96000, -}; - -static struct snd_pcm_hw_constraint_list lp_constraints = { - .count = ARRAY_SIZE(lp_rates), - .list = lp_rates, -}; - -static unsigned int hp_rates[] = { - 8000, - 16000, - 32000, - 48000, - 96000, -}; static struct snd_pcm_hw_constraint_list hp_constraints = { .count = ARRAY_SIZE(hp_rates), @@ -1641,9 +1644,9 @@ static int twl6040_probe(struct snd_soc_codec *codec) else priv->ep_step = 1; - /* default is high-performance mode */ + /* default is low-power mode */ priv->headset_mode = 1; - priv->sysclk_constraints = &hp_constraints; + priv->sysclk_constraints = &lp_constraints; priv->workqueue = create_singlethread_workqueue("twl6040-codec"); if (!priv->workqueue) { |