Commit b02555c3 authored by Zoltan Devai's avatar Zoltan Devai Committed by Takashi Iwai

ALSA: Fix PIT lockup on some chipsets when using the PC-Speaker

Fix PIT lockup on some chipsets when using the PC-Speaker.
Signed-off-by: default avatarZoltan Devai <zdevai@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 219df32f
...@@ -24,13 +24,13 @@ static void pcspkr_do_sound(unsigned int count) ...@@ -24,13 +24,13 @@ static void pcspkr_do_sound(unsigned int count)
spin_lock_irqsave(&i8253_lock, flags); spin_lock_irqsave(&i8253_lock, flags);
if (count) { if (count) {
/* enable counter 2 */
outb_p(inb_p(0x61) | 3, 0x61);
/* set command for counter 2, 2 byte write */ /* set command for counter 2, 2 byte write */
outb_p(0xB6, 0x43); outb_p(0xB6, 0x43);
/* select desired HZ */ /* select desired HZ */
outb_p(count & 0xff, 0x42); outb_p(count & 0xff, 0x42);
outb((count >> 8) & 0xff, 0x42); outb((count >> 8) & 0xff, 0x42);
/* enable counter 2 */
outb_p(inb_p(0x61) | 3, 0x61);
} else { } else {
/* disable counter 2 */ /* disable counter 2 */
outb(inb_p(0x61) & 0xFC, 0x61); outb(inb_p(0x61) & 0xFC, 0x61);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment