All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] miro: OPL4 support
@ 2005-06-24 20:50 Martin Langer
  2005-06-27 14:01 ` Clemens Ladisch
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Langer @ 2005-06-24 20:50 UTC (permalink / raw)
  To: alsa-devel

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

OPL4 support on miroSOUND PCMxx is working now. This patch makes it 
possible. Miro soundcards with OPL3 don't exist and so there's no OPL3 
fallback.

Signed-off-by: Martin Langer <martin-langer@gmx.de>

Enjoy it!
martin

[-- Attachment #2: miro_opl4.patch --]
[-- Type: text/plain, Size: 1609 bytes --]

Index: isa/opti9xx/miro.c
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/isa/opti9xx/miro.c,v
retrieving revision 1.5
diff -u -r1.5 miro.c
--- isa/opti9xx/miro.c	24 Jun 2005 07:07:06 -0000	1.5
+++ isa/opti9xx/miro.c	24 Jun 2005 19:58:42 -0000
@@ -983,14 +983,14 @@
 	case OPTi9XX_HW_82C924:
 		snd_miro_write_mask(chip, OPTi9XX_MC_REG(6), 0x02, 0x02);
 		snd_miro_write_mask(chip, OPTi9XX_MC_REG(1), 0x80, 0x80);
-		snd_miro_write_mask(chip, OPTi9XX_MC_REG(2), 0x00, 0x20);
+		snd_miro_write_mask(chip, OPTi9XX_MC_REG(2), 0x20, 0x20); /* OPL4 */
 		snd_miro_write_mask(chip, OPTi9XX_MC_REG(3), 0xf0, 0xff);
 		snd_miro_write_mask(chip, OPTi9XX_MC_REG(5), 0x02, 0x02);
 		break;
 	case OPTi9XX_HW_82C929:
 		/* untested init commands for OPTi929 */
 		snd_miro_write_mask(chip, OPTi9XX_MC_REG(1), 0x80, 0x80);
-		snd_miro_write_mask(chip, OPTi9XX_MC_REG(2), 0x00, 0x20);
+		snd_miro_write_mask(chip, OPTi9XX_MC_REG(2), 0x20, 0x20); /* OPL4 */
 		snd_miro_write_mask(chip, OPTi9XX_MC_REG(4), 0x00, 0x0c);
 		snd_miro_write_mask(chip, OPTi9XX_MC_REG(5), 0x02, 0x02);
 		break;
@@ -1394,6 +1394,14 @@
 				&rmidi)))
 			snd_printk("no MPU-401 device at 0x%lx?\n", miro->mpu_port);
 
+	if (miro->fm_port > 0 && miro->fm_port != SNDRV_AUTO_PORT) {
+		opl3_t *opl3 = NULL;
+		opl4_t *opl4;
+		if (snd_opl4_create(card, miro->fm_port, miro->fm_port - 8, 
+				    2, &opl3, &opl4) < 0)
+			snd_printk("no OPL4 device at 0x%lx\n", miro->fm_port);
+	}
+
 	if ((error = snd_set_aci_init_values(miro)) < 0) {
 		snd_card_free(card);
                 return error;

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

end of thread, other threads:[~2005-06-27 14:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-24 20:50 [PATCH] miro: OPL4 support Martin Langer
2005-06-27 14:01 ` Clemens Ladisch

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.