]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: Update correct LED status at the first time usage of update_mute_led()
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Thu, 30 Apr 2020 09:11:39 +0000 (17:11 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 1 May 2020 11:27:17 +0000 (12:27 +0100)
commitecfc7488f305ac57803ef8e1719df2ce0030e879
treeacdada9c73fe30f9f72296afe0577512868c0857
parent87ee9b5685d65739a60fbc92fef708188fe666d5
ASoC: SOF: Update correct LED status at the first time usage of update_mute_led()

At the first time update_mute_led() gets called, if channels are already
muted, the temp value equals to led_value as 0, skipping the following
LED setting.

So set led_value to -1 as an uninitialized state, to update the correct
LED status at first time usage.

Fixes: c2496f6b7afb ("ASoC: SOF: acpi led support for switch controls")
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Acked-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200430091139.7003-1-kai.heng.feng@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/control.c
sound/soc/sof/sof-audio.h
sound/soc/sof/topology.c