OSDN Git Service

codecs/rt5640: Fix restoring of playback volumes
authorDmitry Osipenko <digetx@gmail.com>
Thu, 20 May 2021 14:14:57 +0000 (17:14 +0300)
committerJaroslav Kysela <perex@perex.cz>
Thu, 27 May 2021 07:08:38 +0000 (09:08 +0200)
commit4f74bf0755fe9717a48a4f7452e5cd20d402de76
tree8303874f9947d3b0795e4ed18c028aaa00a17666
parent73e5c8802df2dc362042640caa8000a83781e1b9
codecs/rt5640: Fix restoring of playback volumes

The playback volumes shall be initialized only during of the first
enable sequence, not during the initialization of speaker/headphones
devices. This fixes sound level restoring by pulseaudio when headphones
are inserted/ejected. Previously sound level was always reset to the
default level on insert/ejection, which is the incorrect behaviour.
The correct behaviour is to restore volume the previous level, i.e.
if sound level was 3% before headphones were ejected, then level should
be restored to 3% when headphones are inserted back.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/codecs/rt5640/EnableSeq.conf
ucm2/codecs/rt5640/HeadPhones.conf
ucm2/codecs/rt5640/MonoSpeaker.conf
ucm2/codecs/rt5640/Speaker.conf