All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Langer <martin-langer@gmx.de>
To: alsa-devel@alsa-project.org
Subject: [PATCH] miro: OPL4 support
Date: Fri, 24 Jun 2005 22:50:41 +0200	[thread overview]
Message-ID: <20050624205040.GA3115@tuba> (raw)

[-- 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;

             reply	other threads:[~2005-06-24 20:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-24 20:50 Martin Langer [this message]
2005-06-27 14:01 ` [PATCH] miro: OPL4 support Clemens Ladisch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050624205040.GA3115@tuba \
    --to=martin-langer@gmx.de \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.