Skip to contentSkip to conversation

alsa-driver-1.0.0pre3 - UltraSound PnP card not found?

DISCUSSION Ted 2 participants 5 messages Nov 27, 2003 – Jan 9, 2004

lore
Share & tools
lore

Ted

author
#0 lore raw

Hi,

    I'm trying to use alsa-driver-1.0.0pre3 with linux-2.2.25 and

gcc-2.95.3 for a GravisUltrasound PNP Pro and TMC PCI54ITS motherboard.

Previously, with alsa-driver-0.9.0rc6 and linux-2.2.20, I used isapnp to map out certain IRQs after a cold-boot, before the snd-card-interwave module would load.

Now I'm trying to use alsa-driver-1.0.0pre3 with linux-2.2.25.

After a minor fix (see separate message) the modules appear to build successfully and, after a cold boot, when snd-isapnp is loaded...

# modprobe -v snd-isapnp
/sbin/insmod /lib/modules/2.2.25/misc/snd-isapnp.o \
	isapnp_verbose=2 isapnp_reserve_irq=5,7,11,12,13
Using /lib/modules/2.2.25/misc/snd-isapnp.o
Symbol version prefix ''

and the soundcard is reported by syslog...
kernel: isapnp: Card 'UltraSound Plug & Play'
kernel: isapnp: Device 'UltraSound Plug & Play'
last message repeated 4 times
kernel: isapnp: 1 Plug & Play card detected total

Yet later, snd-interwave fails to load...

# modprobe -v snd-interwave
/sbin/insmod /lib/modules/2.2.25/misc/snd-interwave.o \
        index=0 id=GusPnP enable=1 isapnp=1 port=0x220 irq=15 \
        dma1=5 dma2=7 midi=0 pcm_channels=8 effect=1
Using /lib/modules/2.2.25/misc/snd-interwave.o
Symbol version prefix ''
/lib/modules/2.2.25/misc/snd-interwave.o: \
        init_module: Device or resource busy
Hint: insmod errors can be caused by incorrect module \
        parameters, including invalid IO or IRQ parameters
/lib/modules/2.2.25/misc/snd-interwave.o: \
        insmod /lib/modules/2.2.25/misc/snd-interwave.o failed
/lib/modules/2.2.25/misc/snd-interwave.o: \
        insmod snd-interwave failed

and syslog reports...
kernel: InterWave soundcard not found or device busy

The linux-2.2.25 kernel is configured with...
# CONFIG_PNP is not set
CONFIG_SOUND=m
# CONFIG_SOUND_* are not set

and the alsa-driver-1.0.0pre3 with...

# ./configure --with-sequencer=yes --with-debug=detect \
	--with-isapnp=yes --with-oss=yes --with-cards=interwave

Does anything here look amiss, before I start adding printk's to the source code?

Ted.

Signature · 9 lines
Ted <[email protected]>
   http://www.nowtsfree.freeserve.co.uk


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
#1 lore raw

At Thu, 27 Nov 2003 01:54:45 +0000,

Quoted 5 lines · Ted
# modprobe -v snd-interwave
/sbin/insmod /lib/modules/2.2.25/misc/snd-interwave.o \
        index=0 id=GusPnP enable=1 isapnp=1 port=0x220 irq=15 \
        dma1=5 dma2=7 midi=0 pcm_channels=8 effect=1

what happens if you don't pass the port, irq and dma parameters?

Takashi

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/

author
#2 lore raw

Hello Takashi,

Quoted 9 lines

Takashi Iwai wrote:

Quoted 5 lines · Ted
# modprobe -v snd-interwave
/sbin/insmod /lib/modules/2.2.25/misc/snd-interwave.o \
        index=0 id=GusPnP enable=1 isapnp=1 port=0x220 irq=15 \
        dma1=5 dma2=7 midi=0 pcm_channels=8 effect=1

what happens if you don't pass the port, irq and dma parameters?

The same "init_module: Device or resource busy" messages as before.

I've tried missing out various combinations of parameters + cold-rebooting (or not), so the BIOS/whatever does (or doesnt) set up the PNP card first. The port, irq and dma parameters I used at first were the ones that DOS/Win95 store in the C:\ULTRAPNP\IW.INI file for the card.

Ted.

Signature · 9 lines
Ted <[email protected]>
   http://www.nowtsfree.freeserve.co.uk


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
author
#3 lore raw
In reply to Ted

Hello, I previously reported a problem loading the snd-interwave module from alsa-driver-1.0.0pre3 into linux-2.2.25.

I found a fix, but not the complete answer, because I'm not yet clear about the different roles of the support/isapnp and support/pnp code.

The problem is that support/pnp/pnp.c refers to functions in the support/isapnp code so it #includes isapnp.h without CONFIG_ISAPNP being defined. The result is that dummy isapnp functions defined in isapnp.h to do nothing are used, instead of the working functions in the snd-isapnp module.

See support/isapnp/isapnp.h around lines 308-376.
As a temporary fix I simply defined CONFIG_ISAPNP at line 308, but this will not suit everyone else's configurations.

I suspect that CONFIG_ISAPNP should be defined in the files under support/pnp when they need to link with support/isapnp code, before isapnp.h is include in them, rather the way I have hacked it.

Ted.

Quoted 61 lines

To: [email protected]
Cc: Ted <[email protected]>
Subject: alsa-driver-1.0.0pre3 - UltraSound PnP card not found?
Date: Thu, 27 Nov 2003 01:54:45 +0000
From: Ted <[email protected]>
Message-Id: <[email protected]>

Hi,

    I'm trying to use alsa-driver-1.0.0pre3 with linux-2.2.25 and

gcc-2.95.3 for a GravisUltrasound PNP Pro and TMC PCI54ITS motherboard.

Previously, with alsa-driver-0.9.0rc6 and linux-2.2.20, I used isapnp to map out certain IRQs after a cold-boot, before the snd-card-interwave module would load.

Now I'm trying to use alsa-driver-1.0.0pre3 with linux-2.2.25.

After a minor fix (see separate message) the modules appear to build successfully and, after a cold boot, when snd-isapnp is loaded...

# modprobe -v snd-isapnp
/sbin/insmod /lib/modules/2.2.25/misc/snd-isapnp.o \
	isapnp_verbose=2 isapnp_reserve_irq=5,7,11,12,13
Using /lib/modules/2.2.25/misc/snd-isapnp.o
Symbol version prefix ''

and the soundcard is reported by syslog...
kernel: isapnp: Card 'UltraSound Plug & Play'
kernel: isapnp: Device 'UltraSound Plug & Play'
last message repeated 4 times
kernel: isapnp: 1 Plug & Play card detected total

Yet later, snd-interwave fails to load...

# modprobe -v snd-interwave
/sbin/insmod /lib/modules/2.2.25/misc/snd-interwave.o \
        index=0 id=GusPnP enable=1 isapnp=1 port=0x220 irq=15 \
        dma1=5 dma2=7 midi=0 pcm_channels=8 effect=1
Using /lib/modules/2.2.25/misc/snd-interwave.o
Symbol version prefix ''
/lib/modules/2.2.25/misc/snd-interwave.o: \
        init_module: Device or resource busy
Hint: insmod errors can be caused by incorrect module \
        parameters, including invalid IO or IRQ parameters
/lib/modules/2.2.25/misc/snd-interwave.o: \
        insmod /lib/modules/2.2.25/misc/snd-interwave.o failed
/lib/modules/2.2.25/misc/snd-interwave.o: \
        insmod snd-interwave failed

and syslog reports...
kernel: InterWave soundcard not found or device busy

The linux-2.2.25 kernel is configured with...
# CONFIG_PNP is not set
CONFIG_SOUND=m
# CONFIG_SOUND_* are not set

and the alsa-driver-1.0.0pre3 with...

# ./configure --with-sequencer=yes --with-debug=detect \
	--with-isapnp=yes --with-oss=yes --with-cards=interwave
Quoted 7 lines

Does anything here look amiss, before I start adding printk's to the source code?

Ted.
--
Ted <[email protected]>
http://www.nowtsfree.freeserve.co.uk

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/

author
#4 lore raw

I previously reported a problem on Thu, 27 Nov 2003, with loading the snd-interwave module from alsa-driver-1.0.0pre3 into linux-2.2.25, and a "fix" for this on Fri, 12 Dec 2003.

I have looked harder at this now and think that the fix should be to define CONFIG_ISAPNP in support/pnp/pnp.c, before including <linux/isapnp.h>, rather than defining it in isapnp.h.

The problem is that pnp_register_card_driver() in support/pnp/pnp.c is calling a dummy version of isapnp_find_dev(), defined isapnp.h, because CONFIG_ISAPNP isn't defined when isapnp.h is included in support/pnp/pnp.c.

The problem still remains in cvsexport-2004-01-02.

A better solution seems to be this:

$ diff -u4 alsa-driver/support/pnp/pnp.c.Orig alsa-driver/support/pnp/pnp.c
--- alsa-driver/support/pnp/pnp.c.Orig  Fri Oct 31 15:02:21 2003
+++ alsa-driver/support/pnp/pnp.c       Fri Jan  9 03:51:06 2004
@@ -57,8 +57,10 @@
 #ifndef ALSA_BUILD
 #include <linux/isapnp.h>
 #include <linux/pnp.h>
 #else
+#undef CONFIG_ISAPNP
+#define CONFIG_ISAPNP
 #include <linux/isapnp.h>
 #undef CONFIG_PNP
 #define CONFIG_PNP
 #include "pnp.h"

The driver module for my UltraSound PNP sound card will not load without such a correction.

Ted.

Signature · 9 lines
Ted <[email protected]>
   http://www.nowtsfree.freeserve.co.uk


-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html