lkml.org 
[lkml]   [2001]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[patch] Bug-fix for Maestro dock/hardware volume control patch
From
Date
This patch, to be applied on top of the patch sent to
linux-kernel last week, fixes a bug which caused the driver to
crash on insertion if a hardware volume button had been pushed.

--- linux-2.4.4-ac12.vanilla/drivers/sound/maestro.c Mon May 21 19:18:49 2001
+++ linux-2.4.5pre1/drivers/sound/maestro.c Mon May 21 18:27:39 2001
@@ -3226,7 +3359,7 @@
outw(w, iobase+0x18);

w=inw(iobase+0x18);
- w|=1<<6; /* Hardware volume control interrupt on. */
+ w&=~(1<<6); /* Hardware volume control interrupt off... for now. */
outw(w, iobase+0x18);

w=inw(iobase+0x18);
@@ -3549,6 +3680,15 @@
kfree(card);
return 0;
}
+
+ /* Turn on hardware volume control interrupt.
+ This has to come after we grab the IRQ above,
+ or a crash will result on installation if a button has been pressed,
+ because in that case we'll get an immediate interrupt. */
+ n = inw(iobase+0x18);
+ n|=(1<<6);
+ outw(n, iobase+0x18);
+
/* now go to sleep 'till something interesting happens */
maestro_power(card,ACPI_D2);


--
Ben Pfaff <pfaffben@msu.edu> <pfaffben@debian.org> <blp@gnu.org>
MSU Student - Debian GNU/Linux Maintainer - GNU Developer
Personal webpage: http://www.msu.edu/user/pfaffben
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:53    [W:1.014 / U:3.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site