diff options
author | Mark Brown <broonie@kernel.org> | 2018-02-14 16:39:30 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-02-14 17:10:10 +0100 |
commit | 58fadc19e484a6269521eede6bdb1030d2dc18c0 (patch) | |
tree | ecb7f81b622a10f2e50776688881a72a1f858e43 /sound/soc/codecs/sgtl5000.c | |
parent | ASoC: sgtl5000: replace codec to component (diff) | |
parent | sgtl5000: change digital_mute policy (diff) | |
download | linux-58fadc19e484a6269521eede6bdb1030d2dc18c0.tar.xz linux-58fadc19e484a6269521eede6bdb1030d2dc18c0.zip |
Merge branch 'fix/sgtl5000' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-sgtl5000
Diffstat (limited to 'sound/soc/codecs/sgtl5000.c')
-rw-r--r-- | sound/soc/codecs/sgtl5000.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index c26ac224f39c..975a9d76b37f 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -529,10 +529,15 @@ static const struct snd_kcontrol_new sgtl5000_snd_controls[] = { static int sgtl5000_digital_mute(struct snd_soc_dai *codec_dai, int mute) { struct snd_soc_component *component = codec_dai->component; - u16 adcdac_ctrl = SGTL5000_DAC_MUTE_LEFT | SGTL5000_DAC_MUTE_RIGHT; + u16 i2s_pwr = SGTL5000_I2S_IN_POWERUP; - snd_soc_component_update_bits(component, SGTL5000_CHIP_ADCDAC_CTRL, - adcdac_ctrl, mute ? adcdac_ctrl : 0); + /* + * During 'digital mute' do not mute DAC + * because LINE_IN would be muted aswell. We want to mute + * only I2S block - this can be done by powering it off + */ + snd_soc_component_update_bits(component, SGTL5000_CHIP_DIG_POWER, + i2s_pwr, mute ? 0 : i2s_pwr); return 0; } @@ -1237,6 +1242,10 @@ static int sgtl5000_probe(struct snd_soc_component *component) */ snd_soc_component_write(component, SGTL5000_DAP_CTRL, 0); + /* Unmute DAC after start */ + snd_soc_component_update_bits(component, SGTL5000_CHIP_ADCDAC_CTRL, + SGTL5000_DAC_MUTE_LEFT | SGTL5000_DAC_MUTE_RIGHT, 0); + return 0; err: |