diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2008-04-09 09:16:14 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-04-24 12:00:32 +0200 |
commit | 11864b4b84194b459fc20e0ec47906885bddb12e (patch) | |
tree | cd50f762af2aa05c25657ee7d5486a2b67d66a52 /sound/pci/oxygen/oxygen_mixer.c | |
parent | a9d3cc485e65a56edc9ef78c034146cc8a5b3101 (diff) |
[ALSA] virtuoso: correctly switch input jack on Xonar DX
When selecting the capture source on the Xonar DX, the input jack must
be routed to either the line input or the microphone input by setting a
GPIO pin. This requires an additional callback so that the model driver
can hook into the toggling of AC97 switches.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/oxygen/oxygen_mixer.c')
-rw-r--r-- | sound/pci/oxygen/oxygen_mixer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/oxygen/oxygen_mixer.c b/sound/pci/oxygen/oxygen_mixer.c index 9a7c880eddb..d0bef09a699 100644 --- a/sound/pci/oxygen/oxygen_mixer.c +++ b/sound/pci/oxygen/oxygen_mixer.c @@ -518,6 +518,8 @@ static void mute_ac97_ctl(struct oxygen *chip, unsigned int control) value = oxygen_read_ac97(chip, 0, priv_idx); if (!(value & 0x8000)) { oxygen_write_ac97(chip, 0, priv_idx, value | 0x8000); + if (chip->model->ac97_switch) + chip->model->ac97_switch(chip, priv_idx, 0x8000); snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, &chip->controls[control]->id); } @@ -544,6 +546,8 @@ static int ac97_switch_put(struct snd_kcontrol *ctl, change = newreg != oldreg; if (change) { oxygen_write_ac97(chip, codec, index, newreg); + if (codec == 0 && chip->model->ac97_switch) + chip->model->ac97_switch(chip, index, newreg & 0x8000); if (index == AC97_LINE) { oxygen_write_ac97_masked(chip, 0, CM9780_GPIO_STATUS, newreg & 0x8000 ? |