aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorRoman Volkov <v1ron@mail.ru>2014-01-24 07:18:19 -0500
committerClemens Ladisch <clemens@ladisch.de>2014-01-29 14:45:52 -0500
commitfc114e9fbaf555e2d7fbfe144dac716142e22331 (patch)
treee6560f3586d8149d7d15e1a3b20a29cd10e4246e /sound
parent70e0d82d5e5d65e96f56ced3de97221fdf62cf38 (diff)
ALSA: oxygen: Xonar DG(X): modify high-pass filter control
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/oxygen/xonar_dg_mixer.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/pci/oxygen/xonar_dg_mixer.c b/sound/pci/oxygen/xonar_dg_mixer.c
index 41ee39359bd6..dfdfc991f8e6 100644
--- a/sound/pci/oxygen/xonar_dg_mixer.c
+++ b/sound/pci/oxygen/xonar_dg_mixer.c
@@ -325,6 +325,8 @@ static int input_sel_put(struct snd_kcontrol *ctl,
325 return changed; 325 return changed;
326} 326}
327 327
328/* ADC high-pass filter */
329
328static int hpf_info(struct snd_kcontrol *ctl, struct snd_ctl_elem_info *info) 330static int hpf_info(struct snd_kcontrol *ctl, struct snd_ctl_elem_info *info)
329{ 331{
330 static const char *const names[2] = { "Active", "Frozen" }; 332 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)
354 if (value->value.enumerated.item[0]) 356 if (value->value.enumerated.item[0])
355 reg |= CS4245_HPF_FREEZE; 357 reg |= CS4245_HPF_FREEZE;
356 changed = reg != data->cs4245_shadow[CS4245_ADC_CTRL]; 358 changed = reg != data->cs4245_shadow[CS4245_ADC_CTRL];
357 if (changed) 359 if (changed) {
358 cs4245_write(chip, CS4245_ADC_CTRL, reg); 360 data->cs4245_shadow[CS4245_ADC_CTRL] = reg;
361 cs4245_write_spi(chip, CS4245_ADC_CTRL);
362 }
359 mutex_unlock(&chip->mutex); 363 mutex_unlock(&chip->mutex);
360 return changed; 364 return changed;
361} 365}