X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fpci%2Fice1712%2Fice1712.c;h=c56793b381e282a53218662d286b4ab20716bbb2;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=bf20858d9f193b92db0c84b91c2d3abf1c15e9b8;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index bf20858d9..c56793b38 100644 --- a/sound/pci/ice1712/ice1712.c +++ b/sound/pci/ice1712/ice1712.c @@ -61,6 +61,7 @@ #include #include #include +#include #include #include @@ -106,7 +107,7 @@ module_param_array(dxr_enable, int, NULL, 0444); MODULE_PARM_DESC(dxr_enable, "Enable DXR support for Terratec DMX6FIRE."); -static struct pci_device_id snd_ice1712_ids[] = { +static struct pci_device_id snd_ice1712_ids[] __devinitdata = { { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_ICE_1712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* ICE1712 */ { 0, } }; @@ -1595,7 +1596,7 @@ static void __devinit snd_ice1712_proc_init(struct snd_ice1712 * ice) struct snd_info_entry *entry; if (! snd_card_proc_new(ice->card, "ice1712", &entry)) - snd_info_set_text_ops(entry, ice, snd_ice1712_proc_read); + snd_info_set_text_ops(entry, ice, 1024, snd_ice1712_proc_read); } /* @@ -2397,14 +2398,13 @@ static int __devinit snd_ice1712_chip_init(struct snd_ice1712 *ice) udelay(200); outb(ICE1712_NATIVE, ICEREG(ice, CONTROL)); udelay(200); - if (ice->eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE && - !ice->dxr_enable) - /* Set eeprom value to limit active ADCs and DACs to 6; - * Also disable AC97 as no hardware in standard 6fire card/box - * Note: DXR extensions are not currently supported - */ - ice->eeprom.data[ICE_EEP1_CODEC] = 0x3a; - pci_write_config_byte(ice->pci, 0x60, ice->eeprom.data[ICE_EEP1_CODEC]); + if (ice->eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE && !ice->dxr_enable) { + /* Limit active ADCs and DACs to 6; */ + /* Note: DXR extension not supported */ + pci_write_config_byte(ice->pci, 0x60, 0x2a); + } else { + pci_write_config_byte(ice->pci, 0x60, ice->eeprom.data[ICE_EEP1_CODEC]); + } pci_write_config_byte(ice->pci, 0x61, ice->eeprom.data[ICE_EEP1_ACLINK]); pci_write_config_byte(ice->pci, 0x62, ice->eeprom.data[ICE_EEP1_I2SID]); pci_write_config_byte(ice->pci, 0x63, ice->eeprom.data[ICE_EEP1_SPDIF]); @@ -2606,7 +2606,7 @@ static int __devinit snd_ice1712_create(struct snd_card *card, ice->dmapath_port = pci_resource_start(pci, 2); ice->profi_port = pci_resource_start(pci, 3); - if (request_irq(pci->irq, snd_ice1712_interrupt, IRQF_DISABLED|IRQF_SHARED, + if (request_irq(pci->irq, snd_ice1712_interrupt, SA_INTERRUPT|SA_SHIRQ, "ICE1712", ice)) { snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_ice1712_free(ice); @@ -2737,38 +2737,21 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci, if (! c->no_mpu401) { if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712, - ICEREG(ice, MPU1_CTRL), - (c->mpu401_1_info_flags | - MPU401_INFO_INTEGRATED), + ICEREG(ice, MPU1_CTRL), 1, ice->irq, 0, &ice->rmidi[0])) < 0) { snd_card_free(card); return err; } - if (c->mpu401_1_name) - /* Prefered name available in card_info */ - snprintf(ice->rmidi[0]->name, - sizeof(ice->rmidi[0]->name), - "%s %d", c->mpu401_1_name, card->number); - - if (ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_2xMPU401) { - /* 2nd port used */ + + if (ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_2xMPU401) if ((err = snd_mpu401_uart_new(card, 1, MPU401_HW_ICE1712, - ICEREG(ice, MPU2_CTRL), - (c->mpu401_2_info_flags | - MPU401_INFO_INTEGRATED), + ICEREG(ice, MPU2_CTRL), 1, ice->irq, 0, &ice->rmidi[1])) < 0) { snd_card_free(card); return err; } - if (c->mpu401_2_name) - /* Prefered name available in card_info */ - snprintf(ice->rmidi[1]->name, - sizeof(ice->rmidi[1]->name), - "%s %d", c->mpu401_2_name, - card->number); - } } snd_ice1712_set_input_clock_source(ice, 0);