aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshimune Konno <heitouk@nifty.com>2006-12-18 07:12:18 -0500
committerJaroslav Kysela <perex@suse.cz>2007-02-09 03:02:29 -0500
commitcdf88efa03907a884177b226321bb41bc17c407f (patch)
tree443684bd87fe8462a4a48b5f732d21b87d6c07a1
parent1a5965b72209db9db453bc0049393e0d54cf85cb (diff)
[ALSA] ice1724 - Add support for Prodigy 7.1 XT
This patch supports Audiotrack 7.1 XT. 7.1XT is almost same hardware as 7.1LT. so using 7.1 LT's code. Signed-off-by: Toshimune Konno <heitouk@nifty.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
-rw-r--r--sound/pci/ice1712/aureon.c52
-rw-r--r--sound/pci/ice1712/aureon.h4
2 files changed, 46 insertions, 10 deletions
diff --git a/sound/pci/ice1712/aureon.c b/sound/pci/ice1712/aureon.c
index 9e76cebd2d22..a085618d33f9 100644
--- a/sound/pci/ice1712/aureon.c
+++ b/sound/pci/ice1712/aureon.c
@@ -474,7 +474,8 @@ static void aureon_spi_write(struct snd_ice1712 *ice, unsigned int cs, unsigned
474 474
475 tmp = snd_ice1712_gpio_read(ice); 475 tmp = snd_ice1712_gpio_read(ice);
476 476
477 if (ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71LT) { 477 if (ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71LT ||
478 ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71XT) {
478 snd_ice1712_gpio_set_mask(ice, ~(PRODIGY_SPI_MOSI|PRODIGY_SPI_CLK|PRODIGY_WM_CS)); 479 snd_ice1712_gpio_set_mask(ice, ~(PRODIGY_SPI_MOSI|PRODIGY_SPI_CLK|PRODIGY_WM_CS));
479 mosi = PRODIGY_SPI_MOSI; 480 mosi = PRODIGY_SPI_MOSI;
480 clk = PRODIGY_SPI_CLK; 481 clk = PRODIGY_SPI_CLK;
@@ -601,7 +602,9 @@ static unsigned short wm_get(struct snd_ice1712 *ice, int reg)
601static void wm_put_nocache(struct snd_ice1712 *ice, int reg, unsigned short val) 602static void wm_put_nocache(struct snd_ice1712 *ice, int reg, unsigned short val)
602{ 603{
603 aureon_spi_write(ice, 604 aureon_spi_write(ice,
604 (ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71LT ? PRODIGY_WM_CS : AUREON_WM_CS), 605 ((ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71LT ||
606 ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71XT) ?
607 PRODIGY_WM_CS : AUREON_WM_CS),
605 (reg << 9) | (val & 0x1ff), 16); 608 (reg << 9) | (val & 0x1ff), 16);
606} 609}
607 610
@@ -1288,12 +1291,14 @@ static int aureon_set_headphone_amp(struct snd_ice1712 *ice, int enable)
1288 1291
1289 tmp2 = tmp = snd_ice1712_gpio_read(ice); 1292 tmp2 = tmp = snd_ice1712_gpio_read(ice);
1290 if (enable) 1293 if (enable)
1291 if (ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71LT) 1294 if (ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71LT &&
1295 ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71XT)
1292 tmp |= AUREON_HP_SEL; 1296 tmp |= AUREON_HP_SEL;
1293 else 1297 else
1294 tmp |= PRODIGY_HP_SEL; 1298 tmp |= PRODIGY_HP_SEL;
1295 else 1299 else
1296 if (ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71LT) 1300 if (ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71LT &&
1301 ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71XT)
1297 tmp &= ~ AUREON_HP_SEL; 1302 tmp &= ~ AUREON_HP_SEL;
1298 else 1303 else
1299 tmp &= ~ PRODIGY_HP_SEL; 1304 tmp &= ~ PRODIGY_HP_SEL;
@@ -1898,7 +1903,8 @@ static int __devinit aureon_add_controls(struct snd_ice1712 *ice)
1898 return err; 1903 return err;
1899 } 1904 }
1900 } 1905 }
1901 else if (ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71LT) { 1906 else if (ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71LT &&
1907 ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71XT) {
1902 for (i = 0; i < ARRAY_SIZE(ac97_controls); i++) { 1908 for (i = 0; i < ARRAY_SIZE(ac97_controls); i++) {
1903 err = snd_ctl_add(ice->card, snd_ctl_new1(&ac97_controls[i], ice)); 1909 err = snd_ctl_add(ice->card, snd_ctl_new1(&ac97_controls[i], ice));
1904 if (err < 0) 1910 if (err < 0)
@@ -1906,7 +1912,8 @@ static int __devinit aureon_add_controls(struct snd_ice1712 *ice)
1906 } 1912 }
1907 } 1913 }
1908 1914
1909 if (ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71LT) { 1915 if (ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71LT &&
1916 ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71XT) {
1910 unsigned char id; 1917 unsigned char id;
1911 snd_ice1712_save_gpio_status(ice); 1918 snd_ice1712_save_gpio_status(ice);
1912 id = aureon_cs8415_get(ice, CS8415_ID); 1919 id = aureon_cs8415_get(ice, CS8415_ID);
@@ -2062,7 +2069,8 @@ static int __devinit aureon_init(struct snd_ice1712 *ice)
2062 2069
2063 /* initialize WM8770 codec */ 2070 /* initialize WM8770 codec */
2064 if (ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71 || 2071 if (ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71 ||
2065 ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71LT) 2072 ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71LT ||
2073 ice->eeprom.subvendor == VT1724_SUBDEVICE_PRODIGY71XT)
2066 p = wm_inits_prodigy; 2074 p = wm_inits_prodigy;
2067 else 2075 else
2068 p = wm_inits_aureon; 2076 p = wm_inits_aureon;
@@ -2070,7 +2078,8 @@ static int __devinit aureon_init(struct snd_ice1712 *ice)
2070 wm_put(ice, p[0], p[1]); 2078 wm_put(ice, p[0], p[1]);
2071 2079
2072 /* initialize CS8415A codec */ 2080 /* initialize CS8415A codec */
2073 if (ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71LT) { 2081 if (ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71LT &&
2082 ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71XT) {
2074 for (p = cs_inits; *p != (unsigned short)-1; p++) 2083 for (p = cs_inits; *p != (unsigned short)-1; p++)
2075 aureon_spi_write(ice, AUREON_CS8415_CS, *p | 0x200000, 24); 2084 aureon_spi_write(ice, AUREON_CS8415_CS, *p | 0x200000, 24);
2076 ice->spec.aureon.cs8415_mux = 1; 2085 ice->spec.aureon.cs8415_mux = 1;
@@ -2163,7 +2172,22 @@ static unsigned char prodigy71lt_eeprom[] __devinitdata = {
2163 0x00, /* GPIO_STATE1 */ 2172 0x00, /* GPIO_STATE1 */
2164 0x00, /* GPIO_STATE2 */ 2173 0x00, /* GPIO_STATE2 */
2165}; 2174};
2166 2175
2176static unsigned char prodigy71xt_eeprom[] __devinitdata = {
2177 0x4b, /* SYSCINF: clock 512, spdif-in/ADC, 4DACs */
2178 0x80, /* ACLINK: I2S */
2179 0xfc, /* I2S: vol, 96k, 24bit, 192k */
2180 0xc3, /* SPDIF: out-en, out-int, spdif-in */
2181 0xff, /* GPIO_DIR */
2182 0xff, /* GPIO_DIR1 */
2183 0x5f, /* GPIO_DIR2 */
2184 0x00, /* GPIO_MASK */
2185 0x00, /* GPIO_MASK1 */
2186 0x00, /* GPIO_MASK2 */
2187 0x00, /* GPIO_STATE */
2188 0x00, /* GPIO_STATE1 */
2189 0x00, /* GPIO_STATE2 */
2190};
2167 2191
2168/* entry point */ 2192/* entry point */
2169struct snd_ice1712_card_info snd_vt1724_aureon_cards[] __devinitdata = { 2193struct snd_ice1712_card_info snd_vt1724_aureon_cards[] __devinitdata = {
@@ -2217,5 +2241,15 @@ struct snd_ice1712_card_info snd_vt1724_aureon_cards[] __devinitdata = {
2217 .eeprom_data = prodigy71lt_eeprom, 2241 .eeprom_data = prodigy71lt_eeprom,
2218 .driver = "Prodigy71LT", 2242 .driver = "Prodigy71LT",
2219 }, 2243 },
2244 {
2245 .subvendor = VT1724_SUBDEVICE_PRODIGY71XT,
2246 .name = "Audiotrak Prodigy 7.1 XT",
2247 .model = "prodigy71xt",
2248 .chip_init = aureon_init,
2249 .build_controls = aureon_add_controls,
2250 .eeprom_size = sizeof(prodigy71xt_eeprom),
2251 .eeprom_data = prodigy71xt_eeprom,
2252 .driver = "Prodigy71LT",
2253 },
2220 { } /* terminator */ 2254 { } /* terminator */
2221}; 2255};
diff --git a/sound/pci/ice1712/aureon.h b/sound/pci/ice1712/aureon.h
index 3b7bea656c57..c253b8e2c789 100644
--- a/sound/pci/ice1712/aureon.h
+++ b/sound/pci/ice1712/aureon.h
@@ -28,13 +28,15 @@
28 "{Terratec,Aureon 7.1 Space},"\ 28 "{Terratec,Aureon 7.1 Space},"\
29 "{Terratec,Aureon 7.1 Universe}," \ 29 "{Terratec,Aureon 7.1 Universe}," \
30 "{AudioTrak,Prodigy 7.1}," \ 30 "{AudioTrak,Prodigy 7.1}," \
31 "{AudioTrak,Prodigy 7.1 LT}," 31 "{AudioTrak,Prodigy 7.1 LT},"\
32 "{AudioTrak,Prodigy 7.1 XT},"
32 33
33#define VT1724_SUBDEVICE_AUREON51_SKY 0x3b154711 /* Aureon 5.1 Sky */ 34#define VT1724_SUBDEVICE_AUREON51_SKY 0x3b154711 /* Aureon 5.1 Sky */
34#define VT1724_SUBDEVICE_AUREON71_SPACE 0x3b154511 /* Aureon 7.1 Space */ 35#define VT1724_SUBDEVICE_AUREON71_SPACE 0x3b154511 /* Aureon 7.1 Space */
35#define VT1724_SUBDEVICE_AUREON71_UNIVERSE 0x3b155311 /* Aureon 7.1 Universe */ 36#define VT1724_SUBDEVICE_AUREON71_UNIVERSE 0x3b155311 /* Aureon 7.1 Universe */
36#define VT1724_SUBDEVICE_PRODIGY71 0x33495345 /* PRODIGY 7.1 */ 37#define VT1724_SUBDEVICE_PRODIGY71 0x33495345 /* PRODIGY 7.1 */
37#define VT1724_SUBDEVICE_PRODIGY71LT 0x32315441 /* PRODIGY 7.1 LT */ 38#define VT1724_SUBDEVICE_PRODIGY71LT 0x32315441 /* PRODIGY 7.1 LT */
39#define VT1724_SUBDEVICE_PRODIGY71XT 0x36315441 /* PRODIGY 7.1 XT*/
38 40
39extern struct snd_ice1712_card_info snd_vt1724_aureon_cards[]; 41extern struct snd_ice1712_card_info snd_vt1724_aureon_cards[];
40 42