diff options
Diffstat (limited to 'sound/isa/es1688')
-rw-r--r-- | sound/isa/es1688/es1688.c | 23 | ||||
-rw-r--r-- | sound/isa/es1688/es1688_lib.c | 23 |
2 files changed, 31 insertions, 15 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 && |
diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c index 4fbb508a817f..4c6e14f87f2d 100644 --- a/sound/isa/es1688/es1688_lib.c +++ b/sound/isa/es1688/es1688_lib.c | |||
@@ -45,7 +45,7 @@ static int snd_es1688_dsp_command(struct snd_es1688 *chip, unsigned char val) | |||
45 | return 1; | 45 | return 1; |
46 | } | 46 | } |
47 | #ifdef CONFIG_SND_DEBUG | 47 | #ifdef CONFIG_SND_DEBUG |
48 | printk("snd_es1688_dsp_command: timeout (0x%x)\n", val); | 48 | printk(KERN_DEBUG "snd_es1688_dsp_command: timeout (0x%x)\n", val); |
49 | #endif | 49 | #endif |
50 | return 0; | 50 | return 0; |
51 | } | 51 | } |
@@ -167,13 +167,16 @@ static int snd_es1688_probe(struct snd_es1688 *chip) | |||
167 | hw = ES1688_HW_AUTO; | 167 | hw = ES1688_HW_AUTO; |
168 | switch (chip->version & 0xfff0) { | 168 | switch (chip->version & 0xfff0) { |
169 | case 0x4880: | 169 | case 0x4880: |
170 | snd_printk("[0x%lx] ESS: AudioDrive ES488 detected, but driver is in another place\n", chip->port); | 170 | snd_printk(KERN_ERR "[0x%lx] ESS: AudioDrive ES488 detected, " |
171 | "but driver is in another place\n", chip->port); | ||
171 | return -ENODEV; | 172 | return -ENODEV; |
172 | case 0x6880: | 173 | case 0x6880: |
173 | hw = (chip->version & 0x0f) >= 8 ? ES1688_HW_1688 : ES1688_HW_688; | 174 | hw = (chip->version & 0x0f) >= 8 ? ES1688_HW_1688 : ES1688_HW_688; |
174 | break; | 175 | break; |
175 | default: | 176 | default: |
176 | snd_printk("[0x%lx] ESS: unknown AudioDrive chip with version 0x%x (Jazz16 soundcard?)\n", chip->port, chip->version); | 177 | snd_printk(KERN_ERR "[0x%lx] ESS: unknown AudioDrive chip " |
178 | "with version 0x%x (Jazz16 soundcard?)\n", | ||
179 | chip->port, chip->version); | ||
177 | return -ENODEV; | 180 | return -ENODEV; |
178 | } | 181 | } |
179 | 182 | ||
@@ -223,7 +226,7 @@ static int snd_es1688_init(struct snd_es1688 * chip, int enable) | |||
223 | } | 226 | } |
224 | } | 227 | } |
225 | #if 0 | 228 | #if 0 |
226 | snd_printk("mpu cfg = 0x%x\n", cfg); | 229 | snd_printk(KERN_DEBUG "mpu cfg = 0x%x\n", cfg); |
227 | #endif | 230 | #endif |
228 | spin_lock_irqsave(&chip->reg_lock, flags); | 231 | spin_lock_irqsave(&chip->reg_lock, flags); |
229 | snd_es1688_mixer_write(chip, 0x40, cfg); | 232 | snd_es1688_mixer_write(chip, 0x40, cfg); |
@@ -237,7 +240,9 @@ static int snd_es1688_init(struct snd_es1688 * chip, int enable) | |||
237 | cfg = 0xf0; /* enable only DMA counter interrupt */ | 240 | cfg = 0xf0; /* enable only DMA counter interrupt */ |
238 | irq_bits = irqs[chip->irq & 0x0f]; | 241 | irq_bits = irqs[chip->irq & 0x0f]; |
239 | if (irq_bits < 0) { | 242 | if (irq_bits < 0) { |
240 | snd_printk("[0x%lx] ESS: bad IRQ %d for ES1688 chip!!\n", chip->port, chip->irq); | 243 | snd_printk(KERN_ERR "[0x%lx] ESS: bad IRQ %d " |
244 | "for ES1688 chip!!\n", | ||
245 | chip->port, chip->irq); | ||
241 | #if 0 | 246 | #if 0 |
242 | irq_bits = 0; | 247 | irq_bits = 0; |
243 | cfg = 0x10; | 248 | cfg = 0x10; |
@@ -250,7 +255,8 @@ static int snd_es1688_init(struct snd_es1688 * chip, int enable) | |||
250 | cfg = 0xf0; /* extended mode DMA enable */ | 255 | cfg = 0xf0; /* extended mode DMA enable */ |
251 | dma = chip->dma8; | 256 | dma = chip->dma8; |
252 | if (dma > 3 || dma == 2) { | 257 | if (dma > 3 || dma == 2) { |
253 | snd_printk("[0x%lx] ESS: bad DMA channel %d for ES1688 chip!!\n", chip->port, dma); | 258 | snd_printk(KERN_ERR "[0x%lx] ESS: bad DMA channel %d " |
259 | "for ES1688 chip!!\n", chip->port, dma); | ||
254 | #if 0 | 260 | #if 0 |
255 | dma_bits = 0; | 261 | dma_bits = 0; |
256 | cfg = 0x00; /* disable all DMA */ | 262 | cfg = 0x00; /* disable all DMA */ |
@@ -341,8 +347,9 @@ static int snd_es1688_trigger(struct snd_es1688 *chip, int cmd, unsigned char va | |||
341 | return -EINVAL; /* something is wrong */ | 347 | return -EINVAL; /* something is wrong */ |
342 | } | 348 | } |
343 | #if 0 | 349 | #if 0 |
344 | printk("trigger: val = 0x%x, value = 0x%x\n", val, value); | 350 | printk(KERN_DEBUG "trigger: val = 0x%x, value = 0x%x\n", val, value); |
345 | printk("trigger: pointer = 0x%x\n", snd_dma_pointer(chip->dma8, chip->dma_size)); | 351 | printk(KERN_DEBUG "trigger: pointer = 0x%x\n", |
352 | snd_dma_pointer(chip->dma8, chip->dma_size)); | ||
346 | #endif | 353 | #endif |
347 | snd_es1688_write(chip, 0xb8, (val & 0xf0) | value); | 354 | snd_es1688_write(chip, 0xb8, (val & 0xf0) | value); |
348 | spin_unlock(&chip->reg_lock); | 355 | spin_unlock(&chip->reg_lock); |