diff options
author | Takashi Iwai <tiwai@suse.de> | 2016-02-29 14:25:16 +0100 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-03-11 09:45:24 -0500 |
commit | 4a4aa42396f49dc4463ad36234722271699d35a3 (patch) | |
tree | eba185a15e60ce8f01131503227ac404991ab415 | |
parent | a0afb034eef8385fdfa882b103f5e3ec9f43b0ae (diff) | |
download | lwn-4a4aa42396f49dc4463ad36234722271699d35a3.tar.gz lwn-4a4aa42396f49dc4463ad36234722271699d35a3.zip |
ALSA: hdspm: Fix wrong boolean ctl value accesses
[ Upstream commit 537e48136295c5860a92138c5ea3959b9542868b ]
snd-hdspm 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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
-rw-r--r-- | sound/pci/rme9652/hdspm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index fcf91ee0328d..6b2b9760a7ee 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c @@ -2266,7 +2266,7 @@ static int snd_hdspm_put_system_sample_rate(struct snd_kcontrol *kcontrol, { struct hdspm *hdspm = snd_kcontrol_chip(kcontrol); - hdspm_set_dds_value(hdspm, ucontrol->value.enumerated.item[0]); + hdspm_set_dds_value(hdspm, ucontrol->value.integer.value[0]); return 0; } @@ -4465,7 +4465,7 @@ static int snd_hdspm_get_tco_word_term(struct snd_kcontrol *kcontrol, { struct hdspm *hdspm = snd_kcontrol_chip(kcontrol); - ucontrol->value.enumerated.item[0] = hdspm->tco->term; + ucontrol->value.integer.value[0] = hdspm->tco->term; return 0; } @@ -4476,8 +4476,8 @@ static int snd_hdspm_put_tco_word_term(struct snd_kcontrol *kcontrol, { struct hdspm *hdspm = snd_kcontrol_chip(kcontrol); - if (hdspm->tco->term != ucontrol->value.enumerated.item[0]) { - hdspm->tco->term = ucontrol->value.enumerated.item[0]; + if (hdspm->tco->term != ucontrol->value.integer.value[0]) { + hdspm->tco->term = ucontrol->value.integer.value[0]; hdspm_tco_write(hdspm); |