ASoC: mediatek: mt6358: initialize setting when ramping volume
authorTzung-Bi Shih <tzungbi@google.com>
Tue, 7 May 2019 10:12:18 +0000 (18:12 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 8 May 2019 08:11:53 +0000 (17:11 +0900)
commitbdb8fa6b09a801a6cbe3c2487f0228860f9c5aba
treee1605a3c2d013c4c5bfd1e690688bf2713871629
parentce38a75089f70f6380fc63a5478a7659b4eb3f47
ASoC: mediatek: mt6358: initialize setting when ramping volume

Mt6358 ramps up from the smallest volume (i.e. -10dB) to target dB when
opening and ramps down from target dB to mute (i.e. -40dB) when closing.
If target is equal to -10dB when opening, headset_volume_ramp() simply
leaves current setting (which may not be -10dB) unchanged.

Execute the loop at least once to initialize the setting to the
starting point (i.e. from).

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/mt6358.c