From: Takashi Iwai <tiwai@suse.de>
To: Jaroslav Kysela <perex@suse.cz>
Cc: Mario Loritz <loritz@fh-furtwangen.de>, alsa-devel@lists.sourceforge.net
Subject: Re: config bug with sbawe and --with-isapnp=no
Date: Fri, 23 Jan 2004 12:49:51 +0100 [thread overview]
Message-ID: <s5hu12mx4tc.wl@alsa2.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0401231123400.1875@pnote.perex-int.cz>
[-- Attachment #1: Type: text/plain, Size: 404 bytes --]
At Fri, 23 Jan 2004 11:26:38 +0100 (CET),
Jaroslav wrote:
>
> On Fri, 23 Jan 2004, Mario Loritz wrote:
>
> > Hello list,
> >
> > I reproduced the error message while the driver is loading:
>
> Could you try the patch bellow?
i found the bug in adriver.h, which always defines CONFIG_PNP when
CONFIG_ISAPNP is set.
the attached patches are the fix and clean-up for pnp.
please give a try.
Takashi
[-- Attachment #2: alsa-pnp-fix.dif --]
[-- Type: application/octet-stream, Size: 3068 bytes --]
Index: alsa-driver/Rules.make
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-driver/Rules.make,v
retrieving revision 1.33
diff -u -r1.33 Rules.make
--- alsa-driver/Rules.make 4 Dec 2003 10:52:47 -0000 1.33
+++ alsa-driver/Rules.make 23 Jan 2004 11:10:20 -0000
@@ -129,7 +129,12 @@
patch -p0 -i $<
%.isapnp: %.c
+ifeq (y,$(CONFIG_ISAPNP))
$(CPP) -C -D__KERNEL__ $(CFLAGS) $(EXTRA_CFLAGS) -D__isapnp_now__ -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) $(CFLAGS_$@) $(CFLAGS_$@) $< | awk -f $(TOPDIR)/utils/convert_isapnp_ids > $@
+else
+ rm -f $@
+ touch $@
+endif
#
#
Index: alsa-driver/configure.in
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-driver/configure.in,v
retrieving revision 1.153
diff -u -r1.153 configure.in
--- alsa-driver/configure.in 22 Jan 2004 13:46:51 -0000 1.153
+++ alsa-driver/configure.in 23 Jan 2004 11:06:01 -0000
@@ -955,11 +955,11 @@
AC_SUBST(CONFIG_ISAPNP)
if test "$CONFIG_ISAPNP" = "y"; then
- AC_DEFINE(CONFIG_ISAPNP)
+ AC_DEFINE(CONFIG_SND_ISAPNP)
CONFIG_PNP=$CONFIG_ISAPNP
- AC_DEFINE(CONFIG_PNP)
- AC_SUBST(CONFIG_PNP)
+ AC_DEFINE(CONFIG_SND_PNP)
fi
+AC_SUBST(CONFIG_PNP)
dnl Check for strlcpy...
AC_MSG_CHECKING(for strlcpy)
Index: alsa-driver/include/adriver.h
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-driver/include/adriver.h,v
retrieving revision 1.61
diff -u -r1.61 adriver.h
--- alsa-driver/include/adriver.h 21 Jan 2004 18:26:48 -0000 1.61
+++ alsa-driver/include/adriver.h 23 Jan 2004 11:15:39 -0000
@@ -151,20 +151,19 @@
#endif
#endif
-#if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE))
-#include <linux/isapnp.h>
-#ifndef CONFIG_PNP
-#define CONFIG_PNP
+/* isapnp support for 2.2 kernels */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 0)
+#undef CONFIG_ISAPNP
+#ifdef CONFIG_SND_ISAPNP
+#define CONFIG_ISAPNP
+#endif
#endif
-#if (defined(CONFIG_ISAPNP_KERNEL) && defined(ALSA_BUILD)) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 30) && !defined(ALSA_BUILD))
-#define isapnp_dev pci_dev
-#define isapnp_card pci_bus
-#endif
-#undef __ISAPNP__
-#define __ISAPNP__
-#else
+
+/* support of pnp compatible layer for 2.2/2.4 kernels */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
#undef CONFIG_PNP
+#ifdef CONFIG_SND_PNP
+#define CONFIG_PNP
#endif
#endif
Index: alsa-driver/include/config.h.in
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-driver/include/config.h.in,v
retrieving revision 1.19
diff -u -r1.19 config.h.in
--- alsa-driver/include/config.h.in 8 Jan 2004 14:08:19 -0000 1.19
+++ alsa-driver/include/config.h.in 23 Jan 2004 11:05:43 -0000
@@ -25,8 +25,8 @@
#undef CONFIG_SND_KERNELDIR
#undef CONFIG_ISAPNP_KERNEL
#undef CONFIG_PNP_KERNEL
-#undef CONFIG_ISAPNP
-#undef CONFIG_PNP
+#undef CONFIG_SND_ISAPNP
+#undef CONFIG_SND_PNP
/* 2.4 kernels */
#undef CONFIG_HAVE_OLD_REQUEST_MODULE
[-- Attachment #3: sb16-pnp-fix.dif --]
[-- Type: application/octet-stream, Size: 720 bytes --]
Index: alsa-kernel/isa/sb/sb16.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/isa/sb/sb16.c,v
retrieving revision 1.34
diff -u -r1.34 sb16.c
--- alsa-kernel/isa/sb/sb16.c 21 Jan 2004 18:29:46 -0000 1.34
+++ alsa-kernel/isa/sb/sb16.c 23 Jan 2004 11:23:45 -0000
@@ -157,6 +157,8 @@
static snd_card_t *snd_sb16_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
+#ifdef CONFIG_PNP
+
static struct pnp_card_device_id snd_sb16_pnpids[] = {
#ifndef SNDRV_SBAWE
/* Sound Blaster 16 PnP */
@@ -250,6 +252,8 @@
MODULE_DEVICE_TABLE(pnp_card, snd_sb16_pnpids);
+#endif /* CONFIG_PNP */
+
#ifdef SNDRV_SBAWE_EMU8000
#define DRIVER_NAME "snd-card-sbawe"
#else
[-- Attachment #4: opti9xx-pnp-fix.dif --]
[-- Type: application/octet-stream, Size: 1037 bytes --]
Index: alsa-driver/isa/opti9xx/opti92x-ad1848.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-driver/isa/opti9xx/opti92x-ad1848.c,v
retrieving revision 1.7
diff -u -r1.7 opti92x-ad1848.c
--- alsa-driver/isa/opti9xx/opti92x-ad1848.c 13 Nov 2003 17:03:36 -0000 1.7
+++ alsa-driver/isa/opti9xx/opti92x-ad1848.c 23 Jan 2004 11:37:57 -0000
@@ -1,13 +1,12 @@
#include <linux/version.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 2, 0)
+#define isapnp_dev pci_dev
+#endif
#define snd_opti9xx_fixup_dma2(pdev) \
{struct isapnp_dev *b = (struct isapnp_dev *)pdev;\
memset(&b->dma_resource[1].flags, 0, sizeof(b->dma_resource[1].flags));}
-#else
-#define snd_opti9xx_fixup_dma2(pdev) \
- {struct pci_dev *b = (struct pci_dev *)pdev;\
- memset(&b->dma_resource[1].flags, 0, sizeof(b->dma_resource[1].flags));}
#endif
#include "../../alsa-kernel/isa/opti9xx/opti92x-ad1848.c"
next prev parent reply other threads:[~2004-01-23 11:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-22 11:49 config bug with sbawe and --with-isapnp=no Mario Loritz
2004-01-22 12:05 ` Takashi Iwai
2004-01-23 10:13 ` Mario Loritz
2004-01-23 10:26 ` Jaroslav Kysela
2004-01-23 11:49 ` Takashi Iwai [this message]
2004-01-24 14:57 ` Mario Loritz
2004-01-26 11:15 ` Takashi Iwai
2004-01-28 15:45 ` Mario Loritz
2004-01-28 21:53 ` Mario Loritz
2004-01-29 15:12 ` Mario Loritz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hu12mx4tc.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=loritz@fh-furtwangen.de \
--cc=perex@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox