From alsa-user-owner@alsa.jcu.cz  Sun Oct 25 05:03:24 1998
Received: from slinky.scrye.com (IDENT:tkil@slinky.scrye.com [216.17.141.11])
	by marvin.jcu.cz (8.9.1a/8.9.1) with ESMTP id FAA27627
	for <alsa-user@alsa.jcu.cz>; Sun, 25 Oct 1998 05:01:42 +0100
Received: (from tkil@localhost)
	by slinky.scrye.com (8.8.7/8.8.7) id WAA03392;
	Sat, 24 Oct 1998 22:01:32 -0600
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Date: Sat, 24 Oct 1998 22:01:32 -0600 (MDT)
To: Meino Christian Cramer <root@solfire.ludwigsburg.netsurf.de>
CC: alsa-user@alsa.jcu.cz
Subject: Re: v2.1.125: Sound problems with GUS PnP
In-Reply-To: <19981023184834K.root@solfire.ludwigsburg.netsurf.de>
References: <gvhlci5te.fsf@scrye.com>
	<19981023184834K.root@solfire.ludwigsburg.netsurf.de>
Message-ID: <13874.39459.236233.757142@slinky.scrye.com>
From: Tkil <tkil@scrye.com>
Reply-To: alsa-user@alsa.jcu.cz
Sender: alsa-user-owner@alsa.jcu.cz
Precedence: list


[Meino posted a question to linux-kernel indicating that he was having 
difficulties getting kernel 2.1.125 to talk to his GUS PnP.  i
indicated that i was having success with this hardware/kernel
combination, by using the ALSA suite.  this e-mail is my response to
his request for more information.  i'm CC'ing this to the alsa-user
mailing list, in the hopes that it may be useful for others as well.]

just as an alert, i upgraded to 2.1.126 today.  other than some
stupidity on my part with the patching, it went flawlessly -- and i
only had to recompile the alsa-driver (not that i've tried doing
anything fancy, but things seem to work without recompiling alsa-libs
and alsa-utils)

>>>>> "Meino" == Meino Christian Cramer <root@solfire.ludwigsburg.netsurf.de> writes:

Meino>  I played around with pnpdump and it simply frozes my box
Meino>  instantly? What did I wrong? 

the older versions of pnpdump had warnings that running it more than
once per cold boot could cause lockups.

i think i experienced this once with an older version of the
isapnptools, but the current version (1.16) doesn't seem to have the
same problem.  either that, or i only did it once.  :)

you might have to make sure that you're not forcing any ISA PnP
configuration through your system's BIOS; i'm not.  i just used
'pnpdump', selected pretty much the first configuration, then set up
my init scripts to run 'isapnp' at boot time.

Meino> Would you please send me your setting/config-files with a
Meino> output of

ok, here's what things look like with everything set up proper.  there 
are three main things to look at here:

1. what does my system look like (proc/*, lsmod) when i have ALSA up
   and running?

2. what config files (/etc/conf.modules, /etc/isapnp.conf) am i using?
    in particular, the conf.modules is lifted almost directly from the 
    alsa-driver documentation; i made a few modifications, but the one 
    that is supplied also works just about perfectly.

3. how have i changed my startup scripts (/etc/rc.d/*) to load this
   stuff at boot time?

   note that the "rc.sysinit" isn't complete; i only excerpted the
   parts that i felt were relevant.  (i just want to make sure that
   no-one tries to run their system with just those few lines in
   there!)

anyway, here's the info:

### system state info ###

$ cd /proc

$ cat interrupts
           CPU0       
  0:     644313          XT-PIC  timer
  1:      22545          XT-PIC  keyboard
  2:          0          XT-PIC  cascade
  9:      47519          XT-PIC  ncr53c8xx
 10:       5911          XT-PIC  Digital DS21140 Tulip
 11:      10688          XT-PIC  InterWave
 12:      62183          XT-PIC  PS/2 Mouse
 13:          1          XT-PIC  fpu
 14:          2          XT-PIC  ide0
 15:       3910          XT-PIC  ide1
NMI:          0

$ cat dma
 4: cascade
 5: GFA1/CS4231 record
 7: CS4231 playback

$ cat ioports
0000-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0080-008f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : fpu
0170-0177 : ide1
01f0-01f7 : ide0
0220-022f : InterWave (Adlib/SB compatibility)
02f8-02ff : serial(auto)
0320-032b : InterWave (synthesizer)
032c-032f : InterWave (CS4231)
0376-0376 : ide1
03c0-03df : vga+
03f6-03f6 : ide0
03f8-03ff : serial(auto)
f400-f407 : ide0
f408-f40f : ide1
f600-f67f : ncr53c8xx
f700-f77f : Digital DS21140 Tulip

$ cat devices 
Character devices:
  1 mem
  2 pty
  3 ttyp
  4 ttyS
  5 cua
  7 vcs
 10 misc
 14 snd
128 ptm
136 pts

Block devices:
  2 fd
  3 ide0
  8 sd
 22 ide1

$ lsmod
Module                  Size  Used by
snd-pcm1-oss           13108   0 
snd-interwave           5640   1 
snd-gus                24972   0  [snd-interwave]
snd-synth               1132   0  [snd-gus]
snd-cs4231              9676   0  [snd-interwave]
snd-timer               2956   0  [snd-gus snd-cs4231]
snd-mixer              13460   1  [snd-pcm1-oss snd-interwave snd-gus snd-cs4231]
snd-pcm1               14380   0  [snd-pcm1-oss snd-gus snd-cs4231]
snd-midi               12364   0  [snd-interwave snd-gus]
snd-pcm                 6540   0  [snd-pcm1-oss snd-interwave snd-gus snd-cs4231 snd-pcm1]
snd                    25440   0  [snd-pcm1-oss snd-interwave snd-gus snd-synth snd-cs4231 snd-timer snd-mixer snd-pcm1 snd-midi snd-pcm]

### config files ###

$ cd /etc

$ cat isapnp.conf 
# $Id: pnpdump.c,v 1.16 1998/10/09 22:19:06 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 on isapnp and pnpdump see:
# http://www.roestock.demon.co.uk/isapnptools/
#
# Compiler flags: -DREALTIME
#
# Trying port address 0203
# Board 1 has serial identifier 8c 09 00 00 00 01 00 56 1e

# (DEBUG)
(READPORT 0x0203)
(ISOLATE PRESERVE)
(IDENTIFY *)
(VERBOSITY 2)
(CONFLICT (IO FATAL)(IRQ FATAL)(DMA FATAL)(MEM FATAL)) # or WARNING

# Card 1: (serial identifier 8c 09 00 00 00 01 00 56 1e)
# Vendor Id GRV0001, Serial Number 150994944, checksum 0x8C.
# Version 1.0, Vendor version 1.2
# ANSI string -->UltraSound Plug & Play<--
#
# Logical device id GRV0000
#     Device support I/O range check register
#
# 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 GRV0001/150994944 (LD 0
#     Vendor defined tag:  72 fd ff
#     ANSI string -->Synth & Codec<--

# Multiple choice time, choose one only !

  (INT 0 (IRQ 11 (MODE +E)))
  (DMA 0 (CHANNEL 5))
  (DMA 1 (CHANNEL 7))
  (IO 0 (SIZE 16) (BASE 0x0220))
  (IO 1 (SIZE 8) (BASE 0x0320))
  (IO 2 (SIZE 4) (BASE 0x032c))
  (NAME "GRV0001/150994944[0]{Synth & Codec       }")
  (ACT Y)))

(CONFIGURE GRV0001/150994944 (LD 1
#     ANSI string -->Disabled Device<--
  (ACT N)))

(CONFIGURE GRV0001/150994944 (LD 2
#     ANSI string -->Game Port<--
  (IO 0 (SIZE 1) (BASE 0x0201))
  (NAME "GRV0001/150994944[2]{Game Port           }")
  (ACT Y)))

(CONFIGURE GRV0001/150994944 (LD 3
#     ANSI string -->SB Compatible Audio<--
  (DMA 0 (CHANNEL 1))
  (INT 0 (IRQ 5 (MODE +E)))
  (IO 0 (SIZE 2) (BASE 0x0388))
  (NAME "GRV0001/150994944[3]{SB Compatible Audio }")
  (ACT Y)))

(CONFIGURE GRV0001/150994944 (LD 4
#     ANSI string -->MPU-401 GM Music<--
  (IO 0 (SIZE 2) (BASE 0x0330))
  (NAME "GRV0001/150994944[4]{MPU-401 GM Music    }")
  (ACT Y)))

# End tag... Checksum 0x00 (OK)

# Returns all cards to the "Wait for Key" state
(WAITFORKEY)

$ cat conf.modules
alias scsi_hostadapter ncr53c8xx
alias eth0 tulip
alias char-major-14 snd
alias snd-minor-oss-0 snd-interwave
alias snd-minor-oss-3 snd-pcm1-oss
alias snd-minor-oss-4 snd-pcm1-oss
alias snd-minor-oss-5 snd-pcm1-oss
alias snd-minor-oss-12 snd-pcm1-oss
alias snd-card-0 snd-interwave
options snd snd_cards_limit=1
options snd-interwave snd_index=1 snd_id="guspnp" snd_port=0x220 snd_irq=11 snd_dma1=5 snd_dma2=7 snd_midi=1

### startup scripts ###

$ cd rc.d

$ ls
init.d	    rc.local	rc0.d	    rc3.d	rc6.d
rc	    rc.news	rc1.d	    rc4.d
rc.isapnp   rc.sysinit	rc2.d	    rc5.d

$ cat rc.isapnp 
if [ -x /sbin/isapnp -a -f /etc/isapnp.conf ]; then
	echo "Setting up PnP cards..."
	/sbin/isapnp /etc/isapnp.conf
fi

$ cat rc.sysinit 
#! /bin/sh
#
# /etc/rc.d/rc.sysinit - run once at boot time
#
# Taken in part from Miquel van Smoorenburg's bcheckrc.
#

# Set the path
PATH=/bin:/sbin:/usr/bin:/usr/sbin
export PATH

# setup plug and play cards.
if [ -f /etc/rc.d/rc.isapnp ]; then
	. /etc/rc.d/rc.isapnp
fi

# Read in config data.
if [ -f /etc/sysconfig/network ]; then
    . /etc/sysconfig/network
else
    NETWORKING=no
    HOSTNAME=localhost
fi

[... skip the next lot of this file, until the sound section]

# load sound modules
if ! grep -i nomodules /proc/cmdline >/dev/null ; then
    if [ -n "$USEMODULES" ]; then
	modprobe snd-interwave
	modprobe snd-pcm1-oss
    fi
fi

[... rest of file is about as you'd expect]

Meino>  What is the current version of the alsadriver? 

the current versions can always be found on the ALSA web page, at

   http://alsa.jcu.cz/

at the moment, i see:

   alsa-driver 0.2.0-pre8
   alsa-lib 0.1.1
   alsa-utils 0.0.6

... which are the exact same versions i'm running.

Meino> Can I use additional midi-instrument-files?  Can I play
Meino> midi-files?

i would suspect that you can play midi files, although i haven't tried 
it lately.  the ultrasound project (what perex did before starting
ALSA) had good support for MIDI under linux, i suspect that ALSA will
have the same high quality.  ALSA may not have that ability yet,
however; i remember reading that some of that interface is still being 
decided.  there is work on an ALSA-native sequencer and such; browse
around the web page for more info.

Meino> What mixer do you use?

XAmixer (v 0.1.8):  http://towerhs.dyn.ml.org/linux/xamixer/

it is not quite as slick as i would like it to be, and the mixers seem 
to be linear (instead of perceptive / logarithmic), but it works for
now.  

[i found an interesting issue with it earlier today: there is no
"Quit" button, and using fvwm2 to destroy it caused it to start eating
100% CPU...]

Meino> Thank you very much for all your help in advance!

hope this helps.  note that there are some good mailing lists
available for exchanging information about ALSA user and developer
issues.  please see the web page for addresses and instructions for
joining those lists (they're fairly low-volume, maybe 10-20 messages
per day maximum).

good luck,
t.
-- 
Tkil <http://www.scrye.com/~tkil> hopelessly hopeless romantic.
   "Rain -- you can't hold on to it / a treasure you cannot frame
    Rain -- somehow I'm drawn to it / I feel engaged, one and the same
    when heaven's dressing beads off my skin
    the pain is nothing that a downpour won't erase"
	-- "Flowers Become Screens", _Semantic Spaces_, Delerium [1994]

