diff options
author | Bard Liao <bardliao@realtek.com> | 2016-10-19 22:13:44 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-10-24 13:03:14 -0400 |
commit | d01580c394f58dff234a03f0f2f32c051a556f15 (patch) | |
tree | bb7c427bf68091449951b07cf09d11c98e59a57d | |
parent | 1001354ca34179f3db924eb66672442a173147dc (diff) |
ASoC: rt5660: enable MCLK detection
There is a power saving mechanism in rt5660. It will turn off some
unused power when MCLK is not present. We call that "MCLK detection"
and it should be enabled by default.
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/rt5660.c | 4 | ||||
-rw-r--r-- | sound/soc/codecs/rt5660.h | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5660.c b/sound/soc/codecs/rt5660.c index 9f0933ced804..76cf76a2e9b6 100644 --- a/sound/soc/codecs/rt5660.c +++ b/sound/soc/codecs/rt5660.c | |||
@@ -1311,6 +1311,10 @@ static int rt5660_i2c_probe(struct i2c_client *i2c, | |||
1311 | if (ret != 0) | 1311 | if (ret != 0) |
1312 | dev_warn(&i2c->dev, "Failed to apply regmap patch: %d\n", ret); | 1312 | dev_warn(&i2c->dev, "Failed to apply regmap patch: %d\n", ret); |
1313 | 1313 | ||
1314 | regmap_update_bits(rt5660->regmap, RT5660_GEN_CTRL1, | ||
1315 | RT5660_AUTO_DIS_AMP | RT5660_MCLK_DET | RT5660_POW_CLKDET, | ||
1316 | RT5660_AUTO_DIS_AMP | RT5660_MCLK_DET | RT5660_POW_CLKDET); | ||
1317 | |||
1314 | if (rt5660->pdata.dmic1_data_pin) { | 1318 | if (rt5660->pdata.dmic1_data_pin) { |
1315 | regmap_update_bits(rt5660->regmap, RT5660_GPIO_CTRL1, | 1319 | regmap_update_bits(rt5660->regmap, RT5660_GPIO_CTRL1, |
1316 | RT5660_GP1_PIN_MASK, RT5660_GP1_PIN_DMIC1_SCL); | 1320 | RT5660_GP1_PIN_MASK, RT5660_GP1_PIN_DMIC1_SCL); |
diff --git a/sound/soc/codecs/rt5660.h b/sound/soc/codecs/rt5660.h index 6cdb9269ec9e..bba18fb66b6f 100644 --- a/sound/soc/codecs/rt5660.h +++ b/sound/soc/codecs/rt5660.h | |||
@@ -810,6 +810,9 @@ | |||
810 | /* General Control 1 (0xfa) */ | 810 | /* General Control 1 (0xfa) */ |
811 | #define RT5660_PWR_VREF_HP (0x1 << 11) | 811 | #define RT5660_PWR_VREF_HP (0x1 << 11) |
812 | #define RT5660_PWR_VREF_HP_SFT 11 | 812 | #define RT5660_PWR_VREF_HP_SFT 11 |
813 | #define RT5660_AUTO_DIS_AMP (0x1 << 6) | ||
814 | #define RT5660_MCLK_DET (0x1 << 5) | ||
815 | #define RT5660_POW_CLKDET (0x1 << 1) | ||
813 | #define RT5660_DIG_GATE_CTRL (0x1) | 816 | #define RT5660_DIG_GATE_CTRL (0x1) |
814 | #define RT5660_DIG_GATE_CTRL_SFT 0 | 817 | #define RT5660_DIG_GATE_CTRL_SFT 0 |
815 | 818 | ||