Commit d258b07c authored by Takashi Iwai's avatar Takashi Iwai Committed by Ben Hutchings

ALSA: hdspm: Fix wrong boolean ctl value accesses

commit 537e4813 upstream.

snd-hdspm driver accesses enum item values (int) instead of boolean
values (long) wrongly for some ctl elements.  This patch fixes them.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
[bwh: Backported to 3.2: drop change to snd_hdspm_put_system_sample_rate()]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent a6915746
...@@ -4386,7 +4386,7 @@ static int snd_hdspm_get_tco_word_term(struct snd_kcontrol *kcontrol, ...@@ -4386,7 +4386,7 @@ static int snd_hdspm_get_tco_word_term(struct snd_kcontrol *kcontrol,
{ {
struct hdspm *hdspm = snd_kcontrol_chip(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; return 0;
} }
...@@ -4397,8 +4397,8 @@ static int snd_hdspm_put_tco_word_term(struct snd_kcontrol *kcontrol, ...@@ -4397,8 +4397,8 @@ static int snd_hdspm_put_tco_word_term(struct snd_kcontrol *kcontrol,
{ {
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol); struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
if (hdspm->tco->term != ucontrol->value.enumerated.item[0]) { if (hdspm->tco->term != ucontrol->value.integer.value[0]) {
hdspm->tco->term = ucontrol->value.enumerated.item[0]; hdspm->tco->term = ucontrol->value.integer.value[0];
hdspm_tco_write(hdspm); hdspm_tco_write(hdspm);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment