Skip to content
Unverified Commit bbb56537 authored by Tzung-Bi Shih's avatar Tzung-Bi Shih Committed by Mark Brown
Browse files

ASoC: mediatek: mt6358: save output volume for mixer controls



Output volume settings from mixer controls would be lost.

Imagine that "Headphone Volume" has set to -10dB via amixer:
- in mtk_hp_enable()
  - hp_store_gain() saves the volume setting -10dB from regmap_read()
    to ana_gain[AUDIO_ANALOG_VOLUME_HPOUTL]
  - headset_volume_ramp() ramps up from -10dB to -10dB
- in mtk_hp_disable()
  - headset_volume_ramp() ramps down from -10dB to -40dB

Next time in mtk_hp_enable(), hp_store_gain() would save -40dB but
not -10dB.  As a result, headset_volume_ramp() would ramp from -10dB to
-40dB (which is mute).

Signed-off-by: default avatarTzung-Bi Shih <tzungbi@google.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent bdb8fa6b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment