Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* |
2 | * ALSA driver for VT1720/VT1724 (Envy24PT/Envy24HT) | |
3 | * | |
4 | * Lowlevel functions for VT1720-based motherboards | |
5 | * | |
6 | * Copyright (c) 2004 Takashi Iwai <tiwai@suse.de> | |
7 | * | |
8 | * This program is free software; you can redistribute it and/or modify | |
9 | * it under the terms of the GNU General Public License as published by | |
10 | * the Free Software Foundation; either version 2 of the License, or | |
11 | * (at your option) any later version. | |
12 | * | |
13 | * This program is distributed in the hope that it will be useful, | |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | * GNU General Public License for more details. | |
17 | * | |
18 | * You should have received a copy of the GNU General Public License | |
19 | * along with this program; if not, write to the Free Software | |
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 | * | |
22 | */ | |
23 | ||
24 | #include <sound/driver.h> | |
25 | #include <asm/io.h> | |
26 | #include <linux/delay.h> | |
27 | #include <linux/interrupt.h> | |
28 | #include <linux/init.h> | |
29 | #include <linux/slab.h> | |
30 | #include <sound/core.h> | |
31 | ||
32 | #include "ice1712.h" | |
33 | #include "vt1720_mobo.h" | |
34 | ||
35 | ||
ab0c7d72 | 36 | static int __devinit k8x800_init(struct snd_ice1712 *ice) |
1da177e4 LT |
37 | { |
38 | ice->vt1720 = 1; | |
39 | ||
40 | /* VT1616 codec */ | |
41 | ice->num_total_dacs = 6; | |
42 | ice->num_total_adcs = 2; | |
43 | ||
44 | /* WM8728 codec */ | |
45 | /* FIXME: TODO */ | |
46 | ||
47 | return 0; | |
48 | } | |
49 | ||
ab0c7d72 | 50 | static int __devinit k8x800_add_controls(struct snd_ice1712 *ice) |
1da177e4 LT |
51 | { |
52 | /* FIXME: needs some quirks for VT1616? */ | |
53 | return 0; | |
54 | } | |
55 | ||
56 | /* EEPROM image */ | |
57 | ||
58 | static unsigned char k8x800_eeprom[] __devinitdata = { | |
59 | 0x01, /* SYSCONF: clock 256, 1ADC, 2DACs */ | |
60 | 0x02, /* ACLINK: ACLINK, packed */ | |
61 | 0x00, /* I2S: - */ | |
62 | 0x00, /* SPDIF: - */ | |
63 | 0xff, /* GPIO_DIR */ | |
64 | 0xff, /* GPIO_DIR1 */ | |
65 | 0x00, /* - */ | |
66 | 0xff, /* GPIO_MASK */ | |
67 | 0xff, /* GPIO_MASK1 */ | |
68 | 0x00, /* - */ | |
69 | 0x00, /* GPIO_STATE */ | |
70 | 0x00, /* GPIO_STATE1 */ | |
71 | 0x00, /* - */ | |
72 | }; | |
73 | ||
09f9a891 TI |
74 | static unsigned char sn25p_eeprom[] __devinitdata = { |
75 | 0x01, /* SYSCONF: clock 256, 1ADC, 2DACs */ | |
76 | 0x02, /* ACLINK: ACLINK, packed */ | |
77 | 0x00, /* I2S: - */ | |
78 | 0x41, /* SPDIF: - */ | |
79 | 0xff, /* GPIO_DIR */ | |
80 | 0xff, /* GPIO_DIR1 */ | |
81 | 0x00, /* - */ | |
82 | 0xff, /* GPIO_MASK */ | |
83 | 0xff, /* GPIO_MASK1 */ | |
84 | 0x00, /* - */ | |
85 | 0x00, /* GPIO_STATE */ | |
86 | 0x00, /* GPIO_STATE1 */ | |
87 | 0x00, /* - */ | |
88 | }; | |
89 | ||
1da177e4 LT |
90 | |
91 | /* entry point */ | |
92 | struct snd_ice1712_card_info snd_vt1720_mobo_cards[] __devinitdata = { | |
93 | { | |
94 | .subvendor = VT1720_SUBDEVICE_K8X800, | |
95 | .name = "Albatron K8X800 Pro II", | |
96 | .model = "k8x800", | |
97 | .chip_init = k8x800_init, | |
98 | .build_controls = k8x800_add_controls, | |
99 | .eeprom_size = sizeof(k8x800_eeprom), | |
100 | .eeprom_data = k8x800_eeprom, | |
101 | }, | |
102 | { | |
103 | .subvendor = VT1720_SUBDEVICE_ZNF3_150, | |
104 | .name = "Chaintech ZNF3-150", | |
105 | /* identical with k8x800 */ | |
106 | .chip_init = k8x800_init, | |
107 | .build_controls = k8x800_add_controls, | |
108 | .eeprom_size = sizeof(k8x800_eeprom), | |
109 | .eeprom_data = k8x800_eeprom, | |
110 | }, | |
111 | { | |
112 | .subvendor = VT1720_SUBDEVICE_ZNF3_250, | |
113 | .name = "Chaintech ZNF3-250", | |
114 | /* identical with k8x800 */ | |
115 | .chip_init = k8x800_init, | |
116 | .build_controls = k8x800_add_controls, | |
117 | .eeprom_size = sizeof(k8x800_eeprom), | |
118 | .eeprom_data = k8x800_eeprom, | |
119 | }, | |
120 | { | |
121 | .subvendor = VT1720_SUBDEVICE_9CJS, | |
122 | .name = "Chaintech 9CJS", | |
123 | /* identical with k8x800 */ | |
124 | .chip_init = k8x800_init, | |
125 | .build_controls = k8x800_add_controls, | |
126 | .eeprom_size = sizeof(k8x800_eeprom), | |
127 | .eeprom_data = k8x800_eeprom, | |
128 | }, | |
b9cce374 TI |
129 | { |
130 | .subvendor = VT1720_SUBDEVICE_SN25P, | |
131 | .name = "Shuttle SN25P", | |
09f9a891 | 132 | .model = "sn25p", |
b9cce374 TI |
133 | .chip_init = k8x800_init, |
134 | .build_controls = k8x800_add_controls, | |
135 | .eeprom_size = sizeof(k8x800_eeprom), | |
09f9a891 | 136 | .eeprom_data = sn25p_eeprom, |
b9cce374 | 137 | }, |
1da177e4 LT |
138 | { } /* terminator */ |
139 | }; | |
140 |