aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ice1712
diff options
context:
space:
mode:
authorAlan Horstmann <gineera@aspect135.co.uk>2006-02-08 01:40:33 -0500
committerJaroslav Kysela <perex@suse.cz>2006-03-22 04:28:25 -0500
commit531af46279fe113f9e41bd5167c8868c936813b5 (patch)
treed2eb57fb88a15f2fcbfe8bb88066de92d4f93aea /sound/pci/ice1712
parentcc7a59bd8dcee9b01e0c9ab21380071f0ae6ef0d (diff)
[ALSA] ice1712 - disable unused ADCs & DACs on DMX6fire
Modules: ICE1712 driver Change the value written to hardware configuration register of envy24 chip in the case of Terratec DMX6fire to restrict the active ADCs & DACs to 6. Also add the dxr_enable module option to eventually leave the old behaviour when user requests. Signed-off-by: Alan Horstmann <gineera@aspect135.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/ice1712')
-rw-r--r--sound/pci/ice1712/ice1712.c16
-rw-r--r--sound/pci/ice1712/ice1712.h1
2 files changed, 15 insertions, 2 deletions
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c
index 6682e1fc1449..d6dfe001fde3 100644
--- a/sound/pci/ice1712/ice1712.c
+++ b/sound/pci/ice1712/ice1712.c
@@ -87,6 +87,7 @@ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card
87static char *model[SNDRV_CARDS]; 87static char *model[SNDRV_CARDS];
88static int omni[SNDRV_CARDS]; /* Delta44 & 66 Omni I/O support */ 88static int omni[SNDRV_CARDS]; /* Delta44 & 66 Omni I/O support */
89static int cs8427_timeout[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 500}; /* CS8427 S/PDIF transciever reset timeout value in msec */ 89static int cs8427_timeout[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 500}; /* CS8427 S/PDIF transciever reset timeout value in msec */
90static int dxr_enable[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 500}; /* DXR enable for DMX6FIRE */
90 91
91module_param_array(index, int, NULL, 0444); 92module_param_array(index, int, NULL, 0444);
92MODULE_PARM_DESC(index, "Index value for ICE1712 soundcard."); 93MODULE_PARM_DESC(index, "Index value for ICE1712 soundcard.");
@@ -100,6 +101,8 @@ module_param_array(cs8427_timeout, int, NULL, 0444);
100MODULE_PARM_DESC(cs8427_timeout, "Define reset timeout for cs8427 chip in msec resolution."); 101MODULE_PARM_DESC(cs8427_timeout, "Define reset timeout for cs8427 chip in msec resolution.");
101module_param_array(model, charp, NULL, 0444); 102module_param_array(model, charp, NULL, 0444);
102MODULE_PARM_DESC(model, "Use the given board model."); 103MODULE_PARM_DESC(model, "Use the given board model.");
104module_param_array(dxr_enable, int, NULL, 0444);
105MODULE_PARM_DESC(dsr_enable, "Enable DXR support for Terratec DMX6FIRE.");
103 106
104 107
105static struct pci_device_id snd_ice1712_ids[] = { 108static struct pci_device_id snd_ice1712_ids[] = {
@@ -2390,7 +2393,13 @@ static int __devinit snd_ice1712_chip_init(struct snd_ice1712 *ice)
2390 udelay(200); 2393 udelay(200);
2391 outb(ICE1712_NATIVE, ICEREG(ice, CONTROL)); 2394 outb(ICE1712_NATIVE, ICEREG(ice, CONTROL));
2392 udelay(200); 2395 udelay(200);
2393 pci_write_config_byte(ice->pci, 0x60, ice->eeprom.data[ICE_EEP1_CODEC]); 2396 if (ice->eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE && !ice->dxr_enable) {
2397 /* Limit active ADCs and DACs to 6; */
2398 /* Note: DXR extension not supported */
2399 pci_write_config_byte(ice->pci, 0x60, 0x0a);
2400 } else {
2401 pci_write_config_byte(ice->pci, 0x60, ice->eeprom.data[ICE_EEP1_CODEC]);
2402 }
2394 pci_write_config_byte(ice->pci, 0x61, ice->eeprom.data[ICE_EEP1_ACLINK]); 2403 pci_write_config_byte(ice->pci, 0x61, ice->eeprom.data[ICE_EEP1_ACLINK]);
2395 pci_write_config_byte(ice->pci, 0x62, ice->eeprom.data[ICE_EEP1_I2SID]); 2404 pci_write_config_byte(ice->pci, 0x62, ice->eeprom.data[ICE_EEP1_I2SID]);
2396 pci_write_config_byte(ice->pci, 0x63, ice->eeprom.data[ICE_EEP1_SPDIF]); 2405 pci_write_config_byte(ice->pci, 0x63, ice->eeprom.data[ICE_EEP1_SPDIF]);
@@ -2526,6 +2535,7 @@ static int __devinit snd_ice1712_create(struct snd_card *card,
2526 const char *modelname, 2535 const char *modelname,
2527 int omni, 2536 int omni,
2528 int cs8427_timeout, 2537 int cs8427_timeout,
2538 int dxr_enable,
2529 struct snd_ice1712 ** r_ice1712) 2539 struct snd_ice1712 ** r_ice1712)
2530{ 2540{
2531 struct snd_ice1712 *ice; 2541 struct snd_ice1712 *ice;
@@ -2558,6 +2568,7 @@ static int __devinit snd_ice1712_create(struct snd_card *card,
2558 else if (cs8427_timeout > 1000) 2568 else if (cs8427_timeout > 1000)
2559 cs8427_timeout = 1000; 2569 cs8427_timeout = 1000;
2560 ice->cs8427_timeout = cs8427_timeout; 2570 ice->cs8427_timeout = cs8427_timeout;
2571 ice->dxr_enable = dxr_enable;
2561 spin_lock_init(&ice->reg_lock); 2572 spin_lock_init(&ice->reg_lock);
2562 mutex_init(&ice->gpio_mutex); 2573 mutex_init(&ice->gpio_mutex);
2563 mutex_init(&ice->i2c_mutex); 2574 mutex_init(&ice->i2c_mutex);
@@ -2660,7 +2671,8 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci,
2660 strcpy(card->shortname, "ICEnsemble ICE1712"); 2671 strcpy(card->shortname, "ICEnsemble ICE1712");
2661 2672
2662 if ((err = snd_ice1712_create(card, pci, model[dev], omni[dev], 2673 if ((err = snd_ice1712_create(card, pci, model[dev], omni[dev],
2663 cs8427_timeout[dev], &ice)) < 0) { 2674 cs8427_timeout[dev], dxr_enable[dev],
2675 &ice)) < 0) {
2664 snd_card_free(card); 2676 snd_card_free(card);
2665 return err; 2677 return err;
2666 } 2678 }
diff --git a/sound/pci/ice1712/ice1712.h b/sound/pci/ice1712/ice1712.h
index d7416a83fcac..f9b22d4a3932 100644
--- a/sound/pci/ice1712/ice1712.h
+++ b/sound/pci/ice1712/ice1712.h
@@ -325,6 +325,7 @@ struct snd_ice1712 {
325 325
326 unsigned int pro_volumes[20]; 326 unsigned int pro_volumes[20];
327 unsigned int omni: 1; /* Delta Omni I/O */ 327 unsigned int omni: 1; /* Delta Omni I/O */
328 unsigned int dxr_enable: 1; /* Terratec DXR enable for DMX6FIRE */
328 unsigned int vt1724: 1; 329 unsigned int vt1724: 1;
329 unsigned int vt1720: 1; 330 unsigned int vt1720: 1;
330 unsigned int has_spdif: 1; /* VT1720/4 - has SPDIF I/O */ 331 unsigned int has_spdif: 1; /* VT1720/4 - has SPDIF I/O */