aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2010-09-09 06:18:35 -0400
committerTakashi Iwai <tiwai@suse.de>2010-09-09 04:53:23 -0400
commitda0dab5ecb5001f76e739e71ee199db4c61e7af2 (patch)
treec9573207f04aeb54fcc304118dbca2fcc06121dc
parentc8bdfacb63c85d39ff55d365f1e48cce011b219e (diff)
ALSA: virtuoso: fix WM8766 register writes with MSB
The check for the volume update latch bit was accidentally in the wrong function, where it would prevent the MSB from being written, instead of correctly ignoring it for cached values. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/oxygen/xonar_wm87x6.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/pci/oxygen/xonar_wm87x6.c b/sound/pci/oxygen/xonar_wm87x6.c
index b82c1cfa96f5..4346006df3ec 100644
--- a/sound/pci/oxygen/xonar_wm87x6.c
+++ b/sound/pci/oxygen/xonar_wm87x6.c
@@ -97,8 +97,12 @@ static void wm8766_write(struct oxygen *chip,
97 (0 << OXYGEN_SPI_CODEC_SHIFT) | 97 (0 << OXYGEN_SPI_CODEC_SHIFT) |
98 OXYGEN_SPI_CEN_LATCH_CLOCK_LO, 98 OXYGEN_SPI_CEN_LATCH_CLOCK_LO,
99 (reg << 9) | value); 99 (reg << 9) | value);
100 if (reg < ARRAY_SIZE(data->wm8766_regs)) 100 if (reg < ARRAY_SIZE(data->wm8766_regs)) {
101 if ((reg >= WM8766_LDA1 && reg <= WM8766_RDA1) ||
102 (reg >= WM8766_LDA2 && reg <= WM8766_MASTDA))
103 value &= ~WM8766_UPDATE;
101 data->wm8766_regs[reg] = value; 104 data->wm8766_regs[reg] = value;
105 }
102} 106}
103 107
104static void wm8766_write_cached(struct oxygen *chip, 108static void wm8766_write_cached(struct oxygen *chip,
@@ -107,12 +111,8 @@ static void wm8766_write_cached(struct oxygen *chip,
107 struct xonar_wm87x6 *data = chip->model_data; 111 struct xonar_wm87x6 *data = chip->model_data;
108 112
109 if (reg >= ARRAY_SIZE(data->wm8766_regs) || 113 if (reg >= ARRAY_SIZE(data->wm8766_regs) ||
110 value != data->wm8766_regs[reg]) { 114 value != data->wm8766_regs[reg])
111 if ((reg >= WM8766_LDA1 && reg <= WM8766_RDA1) ||
112 (reg >= WM8766_LDA2 && reg <= WM8766_MASTDA))
113 value &= ~WM8766_UPDATE;
114 wm8766_write(chip, reg, value); 115 wm8766_write(chip, reg, value);
115 }
116} 116}
117 117
118static void wm8776_registers_init(struct oxygen *chip) 118static void wm8776_registers_init(struct oxygen *chip)