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

Modified Files:
        cmipci.c 
Log Message:
- changed joystick option to joystick_port option for cmipci driver.
- mentioning alsa-firmware package together with alsa-tools package
  for firmware loading.
- fixed the description of auto-invokation of vxloader for 2.6 kernels.







Index: cmipci.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/cmipci.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- cmipci.c    1 Dec 2003 10:30:45 -0000       1.54
+++ cmipci.c    5 Jan 2004 14:06:22 -0000       1.55
@@ -66,7 +66,7 @@
 static int soft_ac3[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)]=1};
 #endif
 #ifdef SUPPORT_JOYSTICK
-static int joystick[SNDRV_CARDS];
+static int joystick_port[SNDRV_CARDS];
 #endif
 
 MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
@@ -90,9 +90,9 @@
 MODULE_PARM_SYNTAX(soft_ac3, SNDRV_ENABLED "," SNDRV_BOOLEAN_TRUE_DESC);
 #endif
 #ifdef SUPPORT_JOYSTICK
-MODULE_PARM(joystick, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
-MODULE_PARM_DESC(joystick, "Enable joystick.");
-MODULE_PARM_SYNTAX(joystick, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
+MODULE_PARM(joystick_port, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(joystick_port, "Joystick port address.");
+MODULE_PARM_SYNTAX(joystick_port, SNDRV_ENABLED 
",allows:{{0},{1},{0x200},{0x201}},dialog:list");
 #endif
 
 #ifndef PCI_DEVICE_ID_CMEDIA_CM8738
@@ -352,9 +352,6 @@
 #define CM_EXTENT_MIDI   0x2
 #define CM_EXTENT_SYNTH          0x4
 
-/* fixed legacy joystick address */
-#define CM_JOYSTICK_ADDR       0x200
-  
 
 /*
  * pci ids
@@ -3151,13 +3148,29 @@
 #endif /* USE_VAR48KRATE */
 
 #ifdef SUPPORT_JOYSTICK
-       if (joystick[dev] &&
-           (cm->res_joystick = request_region(CM_JOYSTICK_ADDR, 8, "CMIPCI 
gameport")) != NULL) {
-               cm->gameport.io = CM_JOYSTICK_ADDR;
+       if (joystick_port[dev] > 0) {
+               if (joystick_port[dev] == 1) { /* auto-detect */
+                       static int ports[] = { 0x200, 0x201, 0 };
+                       int i;
+                       for (i = 0; ports[i]; i++) {
+                               joystick_port[dev] = ports[i];
+                               cm->res_joystick = request_region(ports[i], 8, "CMIPCI 
gameport");
+                               if (cm->res_joystick)
+                                       break;
+                       }
+               } else {
+                       cm->res_joystick = request_region(joystick_port[dev], 8, 
"CMIPCI gameport");
+               }
+       }
+       if (cm->res_joystick) {
+               cm->gameport.io = joystick_port[dev];
                snd_cmipci_set_bit(cm, CM_REG_FUNCTRL1, CM_JYSTK_EN);
                gameport_register_port(&cm->gameport);
-       } else
+       } else {
+               if (joystick_port[dev] > 0)
+                       printk(KERN_WARNING "cmipci: cannot reserve joystick ports\n");
                snd_cmipci_clear_bit(cm, CM_REG_FUNCTRL1, CM_JYSTK_EN);
+       }
 #endif
        *rcmipci = cm;
        return 0;



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to