32 #include <linux/pci.h>
33 #include <linux/slab.h>
34 #include <linux/module.h>
50 static int pcm_channels = 32;
74 #define snd_ali_printk(format, args...) printk(KERN_DEBUG format, ##args);
76 #define snd_ali_printk(format, args...)
83 #define DEVICE_ID_ALI5451 ((PCI_VENDOR_ID_AL<<16)|PCI_DEVICE_ID_AL_M5451)
86 #define ALI_CHANNELS 32
88 #define ALI_PCM_IN_CHANNEL 31
89 #define ALI_SPDIF_IN_CHANNEL 19
90 #define ALI_SPDIF_OUT_CHANNEL 15
91 #define ALI_CENTER_CHANNEL 24
92 #define ALI_LEF_CHANNEL 23
93 #define ALI_SURR_LEFT_CHANNEL 26
94 #define ALI_SURR_RIGHT_CHANNEL 25
95 #define ALI_MODEM_IN_CHANNEL 21
96 #define ALI_MODEM_OUT_CHANNEL 20
98 #define SNDRV_ALI_VOICE_TYPE_PCM 01
99 #define SNDRV_ALI_VOICE_TYPE_OTH 02
101 #define ALI_5451_V02 0x02
107 #define ALI_LEGACY_DMAR0 0x00
108 #define ALI_LEGACY_DMAR4 0x04
109 #define ALI_LEGACY_DMAR11 0x0b
110 #define ALI_LEGACY_DMAR15 0x0f
111 #define ALI_MPUR0 0x20
112 #define ALI_MPUR1 0x21
113 #define ALI_MPUR2 0x22
114 #define ALI_MPUR3 0x23
116 #define ALI_AC97_WRITE 0x40
117 #define ALI_AC97_READ 0x44
119 #define ALI_SCTRL 0x48
120 #define ALI_SPDIF_OUT_ENABLE 0x20
121 #define ALI_SCTRL_LINE_IN2 (1 << 9)
122 #define ALI_SCTRL_GPIO_IN2 (1 << 13)
123 #define ALI_SCTRL_LINE_OUT_EN (1 << 20)
124 #define ALI_SCTRL_GPIO_OUT_EN (1 << 23)
125 #define ALI_SCTRL_CODEC1_READY (1 << 24)
126 #define ALI_SCTRL_CODEC2_READY (1 << 25)
127 #define ALI_AC97_GPIO 0x4c
128 #define ALI_AC97_GPIO_ENABLE 0x8000
129 #define ALI_AC97_GPIO_DATA_SHIFT 16
130 #define ALI_SPDIF_CS 0x70
131 #define ALI_SPDIF_CTRL 0x74
132 #define ALI_SPDIF_IN_FUNC_ENABLE 0x02
133 #define ALI_SPDIF_IN_CH_STATUS 0x40
134 #define ALI_SPDIF_OUT_CH_STATUS 0xbf
135 #define ALI_START 0x80
136 #define ALI_STOP 0x84
137 #define ALI_CSPF 0x90
138 #define ALI_AINT 0x98
139 #define ALI_GC_CIR 0xa0
140 #define ENDLP_IE 0x00001000
141 #define MIDLP_IE 0x00002000
142 #define ALI_AINTEN 0xa4
143 #define ALI_VOLUME 0xa8
144 #define ALI_SBDELTA_DELTA_R 0xac
145 #define ALI_MISCINT 0xb0
146 #define ADDRESS_IRQ 0x00000020
147 #define TARGET_REACHED 0x00008000
148 #define MIXER_OVERFLOW 0x00000800
149 #define MIXER_UNDERFLOW 0x00000400
150 #define GPIO_IRQ 0x01000000
151 #define ALI_SBBL_SBCL 0xc0
152 #define ALI_SBCTRL_SBE2R_SBDD 0xc4
153 #define ALI_STIMER 0xc8
154 #define ALI_GLOBAL_CONTROL 0xd4
155 #define ALI_SPDIF_OUT_SEL_PCM 0x00000400
156 #define ALI_SPDIF_IN_SUPPORT 0x00000800
157 #define ALI_SPDIF_OUT_CH_ENABLE 0x00008000
158 #define ALI_SPDIF_IN_CH_ENABLE 0x00080000
159 #define ALI_PCM_IN_ENABLE 0x80000000
161 #define ALI_CSO_ALPHA_FMS 0xe0
163 #define ALI_ESO_DELTA 0xe8
164 #define ALI_GVSEL_PAN_VOC_CTRL_EC 0xf0
165 #define ALI_EBUF1 0xf4
166 #define ALI_EBUF2 0xf8
168 #define ALI_REG(codec, x) ((codec)->port + x)
232 #define ALI_GLOBAL_REGS 56
233 #define ALI_CHANNEL_REGS 8
273 #ifdef CONFIG_PM_SLEEP
284 static void snd_ali_clear_voices(
struct snd_ali *,
unsigned int,
unsigned int);
285 static unsigned short snd_ali_codec_peek(
struct snd_ali *,
int,
unsigned short);
286 static void snd_ali_codec_poke(
struct snd_ali *,
int,
unsigned short,
293 static inline unsigned int snd_ali_5451_peek(
struct snd_ali *
codec,
296 return (
unsigned int)
inl(
ALI_REG(codec, port));
299 static inline void snd_ali_5451_poke(
struct snd_ali *codec,
306 static int snd_ali_codec_ready(
struct snd_ali *codec,
309 unsigned long end_time;
315 res = snd_ali_5451_peek(codec,port);
323 snd_ali_5451_poke(codec, port, res & ~0x8000);
324 snd_printdd(
"ali_codec_ready: codec is not ready.\n ");
328 static int snd_ali_stimer_ready(
struct snd_ali *codec)
330 unsigned long end_time;
331 unsigned long dwChk1,dwChk2;
333 dwChk1 = snd_ali_5451_peek(codec,
ALI_STIMER);
337 dwChk2 = snd_ali_5451_peek(codec,
ALI_STIMER);
338 if (dwChk2 != dwChk1)
349 static void snd_ali_codec_poke(
struct snd_ali *codec,
int secondary,
361 port = codec->
chregs.regs.ac97write;
363 if (snd_ali_codec_ready(codec, port) < 0)
365 if (snd_ali_stimer_ready(codec) < 0)
368 dwVal = (
unsigned int) (reg & 0xff);
369 dwVal |= 0x8000 | (val << 16);
375 snd_ali_5451_poke(codec, port, dwVal);
380 static unsigned short snd_ali_codec_peek(
struct snd_ali *codec,
392 port = codec->
chregs.regs.ac97read;
394 if (snd_ali_codec_ready(codec, port) < 0)
396 if (snd_ali_stimer_ready(codec) < 0)
399 dwVal = (
unsigned int) (reg & 0xff);
404 snd_ali_5451_poke(codec, port, dwVal);
406 if (snd_ali_stimer_ready(codec) < 0)
408 if (snd_ali_codec_ready(codec, port) < 0)
411 return (snd_ali_5451_peek(codec, port) & 0xffff0000) >> 16;
414 static void snd_ali_codec_write(
struct snd_ac97 *ac97,
426 snd_ali_codec_poke(codec, ac97->
num, reg, val);
431 static unsigned short snd_ali_codec_read(
struct snd_ac97 *ac97,
437 return snd_ali_codec_peek(codec, ac97->
num, reg);
444 static int snd_ali_reset_5451(
struct snd_ali *codec)
447 unsigned short wCount, wReg;
452 pci_read_config_dword(pci_dev, 0x7c, &dwVal);
453 pci_write_config_dword(pci_dev, 0x7c, dwVal | 0x08000000);
455 pci_read_config_dword(pci_dev, 0x7c, &dwVal);
456 pci_write_config_dword(pci_dev, 0x7c, dwVal & 0xf7ffffff);
460 pci_dev = codec->
pci;
461 pci_read_config_dword(pci_dev, 0x44, &dwVal);
462 pci_write_config_dword(pci_dev, 0x44, dwVal | 0x000c0000);
464 pci_read_config_dword(pci_dev, 0x44, &dwVal);
465 pci_write_config_dword(pci_dev, 0x44, dwVal & 0xfffbffff);
471 if ((wReg & 0x000f) == 0x000f)
485 static void snd_ali_enable_special_channel(
struct snd_ali *codec,
491 dwVal |= 1 << (channel & 0x0000001f);
495 static void snd_ali_disable_special_channel(
struct snd_ali *codec,
496 unsigned int channel)
501 dwVal &= ~(1 << (channel & 0x0000001f));
505 static void snd_ali_enable_address_interrupt(
struct snd_ali *codec)
515 static void snd_ali_disable_address_interrupt(
struct snd_ali *codec)
525 static void snd_ali_disable_voice_irq(
struct snd_ali *codec,
526 unsigned int channel)
533 mask = 1 << (channel & 0x1f);
535 pchregs->
data.ainten &= ~mask;
539 static int snd_ali_alloc_pcm_channel(
struct snd_ali *codec,
int channel)
541 unsigned int idx = channel & 0x1f;
545 "ali_alloc_pcm_channel: no free channels.\n");
549 if (!(codec->
synth.chmap & (1 << idx))) {
551 codec->
synth.chcnt++;
558 static int snd_ali_find_free_channel(
struct snd_ali * codec,
int rec)
563 snd_ali_printk(
"find_free_channel: for %s\n",rec ?
"rec" :
"pcm");
574 result = snd_ali_alloc_pcm_channel(codec, idx);
579 "record channel is busy now.\n");
589 result = snd_ali_alloc_pcm_channel(codec, idx);
594 "S/PDIF out channel is in busy now.\n");
598 result = snd_ali_alloc_pcm_channel(codec, idx);
606 static void snd_ali_free_channel_pcm(
struct snd_ali *codec,
int channel)
608 unsigned int idx = channel & 0x0000001f;
615 if (!(codec->
synth.chmap & (1 << idx))) {
617 "channel %d is not in use.\n", channel);
621 codec->
synth.chcnt--;
625 static void snd_ali_stop_voice(
struct snd_ali *codec,
unsigned int channel)
627 unsigned int mask = 1 << (channel & 0x1f);
639 unsigned long begintimer,currenttimer;
644 while (currenttimer < begintimer + interval) {
645 if (snd_ali_stimer_ready(codec) < 0)
652 static void snd_ali_detect_spdif_rate(
struct snd_ali *codec)
662 while ((R1 < 0x0b || R1 > 0x0e) && R1 != 0x12 && count <= 50000) {
664 snd_ali_delay(codec, 6);
674 for (count = 0; count <= 50000; count++) {
675 snd_ali_delay(codec, 6);
689 if (
R2 >= 0x0b &&
R2 <= 0x0e) {
692 wval |= (0x09 << 8) | 0x05;
697 }
else if (
R2 == 0x12) {
700 wval |= (0x0e << 8) | 0x08;
708 static unsigned int snd_ali_get_spdif_in_rate(
struct snd_ali *codec)
718 snd_ali_detect_spdif_rate(codec);
724 case 0: dwRate = 44100;
break;
725 case 1: dwRate = 48000;
break;
726 case 2: dwRate = 32000;
break;
727 default: dwRate = 0;
break;
733 static void snd_ali_enable_spdif_in(
struct snd_ali *codec)
748 static void snd_ali_disable_spdif_in(
struct snd_ali *codec)
753 dwVal &= ~ALI_SPDIF_IN_SUPPORT;
760 static void snd_ali_set_spdif_out_rate(
struct snd_ali *codec,
unsigned int rate)
766 case 32000: dwRate = 0x300;
break;
767 case 48000: dwRate = 0x200;
break;
768 default: dwRate = 0;
break;
772 bVal &= (
unsigned char)(~(1<<6));
783 static void snd_ali_enable_spdif_out(
struct snd_ali *codec)
792 pci_read_config_byte(pci_dev, 0x61, &bVal);
794 pci_write_config_byte(pci_dev, 0x61, bVal);
795 pci_read_config_byte(pci_dev, 0x7d, &bVal);
797 pci_write_config_byte(pci_dev, 0x7d, bVal);
799 pci_read_config_byte(pci_dev, 0x7e, &bVal);
802 pci_write_config_byte(pci_dev, 0x7e, bVal);
816 static void snd_ali_enable_spdif_chnout(
struct snd_ali *codec)
834 static void snd_ali_disable_spdif_chnout(
struct snd_ali *codec)
845 static void snd_ali_disable_spdif_out(
struct snd_ali *codec)
852 snd_ali_disable_spdif_chnout(codec);
855 static void snd_ali_update_ptr(
struct snd_ali *codec,
int channel)
860 unsigned int old,
mask;
862 unsigned int temp, cspf;
865 pchregs = &(codec->
chregs);
868 old = pchregs->
data.aint;
869 mask = 1
U << (channel & 0x1f);
894 snd_ali_stop_voice(codec, channel);
895 snd_ali_disable_voice_irq(codec, channel);
897 }
else if (codec->
synth.voices[channel].synth) {
899 }
else if (codec->
synth.voices[channel].midi) {
903 snd_ali_stop_voice(codec, channel);
904 snd_ali_disable_voice_irq(codec, channel);
908 pchregs->
data.aint = old & (~mask);
915 unsigned int audio_int;
925 pchregs = &(codec->
chregs);
930 snd_ali_update_ptr(codec, channel);
940 int type,
int rec,
int channel)
949 idx = channel > 0 ? snd_ali_alloc_pcm_channel(codec, channel) :
950 snd_ali_find_free_channel(codec,rec);
956 pvoice = &(codec->
synth.voices[
idx]);
969 static void snd_ali_free_voice(
struct snd_ali * codec,
978 snd_ali_clear_voices(codec, pvoice->
number, pvoice->
number);
985 snd_ali_free_channel_pcm(codec, pvoice->
number);
994 static void snd_ali_clear_voices(
struct snd_ali *codec,
1000 for (i = v_min; i <= v_max; i++) {
1001 snd_ali_stop_voice(codec, i);
1002 snd_ali_disable_voice_irq(codec, i);
1006 static void snd_ali_write_voice_regs(
struct snd_ali *codec,
1012 unsigned int ALPHA_FMS,
1019 unsigned int ctlcmds[4];
1023 ctlcmds[0] = (CSO << 16) | (ALPHA_FMS & 0x0000ffff);
1025 ctlcmds[2] = (ESO << 16) | (DELTA & 0x0ffff);
1026 ctlcmds[3] = (GVSEL << 31) |
1027 ((PAN & 0x0000007f) << 24) |
1028 ((VOL & 0x000000ff) << 16) |
1029 ((CTRL & 0x0000000f) << 12) |
1043 static unsigned int snd_ali_convert_rate(
unsigned int rate,
int rec)
1055 else if (rate == 8000)
1057 else if (rate == 48000)
1060 delta = ((48000 << 12) / rate) & 0x0000ffff;
1064 else if (rate == 8000)
1066 else if (rate == 48000)
1069 delta = (((rate << 12) + rate) / 48000) & 0x0000ffff;
1103 unsigned int what, whati, capture_flag;
1121 what = whati = capture_flag = 0;
1124 pvoice = s->
runtime->private_data;
1125 evoice = pvoice->
extra;
1126 what |= 1 << (pvoice->
number & 0x1f);
1128 whati |= 1 << (pvoice->
number & 0x1f);
1130 whati |= 1 << (evoice->
number & 0x1f);
1131 what |= 1 << (evoice->
number & 0x1f);
1142 snd_pcm_trigger_done(s, substream);
1183 evoice = snd_ali_alloc_voice(codec,
1188 pvoice->
extra = evoice;
1193 snd_ali_free_voice(codec, evoice);
1210 snd_ali_free_voice(codec, evoice);
1249 Delta = snd_ali_convert_rate(runtime->
rate, 0);
1253 snd_ali_disable_special_channel(codec, pvoice->
number);
1256 ALI_SPDIF_OUT_CH_ENABLE)
1258 snd_ali_set_spdif_out_rate(codec, runtime->
rate);
1275 ESO = pvoice->
eso -1;
1277 CTRL = snd_ali_control_mode(substream);
1284 snd_ali_printk(
"ch=%d, Rate=%d Delta=%xh,GVSEL=%xh,PAN=%xh,CTRL=%xh\n",
1285 pvoice->
number,runtime->
rate,Delta,GVSEL,PAN,CTRL);
1286 snd_ali_write_voice_regs(codec,
1301 ESO = evoice->
eso - 1;
1302 snd_ali_write_voice_regs(codec,
1339 snd_ali_enable_special_channel(codec,pvoice->
number);
1343 0x1000 : snd_ali_convert_rate(runtime->
rate, pvoice->
mode);
1354 rate = snd_ali_get_spdif_in_rate(codec);
1357 "spdif rate detect err!\n");
1362 if (bValue & 0x10) {
1368 Delta = ((rate << 12) / runtime->
rate) & 0x00ffff;
1381 ESO = pvoice->
eso - 1;
1382 CTRL = snd_ali_control_mode(substream);
1388 snd_ali_write_voice_regs( codec,
1462 .buffer_bytes_max = (256*1024),
1466 .periods_max = 1024,
1488 .buffer_bytes_max = (128*1024),
1492 .periods_max = 1024,
1496 static void snd_ali_pcm_free_substream(
struct snd_pcm_runtime *runtime)
1502 codec = pvoice->
codec;
1503 snd_ali_free_voice(pvoice->
codec, pvoice);
1532 return snd_ali_open(substream, 0, -1, &snd_ali_playback);
1537 return snd_ali_open(substream, 1, -1, &snd_ali_capture);
1550 snd_ali_disable_special_channel(codec,pvoice->
number);
1555 static struct snd_pcm_ops snd_ali_playback_ops = {
1556 .open = snd_ali_playback_open,
1557 .close = snd_ali_playback_close,
1559 .hw_params = snd_ali_playback_hw_params,
1560 .hw_free = snd_ali_playback_hw_free,
1561 .prepare = snd_ali_playback_prepare,
1562 .trigger = snd_ali_trigger,
1563 .pointer = snd_ali_playback_pointer,
1567 .open = snd_ali_capture_open,
1568 .close = snd_ali_close,
1570 .hw_params = snd_ali_hw_params,
1571 .hw_free = snd_ali_hw_free,
1572 .prepare = snd_ali_prepare,
1573 .trigger = snd_ali_trigger,
1574 .pointer = snd_ali_pointer,
1589 return snd_ali_hw_params(substream, hw_params);
1606 .buffer_bytes_max = (256*1024),
1610 .periods_max = 1024,
1617 static unsigned int rates[] = {8000, 9600, 12000, 16000};
1623 int err = snd_ali_open(substream, rec, channel, &snd_ali_modem);
1641 static struct snd_pcm_ops snd_ali_modem_playback_ops = {
1642 .open = snd_ali_modem_playback_open,
1643 .close = snd_ali_close,
1645 .hw_params = snd_ali_modem_hw_params,
1646 .hw_free = snd_ali_hw_free,
1647 .prepare = snd_ali_prepare,
1648 .trigger = snd_ali_trigger,
1649 .pointer = snd_ali_pointer,
1652 static struct snd_pcm_ops snd_ali_modem_capture_ops = {
1653 .open = snd_ali_modem_capture_open,
1654 .close = snd_ali_close,
1656 .hw_params = snd_ali_modem_hw_params,
1657 .hw_free = snd_ali_hw_free,
1658 .prepare = snd_ali_prepare,
1659 .trigger = snd_ali_trigger,
1660 .pointer = snd_ali_pointer,
1670 unsigned short class;
1674 static void snd_ali_pcm_free(
struct snd_pcm *pcm)
1710 codec->
pcm[0] = pcm;
1715 { .name =
"ALI 5451",
1718 .playback_ops = &snd_ali_playback_ops,
1719 .capture_ops = &snd_ali_capture_ops
1721 { .name =
"ALI 5451 modem",
1724 .playback_ops = &snd_ali_modem_playback_ops,
1725 .capture_ops = &snd_ali_modem_capture_ops,
1734 err = snd_ali_pcm(codec, i, &ali_pcms[i]);
1742 #define ALI5451_SPDIF(xname, xindex, value) \
1743 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex,\
1744 .info = snd_ali5451_spdif_info, .get = snd_ali5451_spdif_get, \
1745 .put = snd_ali5451_spdif_put, .private_value = value}
1747 #define snd_ali5451_spdif_info snd_ctl_boolean_mono_info
1749 static int snd_ali5451_spdif_get(
struct snd_kcontrol *kcontrol,
1753 unsigned int spdif_enable;
1755 spdif_enable = ucontrol->
value.integer.value[0] ? 1 : 0;
1760 spdif_enable = (codec->
spdif_mask & 0x02) ? 1 : 0;
1763 spdif_enable = ((codec->
spdif_mask & 0x02) &&
1767 spdif_enable = (codec->
spdif_mask & 0x01) ? 1 : 0;
1772 ucontrol->
value.integer.value[0] = spdif_enable;
1777 static int snd_ali5451_spdif_put(
struct snd_kcontrol *kcontrol,
1781 unsigned int change = 0, spdif_enable = 0;
1783 spdif_enable = ucontrol->
value.integer.value[0] ? 1 : 0;
1789 change = change ^ spdif_enable;
1793 snd_ali_enable_spdif_out(codec);
1797 snd_ali_disable_spdif_out(codec);
1803 change = change ^ spdif_enable;
1807 snd_ali_enable_spdif_chnout(codec);
1810 snd_ali_disable_spdif_chnout(codec);
1816 change = change ^ spdif_enable;
1820 snd_ali_enable_spdif_in(codec);
1823 snd_ali_disable_spdif_in(codec);
1851 .write = snd_ali_codec_write,
1852 .read = snd_ali_codec_read,
1859 memset(&ac97, 0,
sizeof(ac97));
1867 "ali mixer %d creating error.\n", i);
1876 for (idx = 0; idx <
ARRAY_SIZE(snd_ali5451_mixer_spdif); idx++) {
1886 #ifdef CONFIG_PM_SLEEP
1887 static int ali_suspend(
struct device *
dev)
1901 snd_pcm_suspend_all(chip->
pcm[i]);
1902 snd_ac97_suspend(chip->
ac97[i]);
1937 static int ali_resume(
struct device *dev)
1953 "disabling device\n");
1982 snd_ac97_resume(chip->
ac97[i]);
1989 #define ALI_PM_OPS &ali_pm
1991 #define ALI_PM_OPS NULL
1994 static int snd_ali_free(
struct snd_ali * codec)
1997 snd_ali_disable_address_interrupt(codec);
1998 if (codec->
irq >= 0)
2003 #ifdef CONFIG_PM_SLEEP
2004 kfree(codec->image);
2012 static int snd_ali_chip_init(
struct snd_ali *codec)
2014 unsigned int legacy;
2020 if (snd_ali_reset_5451(codec)) {
2027 pci_read_config_byte(pci_dev, 0x59, &temp);
2029 pci_write_config_byte(pci_dev, 0x59, temp);
2032 pci_read_config_byte(pci_dev, 0xb8, &temp);
2034 pci_write_config_byte(pci_dev, 0xB8, temp);
2037 pci_read_config_dword(codec->
pci, 0x44, &legacy);
2038 legacy &= 0xff00ff00;
2039 legacy |= 0x000800aa;
2040 pci_write_config_dword(codec->
pci, 0x44, legacy);
2052 snd_ali_enable_spdif_out(codec);
2078 for (i = 0; i < 256 ; i+= 4)
2079 snd_iprintf(buf,
"%02x: %08x\n", i,
inl(
ALI_REG(codec, i)));
2085 if (!snd_card_proc_new(codec->
card,
"ali5451", &entry))
2086 snd_info_set_text_ops(entry, codec, snd_ali_proc_read);
2104 codec->
irq = codec->
pci->irq;
2108 static int snd_ali_dev_free(
struct snd_device *device)
2111 snd_ali_free(codec);
2116 struct pci_dev *pci,
2123 unsigned short cmdw;
2125 .dev_free = snd_ali_dev_free,
2138 pci_set_consistent_dma_mask(pci,
DMA_BIT_MASK(31)) < 0) {
2140 "31bit PCI busmaster DMA\n");
2160 if (pcm_streams < 1)
2162 if (pcm_streams > 32)
2173 if (snd_ali_resources(codec)) {
2174 snd_ali_free(codec);
2180 codec->
synth.chmap = 0;
2181 codec->
synth.chcnt = 0;
2183 codec->
synth.synthcount = 0;
2196 codec->
chregs.data.start = 0x00;
2197 codec->
chregs.data.stop = 0x00;
2198 codec->
chregs.data.aint = 0x00;
2199 codec->
chregs.data.ainten = 0x00;
2205 snd_ali_free(codec);
2212 snd_ali_free(codec);
2219 snd_ali_free(codec);
2227 codec->
synth.voices[i].number = i;
2229 err = snd_ali_chip_init(codec);
2235 #ifdef CONFIG_PM_SLEEP
2241 snd_ali_enable_address_interrupt(codec);
2249 static int __devinit snd_ali_probe(
struct pci_dev *pci,
2262 err = snd_ali_create(card, pci, pcm_channels,
spdif, &codec);
2268 err = snd_ali_mixer(codec);
2273 err = snd_ali_build_pcms(codec);
2277 snd_ali_proc_init(codec);
2290 pci_set_drvdata(pci, card);
2298 static void __devexit snd_ali_remove(
struct pci_dev *pci)
2301 pci_set_drvdata(pci,
NULL);
2305 .name = KBUILD_MODNAME,
2306 .id_table = snd_ali_ids,
2307 .probe = snd_ali_probe,