22 #include <linux/time.h>
23 #include <linux/wait.h>
25 #include <linux/module.h>
32 #define PFX "ad1816a: "
38 "{Analog Devices,AD1815},"
39 "{Analog Devices,AD1816A},"
41 "{TerraTec,AudioSystem EWS64S},"
42 "{Aztech/Newcom SC-16 3D},"
43 "{Shark Predator ISA}}");
64 MODULE_PARM_DESC(clockfreq,
"Clock frequency for ad1816a driver (default = 0).");
68 { .id =
"ADS7150", .devs = { { .id =
"ADS7150" }, { .id =
"ADS7151" } } },
70 { .id =
"ADS7180", .devs = { { .id =
"ADS7180" }, { .id =
"ADS7181" } } },
72 { .id =
"ADS7181", .devs = { { .id =
"ADS7180" }, { .id =
"ADS7181" } } },
74 { .id =
"AZT1022", .devs = { { .id =
"AZT1018" }, { .id =
"AZT2002" } } },
76 { .id =
"LWC1061", .devs = { { .id =
"ADS7180" }, { .id =
"ADS7181" } } },
78 { .id =
"MDK1605", .devs = { { .id =
"ADS7180" }, { .id =
"ADS7181" } } },
80 { .id =
"SMM7180", .devs = { { .id =
"ADS7180" }, { .id =
"ADS7181" } } },
82 { .id =
"TER1112", .devs = { { .id =
"ADS7180" }, { .id =
"ADS7181" } } },
84 { .id =
"TER1112", .devs = { { .id =
"TER1100" }, { .id =
"TER1101" } } },
86 { .id =
"TER1411", .devs = { { .id =
"ADS7180" }, { .id =
"ADS7181" } } },
94 #define DRIVER_NAME "snd-card-ad1816a"
113 port[
dev] = pnp_port_start(pdev, 2);
114 fm_port[
dev] = pnp_port_start(pdev, 1);
131 mpu_port[
dev] = pnp_port_start(pdev, 0);
153 if ((error = snd_card_ad1816a_pnp(dev, pcard, pid))) {
167 if (clockfreq[dev] >= 5000 && clockfreq[dev] <= 100000)
173 card->
shortname, chip->
port, irq[dev], dma1[dev], dma2[dev]);
191 if (mpu_port[dev] > 0) {
193 mpu_port[dev], 0, mpu_irq[dev],
198 if (fm_port[dev] > 0) {
200 fm_port[dev], fm_port[dev] + 2,
202 printk(
KERN_ERR PFX "no OPL device at 0x%lx-0x%lx.\n", fm_port[dev], fm_port[dev] + 2);
216 pnp_set_card_drvdata(pcard, card);
231 res = snd_card_ad1816a_probe(dev, card,
id);
244 pnp_set_card_drvdata(pcard,
NULL);
248 static int snd_ad1816a_pnp_suspend(
struct pnp_card_link *pcard,
251 struct snd_card *card = pnp_get_card_drvdata(pcard);
258 static int snd_ad1816a_pnp_resume(
struct pnp_card_link *pcard)
260 struct snd_card *card = pnp_get_card_drvdata(pcard);
271 .id_table = snd_ad1816a_pnpids,
272 .probe = snd_ad1816a_pnp_detect,
275 .suspend = snd_ad1816a_pnp_suspend,
276 .resume = snd_ad1816a_pnp_resume,
280 static int __init alsa_card_ad1816a_init(
void)
288 if (!ad1816a_devices) {
298 static void __exit alsa_card_ad1816a_exit(
void)