From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: config bug with sbawe and --with-isapnp=no Date: Fri, 23 Jan 2004 12:49:51 +0100 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <200401221249.07577.loritz@fh-furtwangen.de> <200401231113.35085.loritz@fh-furtwangen.de> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: multipart/mixed; boundary="Multipart_Fri_Jan_23_12:49:51_2004-1" Return-path: In-Reply-To: Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Jaroslav Kysela Cc: Mario Loritz , alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org --Multipart_Fri_Jan_23_12:49:51_2004-1 Content-Type: text/plain; charset=US-ASCII 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 --Multipart_Fri_Jan_23_12:49:51_2004-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="alsa-pnp-fix.dif" Content-Transfer-Encoding: 7bit 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 -#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 --Multipart_Fri_Jan_23_12:49:51_2004-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="sb16-pnp-fix.dif" Content-Transfer-Encoding: 7bit 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 --Multipart_Fri_Jan_23_12:49:51_2004-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="opti9xx-pnp-fix.dif" Content-Transfer-Encoding: 7bit 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 -#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" --Multipart_Fri_Jan_23_12:49:51_2004-1-- ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn