Changeset 277 for GPL/branches/alsa-resync1/alsa-kernel/pci
- Timestamp:
- Dec 14, 2007, 8:27:04 AM (18 years ago)
- Location:
- GPL/branches/alsa-resync1/alsa-kernel/pci
- Files:
-
- 9 edited
-
als4000.c (modified) (9 diffs)
-
cmipci.c (modified) (8 diffs)
-
es1968.c (modified) (12 diffs)
-
ice1712/ice1712.c (modified) (3 diffs)
-
intel8x0.c (modified) (4 diffs)
-
nm256/nm256.c (modified) (1 diff)
-
rme96.c (modified) (3 diffs)
-
ymfpci/ymfpci.c (modified) (8 diffs)
-
ymfpci/ymfpci_main.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/alsa-resync1/alsa-kernel/pci/als4000.c
r210 r277 64 64 #include <linux/pci.h> 65 65 #include <linux/slab.h> 66 #include <linux/gameport.h> 66 67 #include <sound/core.h> 67 68 #include <sound/pcm.h> … … 79 80 MODULE_DEVICES("{{Avance Logic,ALS4000}}"); 80 81 82 #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) 83 #define SUPPORT_JOYSTICK 1 84 #endif 85 81 86 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ 82 87 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ 83 88 static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ 84 static int joystick_port[SNDRV_CARDS] = 85 #ifdef CONFIG_ISA 86 {0x200}; /* enable as default */ 87 #else 88 {0}; /* disabled */ 89 #ifdef SUPPORT_JOYSTICK 90 static int joystick_port[SNDRV_CARDS]; 89 91 #endif 90 92 … … 536 538 /******************************************************************/ 537 539 538 static void __devinitsnd_als4000_set_addr(unsigned long gcr,540 static void snd_als4000_set_addr(unsigned long gcr, 539 541 unsigned int sb, 540 542 unsigned int mpu, … … 610 612 unsigned short word; 611 613 int err; 614 int joystick = 0; 612 615 613 616 if (dev >= SNDRV_CARDS) … … 637 640 pci_set_master(pci); 638 641 639 /* disable all legacy ISA stuff except for joystick */640 snd_als4000_set_addr(gcr, 0, 0, 0, joystick_port[dev]);641 642 642 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 643 643 sizeof( snd_card_als4000_t ) ); … … 651 651 acard->gcr = gcr; 652 652 card->private_free = snd_card_als4000_free; 653 654 /* disable all legacy ISA stuff except for joystick */ 655 #ifdef SUPPORT_JOYSTICK 656 if (joystick_port[dev] > 0 && 657 (acard->res_joystick = request_region(joystick_port[dev], 8, "ALS4000 gameport")) != NULL) 658 joystick = joystick_port[dev]; 659 #endif 660 snd_als4000_set_addr(gcr, 0, 0, 0, joystick); 653 661 654 662 if ((err = snd_sbdsp_create(card, … … 697 705 } 698 706 707 #ifdef SUPPORT_JOYSTICK 708 if (acard->res_joystick) { 709 acard->gameport.io = joystick; 710 gameport_register_port(&acard->gameport); 711 } 712 #endif 699 713 strcpy(card->driver, "ALS4000"); 700 714 strcpy(card->shortname, "Avance Logic ALS4000"); … … 747 761 #ifndef MODULE 748 762 749 /* format is: snd-als4000=enable,index,id */763 /* format is: snd-als4000=enable,index,id,joystick_port */ 750 764 751 765 static int __init alsa_card_als4000_setup(char *str) … … 757 771 (void)(get_option(&str,&enable[nr_dev]) == 2 && 758 772 get_option(&str,&index[nr_dev]) == 2 && 759 get_id(&str,&id[nr_dev]) == 2); 773 get_id(&str,&id[nr_dev]) == 2 774 #ifdef SUPPORT_JOYSTICK 775 && get_option(&str,&joystick_port[nr_dev]) == 2 776 #endif 777 ); 760 778 nr_dev++; 761 779 return 1; -
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 DEFINE_CARD_SWITCH("Joystick", joystick),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; -
GPL/branches/alsa-resync1/alsa-kernel/pci/es1968.c
r262 r277 95 95 */ 96 96 97 #define __SND_OSS_COMPAT__98 97 #include <sound/driver.h> 99 98 #include <asm/io.h> … … 103 102 #include <linux/pci.h> 104 103 #include <linux/slab.h> 104 #include <linux/gameport.h> 105 105 #include <sound/core.h> 106 106 #include <sound/pcm.h> … … 109 109 #define SNDRV_GET_ID 110 110 #include <sound/initval.h> 111 112 #define chip_t es1968_t 111 113 112 114 #define CARD_NAME "ESS Maestro1/2" … … 120 122 "{ESS,Maestro 1}," 121 123 "{TerraTec,DMX}}"); 124 125 #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) 126 #define SUPPORT_JOYSTICK 1 127 #endif 122 128 123 129 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 1-MAX */ … … 130 136 static int use_pm[SNDRV_CARDS] = { REPEAT_SNDRV(2) }; 131 137 static int enable_mpu[SNDRV_CARDS] = { REPEAT_SNDRV(1) }; 138 #ifdef SUPPORT_JOYSTICK 139 static int joystick[SNDRV_CARDS]; 140 #endif 132 141 133 142 MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); … … 158 167 MODULE_PARM_DESC(enable_mpu, "Enable MPU401. (0 = off, 1 = on, 2 = auto)"); 159 168 MODULE_PARM_SYNTAX(enable_mpu, SNDRV_ENABLED "," SNDRV_BOOLEAN_TRUE_DESC); 169 #ifdef SUPPORT_JOYSTICK 170 MODULE_PARM(joystick, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); 171 MODULE_PARM_DESC(joystick, "Enable joystick."); 172 MODULE_PARM_SYNTAX(joystick, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC); 173 #endif 160 174 161 175 … … 610 624 #ifdef CONFIG_PM 611 625 u16 apu_map[NR_APUS][NR_APU_REGS]; 626 #endif 627 628 #ifdef SUPPORT_JOYSTICK 629 struct gameport gameport; 630 struct resource *res_joystick; 612 631 #endif 613 632 }; … … 2506 2525 if (chip->irq >= 0) 2507 2526 free_irq(chip->irq, (void *)chip); 2527 #ifdef SUPPORT_JOYSTICK 2528 if (chip->res_joystick) { 2529 gameport_unregister_port(&chip->gameport); 2530 release_resource(chip->res_joystick); 2531 kfree_nocheck(chip->res_joystick); 2532 } 2533 #endif 2508 2534 snd_es1968_set_acpi(chip, ACPI_D3); 2509 2535 chip->master_switch = NULL; … … 2651 2677 2652 2678 /* 2653 * joystick2654 */2655 2656 static int snd_es1968_joystick_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)2657 {2658 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;2659 uinfo->count = 1;2660 uinfo->value.integer.min = 0;2661 uinfo->value.integer.max = 1;2662 return 0;2663 }2664 2665 static int snd_es1968_joystick_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)2666 {2667 es1968_t *chip = snd_kcontrol_chip(kcontrol);2668 u16 val;2669 2670 pci_read_config_word(chip->pci, ESM_LEGACY_AUDIO_CONTROL, &val);2671 ucontrol->value.integer.value[0] = (val & 0x04) ? 1 : 0;2672 return 0;2673 }2674 2675 static int snd_es1968_joystick_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)2676 {2677 es1968_t *chip = snd_kcontrol_chip(kcontrol);2678 u16 val, oval;2679 2680 pci_read_config_word(chip->pci, ESM_LEGACY_AUDIO_CONTROL, &oval);2681 val = oval & ~0x04;2682 if (ucontrol->value.integer.value[0])2683 val |= 0x04;2684 if (val != oval) {2685 pci_write_config_word(chip->pci, ESM_LEGACY_AUDIO_CONTROL, val);2686 return 1;2687 }2688 return 0;2689 }2690 2691 #define num_controls(ary) (sizeof(ary) / sizeof(snd_kcontrol_new_t))2692 2693 static snd_kcontrol_new_t snd_es1968_control_switches[] __devinitdata = {2694 {2695 .name = "Joystick",2696 .iface = SNDRV_CTL_ELEM_IFACE_CARD,2697 .info = snd_es1968_joystick_info,2698 .get = snd_es1968_joystick_get,2699 .put = snd_es1968_joystick_put,2700 }2701 };2702 2703 /*2704 2679 */ 2705 2680 static int __devinit snd_es1968_probe(struct pci_dev *pci, … … 2798 2773 printk("snd_es1968_probe cp8\n"); 2799 2774 2800 /* card switches */ 2801 for (i = 0; i < num_controls(snd_es1968_control_switches); i++) { 2802 err = snd_ctl_add(card, snd_ctl_new1(&snd_es1968_control_switches[i], chip)); 2803 if (err < 0) { 2804 snd_card_free(card); 2805 return err; 2806 } 2807 } 2775 #ifdef SUPPORT_JOYSTICK 2776 #define JOYSTICK_ADDR 0x200 2777 if (joystick[dev] && 2778 (chip->res_joystick = request_region(JOYSTICK_ADDR, 8, "ES1968 gameport")) != NULL) { 2779 u16 val; 2780 pci_read_config_word(pci, ESM_LEGACY_AUDIO_CONTROL, &val); 2781 pci_write_config_word(pci, ESM_LEGACY_AUDIO_CONTROL, val | 0x04); 2782 chip->gameport.io = JOYSTICK_ADDR; 2783 gameport_register_port(&chip->gameport); 2784 } 2785 #endif 2808 2786 printk("snd_es1968_probe cp9\n"); 2809 2787 … … 2879 2857 clock, 2880 2858 use_pm, 2881 enable_mpu 2859 enable_mpu, 2860 joystick 2882 2861 */ 2883 2862 … … 2896 2875 get_option(&str,&clock[nr_dev]) == 2 && 2897 2876 get_option(&str,&use_pm[nr_dev]) == 2 && 2898 get_option(&str,&enable_mpu[nr_dev]) == 2); 2877 get_option(&str,&enable_mpu[nr_dev]) == 2 2878 #ifdef SUPPORT_JOYSTICK 2879 && get_option(&str,&joystick[nr_dev]) == 2 2880 #endif 2881 ); 2899 2882 nr_dev++; 2900 2883 return 1; -
GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/ice1712.c
r262 r277 1041 1041 snd_BUG(); 1042 1042 val = 0; 1043 rate = 48000; 1043 1044 break; 1044 1045 } … … 1051 1052 ice->akm[i].ops.set_rate_val(&ice->akm[i], rate); 1052 1053 } 1054 if (ice->spdif.ops.setup_rate) 1055 ice->spdif.ops.setup_rate(ice, rate); 1053 1056 } 1054 1057 … … 1073 1076 1074 1077 snd_ice1712_set_pro_rate(ice, params_rate(hw_params), 0); 1075 if (ice->spdif.ops.setup_rate)1076 ice->spdif.ops.setup_rate(ice, params_rate(hw_params));1077 1078 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); 1078 1079 } -
GPL/branches/alsa-resync1/alsa-kernel/pci/intel8x0.c
r260 r277 34 34 #include <linux/pci.h> 35 35 #include <linux/slab.h> 36 #include <linux/gameport.h> 36 37 #include <sound/core.h> 37 38 #include <sound/pcm.h> … … 3242 3243 } 3243 3244 3244 #if 0 // fixme to be gone?3245 3245 static void __devexit snd_intel8x0_joystick_remove(struct pci_dev *pci) 3246 3246 { … … 3258 3258 pci_write_config_word(pci, 0xe6, val); 3259 3259 } 3260 #endif // fixme to be gone3261 3260 3262 3261 static struct pci_device_id snd_intel8x0_joystick_ids[] = { … … 3279 3278 .id_table = snd_intel8x0_joystick_ids, 3280 3279 .probe = snd_intel8x0_joystick_probe, 3280 .remove = __devexit_p(snd_intel8x0_joystick_remove), 3281 3281 }; 3282 3282 3283 static int have_joystick; 3283 3284 #endif -
GPL/branches/alsa-resync1/alsa-kernel/pci/nm256/nm256.c
r76 r277 338 338 } 339 339 #endif 340 memcpy_toio( chip->buffer + offset, src, size);340 memcpy_toio((void *)chip->buffer + offset, src, size); 341 341 } 342 342 -
GPL/branches/alsa-resync1/alsa-kernel/pci/rme96.c
r262 r277 1525 1525 1526 1526 if (bytes > RME96_BUFFER_SIZE - rme96->playback_ptr) { 1527 memcpy_toio( rme96->iobase + RME96_IO_PLAY_BUFFER +1528 rme96->playback_ptr,1527 memcpy_toio((void *)(rme96->iobase + RME96_IO_PLAY_BUFFER + 1528 rme96->playback_ptr), 1529 1529 runtime->dma_area + rme96->playback_ptr, 1530 1530 RME96_BUFFER_SIZE - rme96->playback_ptr); … … 1533 1533 bytes = RME96_BUFFER_SIZE; 1534 1534 } 1535 memcpy_toio( rme96->iobase + RME96_IO_PLAY_BUFFER,1535 memcpy_toio((void *)(rme96->iobase + RME96_IO_PLAY_BUFFER), 1536 1536 runtime->dma_area, 1537 1537 bytes); 1538 1538 rme96->playback_ptr = bytes; 1539 1539 } else if (bytes != 0) { 1540 memcpy_toio( rme96->iobase + RME96_IO_PLAY_BUFFER +1541 rme96->playback_ptr,1540 memcpy_toio((void *)(rme96->iobase + RME96_IO_PLAY_BUFFER + 1541 rme96->playback_ptr), 1542 1542 runtime->dma_area + rme96->playback_ptr, 1543 1543 bytes); … … 1561 1561 if (ptr > rme96->capture_ptr) { 1562 1562 memcpy_fromio(runtime->dma_area + rme96->capture_ptr, 1563 rme96->iobase + RME96_IO_REC_BUFFER +1564 rme96->capture_ptr,1563 (void *)(rme96->iobase + RME96_IO_REC_BUFFER + 1564 rme96->capture_ptr), 1565 1565 ptr - rme96->capture_ptr); 1566 1566 rme96->capture_ptr += ptr - rme96->capture_ptr; 1567 1567 } else if (ptr < rme96->capture_ptr) { 1568 1568 memcpy_fromio(runtime->dma_area + rme96->capture_ptr, 1569 rme96->iobase + RME96_IO_REC_BUFFER +1570 rme96->capture_ptr,1569 (void *)(rme96->iobase + RME96_IO_REC_BUFFER + 1570 rme96->capture_ptr), 1571 1571 RME96_BUFFER_SIZE - rme96->capture_ptr); 1572 1572 memcpy_fromio(runtime->dma_area, 1573 rme96->iobase + RME96_IO_REC_BUFFER,1573 (void *)(rme96->iobase + RME96_IO_REC_BUFFER), 1574 1574 ptr); 1575 1575 rme96->capture_ptr = ptr; -
GPL/branches/alsa-resync1/alsa-kernel/pci/ymfpci/ymfpci.c
r212 r277 51 51 static long fm_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1}; 52 52 static long mpu_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1}; 53 #ifdef SUPPORT_JOYSTICK 54 static long joystick_port[SNDRV_CARDS]; 55 #endif 53 56 #endif 54 57 static int rear_switch[SNDRV_CARDS] = {1,1,1,1,1,1,1,1}; … … 69 72 MODULE_PARM_DESC(fm_port, "FM OPL-3 Port."); 70 73 MODULE_PARM_SYNTAX(fm_port, SNDRV_ENABLED); 74 #ifdef SUPPORT_JOYSTICK 75 MODULE_PARM(joystick_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l"); 76 MODULE_PARM_DESC(joystick_port, "Joystick port address"); 77 MODULE_PARM_SYNTAX(joystick_port, SNDRV_ENABLED); 78 #endif 71 79 MODULE_PARM(rear_switch, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); 72 80 MODULE_PARM_DESC(rear_switch, "Enable shared rear/line-in switch"); … … 92 100 struct resource *fm_res = NULL; 93 101 struct resource *mpu_res = NULL; 102 #ifdef SUPPORT_JOYSTICK 103 struct resource *joystick_res = NULL; 104 #endif 94 105 ymfpci_t *chip; 95 106 opl3_t *opl3; … … 124 135 125 136 if (pci_id->device >= 0x0010) { /* YMF 744/754 */ 126 if (fm_port[dev] < 0) {137 if (fm_port[dev] <= 0) { 127 138 fm_port[dev] = pci_resource_start(pci, 1); 128 139 } 129 if (fm_port[dev] > =0 &&140 if (fm_port[dev] > 0 && 130 141 (fm_res = request_region(fm_port[dev], 4, "YMFPCI OPL3")) != NULL) { 131 142 legacy_ctrl |= YMFPCI_LEGACY_FMEN; 132 143 pci_write_config_word(pci, PCIR_DSXG_FMBASE, fm_port[dev]); 133 144 } 134 if (mpu_port[dev] < 0) {145 if (mpu_port[dev] <= 0) { 135 146 mpu_port[dev] = pci_resource_start(pci, 1) + 0x20; 136 147 } 137 if (mpu_port[dev] > =0 &&148 if (mpu_port[dev] > 0 && 138 149 (mpu_res = request_region(mpu_port[dev], 2, "YMFPCI MPU401")) != NULL) { 139 150 legacy_ctrl |= YMFPCI_LEGACY_MEN; 140 151 pci_write_config_word(pci, PCIR_DSXG_MPU401BASE, mpu_port[dev]); 141 152 } 153 #ifdef SUPPORT_JOYSTICK 154 if (joystick_port[dev] < 0) { 155 joystick_port[dev] = pci_resource_start(pci, 2); 156 } 157 if (joystick_port[dev] >= 0 && 158 (joystick_res = request_region(joystick_port[dev], 1, "YMFPCI gameport")) != NULL) { 159 legacy_ctrl |= YMFPCI_LEGACY_JPEN; 160 pci_write_config_word(pci, PCIR_DSXG_JOYBASE, joystick_port[dev]); 161 } 162 #endif 142 163 } else { 143 164 switch (fm_port[dev]) { … … 169 190 mpu_port[dev] = -1; 170 191 } 192 #ifdef SUPPORT_JOYSTICK 193 switch (joystick_port[dev]) { 194 case 0x201: legacy_ctrl2 |= 0 << 6; break; 195 case 0x202: legacy_ctrl2 |= 1 << 6; break; 196 case 0x204: legacy_ctrl2 |= 2 << 6; break; 197 case 0x205: legacy_ctrl2 |= 3 << 6; break; 198 default: joystick_port[dev] = -1; break; 199 } 200 if (joystick_port[dev] > 0 && 201 (joystick_res = request_region(joystick_port[dev], 1, "YMFPCI gameport")) != NULL) { 202 legacy_ctrl |= YMFPCI_LEGACY_JPEN; 203 } else { 204 legacy_ctrl2 &= ~YMFPCI_LEGACY2_JSIO; 205 joystick_port[dev] = -1; 206 } 207 #endif 171 208 } 172 209 if (mpu_res) { … … 190 227 kfree_nocheck(fm_res); 191 228 } 229 #ifdef SUPPORT_JOYSTICK 230 if (joystick_res) { 231 release_resource(joystick_res); 232 kfree_nocheck(joystick_res); 233 } 234 #endif 192 235 return err; 193 236 } … … 252 295 } 253 296 #endif 254 #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) 255 if ((err = snd_ymfpci_joystick(chip)) < 0) { 256 printk(KERN_WARNING "ymfpci: cannot initialize joystick, skipping...\n"); 257 } 258 #endif 297 #ifdef SUPPORT_JOYSTICK 298 if (chip->joystick_res) { 299 chip->gameport.io = joystick_port[dev]; 300 gameport_register_port(&chip->gameport); 301 } 302 #endif 303 strcpy(card->driver, str); 304 sprintf(card->shortname, "Yamaha DS-XG PCI (%s)", str); 305 sprintf(card->longname, "%s at 0x%lx, irq %i", 306 card->shortname, 307 chip->reg_area_phys, 308 chip->irq); 259 309 260 310 if ((err = snd_card_register(card)) < 0) { … … 321 371 get_option(&str,&index[nr_dev]) == 2 && 322 372 get_id(&str,&id[nr_dev]) == 2 && 323 get_option (&str,(int *)&fm_port[nr_dev]) == 2 &&324 get_option (&str,(int *)&mpu_port[nr_dev]) == 2);373 get_option_long(&str,&fm_port[nr_dev]) == 2 && 374 get_option_long(&str,&mpu_port[nr_dev]) == 2); 325 375 nr_dev++; 326 376 return 1; -
GPL/branches/alsa-resync1/alsa-kernel/pci/ymfpci/ymfpci_main.c
r250 r277 2316 2316 init_waitqueue_head(&chip->interrupt_sleep); 2317 2317 atomic_set(&chip->interrupt_sleep_count, 0); 2318 #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))2319 init_MUTEX(&chip->joystick_mutex);2320 #endif2321 2318 chip->card = card; 2322 2319 chip->pci = pci;
Note:
See TracChangeset
for help on using the changeset viewer.
