aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt1
-rw-r--r--sound/isa/sscape.c33
2 files changed, 30 insertions, 4 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index cf985257ae40..6de56d134abb 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -1639,6 +1639,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
1639 mpu_irq - MPU-401 IRQ # (PnP setup) 1639 mpu_irq - MPU-401 IRQ # (PnP setup)
1640 dma - DMA # (PnP setup) 1640 dma - DMA # (PnP setup)
1641 dma2 - 2nd DMA # (PnP setup, -1 to disable) 1641 dma2 - 2nd DMA # (PnP setup, -1 to disable)
1642 joystick - Enable gameport - 0 = disable (default), 1 = enable
1642 1643
1643 This module supports multiple cards. 1644 This module supports multiple cards.
1644 1645
diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c
index c739374af20e..279be505b72e 100644
--- a/sound/isa/sscape.c
+++ b/sound/isa/sscape.c
@@ -54,6 +54,7 @@ static int irq[SNDRV_CARDS] __devinitdata = SNDRV_DEFAULT_IRQ;
54static int mpu_irq[SNDRV_CARDS] __devinitdata = SNDRV_DEFAULT_IRQ; 54static int mpu_irq[SNDRV_CARDS] __devinitdata = SNDRV_DEFAULT_IRQ;
55static int dma[SNDRV_CARDS] __devinitdata = SNDRV_DEFAULT_DMA; 55static int dma[SNDRV_CARDS] __devinitdata = SNDRV_DEFAULT_DMA;
56static int dma2[SNDRV_CARDS] __devinitdata = SNDRV_DEFAULT_DMA; 56static int dma2[SNDRV_CARDS] __devinitdata = SNDRV_DEFAULT_DMA;
57static bool joystick[SNDRV_CARDS] __devinitdata;
57 58
58module_param_array(index, int, NULL, 0444); 59module_param_array(index, int, NULL, 0444);
59MODULE_PARM_DESC(index, "Index number for SoundScape soundcard"); 60MODULE_PARM_DESC(index, "Index number for SoundScape soundcard");
@@ -79,6 +80,9 @@ MODULE_PARM_DESC(dma, "DMA # for SoundScape driver.");
79module_param_array(dma2, int, NULL, 0444); 80module_param_array(dma2, int, NULL, 0444);
80MODULE_PARM_DESC(dma2, "DMA2 # for SoundScape driver."); 81MODULE_PARM_DESC(dma2, "DMA2 # for SoundScape driver.");
81 82
83module_param_array(joystick, bool, NULL, 0444);
84MODULE_PARM_DESC(joystick, "Enable gameport.");
85
82#ifdef CONFIG_PNP 86#ifdef CONFIG_PNP
83static int isa_registered; 87static int isa_registered;
84static int pnp_registered; 88static int pnp_registered;
@@ -145,7 +149,6 @@ struct soundscape {
145 struct resource *io_res; 149 struct resource *io_res;
146 struct resource *wss_res; 150 struct resource *wss_res;
147 struct snd_wss *chip; 151 struct snd_wss *chip;
148 struct snd_mpu401 *mpu;
149 152
150 unsigned char midi_vol; 153 unsigned char midi_vol;
151}; 154};
@@ -815,7 +818,6 @@ static int __devinit create_mpu401(struct snd_card *card, int devnum, unsigned l
815 mpu->open_input = mpu401_open; 818 mpu->open_input = mpu401_open;
816 mpu->open_output = mpu401_open; 819 mpu->open_output = mpu401_open;
817 mpu->private_data = sscape; 820 mpu->private_data = sscape;
818 sscape->mpu = mpu;
819 821
820 initialise_mpu401(mpu); 822 initialise_mpu401(mpu);
821 } 823 }
@@ -836,12 +838,30 @@ static int __devinit create_ad1845(struct snd_card *card, unsigned port,
836 register struct soundscape *sscape = get_card_soundscape(card); 838 register struct soundscape *sscape = get_card_soundscape(card);
837 struct snd_wss *chip; 839 struct snd_wss *chip;
838 int err; 840 int err;
841 int codec_type = WSS_HW_DETECT;
842
843 switch (sscape->type) {
844 case MEDIA_FX:
845 case SSCAPE:
846 /*
847 * There are some freak examples of early Soundscape cards
848 * with CS4231 instead of AD1848/CS4248. Unfortunately, the
849 * CS4231 works only in CS4248 compatibility mode on
850 * these cards so force it.
851 */
852 if (sscape->ic_type != IC_OPUS)
853 codec_type = WSS_HW_AD1848;
854 break;
839 855
840 if (sscape->type == SSCAPE_VIVO) 856 case SSCAPE_VIVO:
841 port += 4; 857 port += 4;
858 break;
859 default:
860 break;
861 }
842 862
843 err = snd_wss_create(card, port, -1, irq, dma1, dma2, 863 err = snd_wss_create(card, port, -1, irq, dma1, dma2,
844 WSS_HW_DETECT, WSS_HWSHARE_DMA1, &chip); 864 codec_type, WSS_HWSHARE_DMA1, &chip);
845 if (!err) { 865 if (!err) {
846 unsigned long flags; 866 unsigned long flags;
847 struct snd_pcm *pcm; 867 struct snd_pcm *pcm;
@@ -927,6 +947,7 @@ static int __devinit create_sscape(int dev, struct snd_card *card)
927 struct resource *wss_res; 947 struct resource *wss_res;
928 unsigned long flags; 948 unsigned long flags;
929 int err; 949 int err;
950 int val;
930 const char *name; 951 const char *name;
931 952
932 /* 953 /*
@@ -1026,6 +1047,10 @@ static int __devinit create_sscape(int dev, struct snd_card *card)
1026 sscape_write_unsafe(sscape->io_base, GA_DMAB_REG, 0x20); 1047 sscape_write_unsafe(sscape->io_base, GA_DMAB_REG, 0x20);
1027 1048
1028 mpu_irq_cfg |= mpu_irq_cfg << 2; 1049 mpu_irq_cfg |= mpu_irq_cfg << 2;
1050 val = sscape_read_unsafe(sscape->io_base, GA_HMCTL_REG) & 0xF7;
1051 if (joystick[dev])
1052 val |= 8;
1053 sscape_write_unsafe(sscape->io_base, GA_HMCTL_REG, val | 0x10);
1029 sscape_write_unsafe(sscape->io_base, GA_INTCFG_REG, 0xf0 | mpu_irq_cfg); 1054 sscape_write_unsafe(sscape->io_base, GA_INTCFG_REG, 0xf0 | mpu_irq_cfg);
1030 sscape_write_unsafe(sscape->io_base, 1055 sscape_write_unsafe(sscape->io_base,
1031 GA_CDCFG_REG, 0x09 | DMA_8BIT 1056 GA_CDCFG_REG, 0x09 | DMA_8BIT