[alsa-devel] [PATCH] ASoC: rt5645: Add codec driver

Oder oder_chiou at realtek.com
Tue Apr 22 03:10:19 CEST 2014


>> +static int rt5645_set_bias_level(struct snd_soc_codec *codec,
>> +                     enum snd_soc_bias_level level)
>> +{
>> +     switch (level) {
>> +     case SND_SOC_BIAS_STANDBY:
>> +             if (SND_SOC_BIAS_OFF == codec->dapm.bias_level) {
>> +                     snd_soc_update_bits(codec, RT5645_PWR_ANLG1,
>> +                             RT5645_PWR_VREF1 | RT5645_PWR_MB |
>> +                             RT5645_PWR_BG | RT5645_PWR_VREF2,
>> +                             RT5645_PWR_VREF1 | RT5645_PWR_MB |
>> +                             RT5645_PWR_BG | RT5645_PWR_VREF2);
>> +                     mdelay(10);
>> +                     snd_soc_update_bits(codec, RT5645_PWR_ANLG1,
>> +                             RT5645_PWR_FV1 | RT5645_PWR_FV2,
>> +                             RT5645_PWR_FV1 | RT5645_PWR_FV2);
>> +                     snd_soc_update_bits(codec, RT5645_GEN_CTRL1,
>> +                             RT5645_DIG_GATE_CTRL, RT5645_DIG_GATE_CTRL);
>> +             }
>> +             break;
>
> Since the device can power up and down very quickly it should make sense
> to set idle_bias_off for a power saving when idle.
>
We've set the idle_bias_off as true in struct "soc_codec_dev_rt5645",
is there any thing i miss it?


More information about the Alsa-devel mailing list