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>
This commit is contained in:
Родитель
c8bdfacb63
Коммит
da0dab5ecb
|
@ -97,8 +97,12 @@ static void wm8766_write(struct oxygen *chip,
|
||||||
(0 << OXYGEN_SPI_CODEC_SHIFT) |
|
(0 << OXYGEN_SPI_CODEC_SHIFT) |
|
||||||
OXYGEN_SPI_CEN_LATCH_CLOCK_LO,
|
OXYGEN_SPI_CEN_LATCH_CLOCK_LO,
|
||||||
(reg << 9) | value);
|
(reg << 9) | value);
|
||||||
if (reg < ARRAY_SIZE(data->wm8766_regs))
|
if (reg < ARRAY_SIZE(data->wm8766_regs)) {
|
||||||
|
if ((reg >= WM8766_LDA1 && reg <= WM8766_RDA1) ||
|
||||||
|
(reg >= WM8766_LDA2 && reg <= WM8766_MASTDA))
|
||||||
|
value &= ~WM8766_UPDATE;
|
||||||
data->wm8766_regs[reg] = value;
|
data->wm8766_regs[reg] = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wm8766_write_cached(struct oxygen *chip,
|
static void wm8766_write_cached(struct oxygen *chip,
|
||||||
|
@ -107,12 +111,8 @@ static void wm8766_write_cached(struct oxygen *chip,
|
||||||
struct xonar_wm87x6 *data = chip->model_data;
|
struct xonar_wm87x6 *data = chip->model_data;
|
||||||
|
|
||||||
if (reg >= ARRAY_SIZE(data->wm8766_regs) ||
|
if (reg >= ARRAY_SIZE(data->wm8766_regs) ||
|
||||||
value != data->wm8766_regs[reg]) {
|
value != data->wm8766_regs[reg])
|
||||||
if ((reg >= WM8766_LDA1 && reg <= WM8766_RDA1) ||
|
|
||||||
(reg >= WM8766_LDA2 && reg <= WM8766_MASTDA))
|
|
||||||
value &= ~WM8766_UPDATE;
|
|
||||||
wm8766_write(chip, reg, value);
|
wm8766_write(chip, reg, value);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wm8776_registers_init(struct oxygen *chip)
|
static void wm8776_registers_init(struct oxygen *chip)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче