Skip to content

Commit

Permalink
ALSA: oxygen: Xonar DG(X): modify high-pass filter control
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roman Volkov authored and Clemens Ladisch committed Jan 29, 2014
1 parent 70e0d82 commit fc114e9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sound/pci/oxygen/xonar_dg_mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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" };
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit fc114e9

Please sign in to comment.