Merge trivial low-risk suspend hotkey bugzilla-5918 into release
[sfrench/cifs-2.6.git] / sound / pci / emu10k1 / emu10k1_main.c
index 6bfa08436efa251b3c93aa77df2cdb539360b6e9..79f24cdf5fbf0b121b6c7564325d8983e89e86d1 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;
@@ -777,14 +777,6 @@ static int snd_emu10k1_dev_free(struct snd_device *device)
 
 static struct snd_emu_chip_details emu_chip_details[] = {
        /* Audigy 2 Value AC3 out does not work yet. Need to find out how to turn off interpolators.*/
-       /* Audigy4 SB0400 */
-       {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x10211102,
-        .driver = "Audigy2", .name = "Audigy 4 [SB0400]", 
-        .id = "Audigy2",
-        .emu10k2_chip = 1,
-        .ca0108_chip = 1,
-        .spk71 = 1,
-        .ac97_chip = 1} ,
        /* Tested by James@superbug.co.uk 3rd July 2005 */
        /* DSP: CA0108-IAT
         * DAC: CS4382-KQ
@@ -799,13 +791,59 @@ static struct snd_emu_chip_details emu_chip_details[] = {
         .ca0108_chip = 1,
         .spk71 = 1,
         .ac97_chip = 1} ,
+       /* Audigy4 (Not PRO) SB0610 */
+       /* Tested by James@superbug.co.uk 4th April 2006 */
+       /* A_IOCFG bits
+        * Output
+        * 0: ?
+        * 1: ?
+        * 2: ?
+        * 3: 0 - Digital Out, 1 - Line in
+        * 4: ?
+        * 5: ?
+        * 6: ?
+        * 7: ?
+        * Input
+        * 8: ?
+        * 9: ?
+        * A: Green jack sense (Front)
+        * B: ?
+        * C: Black jack sense (Rear/Side Right)
+        * D: Yellow jack sense (Center/LFE/Side Left)
+        * E: ?
+        * F: ?
+        *
+        * Digital Out/Line in switch using A_IOCFG bit 3 (0x08)
+        * 0 - Digital Out
+        * 1 - Line in
+        */
+       /* Mic input not tested.
+        * Analog CD input not tested
+        * Digital Out not tested.
+        * Line in working.
+        * Audio output 5.1 working. Side outputs not working.
+        */
+       /* DSP: CA10300-IAT LF
+        * DAC: Cirrus Logic CS4382-KQZ
+        * ADC: Philips 1361T
+        * AC97: Sigmatel STAC9750
+        * CA0151: None
+        */
+       {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x10211102,
+        .driver = "Audigy2", .name = "Audigy 4 [SB0610]", 
+        .id = "Audigy2",
+        .emu10k2_chip = 1,
+        .ca0108_chip = 1,
+        .spk71 = 1,
+        .adc_1361t = 1,  /* 24 bit capture instead of 16bit */
+        .ac97_chip = 1} ,
        /* Audigy 2 ZS Notebook Cardbus card.*/
        /* Tested by James@superbug.co.uk 22th December 2005 */
        /* Audio output 7.1/Headphones working.
         * Digital output working. (AC3 not checked, only PCM)
         * Audio inputs not tested.
         */ 
-       /* DSP: Tiny2
+       /* DSP: Tina2
         * DAC: Wolfson WM8768/WM8568
         * ADC: Wolfson WM8775
         * AC97: None
@@ -898,6 +936,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",
@@ -1195,7 +1244,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;
        }
@@ -1392,6 +1441,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);
@@ -1421,16 +1474,3 @@ void snd_emu10k1_resume_regs(struct snd_emu10k1 *emu)
        }
 }
 #endif
-
-/* memory.c */
-EXPORT_SYMBOL(snd_emu10k1_synth_alloc);
-EXPORT_SYMBOL(snd_emu10k1_synth_free);
-EXPORT_SYMBOL(snd_emu10k1_synth_bzero);
-EXPORT_SYMBOL(snd_emu10k1_synth_copy_from_user);
-EXPORT_SYMBOL(snd_emu10k1_memblk_map);
-/* voice.c */
-EXPORT_SYMBOL(snd_emu10k1_voice_alloc);
-EXPORT_SYMBOL(snd_emu10k1_voice_free);
-/* io.c */
-EXPORT_SYMBOL(snd_emu10k1_ptr_read);
-EXPORT_SYMBOL(snd_emu10k1_ptr_write);