* [PATCH 3/3] maestro3: HP OmniBook HW volume button magic
@ 2005-04-21 19:08 Ville Syrjala
2005-05-12 13:21 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Ville Syrjala @ 2005-04-21 19:08 UTC (permalink / raw)
To: alsa-devel
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>
---
maestro3.c | 12 ++++++++++++
1 files changed, 12 insertions(+)
diff -urN linux/sound/pci/maestro3.c linux/sound/pci/maestro3.c
--- linux/sound/pci/maestro3.c 2005-04-21 21:43:56.000000000 +0300
+++ linux/sound/pci/maestro3.c 2005-04-21 21:44:06.000000000 +0300
@@ -2392,6 +2392,18 @@
DISABLE_LEGACY);
pci_write_config_word(pcidev, PCI_LEGACY_AUDIO_CTRL, w);
+ /*
+ * Volume buttons on some HP OmniBook laptops (500 and 6000 at least)
+ * don't work correctly. This makes them work for the most part.
+ * Volume up and down buttons on the laptop side work perfectly.
+ * Fn+cursor_up (volme up) works, Fn+cursor_down (volume down) doesn't,
+ * Fn+F8 (mute) works acts as volume up.
+ */
+ outw(~(GPI_VOL_DOWN|GPI_VOL_UP), io + GPIO_MASK);
+ outw(inw(io + GPIO_DIRECTION) & ~(GPI_VOL_DOWN|GPI_VOL_UP), io + GPIO_DIRECTION);
+ outw((GPI_VOL_DOWN|GPI_VOL_UP), io + GPIO_DATA);
+ outw(0xffff, io + GPIO_MASK);
+
pci_read_config_dword(pcidev, PCI_ALLEGRO_CONFIG, &n);
n &= ~HV_BUTTON_FROM_GD;
n |= HV_CTRL_ENABLE | REDUCED_DEBOUNCE;
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-12 13:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-21 19:08 [PATCH 3/3] maestro3: HP OmniBook HW volume button magic Ville Syrjala
2005-05-12 13:21 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.