Skip to content

Commit a9467db

Browse files
Roman Volkovpopcornmix
authored andcommitted
ALSA: oxygen: modify adjust_dg_dac_routing function
commit 1f91ecc upstream. When selecting the audio output destinations (headphones, FP headphones, multichannel output), the channel routing should be changed depending on what destination selected. Also unnecessary I2S channels are digitally muted. This function called when the user selects the destination in the ALSA mixer. Signed-off-by: Roman Volkov <v1ron@mail.ru> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4588502 commit a9467db

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎sound/pci/oxygen/xonar_dg.c‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,16 @@ static int output_switch_put(struct snd_kcontrol *ctl,
294294
oxygen_write16_masked(chip, OXYGEN_GPIO_DATA,
295295
data->output_sel == 1 ? GPIO_HP_REAR : 0,
296296
GPIO_HP_REAR);
297+
oxygen_write8_masked(chip, OXYGEN_PLAY_ROUTING,
298+
data->output_sel == 0 ?
299+
OXYGEN_PLAY_MUTE01 :
300+
OXYGEN_PLAY_MUTE23 |
301+
OXYGEN_PLAY_MUTE45 |
302+
OXYGEN_PLAY_MUTE67,
303+
OXYGEN_PLAY_MUTE01 |
304+
OXYGEN_PLAY_MUTE23 |
305+
OXYGEN_PLAY_MUTE45 |
306+
OXYGEN_PLAY_MUTE67);
297307
}
298308
mutex_unlock(&chip->mutex);
299309
return changed;

0 commit comments

Comments
 (0)