]> Pileus Git - ~andy/linux/commitdiff
ALSA: oxygen: Xonar DG(X): modify high-pass filter control
authorRoman Volkov <v1ron@mail.ru>
Fri, 24 Jan 2014 12:18:19 +0000 (16:18 +0400)
committerClemens Ladisch <clemens@ladisch.de>
Wed, 29 Jan 2014 19:45:52 +0000 (20:45 +0100)
Change the 'put' function of the high-pass filter control to use the new
SPI functions.

Signed-off-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
sound/pci/oxygen/xonar_dg_mixer.c

index 41ee39359bd6aa4e72d1a36eaae384b8e29d2d76..dfdfc991f8e64967f2f1c468d0569216e22d8bf6 100644 (file)
@@ -325,6 +325,8 @@ static int input_sel_put(struct snd_kcontrol *ctl,
        return changed;
 }
 
+/* ADC high-pass filter */
+
 static int hpf_info(struct snd_kcontrol *ctl, struct snd_ctl_elem_info *info)
 {
        static const char *const names[2] = { "Active", "Frozen" };
@@ -354,8 +356,10 @@ static int hpf_put(struct snd_kcontrol *ctl, struct snd_ctl_elem_value *value)
        if (value->value.enumerated.item[0])
                reg |= CS4245_HPF_FREEZE;
        changed = reg != data->cs4245_shadow[CS4245_ADC_CTRL];
-       if (changed)
-               cs4245_write(chip, CS4245_ADC_CTRL, reg);
+       if (changed) {
+               data->cs4245_shadow[CS4245_ADC_CTRL] = reg;
+               cs4245_write_spi(chip, CS4245_ADC_CTRL);
+       }
        mutex_unlock(&chip->mutex);
        return changed;
 }