summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-06-01 14:01:13 +0200
committerMark Brown <broonie@kernel.org>2020-06-01 14:01:13 +0200
commita72ff08faf3d6b2a1c21c9b815bf02af44cc70ab (patch)
tree5d9292f82ef7a236930febee51373565e1842398 /sound/soc/sof
parentLinux 5.7-rc7 (diff)
parentASoC: dapm: Move dai_link widgets to runtime to fix use after free (diff)
downloadlinux-a72ff08faf3d6b2a1c21c9b815bf02af44cc70ab.tar.xz
linux-a72ff08faf3d6b2a1c21c9b815bf02af44cc70ab.zip
Merge remote-tracking branch 'asoc/for-5.7' into asoc-linus
Diffstat (limited to 'sound/soc/sof')
-rw-r--r--sound/soc/sof/control.c4
-rw-r--r--sound/soc/sof/sof-audio.h2
-rw-r--r--sound/soc/sof/topology.c2
3 files changed, 5 insertions, 3 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);
diff --git a/sound/soc/sof/sof-audio.h b/sound/soc/sof/sof-audio.h
index bf65f31af858..875a5fc13297 100644
--- a/sound/soc/sof/sof-audio.h
+++ b/sound/soc/sof/sof-audio.h
@@ -56,7 +56,7 @@ struct snd_sof_pcm {
struct snd_sof_led_control {
unsigned int use_led;
unsigned int direction;
- unsigned int led_value;
+ int led_value;
};
/* ALSA SOF Kcontrol device */
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index fe8ba3e05e08..ab2b69de1d4d 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -1203,6 +1203,8 @@ static int sof_control_load(struct snd_soc_component *scomp, int index,
return ret;
}
+ scontrol->led_ctl.led_value = -1;
+
dobj->private = scontrol;
list_add(&scontrol->list, &sdev->kcontrol_list);
return ret;