From: Takashi Iwai Date: Mon, 20 Mar 2006 17:31:57 +0000 (+0100) Subject: [ALSA] ice1712 - Fix wrong value types for enum items X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6682025e1220a1ab0b6b855b7805928c3163e043;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [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 --- 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 mutex_lock(&ice->gpio_mutex); val = wm_get(ice, WM_ADC_MUX); - ucontrol->value.integer.value[0] = val & 7; - ucontrol->value.integer.value[1] = (val >> 4) & 7; + ucontrol->value.enumerated.item[0] = val & 7; + ucontrol->value.enumerated.item[1] = (val >> 4) & 7; mutex_unlock(&ice->gpio_mutex); return 0; } @@ -970,8 +970,8 @@ static int wm_adc_mux_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_val snd_ice1712_save_gpio_status(ice); oval = wm_get(ice, WM_ADC_MUX); nval = oval & ~0x77; - nval |= ucontrol->value.integer.value[0] & 7; - nval |= (ucontrol->value.integer.value[1] & 7) << 4; + nval |= ucontrol->value.enumerated.item[0] & 7; + nval |= (ucontrol->value.enumerated.item[1] & 7) << 4; change = (oval != nval); if (change) 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 //snd_ice1712_save_gpio_status(ice); //val = aureon_cs8415_get(ice, CS8415_CTRL2); - ucontrol->value.integer.value[0] = ice->spec.aureon.cs8415_mux; + ucontrol->value.enumerated.item[0] = ice->spec.aureon.cs8415_mux; //snd_ice1712_restore_gpio_status(ice); return 0; } @@ -1025,12 +1025,12 @@ static int aureon_cs8415_mux_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e snd_ice1712_save_gpio_status(ice); oval = aureon_cs8415_get(ice, CS8415_CTRL2); nval = oval & ~0x07; - nval |= ucontrol->value.integer.value[0] & 7; + nval |= ucontrol->value.enumerated.item[0] & 7; change = (oval != nval); if (change) aureon_cs8415_put(ice, CS8415_CTRL2, nval); snd_ice1712_restore_gpio_status(ice); - ice->spec.aureon.cs8415_mux = ucontrol->value.integer.value[0]; + ice->spec.aureon.cs8415_mux = ucontrol->value.enumerated.item[0]; return change; }