[ALSA] ice1712 - Fix wrong value types for enum items
authorTakashi Iwai <tiwai@suse.de>
Mon, 20 Mar 2006 17:31:57 +0000 (18:31 +0100)
committerJaroslav Kysela <perex@suse.cz>
Wed, 22 Mar 2006 09:39:31 +0000 (10:39 +0100)
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>
sound/pci/ice1712/aureon.c

index 0f7f4d8263c0eb1d186b095f928daaa7407f7bb2..7e6608b14abce345187fee04495d1550ef995cba 100644 (file)
@@ -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;
 }