22 #include <linux/slab.h>
23 #include <linux/module.h>
33 #define CARD_NAME "PDAudio-CF"
59 static int pdacf_config(
struct pcmcia_device *
link);
60 static void snd_pdacf_detach(
struct pcmcia_device *p_dev);
62 static void pdacf_release(
struct pcmcia_device *
link)
70 static int snd_pdacf_free(
struct snd_pdacf *pdacf)
72 struct pcmcia_device *
link = pdacf->
p_dev;
86 return snd_pdacf_free(chip);
92 static int snd_pdacf_probe(
struct pcmcia_device *
link)
98 .dev_free = snd_pdacf_dev_free,
107 if (i >= SNDRV_CARDS) {
142 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
143 link->resource[0]->end = 16;
145 link->config_flags = CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ;
146 link->config_index = 1;
147 link->config_regs = PRESENT_OPTION;
149 return pdacf_config(link);
163 static int snd_pdacf_assign_resources(
struct snd_pdacf *pdacf,
int port,
int irq)
196 static void snd_pdacf_detach(
struct pcmcia_device *link)
213 static int pdacf_config(
struct pcmcia_device *link)
219 link->config_index = 0x5;
220 link->config_flags |= CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ;
234 if (snd_pdacf_assign_resources(pdacf, link->resource[0]->start,
247 static int pdacf_suspend(
struct pcmcia_device *link)
254 snd_pdacf_suspend(chip);
260 static int pdacf_resume(
struct pcmcia_device *link)
268 snd_pdacf_resume(chip);
283 PCMCIA_DEVICE_PROD_ID12(
"Core Sound",
"PDAudio-CF",0x396d19d2,0x71717b49),
288 static struct pcmcia_driver pdacf_cs_driver = {
290 .name =
"snd-pdaudiocf",
291 .probe = snd_pdacf_probe,
292 .remove = snd_pdacf_detach,
293 .id_table = snd_pdacf_ids,
295 .suspend = pdacf_suspend,
296 .resume = pdacf_resume,
301 static int __init init_pdacf(
void)
306 static void __exit exit_pdacf(
void)