26 #include <linux/time.h>
27 #include <linux/module.h>
31 #define SNDRV_LEGACY_FIND_FREE_IRQ
32 #define SNDRV_LEGACY_FIND_FREE_DMA
35 #define CRD_NAME "Gravis UltraSound Classic"
36 #define DEV_NAME "gusclassic"
84 static long possible_ports[] = {0x220, 0x230, 0x240, 0x250, 0x260};
85 static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, 4, -1};
86 static int possible_dmas[] = {5, 6, 7, 1, 3, -1};
91 irq[
n] = snd_legacy_find_free_irq(possible_irqs);
93 dev_err(dev,
"unable to find a free IRQ\n");
98 dma1[
n] = snd_legacy_find_free_dma(possible_dmas);
100 dev_err(dev,
"unable to find a free DMA1\n");
105 dma2[
n] = snd_legacy_find_free_dma(possible_dmas);
107 dev_err(dev,
"unable to find a free DMA2\n");
114 0, channels[n], pcm_channels[n], 0, rgus);
118 port[
n] = possible_ports[
i];
120 0, channels[n], pcm_channels[n], 0, rgus);
121 }
while (error < 0 && ++i <
ARRAY_SIZE(possible_ports));
145 static int __devinit snd_gusclassic_probe(
struct device *dev,
unsigned int n)
155 if (pcm_channels[n] < 2)
158 error = snd_gusclassic_create(card, dev, n, &gus);
162 error = snd_gusclassic_detect(gus);
174 dev_err(dev,
"GUS Classic or ACE soundcard was "
175 "not detected at 0x%lx\n", gus->
gf1.port);
194 " at 0x%lx, irq %d, dma %d",
195 gus->
gf1.port, gus->
gf1.irq, gus->
gf1.dma1);
197 if (gus->
gf1.dma2 >= 0)
199 "&%d", gus->
gf1.dma2);
214 static int __devexit snd_gusclassic_remove(
struct device *dev,
unsigned int n)
221 static struct isa_driver snd_gusclassic_driver = {
222 .match = snd_gusclassic_match,
223 .probe = snd_gusclassic_probe,
226 .suspend = snd_gusclassic_suspend,
227 .remove = snd_gusclassic_remove,
234 static int __init alsa_card_gusclassic_init(
void)
239 static void __exit alsa_card_gusclassic_exit(
void)