Ignore:
Timestamp:
Dec 14, 2007, 8:27:04 AM (18 years ago)
Author:
Brendan Oakley
Message:

Merged to ALSA 0.9.8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/alsa-resync1/alsa-kernel/pci/cmipci.c

    r262 r277  
    2828//#include <linux/pci.h>
    2929#include <linux/slab.h>
     30#include <linux/gameport.h>
    3031#include <sound/core.h>
    3132#include <sound/info.h>
     
    7980MODULE_PARM_DESC(soft_ac3, "Sofware-conversion of raw SPDIF packets (model 033 only).");
    8081MODULE_PARM_SYNTAX(soft_ac3, SNDRV_ENABLED "," SNDRV_BOOLEAN_TRUE_DESC);
     82#endif
     83#ifdef SUPPORT_JOYSTICK
     84MODULE_PARM(joystick, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
     85MODULE_PARM_DESC(joystick, "Enable joystick.");
     86MODULE_PARM_SYNTAX(joystick, SNDRV_ENABLED "," SNDRV_BOOLEAN_FALSE_DESC);
    8187#endif
    8288
     
    349355#define CM_EXTENT_MIDI    0x2
    350356#define CM_EXTENT_SYNTH   0x4
     357
     358/* fixed legacy joystick address */
     359#define CM_JOYSTICK_ADDR        0x200
     360 
    351361
    352362/*
     
    23022312DEFINE_BIT_SWITCH_ARG(line_rear, CM_REG_MIXER1, CM_SPK4, 1, 0);
    23032313DEFINE_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 */
    23052315DEFINE_SWITCH_ARG(modem, CM_REG_MISC_CTRL, CM_FLINKON|CM_FLINKOFF, CM_FLINKON, 0, 0);
    23062316
     
    25122522/* card control switches */
    25132523static struct snd_kcontrol_new snd_cmipci_control_switches[] __devinitdata = {
    2514     DEFINE_CARD_SWITCH("Joystick", joystick),
     2524        // DEFINE_CARD_SWITCH("Joystick", joystick),
    25152525    DEFINE_CARD_SWITCH("Modem", modem),
    25162526};
     
    29732983#endif /* USE_VAR48KRATE */
    29742984
     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
    29752994    *rcmipci = cm;
    29762995    return 0;
     
    31743193
    31753194/* format is: snd-cmipci=enable,index,id,
    3176  mpu_port,fm_port */
     3195                         mpu_port,fm_port,soft_ac3,joystick */
    31773196
    31783197static int __init alsa_card_cmipci_setup(char *str)
     
    31853204           get_option(&str,&index[nr_dev]) == 2 &&
    31863205           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               );
    31893215    nr_dev++;
    31903216    return 1;
Note: See TracChangeset for help on using the changeset viewer.