Commit 54a19ec5 authored by Clemens Ladisch's avatar Clemens Ladisch Committed by Ben Hutchings

ALSA: oxygen: Xonar DG(X): modify DAC routing

commit 1f91ecc1 upstream.

When selecting the audio output destinations (headphones, FP headphones,
multichannel output), unnecessary I2S channels are digitally muted to
avoid invalid signal levels on the other outputs.
Signed-off-by: default avatarRoman Volkov <v1ron@mail.ru>
Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 935e68c6
......@@ -294,6 +294,16 @@ static int output_switch_put(struct snd_kcontrol *ctl,
oxygen_write16_masked(chip, OXYGEN_GPIO_DATA,
data->output_sel == 1 ? GPIO_HP_REAR : 0,
GPIO_HP_REAR);
oxygen_write8_masked(chip, OXYGEN_PLAY_ROUTING,
data->output_sel == 0 ?
OXYGEN_PLAY_MUTE01 :
OXYGEN_PLAY_MUTE23 |
OXYGEN_PLAY_MUTE45 |
OXYGEN_PLAY_MUTE67,
OXYGEN_PLAY_MUTE01 |
OXYGEN_PLAY_MUTE23 |
OXYGEN_PLAY_MUTE45 |
OXYGEN_PLAY_MUTE67);
}
mutex_unlock(&chip->mutex);
return changed;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment