Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* 2.6.11-mm1: sound <-> GAMEPORT problems
       [not found] ` <200503070941.59365.petkov@uni-muenster.de>
@ 2005-03-07 21:52   ` Adrian Bunk
  2005-03-07 22:05     ` Dmitry Torokhov
  2005-03-07 22:12     ` Dmitry Torokhov
  0 siblings, 2 replies; 8+ messages in thread
From: Adrian Bunk @ 2005-03-07 21:52 UTC (permalink / raw)
  To: Borislav Petkov, perex, vojtech
  Cc: Andrew Morton, linux-kernel, alsa-devel, linux-input

On Mon, Mar 07, 2005 at 09:41:59AM +0100, Borislav Petkov wrote:
> On Friday 04 March 2005 12:32, Andrew Morton wrote:
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.11/2.6.11
> >-mm1/
> >
> <snip>
> 
> Hi,
> 
> the ymfpci sound driver wouldn't compile without gameport support selected 
> since the sound card has a gameport on it:
> 
> Signed-off-by: Borislav Petkov <petkov@uni-muenster.de>
> 
> --- sound/pci/ymfpci/ymfpci.c.orig 2005-03-07 09:07:10.000000000 +0100
> +++ sound/pci/ymfpci/ymfpci.c 2005-03-07 09:08:02.000000000 +0100
> @@ -332,7 +332,9 @@ static int __devinit snd_card_ymfpci_pro
>    }
>   }
>  
> +#ifdef SUPPORT_JOYSTICK
>   snd_ymfpci_create_gameport(chip, dev, legacy_ctrl, legacy_ctrl2);
> +#endif /* SUPPORT_JOYSTICK */
>  
>   if ((err = snd_card_register(card)) < 0) {
>    snd_card_free(card);


Nice catch (but I had to apply the patch manually due to some 
whitespace damage).


After a quick look, it seems there are a dozen other sound drivers (most 
OSS but also ALSA) with similar problems.

There are two possibilities:
1. continue to #ifdef all GAMEPORT support in sound drivers
2. remove all #ifdef's for GAMEPORT and let drivers that can use the
   gameport (including the sound drivers) simply select GAMEPORT
   As far as I can see, in this case GAMEPORT does no longer have to be
   user-visible?


I can send patches for both, but I'd prefer the second solution.


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.11-mm1: sound <-> GAMEPORT problems
  2005-03-07 21:52   ` 2.6.11-mm1: sound <-> GAMEPORT problems Adrian Bunk
@ 2005-03-07 22:05     ` Dmitry Torokhov
  2005-03-07 22:12     ` Dmitry Torokhov
  1 sibling, 0 replies; 8+ messages in thread
From: Dmitry Torokhov @ 2005-03-07 22:05 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Borislav Petkov, perex, vojtech, Andrew Morton, linux-kernel,
	alsa-devel, linux-input

On Mon, 7 Mar 2005 22:52:06 +0100, Adrian Bunk <bunk@stusta.de> wrote:
> On Mon, Mar 07, 2005 at 09:41:59AM +0100, Borislav Petkov wrote:
> > On Friday 04 March 2005 12:32, Andrew Morton wrote:
> > > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.11/2.6.11
> > >-mm1/
> > >
> > <snip>
> >
> > Hi,
> >
> > the ymfpci sound driver wouldn't compile without gameport support selected
> > since the sound card has a gameport on it:
> >
> > Signed-off-by: Borislav Petkov <petkov@uni-muenster.de>
> >
> > --- sound/pci/ymfpci/ymfpci.c.orig 2005-03-07 09:07:10.000000000 +0100
> > +++ sound/pci/ymfpci/ymfpci.c 2005-03-07 09:08:02.000000000 +0100
> > @@ -332,7 +332,9 @@ static int __devinit snd_card_ymfpci_pro
> >    }
> >   }
> >
> > +#ifdef SUPPORT_JOYSTICK
> >   snd_ymfpci_create_gameport(chip, dev, legacy_ctrl, legacy_ctrl2);
> > +#endif /* SUPPORT_JOYSTICK */
> >
> >   if ((err = snd_card_register(card)) < 0) {
> >    snd_card_free(card);
> 
> Nice catch (but I had to apply the patch manually due to some
> whitespace damage).
> 
> After a quick look, it seems there are a dozen other sound drivers (most
> OSS but also ALSA) with similar problems.
> 
> There are two possibilities:
> 1. continue to #ifdef all GAMEPORT support in sound drivers
> 2. remove all #ifdef's for GAMEPORT and let drivers that can use the
>   gameport (including the sound drivers) simply select GAMEPORT
>   As far as I can see, in this case GAMEPORT does no longer have to be
>   user-visible?
> 
> I can send patches for both, but I'd prefer the second solution.
> 

Not everyone wants gameport. I think say very small percentage of
people using sound cards that can support gameports actually uses
them.

-- 
Dmitry


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.11-mm1: sound <-> GAMEPORT problems
  2005-03-07 21:52   ` 2.6.11-mm1: sound <-> GAMEPORT problems Adrian Bunk
  2005-03-07 22:05     ` Dmitry Torokhov
@ 2005-03-07 22:12     ` Dmitry Torokhov
  2005-03-07 23:06       ` [2.6 patch] sound/pci/cs4281.c fix typos in the SUPPORT_JOYSTICK=n case Adrian Bunk
  1 sibling, 1 reply; 8+ messages in thread
From: Dmitry Torokhov @ 2005-03-07 22:12 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Borislav Petkov, perex, vojtech, Andrew Morton, linux-kernel,
	alsa-devel, linux-input

On Mon, 7 Mar 2005 22:52:06 +0100, Adrian Bunk <bunk@stusta.de> wrote:
> On Mon, Mar 07, 2005 at 09:41:59AM +0100, Borislav Petkov wrote:
> > On Friday 04 March 2005 12:32, Andrew Morton wrote:
> > > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.11/2.6.11
> > >-mm1/
> > >
> > <snip>
> >
> > Hi,
> >
> > the ymfpci sound driver wouldn't compile without gameport support selected
> > since the sound card has a gameport on it:
> >
> > Signed-off-by: Borislav Petkov <petkov@uni-muenster.de>
> >
> > --- sound/pci/ymfpci/ymfpci.c.orig 2005-03-07 09:07:10.000000000 +0100
> > +++ sound/pci/ymfpci/ymfpci.c 2005-03-07 09:08:02.000000000 +0100
> > @@ -332,7 +332,9 @@ static int __devinit snd_card_ymfpci_pro
> >    }
> >   }
> >
> > +#ifdef SUPPORT_JOYSTICK
> >   snd_ymfpci_create_gameport(chip, dev, legacy_ctrl, legacy_ctrl2);
> > +#endif /* SUPPORT_JOYSTICK */
> >
> >   if ((err = snd_card_register(card)) < 0) {
> >    snd_card_free(card);
> 
> Nice catch (but I had to apply the patch manually due to some
> whitespace damage).
> 
> After a quick look, it seems there are a dozen other sound drivers (most
> OSS but also ALSA) with similar problems.

Note that in input tree (and in -mm) I tried to clean up these #ifdefs
by providing dummy functions when CONFIG_GAMEPORT is not selected. The
original report caused by the typo in dummy function name
(snc_ymfpci_create_gameport).

-- 
Dmitry


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [2.6 patch] sound/pci/cs4281.c fix typos in the SUPPORT_JOYSTICK=n case
  2005-03-07 22:12     ` Dmitry Torokhov
@ 2005-03-07 23:06       ` Adrian Bunk
  2005-03-08 10:24         ` Vojtech Pavlik
  2005-03-09 11:32         ` [2.6 patch] OSS gameport fixes Adrian Bunk
  0 siblings, 2 replies; 8+ messages in thread
From: Adrian Bunk @ 2005-03-07 23:06 UTC (permalink / raw)
  To: dtor_core
  Cc: Borislav Petkov, perex, vojtech, Andrew Morton, linux-kernel,
	alsa-devel, linux-input

On Mon, Mar 07, 2005 at 05:12:57PM -0500, Dmitry Torokhov wrote:
> On Mon, 7 Mar 2005 22:52:06 +0100, Adrian Bunk <bunk@stusta.de> wrote:
> > On Mon, Mar 07, 2005 at 09:41:59AM +0100, Borislav Petkov wrote:
> > >
> > > --- sound/pci/ymfpci/ymfpci.c.orig 2005-03-07 09:07:10.000000000 +0100
> > > +++ sound/pci/ymfpci/ymfpci.c 2005-03-07 09:08:02.000000000 +0100
> > > @@ -332,7 +332,9 @@ static int __devinit snd_card_ymfpci_pro
> > >    }
> > >   }
> > >
> > > +#ifdef SUPPORT_JOYSTICK
> > >   snd_ymfpci_create_gameport(chip, dev, legacy_ctrl, legacy_ctrl2);
> > > +#endif /* SUPPORT_JOYSTICK */
> > >
> > >   if ((err = snd_card_register(card)) < 0) {
> > >    snd_card_free(card);
> > 
> > Nice catch (but I had to apply the patch manually due to some
> > whitespace damage).
> > 
> > After a quick look, it seems there are a dozen other sound drivers (most
> > OSS but also ALSA) with similar problems.
> 
> Note that in input tree (and in -mm) I tried to clean up these #ifdefs
> by providing dummy functions when CONFIG_GAMEPORT is not selected. The
> original report caused by the typo in dummy function name
> (snc_ymfpci_create_gameport).

I was looking at -mm.

Ah OK, that sounds like a good solution.

I rechecked, and the only other non-OSS problems are in 
sound/pci/cs4281.c where the two dummy functions have the wrong names, 
too (patch below).

I'll send patches against the OSS drivers with this problem later.

> Dmitry

cu
Adrian


<--  snip  -->


This patch fixes typos in the SUPPORT_JOYSTICK=n case.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.11-mm1-full/sound/pci/cs4281.c.old	2005-03-07 23:45:01.000000000 +0100
+++ linux-2.6.11-mm1-full/sound/pci/cs4281.c	2005-03-07 23:45:27.000000000 +0100
@@ -1331,8 +1331,8 @@
 	}
 }
 #else
-static inline int snd_cs4281_gameport(cs4281_t *chip) { return -ENOSYS; }
-static inline void snd_cs4281_gameport_free(cs4281_t *chip) { }
+static inline int snd_cs4281_create_gameport(cs4281_t *chip) { return -ENOSYS; }
+static inline void snd_cs4281_free_gameport(cs4281_t *chip) { }
 #endif /* CONFIG_GAMEPORT || (MODULE && CONFIG_GAMEPORT_MODULE) */
 
 



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.6 patch] sound/pci/cs4281.c fix typos in the SUPPORT_JOYSTICK=n case
  2005-03-07 23:06       ` [2.6 patch] sound/pci/cs4281.c fix typos in the SUPPORT_JOYSTICK=n case Adrian Bunk
@ 2005-03-08 10:24         ` Vojtech Pavlik
  2005-03-09 11:32         ` [2.6 patch] OSS gameport fixes Adrian Bunk
  1 sibling, 0 replies; 8+ messages in thread
From: Vojtech Pavlik @ 2005-03-08 10:24 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: dtor_core, Borislav Petkov, perex, Andrew Morton, linux-kernel,
	alsa-devel, linux-input

On Tue, Mar 08, 2005 at 12:06:33AM +0100, Adrian Bunk wrote:

> This patch fixes typos in the SUPPORT_JOYSTICK=n case.
> 
> Signed-off-by: Adrian Bunk <bunk@stusta.de>

Thanks; applied.

> --- linux-2.6.11-mm1-full/sound/pci/cs4281.c.old	2005-03-07 23:45:01.000000000 +0100
> +++ linux-2.6.11-mm1-full/sound/pci/cs4281.c	2005-03-07 23:45:27.000000000 +0100
> @@ -1331,8 +1331,8 @@
>  	}
>  }
>  #else
> -static inline int snd_cs4281_gameport(cs4281_t *chip) { return -ENOSYS; }
> -static inline void snd_cs4281_gameport_free(cs4281_t *chip) { }
> +static inline int snd_cs4281_create_gameport(cs4281_t *chip) { return -ENOSYS; }
> +static inline void snd_cs4281_free_gameport(cs4281_t *chip) { }
>  #endif /* CONFIG_GAMEPORT || (MODULE && CONFIG_GAMEPORT_MODULE) */

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [2.6 patch] OSS gameport fixes
  2005-03-07 23:06       ` [2.6 patch] sound/pci/cs4281.c fix typos in the SUPPORT_JOYSTICK=n case Adrian Bunk
  2005-03-08 10:24         ` Vojtech Pavlik
@ 2005-03-09 11:32         ` Adrian Bunk
  2005-03-10 15:36           ` Dmitry Torokhov
  1 sibling, 1 reply; 8+ messages in thread
From: Adrian Bunk @ 2005-03-09 11:32 UTC (permalink / raw)
  To: dtor_core, Borislav Petkov, perex, vojtech, Andrew Morton,
	linux-kernel, alsa-devel, linux-input

This patch adds dummy gameport_register_port, gameport_unregister_port 
and gameport_set_phys functions to gameport.h for the case when a driver 
can't use gameport.

This fixes the compilation of some OSS drivers with GAMEPORT=n without 
the need to #if inside every single driver.

This patch also removes the non-working and now obsolete SOUND_GAMEPORT.

This patch is also an alternative solution for ALSA drivers with similar 
problems (but #if's inside the drivers might have the advantage of 
saving some more bytes of gameport is not available).

The only user-visible change is that for GAMEPORT=m the affected OSS 
drivers are now allowed to be built statically (but they won't have 
gameport support).

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 drivers/input/gameport/Kconfig |   20 --------------------
 include/linux/gameport.h       |   28 +++++++++++++++++++++++++---
 sound/oss/Kconfig              |   12 ++++++------
 3 files changed, 31 insertions(+), 29 deletions(-)

--- linux-2.6.11-mm2-full/include/linux/gameport.h.old	2005-03-09 06:25:41.000000000 +0100
+++ linux-2.6.11-mm2-full/include/linux/gameport.h	2005-03-09 06:41:58.000000000 +0100
@@ -67,6 +67,8 @@
 void gameport_close(struct gameport *gameport);
 void gameport_rescan(struct gameport *gameport);
 
+#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
+
 void __gameport_register_port(struct gameport *gameport, struct module *owner);
 static inline void gameport_register_port(struct gameport *gameport)
 {
@@ -75,6 +77,29 @@
 
 void gameport_unregister_port(struct gameport *gameport);
 
+void gameport_set_phys(struct gameport *gameport, const char *fmt, ...)
+	__attribute__ ((format (printf, 2, 3)));
+
+#else
+
+static inline void gameport_register_port(struct gameport *gameport)
+{
+	return;
+}
+
+static inline void gameport_unregister_port(struct gameport *gameport)
+{
+	return;
+}
+
+static inline void gameport_set_phys(struct gameport *gameport,
+				     const char *fmt, ...)
+{
+	return;
+}
+
+#endif
+
 static inline struct gameport *gameport_allocate_port(void)
 {
 	struct gameport *gameport = kcalloc(1, sizeof(struct gameport), GFP_KERNEL);
@@ -92,9 +117,6 @@
 	strlcpy(gameport->name, name, sizeof(gameport->name));
 }
 
-void gameport_set_phys(struct gameport *gameport, const char *fmt, ...)
-	__attribute__ ((format (printf, 2, 3)));
-
 /*
  * Use the following fucntions to manipulate gameport's per-port
  * driver-specific data.
--- linux-2.6.11-mm2-full/drivers/input/gameport/Kconfig.old	2005-03-09 06:20:28.000000000 +0100
+++ linux-2.6.11-mm2-full/drivers/input/gameport/Kconfig	2005-03-09 06:20:56.000000000 +0100
@@ -64,23 +64,3 @@
 	tristate "Crystal SoundFusion gameport support"
 
 endif
-
-# Yes, SOUND_GAMEPORT looks a bit odd. Yes, it ends up being turned on
-# in every .config. Please don't touch it. It is here to handle an
-# unusual dependency between GAMEPORT and sound drivers.
-#
-# Some sound drivers call gameport functions. If GAMEPORT is
-# not selected, empty stubs are provided for the functions and all is
-# well.
-# If GAMEPORT is built in, everything is fine.
-# If GAMEPORT is a module, however, it would need to be loaded for the
-# sound driver to be able to link properly. Therefore, the sound
-# driver must be a module as well in that case. Since there's no way
-# to express that directly in Kconfig, we use SOUND_GAMEPORT to
-# express it. SOUND_GAMEPORT boils down to "if GAMEPORT is 'm',
-# anything that depends on SOUND_GAMEPORT must be 'm' as well. if
-# GAMEPORT is 'y' or 'n', it can be anything".
-config SOUND_GAMEPORT
-	tristate
-	default m if GAMEPORT=m
-	default y
--- linux-2.6.11-mm2-full/sound/oss/Kconfig.old	2005-03-09 06:21:05.000000000 +0100
+++ linux-2.6.11-mm2-full/sound/oss/Kconfig	2005-03-09 06:28:29.000000000 +0100
@@ -112,7 +112,7 @@
 
 config SOUND_ES1370
 	tristate "Ensoniq AudioPCI (ES1370)"
-	depends on SOUND_PRIME!=n && SOUND && PCI && SOUND_GAMEPORT
+	depends on SOUND_PRIME!=n && SOUND && PCI
 	help
 	  Say Y or M if you have a PCI sound card utilizing the Ensoniq
 	  ES1370 chipset, such as Ensoniq's AudioPCI (non-97). To find
@@ -125,7 +125,7 @@
 
 config SOUND_ES1371
 	tristate "Creative Ensoniq AudioPCI 97 (ES1371)"
-	depends on SOUND_PRIME!=n && SOUND && PCI && SOUND_GAMEPORT
+	depends on SOUND_PRIME!=n && SOUND && PCI
 	help
 	  Say Y or M if you have a PCI sound card utilizing the Ensoniq
 	  ES1371 chipset, such as Ensoniq's AudioPCI97. To find out if
@@ -138,7 +138,7 @@
 
 config SOUND_ESSSOLO1
 	tristate "ESS Technology Solo1" 
-	depends on SOUND_PRIME!=n && SOUND && SOUND_GAMEPORT && PCI
+	depends on SOUND_PRIME!=n && SOUND && PCI
 	help
 	  Say Y or M if you have a PCI sound card utilizing the ESS Technology
 	  Solo1 chip. To find out if your sound card uses a
@@ -179,7 +179,7 @@
 
 config SOUND_SONICVIBES
 	tristate "S3 SonicVibes"
-	depends on SOUND_PRIME!=n && SOUND && SOUND_GAMEPORT
+	depends on SOUND_PRIME!=n && SOUND
 	help
 	  Say Y or M if you have a PCI sound card utilizing the S3
 	  SonicVibes chipset. To find out if your sound card uses a
@@ -226,7 +226,7 @@
 
 config SOUND_TRIDENT
 	tristate "Trident 4DWave DX/NX, SiS 7018 or ALi 5451 PCI Audio Core"
-	depends on SOUND_PRIME!=n && SOUND && SOUND_GAMEPORT
+	depends on SOUND_PRIME!=n && SOUND
 	---help---
 	  Say Y or M if you have a PCI sound card utilizing the Trident
 	  4DWave-DX/NX chipset or your mother board chipset has SiS 7018
@@ -739,7 +739,7 @@
 
 config SOUND_MAD16
 	tristate "OPTi MAD16 and/or Mozart based cards"
-	depends on SOUND_OSS && SOUND_GAMEPORT
+	depends on SOUND_OSS
 	---help---
 	  Answer Y if your card has a Mozart (OAK OTI-601) or MAD16 (OPTi
 	  82C928 or 82C929 or 82C931) audio interface chip. These chips are


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.6 patch] OSS gameport fixes
  2005-03-09 11:32         ` [2.6 patch] OSS gameport fixes Adrian Bunk
@ 2005-03-10 15:36           ` Dmitry Torokhov
  2005-03-10 15:57             ` Vojtech Pavlik
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Torokhov @ 2005-03-10 15:36 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Borislav Petkov, perex, vojtech, Andrew Morton, linux-kernel,
	alsa-devel, linux-input

On Wed, 9 Mar 2005 12:32:17 +0100, Adrian Bunk <bunk@stusta.de> wrote:
> This patch adds dummy gameport_register_port, gameport_unregister_port
> and gameport_set_phys functions to gameport.h for the case when a driver
> can't use gameport.
> 
> This fixes the compilation of some OSS drivers with GAMEPORT=n without
> the need to #if inside every single driver.
> 
> This patch also removes the non-working and now obsolete SOUND_GAMEPORT.
> 
> This patch is also an alternative solution for ALSA drivers with similar
> problems (but #if's inside the drivers might have the advantage of
> saving some more bytes of gameport is not available).
> 
> The only user-visible change is that for GAMEPORT=m the affected OSS
> drivers are now allowed to be built statically (but they won't have
> gameport support).
> 

Hi Adrian,

I have somewhat mixed feeling about the patch. Some solutions is
definitely needed but I don't like allocating memory that will never
be used. I think I would perfer #ifdefing gameport support is OSS
modules, _if_ #ifdefs are out of line and not in the middle of code
path.

I'll let Vojtech decide which way he wants to go - he could probably
apply the patch and then we could convert drivers one by one and kill
the stubs later.

-- 
Dmitry


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.6 patch] OSS gameport fixes
  2005-03-10 15:36           ` Dmitry Torokhov
@ 2005-03-10 15:57             ` Vojtech Pavlik
  0 siblings, 0 replies; 8+ messages in thread
From: Vojtech Pavlik @ 2005-03-10 15:57 UTC (permalink / raw)
  To: dtor_core
  Cc: Adrian Bunk, Borislav Petkov, perex, Andrew Morton, linux-kernel,
	alsa-devel, linux-input

On Thu, Mar 10, 2005 at 10:36:57AM -0500, Dmitry Torokhov wrote:
> On Wed, 9 Mar 2005 12:32:17 +0100, Adrian Bunk <bunk@stusta.de> wrote:
> > This patch adds dummy gameport_register_port, gameport_unregister_port
> > and gameport_set_phys functions to gameport.h for the case when a driver
> > can't use gameport.
> > 
> > This fixes the compilation of some OSS drivers with GAMEPORT=n without
> > the need to #if inside every single driver.
> > 
> > This patch also removes the non-working and now obsolete SOUND_GAMEPORT.
> > 
> > This patch is also an alternative solution for ALSA drivers with similar
> > problems (but #if's inside the drivers might have the advantage of
> > saving some more bytes of gameport is not available).
> > 
> > The only user-visible change is that for GAMEPORT=m the affected OSS
> > drivers are now allowed to be built statically (but they won't have
> > gameport support).
> > 
> 
> Hi Adrian,
> 
> I have somewhat mixed feeling about the patch. Some solutions is
> definitely needed but I don't like allocating memory that will never
> be used. I think I would perfer #ifdefing gameport support is OSS
> modules, _if_ #ifdefs are out of line and not in the middle of code
> path.
> 
> I'll let Vojtech decide which way he wants to go - he could probably
> apply the patch and then we could convert drivers one by one and kill
> the stubs later.

OK, I'll add it, since it fixes immediate breakage. I'll also accept
patches that #ifdef-out the relevant parts of sound drivers if gameport
support is not present.

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-03-10 15:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20050304033215.1ffa8fec.akpm@osdl.org>
     [not found] ` <200503070941.59365.petkov@uni-muenster.de>
2005-03-07 21:52   ` 2.6.11-mm1: sound <-> GAMEPORT problems Adrian Bunk
2005-03-07 22:05     ` Dmitry Torokhov
2005-03-07 22:12     ` Dmitry Torokhov
2005-03-07 23:06       ` [2.6 patch] sound/pci/cs4281.c fix typos in the SUPPORT_JOYSTICK=n case Adrian Bunk
2005-03-08 10:24         ` Vojtech Pavlik
2005-03-09 11:32         ` [2.6 patch] OSS gameport fixes Adrian Bunk
2005-03-10 15:36           ` Dmitry Torokhov
2005-03-10 15:57             ` Vojtech Pavlik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox