diff options
author | Takashi Iwai <tiwai@suse.de> | 2016-02-29 08:26:43 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-02-29 12:13:34 -0500 |
commit | eab3c4db193f5fcccf70e884de9a922ca2c63d80 (patch) | |
tree | 37b88df49a4f60ccb52bc75fa42cadb19b15591a /sound | |
parent | c1099c3294c2344110085a38c50e478a5992b368 (diff) |
ALSA: hdsp: Fix wrong boolean ctl value accesses
snd-hdsp driver accesses enum item values (int) instead of boolean
values (long) wrongly for some ctl elements. This patch fixes them.
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/rme9652/hdsp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index 2875b4f6d8c9..7c8941b8b2de 100644 --- a/sound/pci/rme9652/hdsp.c +++ b/sound/pci/rme9652/hdsp.c | |||
@@ -2879,7 +2879,7 @@ static int snd_hdsp_get_dds_offset(struct snd_kcontrol *kcontrol, struct snd_ctl | |||
2879 | { | 2879 | { |
2880 | struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); | 2880 | struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); |
2881 | 2881 | ||
2882 | ucontrol->value.enumerated.item[0] = hdsp_dds_offset(hdsp); | 2882 | ucontrol->value.integer.value[0] = hdsp_dds_offset(hdsp); |
2883 | return 0; | 2883 | return 0; |
2884 | } | 2884 | } |
2885 | 2885 | ||
@@ -2891,7 +2891,7 @@ static int snd_hdsp_put_dds_offset(struct snd_kcontrol *kcontrol, struct snd_ctl | |||
2891 | 2891 | ||
2892 | if (!snd_hdsp_use_is_exclusive(hdsp)) | 2892 | if (!snd_hdsp_use_is_exclusive(hdsp)) |
2893 | return -EBUSY; | 2893 | return -EBUSY; |
2894 | val = ucontrol->value.enumerated.item[0]; | 2894 | val = ucontrol->value.integer.value[0]; |
2895 | spin_lock_irq(&hdsp->lock); | 2895 | spin_lock_irq(&hdsp->lock); |
2896 | if (val != hdsp_dds_offset(hdsp)) | 2896 | if (val != hdsp_dds_offset(hdsp)) |
2897 | change = (hdsp_set_dds_offset(hdsp, val) == 0) ? 1 : 0; | 2897 | change = (hdsp_set_dds_offset(hdsp, val) == 0) ? 1 : 0; |