Skip to content

Commit

Permalink
ALSA: oxygen: modify adjust_dg_dac_routing function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roman Volkov authored and Greg Kroah-Hartman committed Mar 24, 2014
1 parent dba7949 commit 212b465
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sound/pci/oxygen/xonar_dg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 212b465

Please sign in to comment.