]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/oxygen/oxygen_lib.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
[linux-2.6-omap-h63xx.git] / sound / pci / oxygen / oxygen_lib.c
index de6bf41c3e961ff69c391b46d5bdec09a3bdf6ad..6eb36dd11476f7c9e5b8715dfba93273faa3b650 100644 (file)
@@ -85,7 +85,7 @@ static irqreturn_t oxygen_interrupt(int dummy, void *dev_id)
        }
 
        if (status & OXYGEN_INT_GPIO)
-               ;
+               schedule_work(&chip->gpio_work);
 
        if ((status & OXYGEN_INT_MIDI) && chip->midi)
                snd_mpu401_uart_interrupt(0, chip->midi->private_data);
@@ -157,6 +157,14 @@ static void oxygen_spdif_input_bits_changed(struct work_struct *work)
        }
 }
 
+static void oxygen_gpio_changed(struct work_struct *work)
+{
+       struct oxygen *chip = container_of(work, struct oxygen, gpio_work);
+
+       if (chip->model->gpio_changed)
+               chip->model->gpio_changed(chip);
+}
+
 #ifdef CONFIG_PROC_FS
 static void oxygen_proc_read(struct snd_info_entry *entry,
                             struct snd_info_buffer *buffer)
@@ -365,8 +373,7 @@ static void __devinit oxygen_init(struct oxygen *chip)
                oxygen_write_ac97(chip, 1, AC97_AUX, 0x8808);
                oxygen_write_ac97(chip, 1, AC97_PCM, 0x0808);
                oxygen_write_ac97(chip, 1, AC97_REC_SEL, 0x0000);
-               oxygen_write_ac97(chip, 1, AC97_REC_GAIN, 0x8000);
-               oxygen_ac97_clear_bits(chip, 1, AC97_REC_GAIN, 0x1c00);
+               oxygen_write_ac97(chip, 1, AC97_REC_GAIN, 0x0000);
                oxygen_ac97_set_bits(chip, 1, 0x6a, 0x0040);
        }
 }
@@ -414,6 +421,7 @@ int __devinit oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
        mutex_init(&chip->mutex);
        INIT_WORK(&chip->spdif_input_bits_work,
                  oxygen_spdif_input_bits_changed);
+       INIT_WORK(&chip->gpio_work, oxygen_gpio_changed);
        init_waitqueue_head(&chip->ac97_waitqueue);
 
        err = pci_enable_device(pci);