Changeset 277 for GPL/branches/alsa-resync1/alsa-kernel/pci/cmipci.c
- Timestamp:
- Dec 14, 2007, 8:27:04 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/alsa-resync1/alsa-kernel/pci/cmipci.c
r262 r277 28 28 //#include <linux/pci.h> 29 29 #include <linux/slab.h> 30 #include <linux/gameport.h> 30 31 #include <sound/core.h> 31 32 #include <sound/info.h> … … 79 80 MODULE_PARM_DESC(soft_ac3, "Sofware-conversion of raw SPDIF packets (model 033 only)."); 80 81 MODULE_PARM_SYNTAX(soft_ac3, SNDRV_ENABLED "," SNDRV_BOOLEAN_TRUE_DESC); 82 #endif 83 #ifdef SUPPORT_JOYSTICK 84 MODULE_PARM(joystick, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); 85 MODULE_PARM_DESC(joystick, "Enable joystick."); 86 MODULE_PARM_SYNTAX(joystick, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); 81 87 #endif 82 88 … … 349 355 #define CM_EXTENT_MIDI 0x2 350 356 #define CM_EXTENT_SYNTH 0x4 357 358 /* fixed legacy joystick address */ 359 #define CM_JOYSTICK_ADDR 0x200 360 351 361 352 362 /* … … 2302 2312 DEFINE_BIT_SWITCH_ARG(line_rear, CM_REG_MIXER1, CM_SPK4, 1, 0); 2303 2313 DEFINE_BIT_SWITCH_ARG(line_bass, CM_REG_LEGACY_CTRL, CM_LINE_AS_BASS, 0, 0); 2304 DEFINE_BIT_SWITCH_ARG(joystick, CM_REG_FUNCTRL1, CM_JYSTK_EN, 0, 0); 2314 // DEFINE_BIT_SWITCH_ARG(joystick, CM_REG_FUNCTRL1, CM_JYSTK_EN, 0, 0); /* now module option */ 2305 2315 DEFINE_SWITCH_ARG(modem, CM_REG_MISC_CTRL, CM_FLINKON|CM_FLINKOFF, CM_FLINKON, 0, 0); 2306 2316 … … 2512 2522 /* card control switches */ 2513 2523 static struct snd_kcontrol_new snd_cmipci_control_switches[] __devinitdata = { 2514 2524 // DEFINE_CARD_SWITCH("Joystick", joystick), 2515 2525 DEFINE_CARD_SWITCH("Modem", modem), 2516 2526 }; … … 2973 2983 #endif /* USE_VAR48KRATE */ 2974 2984 2985 #ifdef SUPPORT_JOYSTICK 2986 if (joystick[dev] && 2987 (cm->res_joystick = request_region(CM_JOYSTICK_ADDR, 8, "CMIPCI gameport")) != NULL) { 2988 cm->gameport.io = CM_JOYSTICK_ADDR; 2989 snd_cmipci_set_bit(cm, CM_REG_FUNCTRL1, CM_JYSTK_EN); 2990 gameport_register_port(&cm->gameport); 2991 } else 2992 snd_cmipci_clear_bit(cm, CM_REG_FUNCTRL1, CM_JYSTK_EN); 2993 #endif 2975 2994 *rcmipci = cm; 2976 2995 return 0; … … 3174 3193 3175 3194 /* format is: snd-cmipci=enable,index,id, 3176 mpu_port,fm_port*/3195 mpu_port,fm_port,soft_ac3,joystick */ 3177 3196 3178 3197 static int __init alsa_card_cmipci_setup(char *str) … … 3185 3204 get_option(&str,&index[nr_dev]) == 2 && 3186 3205 get_id(&str,&id[nr_dev]) == 2 && 3187 get_option(&str,(int *)&mpu_port[nr_dev]) == 2 && 3188 get_option(&str,(int *)&fm_port[nr_dev]) == 2); 3206 get_option_long(&str,&mpu_port[nr_dev]) == 2 && 3207 get_option_long(&str,&fm_port[nr_dev]) == 2 3208 #ifdef DO_SOFT_AC3 3209 && get_option(&str,&soft_ac3[nr_dev]) == 2 3210 #endif 3211 #ifdef SUPPORT_JOYSTICK 3212 && get_option(&str,&joystick[nr_dev]) == 2 3213 #endif 3214 ); 3189 3215 nr_dev++; 3190 3216 return 1;
Note:
See TracChangeset
for help on using the changeset viewer.