aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/max98090.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/max98090.c')
-rw-r--r--sound/soc/codecs/max98090.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index 51f9b3d16b41..9f714ea86613 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -336,6 +336,7 @@ static bool max98090_readable_register(struct device *dev, unsigned int reg)
336 case M98090_REG_RECORD_TDM_SLOT: 336 case M98090_REG_RECORD_TDM_SLOT:
337 case M98090_REG_SAMPLE_RATE: 337 case M98090_REG_SAMPLE_RATE:
338 case M98090_REG_DMIC34_BIQUAD_BASE ... M98090_REG_DMIC34_BIQUAD_BASE + 0x0E: 338 case M98090_REG_DMIC34_BIQUAD_BASE ... M98090_REG_DMIC34_BIQUAD_BASE + 0x0E:
339 case M98090_REG_REVISION_ID:
339 return true; 340 return true;
340 default: 341 default:
341 return false; 342 return false;
@@ -1769,16 +1770,6 @@ static int max98090_set_bias_level(struct snd_soc_codec *codec,
1769 1770
1770 switch (level) { 1771 switch (level) {
1771 case SND_SOC_BIAS_ON: 1772 case SND_SOC_BIAS_ON:
1772 if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
1773 ret = regcache_sync(max98090->regmap);
1774
1775 if (ret != 0) {
1776 dev_err(codec->dev,
1777 "Failed to sync cache: %d\n", ret);
1778 return ret;
1779 }
1780 }
1781
1782 if (max98090->jack_state == M98090_JACK_STATE_HEADSET) { 1773 if (max98090->jack_state == M98090_JACK_STATE_HEADSET) {
1783 /* 1774 /*
1784 * Set to normal bias level. 1775 * Set to normal bias level.
@@ -1792,6 +1783,16 @@ static int max98090_set_bias_level(struct snd_soc_codec *codec,
1792 break; 1783 break;
1793 1784
1794 case SND_SOC_BIAS_STANDBY: 1785 case SND_SOC_BIAS_STANDBY:
1786 if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
1787 ret = regcache_sync(max98090->regmap);
1788 if (ret != 0) {
1789 dev_err(codec->dev,
1790 "Failed to sync cache: %d\n", ret);
1791 return ret;
1792 }
1793 }
1794 break;
1795
1795 case SND_SOC_BIAS_OFF: 1796 case SND_SOC_BIAS_OFF:
1796 /* Set internal pull-up to lowest power mode */ 1797 /* Set internal pull-up to lowest power mode */
1797 snd_soc_update_bits(codec, M98090_REG_JACK_DETECT, 1798 snd_soc_update_bits(codec, M98090_REG_JACK_DETECT,