diff options
Diffstat (limited to 'sound/isa/es1688/es1688.c')
-rw-r--r-- | sound/isa/es1688/es1688.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c index d746750410ea..442b081cafb7 100644 --- a/sound/isa/es1688/es1688.c +++ b/sound/isa/es1688/es1688.c | |||
@@ -49,6 +49,7 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ | |||
49 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ | 49 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ |
50 | static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE; /* Enable this card */ | 50 | static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE; /* Enable this card */ |
51 | static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* 0x220,0x240,0x260 */ | 51 | static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* 0x220,0x240,0x260 */ |
52 | static long fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* Usually 0x388 */ | ||
52 | static long mpu_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1}; | 53 | static long mpu_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1}; |
53 | static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 5,7,9,10 */ | 54 | static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 5,7,9,10 */ |
54 | static int mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 5,7,9,10 */ | 55 | static int mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 5,7,9,10 */ |
@@ -65,6 +66,8 @@ MODULE_PARM_DESC(port, "Port # for " CRD_NAME " driver."); | |||
65 | module_param_array(mpu_port, long, NULL, 0444); | 66 | module_param_array(mpu_port, long, NULL, 0444); |
66 | MODULE_PARM_DESC(mpu_port, "MPU-401 port # for " CRD_NAME " driver."); | 67 | MODULE_PARM_DESC(mpu_port, "MPU-401 port # for " CRD_NAME " driver."); |
67 | module_param_array(irq, int, NULL, 0444); | 68 | module_param_array(irq, int, NULL, 0444); |
69 | module_param_array(fm_port, long, NULL, 0444); | ||
70 | MODULE_PARM_DESC(fm_port, "FM port # for ES1688 driver."); | ||
68 | MODULE_PARM_DESC(irq, "IRQ # for " CRD_NAME " driver."); | 71 | MODULE_PARM_DESC(irq, "IRQ # for " CRD_NAME " driver."); |
69 | module_param_array(mpu_irq, int, NULL, 0444); | 72 | module_param_array(mpu_irq, int, NULL, 0444); |
70 | MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for " CRD_NAME " driver."); | 73 | MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for " CRD_NAME " driver."); |
@@ -143,13 +146,19 @@ static int __devinit snd_es1688_probe(struct device *dev, unsigned int n) | |||
143 | sprintf(card->longname, "%s at 0x%lx, irq %i, dma %i", pcm->name, | 146 | sprintf(card->longname, "%s at 0x%lx, irq %i, dma %i", pcm->name, |
144 | chip->port, chip->irq, chip->dma8); | 147 | chip->port, chip->irq, chip->dma8); |
145 | 148 | ||
146 | if (snd_opl3_create(card, chip->port, chip->port + 2, | 149 | if (fm_port[n] == SNDRV_AUTO_PORT) |
147 | OPL3_HW_OPL3, 0, &opl3) < 0) | 150 | fm_port[n] = port[n]; /* share the same port */ |
148 | dev_warn(dev, "opl3 not detected at 0x%lx\n", chip->port); | 151 | |
149 | else { | 152 | if (fm_port[n] > 0) { |
150 | error = snd_opl3_hwdep_new(opl3, 0, 1, NULL); | 153 | if (snd_opl3_create(card, fm_port[n], fm_port[n] + 2, |
151 | if (error < 0) | 154 | OPL3_HW_OPL3, 0, &opl3) < 0) |
152 | goto out; | 155 | dev_warn(dev, |
156 | "opl3 not detected at 0x%lx\n", fm_port[n]); | ||
157 | else { | ||
158 | error = snd_opl3_hwdep_new(opl3, 0, 1, NULL); | ||
159 | if (error < 0) | ||
160 | goto out; | ||
161 | } | ||
153 | } | 162 | } |
154 | 163 | ||
155 | if (mpu_irq[n] >= 0 && mpu_irq[n] != SNDRV_AUTO_IRQ && | 164 | if (mpu_irq[n] >= 0 && mpu_irq[n] != SNDRV_AUTO_IRQ && |