27 #include <linux/module.h>
85 MODULE_PARM_DESC(use_cs4232_midi,
"Use CS4232 MPU-401 interface (inaccessibly located inside your computer)");
88 static int isa_registered;
89 static int pnp_registered;
93 { .
id =
"CSC7532", .devs = { {
"CSC0000" }, {
"CSC0010" }, {
"PnPb006" }, {
"CSC0004" } } },
95 { .id =
"CSC7632", .devs = { {
"CSC0000" }, {
"CSC0010" }, {
"PnPb006" }, {
"CSC0004" } } },
113 if (acard->wss ==
NULL)
127 if (use_cs4232_midi[dev]) {
129 if (acard->mpu ==
NULL)
136 if (acard->synth ==
NULL)
161 cs4232_pcm_port[
dev] = pnp_port_start(pdev, 0);
162 fm_port[
dev] = pnp_port_start(pdev, 1);
177 ics2115_port[
dev] = pnp_port_start(pdev, 0);
185 if (use_cs4232_midi[dev]) {
194 cs4232_mpu_port[
dev] = pnp_port_start(pdev, 0);
199 cs4232_mpu_port[dev],
200 cs4232_mpu_irq[dev]);
203 snd_printdd (
"CS4232: pcm port=0x%lx, fm port=0x%lx, dma1=%i, dma2=%i, irq=%i\nICS2115: port=0x%lx, irq=%i\n",
204 cs4232_pcm_port[dev],
235 snd_wavefront_new_synth (
struct snd_card *card,
249 if (
snd_hwdep_new(card,
"WaveFront", hw_dev, &wavefront_synth) < 0)
252 "WaveFront (ICS2115) wavetable synthesizer");
257 return wavefront_synth;
261 snd_wavefront_new_fx (
struct snd_card *card,
274 if (
snd_hwdep_new (card,
"YSS225", hw_dev, &fx_processor) < 0)
276 sprintf (fx_processor->
name,
"YSS225 FX Processor at 0x%lx", port);
288 snd_wavefront_new_midi (
struct snd_card *card,
296 static int first = 1;
307 if (
snd_rawmidi_new (card,
"WaveFront MIDI", midi_dev, 1, 1, &rmidi) < 0)
311 strcpy(rmidi->
name,
"WaveFront MIDI (Internal)");
314 strcpy(rmidi->
name,
"WaveFront MIDI (External)");
329 snd_wavefront_free(
struct snd_card *card)
340 static int snd_wavefront_card_new(
int dev,
struct snd_card **cardp)
365 snd_wavefront_probe (
struct snd_card *card,
int dev)
373 int hw_dev = 0, midi_dev = 0,
err;
378 cs4232_pcm_irq[dev], dma1[dev], dma2[dev],
417 ics2115_port[dev], ics2115_port[dev] + 16 - 1);
420 if (
request_irq(ics2115_irq[dev], snd_wavefront_ics2115_interrupt,
421 0,
"ICS2115", acard)) {
429 wavefront_synth = snd_wavefront_new_synth(card, hw_dev, acard);
430 if (wavefront_synth ==
NULL) {
435 strcpy (wavefront_synth->
name,
"ICS2115 Wavetable MIDI Synthesizer");
449 if (cs4232_mpu_port[dev] > 0 && cs4232_mpu_port[dev] !=
SNDRV_AUTO_PORT) {
451 cs4232_mpu_port[dev], 0,
452 cs4232_mpu_irq[dev],
NULL);
463 ics2115_internal_rmidi =
464 snd_wavefront_new_midi (card,
469 if (ics2115_internal_rmidi ==
NULL) {
479 ics2115_external_rmidi =
480 snd_wavefront_new_midi (card,
485 if (ics2115_external_rmidi ==
NULL) {
495 fx_processor = snd_wavefront_new_fx (card,
499 if (fx_processor ==
NULL) {
526 if (dma2[dev] >= 0 && dma2[dev] < 8)
529 if (cs4232_mpu_port[dev] > 0 && cs4232_mpu_port[dev] !=
SNDRV_AUTO_PORT) {
531 " MPU-401 0x%lx irq %d",
532 cs4232_mpu_port[dev],
533 cs4232_mpu_irq[dev]);
537 " SYNTH 0x%lx irq %d",
570 err = snd_wavefront_card_new(dev, &card);
574 if ((err = snd_wavefront_probe(card, dev)) < 0) {
591 #define DEV_NAME "wavefront"
593 static struct isa_driver snd_wavefront_driver = {
594 .match = snd_wavefront_isa_match,
595 .probe = snd_wavefront_isa_probe,
613 if (
enable[dev] && isapnp[dev])
616 if (dev >= SNDRV_CARDS)
619 res = snd_wavefront_card_new(dev, &card);
623 if (snd_wavefront_pnp (dev, card->
private_data, pcard, pid) < 0) {
632 if ((res = snd_wavefront_probe(card, dev)) < 0)
635 pnp_set_card_drvdata(pcard, card);
643 pnp_set_card_drvdata(pcard,
NULL);
649 .id_table = snd_wavefront_pnpids,
650 .probe = snd_wavefront_pnp_detect,
657 static int __init alsa_card_wavefront_init(
void)
676 static void __exit alsa_card_wavefront_exit(
void)