As I have had experience with both varieties, I will describe the procedure for setting up ALSA to drive them. The description here relates to ALSA 0.4.1x. I don't believe anything here is distribution specific, but the desktop machine has SuSE 6.1 while the laptop has SuSE 6.2.
| WARNING -- This material applies to version 0.4.x of ALSA, I'll update it for the Laptop when I get around to upgrading it. I no longer have the OPL3-SA2 in a desktop. |
You need to download the drivers, libraries and utils packages from the ALSA ftp site. The unpack the tar files and build and install in the order: drivers, libraries, utils.
./configure --with-cards=card-opl3sa2 --with-oss --with-sequencerI only used the sequencer option on the desktop machine (not sure if it actually works or not). I wasn't able to persuade the built-in isapnp support to work on my machine so I decided to stick with isapnptools.
Then run (assuming you're not already running as root):
make su -c 'make install' su -c './snddevices'
./configure make su -c 'make install'
This provides several mixers: amixer, gamix, alsamixer and xmixer2; a command line player aplay and an advanced control tool alsactl (I've never used it so I don't really know what it does).
# $Id: pnpdump.c,v 1.18 1999/02/14 22:47:18 fox Exp $
# This is free software, see the sources for details.
# This software has NO WARRANTY, use at your OWN RISK
#
# For details of this file format, see isapnp.conf(5)
#
# For latest information and FAQ on isapnp and pnpdump see:
# http://www.roestock.demon.co.uk/isapnptools/
#
# Compiler flags: -DREALTIME -DNEEDSETSCHEDULER -DABORT_ONRESERR
#
# Trying port address 0203
# Board 1 has serial identifier 96 ff ff ff ff 01 08 a8 65
# (DEBUG)
(READPORT 0x0203)
(ISOLATE PRESERVE)
(IDENTIFY *)
(VERBOSITY 2)
(CONFLICT (IO FATAL)(IRQ FATAL)(DMA FATAL)(MEM FATAL)) # or WARNING
# Card 1: (serial identifier 96 ff ff ff ff 01 08 a8 65)
# Vendor Id YMH0801, No Serial Number (-1), checksum 0x96.
# Version 1.0, Vendor version 0.0
# ANSI string -->OPL3-SA2 Sound Board<--
#
# Logical device id YMH0021
#
# Edit the entries below to uncomment out the configuration required.
# Note that only the first value of any range is given, this may be changed if required
# Don't forget to uncomment the activate (ACT Y) when happy
(CONFIGURE YMH0801/-1 (LD 0
# Multiple choice time, choose one only !
# Start dependent functions: priority preferred
# Logical device decodes 16 bit IO address lines
# Minimum IO base address 0x0220
# Maximum IO base address 0x0220
# IO base alignment 16 bytes
# Number of IO addresses required: 16
(IO 0 (SIZE 16) (BASE 0x0220))
# Logical device decodes 16 bit IO address lines
# Minimum IO base address 0x0530
# Maximum IO base address 0x0530
# IO base alignment 8 bytes
# Number of IO addresses required: 8
(IO 1 (SIZE 8) (BASE 0x0530))
# Logical device decodes 16 bit IO address lines
# Minimum IO base address 0x0388
# Maximum IO base address 0x0388
# IO base alignment 8 bytes
# Number of IO addresses required: 8
(IO 2 (SIZE 8) (BASE 0x0388))
# Logical device decodes 16 bit IO address lines
# Minimum IO base address 0x0330
# Maximum IO base address 0x0330
# IO base alignment 2 bytes
# Number of IO addresses required: 2
(IO 3 (SIZE 2) (BASE 0x0330))
# Logical device decodes 16 bit IO address lines
# Minimum IO base address 0x0370
# Maximum IO base address 0x0370
# IO base alignment 2 bytes
# Number of IO addresses required: 2
(IO 4 (SIZE 2) (BASE 0x0370))
# IRQ 5.
# High true, edge sensitive interrupt
(INT 0 (IRQ 5 (MODE +E)))
# First DMA channel 0.
# 8 bit DMA only
# Logical device is not a bus master
# DMA may execute in count by byte mode
# DMA may not execute in count by word mode
# DMA channel speed type F
(DMA 0 (CHANNEL 0))
# Next DMA channel 1.
# 8 bit DMA only
# Logical device is not a bus master
# DMA may execute in count by byte mode
# DMA may not execute in count by word mode
# DMA channel speed type F
(DMA 1 (CHANNEL 1))
# End dependent functions
(NAME "YMH0801/-1[0]{OPL3-SA2 Sound Board}")
(ACT Y)
))
#
# Logical device id YMH0022
#
# Edit the entries below to uncomment out the configuration required.
# Note that only the first value of any range is given, this may be changed if required
# Don't forget to uncomment the activate (ACT Y) when happy
(CONFIGURE YMH0801/-1 (LD 1
# Compatible device id PNPb02f
# Multiple choice time, choose one only !
# Start dependent functions: priority preferred
# Logical device decodes 16 bit IO address lines
# Minimum IO base address 0x0201
# Maximum IO base address 0x0201
# IO base alignment 1 bytes
# Number of IO addresses required: 1
(IO 0 (SIZE 1) (BASE 0x0201))
# End dependent functions
(NAME "YMH0801/-1[1]{OPL3-SA2 Sound Board}")
(ACT Y)
))
# End tag... Checksum 0x00 (OK)
# Returns all cards to the "Wait for Key" state
(WAITFORKEY)
alias char-major-116 snd
options snd snd_major=116 snd_cards_limit=1
alias char-major-14 soundcore
alias snd-card-0 snd-card-opl3sa2
options snd-card-opl3sa2 snd_index=1 snd_id="OPL3SA2" \
snd_port=0x370 \
snd_wss_port=0x530 \
snd_midi_port=-1 \
snd_fm_port=0x388 \
snd_irq=5 \
snd_dma1=0 \
snd_dma2=1
alias sound-slot-0 snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm1-oss
alias sound-service-0-12 snd-pcm1-oss
# ALSA Configuration. alias char-major-116 snd options snd snd_major=116 snd_cards_limit=1 alias char-major-14 soundcore alias snd-card-0 snd-card-opl3sa2 options snd-card-opl3sa2 \ snd_port=0x538 \ snd_wss_port=0x530 \ snd_midi_port=-1 \ snd_fm_port=0x388 \ snd_irq=5 \ snd_dma1=1 \ snd_dma2=0 alias sound-slot-0 snd-card-0 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 off alias sound-service-0-3 snd-pcm1-oss alias sound-service-0-12 snd-pcm1-oss
#!/bin/sh # A reasonable set of ALSA mixer settings to start up with. # We can always pick better ones for specific cases with the # GUI mixers AMIX='/usr/bin/amixer -q' $AMIX set Master 100% unmute $AMIX set PCM 85% unmute $AMIX set 'Input Gain' 40% $AMIX set Line 40% unmute capture
#!/bin/sh # Next set the mixer settings /usr/bin/amixer -q set Master 90% unmute /usr/bin/amixer -q set PCM 90% unmute /usr/bin/amixer -q set Line 60% unmute capture /usr/bin/amixer -q set CD 60% unmute /usr/bin/amixer -q set 'Input Gain' 50% /usr/bin/amixer -q set FM 60% unmute # Finally play something to show we're here /usr/bin/aplay -q /usr/share/sounds/au/linus-english.auN.B. It is not advisable to unmute the microphone on a Tecra 780 as the built-in microphone is very close to the built-in speaker and so if you half-close the lcd panel with an unmuted microphone, you'll get a horrible feedback loop [has the designer been fired yet? -- or merely made to listen to the results].
