All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] opti931: additional check for OPL3 device
@ 2007-09-14 14:35 Krzysztof Helt
  2007-09-14 14:52 ` Clemens Ladisch
  2007-09-14 16:33 ` Rene Herman
  0 siblings, 2 replies; 14+ messages in thread
From: Krzysztof Helt @ 2007-09-14 14:35 UTC (permalink / raw)
  To: ALSA devel

[-- Attachment #1: Type: text/plain, Size: 533 bytes --]

From: Krzysztof Helt <krzysztof.h1@wp.pl>

This patch adds additional check for OPL3 device. I found that PNP
region returned
by the card is 0x380 - 0x38f but the OPL3 device is located at 0x388
(standard FM
device address). The driver checks start of the range (0x380) which is
incorrect.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
---

The same problem appears on two cards I have with Opti chipset:
opti931 and opti933.
If someone can test if the opti92x PnP has the same problem I would be grateful.

Regards,
Krzysztof

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: opti-fm.diff --]
[-- Type: text/x-patch; name="opti-fm.diff", Size: 1219 bytes --]

diff -urp linux-2.6.22.old/sound/isa/opti9xx/opti92x-ad1848.c linux-2.6.22/sound/isa/opti9xx/opti92x-ad1848.c
--- linux-2.6.22.old/sound/isa/opti9xx/opti92x-ad1848.c	2007-09-08 13:37:59.000000000 +0200
+++ linux-2.6.22/sound/isa/opti9xx/opti92x-ad1848.c	2007-09-13 23:54:02.000000000 +0200
@@ -1890,12 +1890,26 @@ static int __devinit snd_opti9xx_probe(s
 			}
 		}
 #endif	/* !OPTi93X */
-		if (!opl3 && snd_opl3_create(card,
-					     chip->fm_port,
-					     chip->fm_port + 2,
-					     OPL3_HW_AUTO, 0, &opl3) < 0) {
-			snd_printk(KERN_WARNING "no OPL device at 0x%lx-0x%lx\n",
-				   chip->fm_port, chip->fm_port + 4 - 1);
+		if (!opl3) {
+			error = snd_opl3_create(card,
+						chip->fm_port,
+						chip->fm_port + 2,
+						OPL3_HW_AUTO, 0, &opl3);
+			if (error < 0 && chip->fm_port == 0x380) {
+				error = snd_opl3_create(card,
+							chip->fm_port + 8,
+							chip->fm_port + 10,
+							OPL3_HW_AUTO, 0, &opl3);
+			}
+			if (error < 0) {
+				snd_printk(KERN_WARNING
+					   "no OPL device at 0x%lx-0x%lx "
+					   "or 0x%lx-0x%lx\n",
+					   chip->fm_port,
+					   chip->fm_port + 4 - 1,
+					   chip->fm_port + 8,
+					   chip->fm_port + 12 - 1);
+			}
 		}
 		if (opl3) {
 #ifdef CS4231

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2007-09-17 23:05 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-14 14:35 [PATCH] opti931: additional check for OPL3 device Krzysztof Helt
2007-09-14 14:52 ` Clemens Ladisch
2007-09-14 16:47   ` Krzysztof Helt
2007-09-17  8:14     ` Clemens Ladisch
2007-09-17 10:10       ` Rene Herman
2007-09-17 10:39         ` Clemens Ladisch
2007-09-17 12:26           ` Rene Herman
2007-09-17 12:26           ` Krzysztof Helt
2007-09-17 12:40             ` Rene Herman
2007-09-17 13:57               ` Rene Herman
2007-09-17 14:45               ` Krzysztof Helt
2007-09-17 15:09                 ` Takashi Iwai
2007-09-17 23:04                 ` Rene Herman
2007-09-14 16:33 ` Rene Herman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.