From alsa-user-owner@alsa.jcu.cz  Thu Sep 10 16:58:20 1998
Received: from downtown.oche.de (root@downtown.oche.de [194.94.253.3])
	by marvin.jcu.cz (8.8.8/8.8.8) with ESMTP id QAA10079
	for <alsa-user@jcu.cz>; Thu, 10 Sep 1998 16:55:24 +0200
Received: (from uucp@localhost)
	by downtown.oche.de (8.8.8/8.8.8/Debian/GNU) with UUCP id QAA12842
	for alsa-user@jcu.cz; Thu, 10 Sep 1998 16:50:01 +0200
Received: from hobbes.wg.net (dirk@hobbes.wg.net [192.168.2.2])
	by server.wg.net (8.8.8/8.8.8/Debian/GNU) with ESMTP id QAA04006
	for <alsa-user@jcu.cz>; Thu, 10 Sep 1998 16:47:46 +0200
Received: (from dirk@localhost)
	by hobbes.wg.net (8.8.8/8.8.8/Debian/GNU) id QAA00738;
	Thu, 10 Sep 1998 16:44:44 +0200
To: alsa-user@jcu.cz
Subject: audiodrive1868, mup-401
From: Dirk Luetjens <dirk@luedi.oche.de>
Date: 10 Sep 1998 16:44:44 +0200
Message-ID: <86btoot4bn.fsf@hobbes.wg.net>
Reply-To: alsa-user@alsa.jcu.cz
Sender: alsa-user-owner@alsa.jcu.cz
Precedence: list

Hello,

a short question about sound :-). 

Excuse me, I have no clue about sound in the computer, so please allow
me the following questions:

- For what do I need a MUP-401?
- How to play midi files with alsa?
- As far as I know the ESS1868 does not have any built in
  wavetables. Only support for Software wavetables. How do I install
  them, and how do I use them?

I have a simple and cheap audiodrive ESS1868 card that works fine with 
the snd-audiodrive1688 module. Except that I dont know how to play
midi files. Since I installed a PS/2 mouse to my computer I get the
follwing message while installing the alsa modules:

snd: warning: can't allocate IRQ for MPU401, midi port is disabled

The ESS1868 card have four logic devices, namely a 

- Control Interface
- the AudioDrive itself (?)
- Joystick port
- MPU-401 Port (? I got to this due to the fact that the MPU-401 port
  needs an interrupt and that the LD3 is the only device where I can
  specify a second interrupt)

According to this 4 devices I get a section in the ispnp.conf file,
which is the reflect the same adresses used under windows. Except for
the last MPU-401 device which isnt used under windows. The section
tells me that I can use the following adresses:

--------

# Logical device id ESS0002
#
# 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 ESS1868/-1 (LD 3

# Multiple choice time, choose one only !

#     Start dependent functions: priority preferred
#       IRQ 12.
#             High true, edge sensitive interrupt (by default)
# (INT 0 (IRQ 12 (MODE +E)))
#       Fixed IO base address 0x0168
#             Number of IO addresses required: 8
# (IO 0 (BASE 0x0168))
#       Fixed IO base address 0x036e
#             Number of IO addresses required: 2
# (IO 1 (BASE 0x036e))

#       Start dependent functions: priority acceptable
#       IRQ 10 or 11.
#             High true, edge sensitive interrupt (by default)
 (INT 0 (IRQ 11 (MODE +E)))
#       Fixed IO base address 0x0168
#             Number of IO addresses required: 8
 (IO 0 (BASE 0x0168))
#       Fixed IO base address 0x036e
#             Number of IO addresses required: 2
 (IO 1 (BASE 0x036e))

#       Start dependent functions: priority acceptable
#       IRQ 10, 11 or 12.
#             High true, edge sensitive interrupt (by default)
# (INT 0 (IRQ 10 (MODE +E)))
#       Fixed IO base address 0x01e8
#             Number of IO addresses required: 8
# (IO 0 (BASE 0x01e8))
#       Fixed IO base address 0x03ee
#             Number of IO addresses required: 2
# (IO 1 (BASE 0x03ee))

#       Start dependent functions: priority functional
#       IRQ 10, 11 or 12.
#             High true, edge sensitive interrupt (by default)
# (INT 0 (IRQ 10 (MODE +E)))
#       Logical device decodes 16 bit IO address lines
#             Minimum IO base address 0x0100
#             Maximum IO base address 0x01f8
#             IO base alignment 8 bytes
#             Number of IO addresses required: 8
# (IO 0 (BASE 0x0100))
#       Logical device decodes 16 bit IO address lines
#             Minimum IO base address 0x0300
#             Maximum IO base address 0x03fe
#             IO base alignment 2 bytes
#             Number of IO addresses required: 2
# (IO 1 (BASE 0x0300))

#     End dependent functions
#     Compatible device id PNP0600
 (ACT Y)
))

---------

Since IRQ12 is used by the PS/2 mouse I tried to set the IRQ to 11,
which is the last free IRQ in my system. Looking into the alsa source
tells me that my error message is generated from the following lines:

-----------
  ...

  static int possible_irqs[] = { 5, 9, 10, 7, -1 };
  static int possible_dmas[] = { 1, 3, 0, -1 };

  ....

    if ( (acard -> mpuirqnum = snd_register_interrupt( card, "ESx688 - MPU401", 
snd_mpu_irq[ dev ], SND_IRQ_TYPE_ISA, snd_audiodrive_midi_interrupt, acard, poss
ible_irqs )) < 0 ) {
      acard -> mpuirqnum = SND_IRQ_DISABLE;
      snd_printk( "warning: can't allocate IRQ for MPU401, midi port is disabled\n" );

-----------

So my question: The interrupts 11, 12 arnt listed in the possible_irq 
array. So why did the function succeed prior with IRQ 12 and not with IRQ11?

Or did I get something wrong here?

Oh yes, some more questions:

- what is AUX Port in the soundcard?
- How do I control the PC Speaker with alsamixer
- Can I mix different audiostreams with ALSA, e.g having a mpg player
  running in the background and get sound events from the windowmanager?
- Sorry, but what is the difference between the FM and PCM device, and 
  how does the ALSA implementation of the pcm device differ to OSS,
  that one need an extra module?

Keep up the good work
Dirk

