aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/maestro3.c
diff options
context:
space:
mode:
authorVille Syrjala <syrjala@sci.fi>2005-05-12 08:20:57 -0400
committerJaroslav Kysela <perex@suse.cz>2005-05-29 04:08:26 -0400
commit091bf4dcab10b083f944d4eafbe0c734786485fe (patch)
tree34e98a38fd1eb44ad01ee013e47dc525120a9851 /sound/pci/maestro3.c
parentdb68d15da00f64bef2c8c822baab42aff39ae774 (diff)
[ALSA] maestro3: HP OmniBook HW volume button magic
Maestro3 driver Some HP OmniBook laptops (500 and 6000 at least) require some GPIO magic before the HW volume buttons work. This patch makes them work mostly. Something is still missing to make them work perfectly. However I have been unable to figure out what exactly. Signed-off-by: Ville Syrjala <syrjala@sci.fi> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/maestro3.c')
-rw-r--r--sound/pci/maestro3.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c
index c1c7eeeb199b..3690ea05b042 100644
--- a/sound/pci/maestro3.c
+++ b/sound/pci/maestro3.c
@@ -2392,6 +2392,18 @@ snd_m3_chip_init(m3_t *chip)
2392 DISABLE_LEGACY); 2392 DISABLE_LEGACY);
2393 pci_write_config_word(pcidev, PCI_LEGACY_AUDIO_CTRL, w); 2393 pci_write_config_word(pcidev, PCI_LEGACY_AUDIO_CTRL, w);
2394 2394
2395 /*
2396 * Volume buttons on some HP OmniBook laptops (500 and 6000 at least)
2397 * don't work correctly. This makes them work for the most part.
2398 * Volume up and down buttons on the laptop side work perfectly.
2399 * Fn+cursor_up (volme up) works, Fn+cursor_down (volume down) doesn't,
2400 * Fn+F8 (mute) works acts as volume up.
2401 */
2402 outw(~(GPI_VOL_DOWN|GPI_VOL_UP), io + GPIO_MASK);
2403 outw(inw(io + GPIO_DIRECTION) & ~(GPI_VOL_DOWN|GPI_VOL_UP), io + GPIO_DIRECTION);
2404 outw((GPI_VOL_DOWN|GPI_VOL_UP), io + GPIO_DATA);
2405 outw(0xffff, io + GPIO_MASK);
2406
2395 pci_read_config_dword(pcidev, PCI_ALLEGRO_CONFIG, &n); 2407 pci_read_config_dword(pcidev, PCI_ALLEGRO_CONFIG, &n);
2396 n &= ~HV_BUTTON_FROM_GD; 2408 n &= ~HV_BUTTON_FROM_GD;
2397 n |= HV_CTRL_ENABLE | REDUCED_DEBOUNCE; 2409 n |= HV_CTRL_ENABLE | REDUCED_DEBOUNCE;