diff options
author | Kai-Heng Feng <kai.heng.feng@canonical.com> | 2020-04-30 17:11:39 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-05-01 12:27:17 +0100 |
commit | 49c22696348d6e7c8a2ecfd7e60fddfe188ded82 (patch) | |
tree | acdada9c73fe30f9f72296afe0577512868c0857 /sound/soc/sof/control.c | |
parent | 8382f2949a0def8e9519603b77b3c26f81a66576 (diff) |
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: 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>
Diffstat (limited to 'sound/soc/sof/control.c')
-rw-r--r-- | sound/soc/sof/control.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/sof/control.c b/sound/soc/sof/control.c index dfc412e2d956..6d63768d42aa 100644 --- a/sound/soc/sof/control.c +++ b/sound/soc/sof/control.c @@ -19,8 +19,8 @@ static void update_mute_led(struct snd_sof_control *scontrol, struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - unsigned int temp = 0; - unsigned int mask; + int temp = 0; + int mask; int i; mask = 1U << snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); |