Lines Matching refs:n

207 static int __devinit snd_galaxy_match(struct device *dev, unsigned int n)  in snd_galaxy_match()  argument
209 if (!enable[n]) in snd_galaxy_match()
212 switch (port[n]) { in snd_galaxy_match()
217 config[n] |= GALAXY_CONFIG_SBA_220; in snd_galaxy_match()
220 config[n] |= GALAXY_CONFIG_SBA_240; in snd_galaxy_match()
223 config[n] |= GALAXY_CONFIG_SBA_260; in snd_galaxy_match()
226 config[n] |= GALAXY_CONFIG_SBA_280; in snd_galaxy_match()
229 dev_err(dev, "invalid port %#lx\n", port[n]); in snd_galaxy_match()
233 switch (wss_port[n]) { in snd_galaxy_match()
238 config[n] |= GALAXY_CONFIG_WSS_ENABLE | GALAXY_CONFIG_WSSA_530; in snd_galaxy_match()
241 config[n] |= GALAXY_CONFIG_WSS_ENABLE | GALAXY_CONFIG_WSSA_604; in snd_galaxy_match()
244 config[n] |= GALAXY_CONFIG_WSS_ENABLE | GALAXY_CONFIG_WSSA_E80; in snd_galaxy_match()
247 config[n] |= GALAXY_CONFIG_WSS_ENABLE | GALAXY_CONFIG_WSSA_F40; in snd_galaxy_match()
250 dev_err(dev, "invalid WSS port %#lx\n", wss_port[n]); in snd_galaxy_match()
254 switch (irq[n]) { in snd_galaxy_match()
259 wss_config[n] |= WSS_CONFIG_IRQ_7; in snd_galaxy_match()
262 irq[n] = 9; in snd_galaxy_match()
264 wss_config[n] |= WSS_CONFIG_IRQ_9; in snd_galaxy_match()
267 wss_config[n] |= WSS_CONFIG_IRQ_10; in snd_galaxy_match()
270 wss_config[n] |= WSS_CONFIG_IRQ_11; in snd_galaxy_match()
273 dev_err(dev, "invalid IRQ %d\n", irq[n]); in snd_galaxy_match()
277 switch (dma1[n]) { in snd_galaxy_match()
282 wss_config[n] |= WSS_CONFIG_DMA_0; in snd_galaxy_match()
285 wss_config[n] |= WSS_CONFIG_DMA_1; in snd_galaxy_match()
288 wss_config[n] |= WSS_CONFIG_DMA_3; in snd_galaxy_match()
291 dev_err(dev, "invalid playback DMA %d\n", dma1[n]); in snd_galaxy_match()
295 if (dma2[n] == SNDRV_AUTO_DMA || dma2[n] == dma1[n]) { in snd_galaxy_match()
296 dma2[n] = -1; in snd_galaxy_match()
300 wss_config[n] |= WSS_CONFIG_DUPLEX; in snd_galaxy_match()
301 switch (dma2[n]) { in snd_galaxy_match()
305 if (dma1[n] == 0) in snd_galaxy_match()
308 dev_err(dev, "invalid capture DMA %d\n", dma2[n]); in snd_galaxy_match()
313 switch (mpu_port[n]) { in snd_galaxy_match()
316 mpu_port[n] = -1; in snd_galaxy_match()
319 config[n] |= GALAXY_CONFIG_MPU_ENABLE | GALAXY_CONFIG_MPUA_300; in snd_galaxy_match()
322 config[n] |= GALAXY_CONFIG_MPU_ENABLE | GALAXY_CONFIG_MPUA_330; in snd_galaxy_match()
325 dev_err(dev, "invalid MPU port %#lx\n", mpu_port[n]); in snd_galaxy_match()
329 switch (mpu_irq[n]) { in snd_galaxy_match()
332 mpu_irq[n] = -1; in snd_galaxy_match()
335 mpu_irq[n] = 9; in snd_galaxy_match()
337 config[n] |= GALAXY_CONFIG_MPUIRQ_2; in snd_galaxy_match()
341 config[n] |= GALAXY_CONFIG_MPUIRQ_3; in snd_galaxy_match()
345 config[n] |= GALAXY_CONFIG_MPUIRQ_5; in snd_galaxy_match()
348 config[n] |= GALAXY_CONFIG_MPUIRQ_7; in snd_galaxy_match()
352 config[n] |= GALAXY_CONFIG_MPUIRQ_10; in snd_galaxy_match()
356 dev_err(dev, "invalid MPU IRQ %d\n", mpu_irq[n]); in snd_galaxy_match()
360 if (mpu_irq[n] == irq[n]) { in snd_galaxy_match()
366 switch (fm_port[n]) { in snd_galaxy_match()
369 fm_port[n] = -1; in snd_galaxy_match()
374 dev_err(dev, "illegal FM port %#lx\n", fm_port[n]); in snd_galaxy_match()
378 config[n] |= GALAXY_CONFIG_GAME_ENABLE; in snd_galaxy_match()
501 static int __devinit snd_galaxy_probe(struct device *dev, unsigned int n) in snd_galaxy_probe() argument
509 err = snd_card_create(index[n], id[n], THIS_MODULE, sizeof *galaxy, in snd_galaxy_probe()
519 galaxy->res_port = request_region(port[n], 16, DRV_NAME); in snd_galaxy_probe()
521 dev_err(dev, "could not grab ports %#lx-%#lx\n", port[n], in snd_galaxy_probe()
522 port[n] + 15); in snd_galaxy_probe()
526 galaxy->port = ioport_map(port[n], 16); in snd_galaxy_probe()
530 dev_err(dev, "did not find a Sound Galaxy at %#lx\n", port[n]); in snd_galaxy_probe()
533 dev_info(dev, "Sound Galaxy (type %d) found at %#lx\n", type, port[n]); in snd_galaxy_probe()
535 galaxy->res_config_port = request_region(port[n] + GALAXY_PORT_CONFIG, in snd_galaxy_probe()
539 port[n] + GALAXY_PORT_CONFIG, in snd_galaxy_probe()
540 port[n] + GALAXY_PORT_CONFIG + 15); in snd_galaxy_probe()
544 galaxy->config_port = ioport_map(port[n] + GALAXY_PORT_CONFIG, 16); in snd_galaxy_probe()
546 galaxy_config(galaxy, config[n]); in snd_galaxy_probe()
548 galaxy->res_wss_port = request_region(wss_port[n], 4, DRV_NAME); in snd_galaxy_probe()
550 dev_err(dev, "could not grab ports %#lx-%#lx\n", wss_port[n], in snd_galaxy_probe()
551 wss_port[n] + 3); in snd_galaxy_probe()
555 galaxy->wss_port = ioport_map(wss_port[n], 4); in snd_galaxy_probe()
557 err = galaxy_wss_config(galaxy, wss_config[n]); in snd_galaxy_probe()
566 card->shortname, port[n], wss_port[n], irq[n], dma1[n], in snd_galaxy_probe()
567 dma2[n]); in snd_galaxy_probe()
569 err = snd_wss_create(card, wss_port[n] + 4, -1, irq[n], dma1[n], in snd_galaxy_probe()
570 dma2[n], WSS_HW_DETECT, 0, &chip); in snd_galaxy_probe()
586 if (mpu_port[n] >= 0) { in snd_galaxy_probe()
588 mpu_port[n], 0, mpu_irq[n], in snd_galaxy_probe()
594 if (fm_port[n] >= 0) { in snd_galaxy_probe()
597 err = snd_opl3_create(card, fm_port[n], fm_port[n] + 2, in snd_galaxy_probe()
600 dev_err(dev, "no OPL device at %#lx\n", fm_port[n]); in snd_galaxy_probe()
624 static int __devexit snd_galaxy_remove(struct device *dev, unsigned int n) in snd_galaxy_remove() argument