]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - sound/pci/emu10k1/emu10k1_main.c
[ALSA] emu10k1: Fix outl() in snd_emu10k1_resume_regs()
[karo-tx-linux.git] / sound / pci / emu10k1 / emu10k1_main.c
index 42a358f989c323481fee4f01ea0ac2a1160c0c4e..8058059c56e9b70ebc716196d996b45a0ea0af6b 100644 (file)
@@ -531,7 +531,7 @@ static void snd_emu10k1_ecard_setadcgain(struct snd_emu10k1 * emu,
        snd_emu10k1_ecard_write(emu, emu->ecard_ctrl);
 }
 
-static int __devinit snd_emu10k1_ecard_init(struct snd_emu10k1 * emu)
+static int snd_emu10k1_ecard_init(struct snd_emu10k1 * emu)
 {
        unsigned int hc_value;
 
@@ -571,7 +571,7 @@ static int __devinit snd_emu10k1_ecard_init(struct snd_emu10k1 * emu)
        return 0;
 }
 
-static int __devinit snd_emu10k1_cardbus_init(struct snd_emu10k1 * emu)
+static int snd_emu10k1_cardbus_init(struct snd_emu10k1 * emu)
 {
        unsigned long special_port;
        unsigned int value;
@@ -633,7 +633,7 @@ static int snd_emu1212m_fpga_netlist_write(struct snd_emu10k1 * emu, int reg, in
        return 0;
 }
 
-static int __devinit snd_emu10k1_emu1212m_init(struct snd_emu10k1 * emu)
+static int snd_emu10k1_emu1212m_init(struct snd_emu10k1 * emu)
 {
        unsigned int i;
        int tmp;
@@ -927,6 +927,7 @@ static struct snd_emu_chip_details emu_chip_details[] = {
         .ca0151_chip = 1,
         .spk71 = 1,
         .spdif_bug = 1,
+        .adc_1361t = 1,  /* 24 bit capture instead of 16bit */
         .ac97_chip = 1} ,
        {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10051102,
         .driver = "Audigy2", .name = "Audigy 2 EX [1005]", 
@@ -936,6 +937,17 @@ static struct snd_emu_chip_details emu_chip_details[] = {
         .ca0151_chip = 1,
         .spk71 = 1,
         .spdif_bug = 1} ,
+       /* Dell OEM/Creative Labs Audigy 2 ZS */
+       /* See ALSA bug#1365 */
+       {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10031102,
+        .driver = "Audigy2", .name = "Audigy 2 ZS [SB0353]",
+        .id = "Audigy2",
+        .emu10k2_chip = 1,
+        .ca0102_chip = 1,
+        .ca0151_chip = 1,
+        .spk71 = 1,
+        .spdif_bug = 1,
+        .ac97_chip = 1} ,
        {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10021102,
         .driver = "Audigy2", .name = "Audigy 2 Platinum [SB0240P]", 
         .id = "Audigy2",
@@ -1233,7 +1245,7 @@ int __devinit snd_emu10k1_create(struct snd_card *card,
        }
        emu->port = pci_resource_start(pci, 0);
 
-       if (request_irq(pci->irq, snd_emu10k1_interrupt, SA_INTERRUPT|SA_SHIRQ, "EMU10K1", (void *)emu)) {
+       if (request_irq(pci->irq, snd_emu10k1_interrupt, IRQF_DISABLED|IRQF_SHARED, "EMU10K1", (void *)emu)) {
                err = -EBUSY;
                goto error;
        }
@@ -1430,6 +1442,10 @@ void snd_emu10k1_resume_init(struct snd_emu10k1 *emu)
 {
        if (emu->card_capabilities->ecard)
                snd_emu10k1_ecard_init(emu);
+       else if (emu->card_capabilities->ca_cardbus_chip)
+               snd_emu10k1_cardbus_init(emu);
+       else if (emu->card_capabilities->emu1212m)
+               snd_emu10k1_emu1212m_init(emu);
        else
                snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE);
        snd_emu10k1_init(emu, emu->enable_ir, 1);
@@ -1445,8 +1461,8 @@ void snd_emu10k1_resume_regs(struct snd_emu10k1 *emu)
 
        /* resore for spdif */
        if (emu->audigy)
-               outl(emu->port + A_IOCFG, emu->saved_a_iocfg);
-       outl(emu->port + HCFG, emu->saved_hcfg);
+               outl(emu->saved_a_iocfg, emu->port + A_IOCFG);
+       outl(emu->saved_hcfg, emu->port + HCFG);
 
        val = emu->saved_ptr;
        for (reg = saved_regs; *reg != 0xff; reg++)