diff -Naur linux-2.4.18-4.orig/Documentation/sound/Maestro3 linux/Documentation/sound/Maestro3 --- linux-2.4.18-4.orig/Documentation/sound/Maestro3 Sun Feb 4 13:05:29 2001 +++ linux/Documentation/sound/Maestro3 Wed Jun 5 13:52:07 2002 @@ -71,10 +71,18 @@ tell the driver to print minimal debugging information as it runs. This can be collected with 'dmesg' or through the klogd daemon. -The other is 'external_amp', which tells the driver to attempt to enable +One is 'external_amp', which tells the driver to attempt to enable an external amplifier. This defaults to '1', you can tell the driver not to bother enabling such an amplifier by setting it to '0'. +And the last is 'gpio_pin', which tells the driver which GPIO pin number +the external amp uses (0-15), The Allegro uses 8 by default, all others 1. +If everything loads correctly and seems to be working but you get no sound, +try tweaking this value. + +Systems known to need a different value + Panasonic ToughBook CF-72: gpio_pin=13 + Power Management ---------------- diff -Naur linux-2.4.18-4.orig/drivers/sound/maestro3.c linux/drivers/sound/maestro3.c --- linux-2.4.18-4.orig/drivers/sound/maestro3.c Wed Jun 5 11:41:59 2002 +++ linux/drivers/sound/maestro3.c Wed Jun 5 13:44:12 2002 @@ -28,6 +28,9 @@ * Shouts go out to Mike "DJ XPCom" Ang. * * History + * v1.23 - Jun 5 2002 - Michael Olson + * added a module option to allow selection of GPIO pin number + * for external amp * v1.22 - Feb 28 2001 - Zach Brown * allocate mem at insmod/setup, rather than open * limit pci dma addresses to 28bit, thanks guys. @@ -153,7 +156,7 @@ #define M_DEBUG 1 -#define DRIVER_VERSION "1.22" +#define DRIVER_VERSION "1.23" #define M3_MODULE_NAME "maestro3" #define PFX M3_MODULE_NAME ": " @@ -190,6 +193,7 @@ }; int external_amp = 1; +int gpio_pin = -1; struct m3_state { unsigned int magic; @@ -2469,14 +2473,18 @@ if(!external_amp) return; - switch (card->card_type) { - case ESS_ALLEGRO: - polarity_port = 0x1800; - break; - default: - /* presumably this is for all 'maestro3's.. */ - polarity_port = 0x1100; - break; + if (0 <= gpio_pin <= 15) { + polarity_port = 0x1000 + (0x100 * gpio_pin); + } else { + switch (card->card_type) { + case ESS_ALLEGRO: + polarity_port = 0x1800; + break; + default: + /* presumably this is for all 'maestro3's.. */ + polarity_port = 0x1100; + break; + } } gpo = (polarity_port >> 8) & 0x0F; @@ -2911,6 +2919,7 @@ MODULE_PARM(debug,"i"); #endif MODULE_PARM(external_amp,"i"); +MODULE_PARM(gpio_pin, "i"); static struct pci_driver m3_pci_driver = { name: "ess_m3_audio",