aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ice1712
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/ice1712')
-rw-r--r--sound/pci/ice1712/aureon.c26
-rw-r--r--sound/pci/ice1712/aureon.h1
-rw-r--r--sound/pci/ice1712/ews.c3
-rw-r--r--sound/pci/ice1712/ice1712.c43
-rw-r--r--sound/pci/ice1712/ice1712.h5
-rw-r--r--sound/pci/ice1712/ice1724.c5
-rw-r--r--sound/pci/ice1712/pontis.c8
7 files changed, 61 insertions, 30 deletions
diff --git a/sound/pci/ice1712/aureon.c b/sound/pci/ice1712/aureon.c
index 336dc489aee1..ca74f5b85f42 100644
--- a/sound/pci/ice1712/aureon.c
+++ b/sound/pci/ice1712/aureon.c
@@ -1281,9 +1281,15 @@ static int aureon_set_headphone_amp(struct snd_ice1712 *ice, int enable)
1281 1281
1282 tmp2 = tmp = snd_ice1712_gpio_read(ice); 1282 tmp2 = tmp = snd_ice1712_gpio_read(ice);
1283 if (enable) 1283 if (enable)
1284 tmp |= AUREON_HP_SEL; 1284 if (ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71LT)
1285 tmp |= AUREON_HP_SEL;
1286 else
1287 tmp |= PRODIGY_HP_SEL;
1285 else 1288 else
1286 tmp &= ~ AUREON_HP_SEL; 1289 if (ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71LT)
1290 tmp &= ~ AUREON_HP_SEL;
1291 else
1292 tmp &= ~ PRODIGY_HP_SEL;
1287 if (tmp != tmp2) { 1293 if (tmp != tmp2) {
1288 snd_ice1712_gpio_write(ice, tmp); 1294 snd_ice1712_gpio_write(ice, tmp);
1289 return 1; 1295 return 1;
@@ -2079,16 +2085,16 @@ static unsigned char prodigy71_eeprom[] __devinitdata = {
2079}; 2085};
2080 2086
2081static unsigned char prodigy71lt_eeprom[] __devinitdata = { 2087static unsigned char prodigy71lt_eeprom[] __devinitdata = {
2082 0x0b, /* SYSCINF: clock 512, spdif-in/ADC, 4DACs */ 2088 0x4b, /* SYSCINF: clock 512, spdif-in/ADC, 4DACs */
2083 0x80, /* ACLINK: I2S */ 2089 0x80, /* ACLINK: I2S */
2084 0xfc, /* I2S: vol, 96k, 24bit, 192k */ 2090 0xfc, /* I2S: vol, 96k, 24bit, 192k */
2085 0xc3, /* SPDUF: out-en, out-int */ 2091 0xc3, /* SPDIF: out-en, out-int, spdif-in */
2086 0x00, /* GPIO_DIR */ 2092 0xff, /* GPIO_DIR */
2087 0x07, /* GPIO_DIR1 */ 2093 0xff, /* GPIO_DIR1 */
2088 0x00, /* GPIO_DIR2 */ 2094 0x5f, /* GPIO_DIR2 */
2089 0xff, /* GPIO_MASK */ 2095 0x00, /* GPIO_MASK */
2090 0xf8, /* GPIO_MASK1 */ 2096 0x00, /* GPIO_MASK1 */
2091 0xff, /* GPIO_MASK2 */ 2097 0x00, /* GPIO_MASK2 */
2092 0x00, /* GPIO_STATE */ 2098 0x00, /* GPIO_STATE */
2093 0x00, /* GPIO_STATE1 */ 2099 0x00, /* GPIO_STATE1 */
2094 0x00, /* GPIO_STATE2 */ 2100 0x00, /* GPIO_STATE2 */
diff --git a/sound/pci/ice1712/aureon.h b/sound/pci/ice1712/aureon.h
index 98a6752280f2..3b7bea656c57 100644
--- a/sound/pci/ice1712/aureon.h
+++ b/sound/pci/ice1712/aureon.h
@@ -58,5 +58,6 @@ extern struct snd_ice1712_card_info snd_vt1724_aureon_cards[];
58#define PRODIGY_WM_CS (1 << 8) 58#define PRODIGY_WM_CS (1 << 8)
59#define PRODIGY_SPI_MOSI (1 << 10) 59#define PRODIGY_SPI_MOSI (1 << 10)
60#define PRODIGY_SPI_CLK (1 << 9) 60#define PRODIGY_SPI_CLK (1 << 9)
61#define PRODIGY_HP_SEL (1 << 5)
61 62
62#endif /* __SOUND_AUREON_H */ 63#endif /* __SOUND_AUREON_H */
diff --git a/sound/pci/ice1712/ews.c b/sound/pci/ice1712/ews.c
index 2c529e741384..b135389fec6c 100644
--- a/sound/pci/ice1712/ews.c
+++ b/sound/pci/ice1712/ews.c
@@ -1031,6 +1031,9 @@ struct snd_ice1712_card_info snd_ice1712_ews_cards[] __devinitdata = {
1031 .model = "dmx6fire", 1031 .model = "dmx6fire",
1032 .chip_init = snd_ice1712_ews_init, 1032 .chip_init = snd_ice1712_ews_init,
1033 .build_controls = snd_ice1712_ews_add_controls, 1033 .build_controls = snd_ice1712_ews_add_controls,
1034 .mpu401_1_name = "MIDI-Front DMX6fire",
1035 .mpu401_2_name = "Wavetable DMX6fire",
1036 .mpu401_2_info_flags = MPU401_INFO_OUTPUT,
1034 }, 1037 },
1035 { } /* terminator */ 1038 { } /* terminator */
1036}; 1039};
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c
index c56793b381e2..845907159b74 100644
--- a/sound/pci/ice1712/ice1712.c
+++ b/sound/pci/ice1712/ice1712.c
@@ -61,7 +61,6 @@
61#include <sound/core.h> 61#include <sound/core.h>
62#include <sound/cs8427.h> 62#include <sound/cs8427.h>
63#include <sound/info.h> 63#include <sound/info.h>
64#include <sound/mpu401.h>
65#include <sound/initval.h> 64#include <sound/initval.h>
66 65
67#include <sound/asoundef.h> 66#include <sound/asoundef.h>
@@ -1596,7 +1595,7 @@ static void __devinit snd_ice1712_proc_init(struct snd_ice1712 * ice)
1596 struct snd_info_entry *entry; 1595 struct snd_info_entry *entry;
1597 1596
1598 if (! snd_card_proc_new(ice->card, "ice1712", &entry)) 1597 if (! snd_card_proc_new(ice->card, "ice1712", &entry))
1599 snd_info_set_text_ops(entry, ice, 1024, snd_ice1712_proc_read); 1598 snd_info_set_text_ops(entry, ice, snd_ice1712_proc_read);
1600} 1599}
1601 1600
1602/* 1601/*
@@ -2398,13 +2397,14 @@ static int __devinit snd_ice1712_chip_init(struct snd_ice1712 *ice)
2398 udelay(200); 2397 udelay(200);
2399 outb(ICE1712_NATIVE, ICEREG(ice, CONTROL)); 2398 outb(ICE1712_NATIVE, ICEREG(ice, CONTROL));
2400 udelay(200); 2399 udelay(200);
2401 if (ice->eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE && !ice->dxr_enable) { 2400 if (ice->eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE &&
2402 /* Limit active ADCs and DACs to 6; */ 2401 !ice->dxr_enable)
2403 /* Note: DXR extension not supported */ 2402 /* Set eeprom value to limit active ADCs and DACs to 6;
2404 pci_write_config_byte(ice->pci, 0x60, 0x2a); 2403 * Also disable AC97 as no hardware in standard 6fire card/box
2405 } else { 2404 * Note: DXR extensions are not currently supported
2406 pci_write_config_byte(ice->pci, 0x60, ice->eeprom.data[ICE_EEP1_CODEC]); 2405 */
2407 } 2406 ice->eeprom.data[ICE_EEP1_CODEC] = 0x3a;
2407 pci_write_config_byte(ice->pci, 0x60, ice->eeprom.data[ICE_EEP1_CODEC]);
2408 pci_write_config_byte(ice->pci, 0x61, ice->eeprom.data[ICE_EEP1_ACLINK]); 2408 pci_write_config_byte(ice->pci, 0x61, ice->eeprom.data[ICE_EEP1_ACLINK]);
2409 pci_write_config_byte(ice->pci, 0x62, ice->eeprom.data[ICE_EEP1_I2SID]); 2409 pci_write_config_byte(ice->pci, 0x62, ice->eeprom.data[ICE_EEP1_I2SID]);
2410 pci_write_config_byte(ice->pci, 0x63, ice->eeprom.data[ICE_EEP1_SPDIF]); 2410 pci_write_config_byte(ice->pci, 0x63, ice->eeprom.data[ICE_EEP1_SPDIF]);
@@ -2737,21 +2737,38 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci,
2737 2737
2738 if (! c->no_mpu401) { 2738 if (! c->no_mpu401) {
2739 if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712, 2739 if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712,
2740 ICEREG(ice, MPU1_CTRL), 1, 2740 ICEREG(ice, MPU1_CTRL),
2741 (c->mpu401_1_info_flags |
2742 MPU401_INFO_INTEGRATED),
2741 ice->irq, 0, 2743 ice->irq, 0,
2742 &ice->rmidi[0])) < 0) { 2744 &ice->rmidi[0])) < 0) {
2743 snd_card_free(card); 2745 snd_card_free(card);
2744 return err; 2746 return err;
2745 } 2747 }
2746 2748 if (c->mpu401_1_name)
2747 if (ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_2xMPU401) 2749 /* Prefered name available in card_info */
2750 snprintf(ice->rmidi[0]->name,
2751 sizeof(ice->rmidi[0]->name),
2752 "%s %d", c->mpu401_1_name, card->number);
2753
2754 if (ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_2xMPU401) {
2755 /* 2nd port used */
2748 if ((err = snd_mpu401_uart_new(card, 1, MPU401_HW_ICE1712, 2756 if ((err = snd_mpu401_uart_new(card, 1, MPU401_HW_ICE1712,
2749 ICEREG(ice, MPU2_CTRL), 1, 2757 ICEREG(ice, MPU2_CTRL),
2758 (c->mpu401_2_info_flags |
2759 MPU401_INFO_INTEGRATED),
2750 ice->irq, 0, 2760 ice->irq, 0,
2751 &ice->rmidi[1])) < 0) { 2761 &ice->rmidi[1])) < 0) {
2752 snd_card_free(card); 2762 snd_card_free(card);
2753 return err; 2763 return err;
2754 } 2764 }
2765 if (c->mpu401_2_name)
2766 /* Prefered name available in card_info */
2767 snprintf(ice->rmidi[1]->name,
2768 sizeof(ice->rmidi[1]->name),
2769 "%s %d", c->mpu401_2_name,
2770 card->number);
2771 }
2755 } 2772 }
2756 2773
2757 snd_ice1712_set_input_clock_source(ice, 0); 2774 snd_ice1712_set_input_clock_source(ice, 0);
diff --git a/sound/pci/ice1712/ice1712.h b/sound/pci/ice1712/ice1712.h
index 053f8e56fd68..ce27eac40d4e 100644
--- a/sound/pci/ice1712/ice1712.h
+++ b/sound/pci/ice1712/ice1712.h
@@ -29,6 +29,7 @@
29#include <sound/ak4xxx-adda.h> 29#include <sound/ak4xxx-adda.h>
30#include <sound/ak4114.h> 30#include <sound/ak4114.h>
31#include <sound/pcm.h> 31#include <sound/pcm.h>
32#include <sound/mpu401.h>
32 33
33 34
34/* 35/*
@@ -495,6 +496,10 @@ struct snd_ice1712_card_info {
495 int (*chip_init)(struct snd_ice1712 *); 496 int (*chip_init)(struct snd_ice1712 *);
496 int (*build_controls)(struct snd_ice1712 *); 497 int (*build_controls)(struct snd_ice1712 *);
497 unsigned int no_mpu401: 1; 498 unsigned int no_mpu401: 1;
499 unsigned int mpu401_1_info_flags;
500 unsigned int mpu401_2_info_flags;
501 const char *mpu401_1_name;
502 const char *mpu401_2_name;
498 unsigned int eeprom_size; 503 unsigned int eeprom_size;
499 unsigned char *eeprom_data; 504 unsigned char *eeprom_data;
500}; 505};
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c
index b1c007e022d2..34a58c629f47 100644
--- a/sound/pci/ice1712/ice1724.c
+++ b/sound/pci/ice1712/ice1724.c
@@ -1293,7 +1293,7 @@ static void __devinit snd_vt1724_proc_init(struct snd_ice1712 * ice)
1293 struct snd_info_entry *entry; 1293 struct snd_info_entry *entry;
1294 1294
1295 if (! snd_card_proc_new(ice->card, "ice1724", &entry)) 1295 if (! snd_card_proc_new(ice->card, "ice1724", &entry))
1296 snd_info_set_text_ops(entry, ice, 1024, snd_vt1724_proc_read); 1296 snd_info_set_text_ops(entry, ice, snd_vt1724_proc_read);
1297} 1297}
1298 1298
1299/* 1299/*
@@ -2388,7 +2388,8 @@ static int __devinit snd_vt1724_probe(struct pci_dev *pci,
2388 if (! c->no_mpu401) { 2388 if (! c->no_mpu401) {
2389 if (ice->eeprom.data[ICE_EEP2_SYSCONF] & VT1724_CFG_MPU401) { 2389 if (ice->eeprom.data[ICE_EEP2_SYSCONF] & VT1724_CFG_MPU401) {
2390 if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712, 2390 if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712,
2391 ICEREG1724(ice, MPU_CTRL), 1, 2391 ICEREG1724(ice, MPU_CTRL),
2392 MPU401_INFO_INTEGRATED,
2392 ice->irq, 0, 2393 ice->irq, 0,
2393 &ice->rmidi[0])) < 0) { 2394 &ice->rmidi[0])) < 0) {
2394 snd_card_free(card); 2395 snd_card_free(card);
diff --git a/sound/pci/ice1712/pontis.c b/sound/pci/ice1712/pontis.c
index d23fb3fc2133..0efcad9260a5 100644
--- a/sound/pci/ice1712/pontis.c
+++ b/sound/pci/ice1712/pontis.c
@@ -680,9 +680,8 @@ static void wm_proc_init(struct snd_ice1712 *ice)
680{ 680{
681 struct snd_info_entry *entry; 681 struct snd_info_entry *entry;
682 if (! snd_card_proc_new(ice->card, "wm_codec", &entry)) { 682 if (! snd_card_proc_new(ice->card, "wm_codec", &entry)) {
683 snd_info_set_text_ops(entry, ice, 1024, wm_proc_regs_read); 683 snd_info_set_text_ops(entry, ice, wm_proc_regs_read);
684 entry->mode |= S_IWUSR; 684 entry->mode |= S_IWUSR;
685 entry->c.text.write_size = 1024;
686 entry->c.text.write = wm_proc_regs_write; 685 entry->c.text.write = wm_proc_regs_write;
687 } 686 }
688} 687}
@@ -705,9 +704,8 @@ static void cs_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buff
705static void cs_proc_init(struct snd_ice1712 *ice) 704static void cs_proc_init(struct snd_ice1712 *ice)
706{ 705{
707 struct snd_info_entry *entry; 706 struct snd_info_entry *entry;
708 if (! snd_card_proc_new(ice->card, "cs_codec", &entry)) { 707 if (! snd_card_proc_new(ice->card, "cs_codec", &entry))
709 snd_info_set_text_ops(entry, ice, 1024, cs_proc_regs_read); 708 snd_info_set_text_ops(entry, ice, cs_proc_regs_read);
710 }
711} 709}
712 710
713 711