Update of /cvsroot/alsa/alsa-kernel/pci
In directory sc8-pr-cvs1:/tmp/cvs-serv9811

Modified Files:
        cs4281.c ens1370.c es1938.c sonicvibes.c 
Log Message:
added conditional for gameport support.



Index: cs4281.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/cs4281.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- cs4281.c    10 Dec 2002 15:19:00 -0000      1.32
+++ cs4281.c    19 Dec 2002 16:26:30 -0000      1.33
@@ -26,6 +26,7 @@
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/slab.h>
+#include <linux/gameport.h>
 #include <sound/core.h>
 #include <sound/control.h>
 #include <sound/pcm.h>
@@ -35,9 +36,6 @@
 #define SNDRV_GET_ID
 #include <sound/initval.h>
 
-#ifndef LINUX_2_2
-#include <linux/gameport.h>
-#endif
 
 MODULE_AUTHOR("Jaroslav Kysela <[EMAIL PROTECTED]>");
 MODULE_DESCRIPTION("Cirrus Logic CS4281");
@@ -1309,7 +1307,7 @@
  * joystick support
  */
 
-#ifndef LINUX_2_2
+#if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)
 
 typedef struct snd_cs4281_gameport {
        struct gameport info;
@@ -1399,7 +1397,9 @@
        gameport_register_port(&gp->info);
 }
 
-#endif /* !LINUX_2_2 */
+#else
+#define snd_cs4281_gameport(chip) /*NOP*/
+#endif /* CONFIG_GAMEPORT || CONFIG_GAMEPORT_MODULE */
 
 
 /*
@@ -1408,7 +1408,7 @@
 
 static int snd_cs4281_free(cs4281_t *chip)
 {
-#ifndef LINUX_2_2
+#if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)
        if (chip->gameport) {
                gameport_unregister_port(&chip->gameport->info);
                kfree(chip->gameport);
@@ -2041,9 +2041,7 @@
                snd_card_free(card);
                return err;
        }
-#ifndef LINUX_2_2
        snd_cs4281_gameport(chip);
-#endif
        strcpy(card->driver, "CS4281");
        strcpy(card->shortname, "Cirrus Logic CS4281");
        sprintf(card->longname, "%s at 0x%lx, irq %d",

Index: ens1370.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ens1370.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- ens1370.c   11 Dec 2002 18:01:45 -0000      1.29
+++ ens1370.c   19 Dec 2002 16:26:30 -0000      1.30
@@ -405,8 +405,10 @@
        dma_addr_t bugbuf_addr;
 #endif
 
+#if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)
        struct gameport gameport;
        struct semaphore joy_sem;       // gameport configuration semaphore
+#endif
 };
 
 static void snd_audiopci_interrupt(int irq, void *dev_id, struct pt_regs *regs);
@@ -1576,6 +1578,7 @@
  *  General Switches...
  */
 
+#if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)
 /* MQ: gameport driver connectivity */
 #define ENSONIQ_JOY_CONTROL(xname, mask) \
 { .iface = SNDRV_CTL_ELEM_IFACE_CARD, .name = xname, .info = 
snd_ensoniq_control_info, \
@@ -1693,6 +1696,7 @@
 ES1371_JOYSTICK_ADDR("Joystick Address");
 
 #endif /* CHIP1371 */
+#endif /* CONFIG_GAMEPORT */
 
 /*
 
@@ -1950,7 +1954,9 @@
        snd_ctl_add(card, snd_ctl_new1(&snd_es1371_joystick_addr, ensoniq));
 #endif
        snd_ctl_add(card, snd_ctl_new1(&snd_ensoniq_control_joystick, ensoniq));
+#if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)
        ensoniq->gameport.io = 0x200;   // FIXME: is ES1371 configured like this above 
?
+#endif
        synchronize_irq(ensoniq->irq);
 
        if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, ensoniq, &ops)) < 0) {

Index: es1938.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/es1938.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- es1938.c    2 Dec 2002 16:49:31 -0000       1.19
+++ es1938.c    19 Dec 2002 16:26:30 -0000      1.20
@@ -52,6 +52,7 @@
 #include <linux/interrupt.h>
 #include <linux/pci.h>
 #include <linux/slab.h>
+#include <linux/gameport.h>
 #include <sound/core.h>
 #include <sound/control.h>
 #include <sound/pcm.h>
@@ -59,9 +60,6 @@
 #include <sound/mpu401.h>
 #define SNDRV_GET_ID
 #include <sound/initval.h>
-#ifndef LINUX_2_2
-#include <linux/gameport.h>
-#endif
 
 #include <asm/io.h>
 
@@ -248,7 +246,7 @@
        spinlock_t mixer_lock;
         snd_info_entry_t *proc_entry;
 
-#ifndef LINUX_2_2
+#if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)
        struct gameport gameport;
 #endif
 };
@@ -1328,7 +1326,7 @@
 
 static int snd_es1938_free(es1938_t *chip)
 {
-#ifndef LINUX_2_2
+#if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)
        if (chip->gameport.io)
                gameport_unregister_port(&chip->gameport);
 #endif
@@ -1645,7 +1643,7 @@
                                chip->mpu_port, 1, chip->irq, 0, &chip->rmidi) < 0) {
                printk(KERN_ERR "es1938: unable to initialize MPU-401\n");
        }
-#ifndef LINUX_2_2
+#if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)
        chip->gameport.io = chip->game_port;
        gameport_register_port(&chip->gameport);
 #endif

Index: sonicvibes.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/sonicvibes.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- sonicvibes.c        19 Nov 2002 17:22:02 -0000      1.18
+++ sonicvibes.c        19 Dec 2002 16:26:30 -0000      1.19
@@ -28,6 +28,7 @@
 #include <linux/interrupt.h>
 #include <linux/pci.h>
 #include <linux/slab.h>
+#include <linux/gameport.h>
 
 #include <sound/core.h>
 #include <sound/pcm.h>
@@ -37,9 +38,6 @@
 #include <sound/opl3.h>
 #define SNDRV_GET_ID
 #include <sound/initval.h>
-#ifndef LINUX_2_2
-#include <linux/gameport.h>
-#endif
 
 #include <asm/io.h>
 
@@ -257,7 +255,7 @@
        snd_kcontrol_t *master_mute;
        snd_kcontrol_t *master_volume;
 
-#ifndef LINUX_2_2
+#if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)
        struct gameport gameport;
 #endif
 };
@@ -1208,7 +1206,7 @@
 
 static int snd_sonicvibes_free(sonicvibes_t *sonic)
 {
-#ifndef LINUX_2_2
+#if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)
        if (sonic->gameport.io)
                gameport_unregister_port(&sonic->gameport);
 #endif
@@ -1512,7 +1510,7 @@
                snd_card_free(card);
                return err;
        }
-#ifndef LINUX_2_2
+#if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)
        sonic->gameport.io = sonic->game_port;
        gameport_register_port(&sonic->gameport);
 #endif



-------------------------------------------------------
This SF.NET email is sponsored by: Geek Gift Procrastinating?
Get the perfect geek gift now!  Before the Holidays pass you by.
T H I N K G E E K . C O M      http://www.thinkgeek.com/sf/
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to