[ALSA] AdLib FM card driver
authorRene Herman <rene.herman@keyaccess.nl>
Tue, 28 Mar 2006 10:38:20 +0000 (12:38 +0200)
committerJaroslav Kysela <perex@suse.cz>
Fri, 31 Mar 2006 15:58:59 +0000 (17:58 +0200)
Attached you'll find an ALSA driver for AdLib FM cards. An AdLib card is
just an OPL2, which was already supported by sound/drivers/opl3, so only
very minimal bus-glue is needed. The patch applies cleanly to both
2.6.16 and 2.6.16-mm1.

The driver has been tested with an actual ancient 8-bit ISA AdLib card
and works fine. It also works fine for an OPL3 {,emulation} as still
found on many ISA soundcards but given that AdLib cards don't have their
own mixer, upping the volume from 0 might be a problem without the card
driver already loaded and driving the OPL3.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Documentation/sound/alsa/ALSA-Configuration.txt
sound/isa/Kconfig
sound/isa/Makefile
sound/isa/adlib.c [new file with mode: 0644]

index a8c3c7e..0ee2c7d 100644 (file)
@@ -120,6 +120,34 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
     enable     - enable card
                - Default: enabled, for PCI and ISA PnP cards
 
+  Module snd-adlib
+  ----------------
+
+    Module for AdLib FM cards.
+
+    port       - port # for OPL chip
+
+    This module supports multiple cards. It does not support autoprobe, so
+    the port must be specified. For actual AdLib FM cards it will be 0x388.
+    Note that this card does not have PCM support and no mixer; only FM
+    synthesis.
+
+    Make sure you have "sbiload" from the alsa-tools package available and,
+    after loading the module, find out the assigned ALSA sequencer port
+    number through "sbiload -l". Example output:
+
+      Port     Client name                       Port name
+      64:0     OPL2 FM synth                     OPL2 FM Port
+
+    Load the std.sb and drums.sb patches also supplied by sbiload:
+
+      sbiload -p 64:0 std.sb drums.sb
+
+    If you use this driver to drive an OPL3, you can use std.o3 and drums.o3
+    instead. To have the card produce sound, use aplaymidi from alsa-utils:
+
+      aplaymidi -p 64:0 foo.mid
+
   Module snd-ad1816a
   ------------------
 
index 2a1c733..557c4de 100644 (file)
@@ -11,6 +11,15 @@ config SND_CS4231_LIB
         tristate
         select SND_PCM
 
+config SND_ADLIB
+       tristate "AdLib FM card"
+       select SND_OPL3_LIB
+       help
+         Say Y here to include support for AdLib FM cards.
+
+         To compile this driver as a module, choose M here: the module
+         will be called snd-adlib.
+
 config SND_AD1816A
        tristate "Analog Devices SoundPort AD1816A"
        depends on SND && PNP && ISA
index 05724eb..bb317cc 100644 (file)
@@ -3,6 +3,7 @@
 # Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
 #
 
+snd-adlib-objs := adlib.o
 snd-als100-objs := als100.o
 snd-azt2320-objs := azt2320.o
 snd-cmi8330-objs := cmi8330.o
@@ -13,6 +14,7 @@ snd-sgalaxy-objs := sgalaxy.o
 snd-sscape-objs := sscape.o
 
 # Toplevel Module Dependency
+obj-$(CONFIG_SND_ADLIB) += snd-adlib.o
 obj-$(CONFIG_SND_ALS100) += snd-als100.o
 obj-$(CONFIG_SND_AZT2320) += snd-azt2320.o
 obj-$(CONFIG_SND_CMI8330) += snd-cmi8330.o
Simple merge