]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2007-11-10 Robert Millan <rmh@aybabtu.com>
authorrobertmh <robertmh@localhost>
Sat, 10 Nov 2007 21:36:24 +0000 (21:36 +0000)
committerrobertmh <robertmh@localhost>
Sat, 10 Nov 2007 21:36:24 +0000 (21:36 +0000)
* commands/i386/pc/play.c (beep_off): Switch order of arguments
in grub_outb() calls.
(beep_on): Likewise.

ChangeLog
commands/i386/pc/play.c

index f1ce9682e5d7e434e1007410d754867cebeb1ff5..859cf7a0667734eefba8efec0678b892ba75be45 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-11-10  Robert Millan  <rmh@aybabtu.com>
+
+       * commands/i386/pc/play.c (beep_off): Switch order of arguments
+       in grub_outb() calls.
+       (beep_on): Likewise.
+
 2007-11-10  Christian Franke  <franke@computer.org>
 
        * normal/menu.c (run_menu): Check for empty menu to avoid crash.
index 450470689e560d012dba65940784c187d77ccaaa..4fbae08302dfcd711e8759363753dd954d2cdd10 100644 (file)
@@ -116,7 +116,7 @@ beep_off (void)
   unsigned char status;
 
   status = grub_inb (SPEAKER);
-  grub_outb (SPEAKER, status & ~(SPEAKER_TMR2 | SPEAKER_DATA));
+  grub_outb (status & ~(SPEAKER_TMR2 | SPEAKER_DATA), SPEAKER);
 }
 
 static void
@@ -133,15 +133,14 @@ beep_on (short pitch)
   counter = PIT_FREQUENCY / pitch;
 
   /* Program timer 2.  */
-  grub_outb (PIT_CTRL, PIT_CTRL_SELECT_2 | PIT_CTRL_READLOAD_WORD
-       | PIT_CTRL_SQUAREWAVE_GEN | PIT_CTRL_COUNT_BINARY);
-  grub_outb (PIT_COUNTER_2, counter & 0xff);           /* LSB */
-  grub_outb (PIT_COUNTER_2, (counter >> 8) & 0xff);    /* MSB */
+  grub_outb (PIT_CTRL_SELECT_2 | PIT_CTRL_READLOAD_WORD
+       | PIT_CTRL_SQUAREWAVE_GEN | PIT_CTRL_COUNT_BINARY, PIT_CTRL);
+  grub_outb (counter & 0xff, PIT_COUNTER_2);           /* LSB */
+  grub_outb ((counter >> 8) & 0xff, PIT_COUNTER_2);    /* MSB */
 
   /* Start speaker.  */
   status = grub_inb (SPEAKER);
-  grub_outb (SPEAKER, status | SPEAKER_TMR2 | SPEAKER_DATA);
-
+  grub_outb (status | SPEAKER_TMR2 | SPEAKER_DATA, SPEAKER);
 }
 
 static grub_err_t