summaryrefslogtreecommitdiffstats
path: root/arch/mips/sgi
diff options
context:
space:
mode:
authorUlf Carlsson <md1ulfc@mdstud.chalmers.se>1999-04-04 23:41:20 +0000
committerUlf Carlsson <md1ulfc@mdstud.chalmers.se>1999-04-04 23:41:20 +0000
commit0a271636d1be4d85b6eae089da5881653af63a7d (patch)
tree448613bcc5ffbb8be3e6c549d16cf0d542de5d8b /arch/mips/sgi
parent9abfbe7b976bdfa2465b2e43b3e05535d4ead08f (diff)
Set your volume after your preference with the front panel!
Diffstat (limited to 'arch/mips/sgi')
-rw-r--r--arch/mips/sgi/kernel/reset.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/mips/sgi/kernel/reset.c b/arch/mips/sgi/kernel/reset.c
index e6a58fa58..0dc872e64 100644
--- a/arch/mips/sgi/kernel/reset.c
+++ b/arch/mips/sgi/kernel/reset.c
@@ -1,4 +1,4 @@
-/* $Id: reset.c,v 1.6 1998/07/09 19:57:47 ralf Exp $
+/* $Id: reset.c,v 1.4 1998/07/10 01:14:50 ralf Exp $
*
* Reset a SGI.
*
@@ -129,14 +129,20 @@ static inline void power_button(void)
add_timer(&power_timer);
}
+unsigned char current_volume = 0x7f;
+
static inline void volume_up_button(void)
{
- /* Later when we have sound support ... */
+ current_volume = (current_volume < 0xe1) ? current_volume + 0x1e : 0xff;
+ hpc3c0->pbus_extregs[2][0] = current_volume;
+ hpc3c0->pbus_extregs[2][1] = current_volume;
}
static inline void volume_down_button(void)
{
- /* Later when we have sound support ... */
+ current_volume = (current_volume > 0x1e) ? current_volume - 0x1e : 0;
+ hpc3c0->pbus_extregs[2][0] = current_volume;
+ hpc3c0->pbus_extregs[2][1] = current_volume;
}
static void panel_int(int irq, void *dev_id, struct pt_regs *regs)