]> www.infradead.org Git - users/dwmw2/linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:48:39 +0000 (17:48 +0200)
commite5228a0c8c5c78a3013569621e1255c7c0d9306b
treef73f56af956501a1050f6bf747c05ba8591ec8ed
parent29301fa9a7bdf1b0b97a2f0b59bbc6865db26528
ASoC: SOF: Update correct LED status at the first time usage of update_mute_led()

[ Upstream commit 49c22696348d6e7c8a2ecfd7e60fddfe188ded82 ]

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: 5d43001ae436 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/sof/control.c
sound/soc/sof/sof-audio.h
sound/soc/sof/topology.c