diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-03-20 12:31:57 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 04:39:31 -0500 |
commit | 6682025e1220a1ab0b6b855b7805928c3163e043 (patch) | |
tree | c028eb65984a5be22c273c4be9a1a4469bce3504 /sound/pci/ice1712/aureon.c | |
parent | 878b4789196e3cd470f843854b6b09d963214659 (diff) |
[ALSA] ice1712 - Fix wrong value types for enum items
Modules: ICE1712 driver
Fix the access to wrong type values for enum items in aureon.c
(ALSA bug#1527).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ice1712/aureon.c')
-rw-r--r-- | sound/pci/ice1712/aureon.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/pci/ice1712/aureon.c b/sound/pci/ice1712/aureon.c index 0f7f4d8263c0..7e6608b14abc 100644 --- a/sound/pci/ice1712/aureon.c +++ b/sound/pci/ice1712/aureon.c | |||
@@ -955,8 +955,8 @@ static int wm_adc_mux_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_val | |||
955 | 955 | ||
956 | mutex_lock(&ice->gpio_mutex); | 956 | mutex_lock(&ice->gpio_mutex); |
957 | val = wm_get(ice, WM_ADC_MUX); | 957 | val = wm_get(ice, WM_ADC_MUX); |
958 | ucontrol->value.integer.value[0] = val & 7; | 958 | ucontrol->value.enumerated.item[0] = val & 7; |
959 | ucontrol->value.integer.value[1] = (val >> 4) & 7; | 959 | ucontrol->value.enumerated.item[1] = (val >> 4) & 7; |
960 | mutex_unlock(&ice->gpio_mutex); | 960 | mutex_unlock(&ice->gpio_mutex); |
961 | return 0; | 961 | return 0; |
962 | } | 962 | } |
@@ -970,8 +970,8 @@ static int wm_adc_mux_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_val | |||
970 | snd_ice1712_save_gpio_status(ice); | 970 | snd_ice1712_save_gpio_status(ice); |
971 | oval = wm_get(ice, WM_ADC_MUX); | 971 | oval = wm_get(ice, WM_ADC_MUX); |
972 | nval = oval & ~0x77; | 972 | nval = oval & ~0x77; |
973 | nval |= ucontrol->value.integer.value[0] & 7; | 973 | nval |= ucontrol->value.enumerated.item[0] & 7; |
974 | nval |= (ucontrol->value.integer.value[1] & 7) << 4; | 974 | nval |= (ucontrol->value.enumerated.item[1] & 7) << 4; |
975 | change = (oval != nval); | 975 | change = (oval != nval); |
976 | if (change) | 976 | if (change) |
977 | wm_put(ice, WM_ADC_MUX, nval); | 977 | wm_put(ice, WM_ADC_MUX, nval); |
@@ -1011,7 +1011,7 @@ static int aureon_cs8415_mux_get(struct snd_kcontrol *kcontrol, struct snd_ctl_e | |||
1011 | 1011 | ||
1012 | //snd_ice1712_save_gpio_status(ice); | 1012 | //snd_ice1712_save_gpio_status(ice); |
1013 | //val = aureon_cs8415_get(ice, CS8415_CTRL2); | 1013 | //val = aureon_cs8415_get(ice, CS8415_CTRL2); |
1014 | ucontrol->value.integer.value[0] = ice->spec.aureon.cs8415_mux; | 1014 | ucontrol->value.enumerated.item[0] = ice->spec.aureon.cs8415_mux; |
1015 | //snd_ice1712_restore_gpio_status(ice); | 1015 | //snd_ice1712_restore_gpio_status(ice); |
1016 | return 0; | 1016 | return 0; |
1017 | } | 1017 | } |
@@ -1025,12 +1025,12 @@ static int aureon_cs8415_mux_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e | |||
1025 | snd_ice1712_save_gpio_status(ice); | 1025 | snd_ice1712_save_gpio_status(ice); |
1026 | oval = aureon_cs8415_get(ice, CS8415_CTRL2); | 1026 | oval = aureon_cs8415_get(ice, CS8415_CTRL2); |
1027 | nval = oval & ~0x07; | 1027 | nval = oval & ~0x07; |
1028 | nval |= ucontrol->value.integer.value[0] & 7; | 1028 | nval |= ucontrol->value.enumerated.item[0] & 7; |
1029 | change = (oval != nval); | 1029 | change = (oval != nval); |
1030 | if (change) | 1030 | if (change) |
1031 | aureon_cs8415_put(ice, CS8415_CTRL2, nval); | 1031 | aureon_cs8415_put(ice, CS8415_CTRL2, nval); |
1032 | snd_ice1712_restore_gpio_status(ice); | 1032 | snd_ice1712_restore_gpio_status(ice); |
1033 | ice->spec.aureon.cs8415_mux = ucontrol->value.integer.value[0]; | 1033 | ice->spec.aureon.cs8415_mux = ucontrol->value.enumerated.item[0]; |
1034 | return change; | 1034 | return change; |
1035 | } | 1035 | } |
1036 | 1036 | ||