diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2008-01-28 08:36:55 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-01-31 17:30:18 +0100 |
commit | 7c0141591fcf92ddc96a4ee04e35783a15bd68c8 (patch) | |
tree | 22b2ce1e76144b5ff0d0fb420668e18820f8adf2 /sound/pci/oxygen/oxygen_lib.c | |
parent | 5f7b9b457751efc9f3ad120d0ebdb19fe753e9d0 (diff) | |
download | linux-7c0141591fcf92ddc96a4ee04e35783a15bd68c8.tar.bz2 |
[ALSA] virtuoso: monitor external power on D2X
On the Xonar D2X, monitor the GPIO pin that indicates whether external
power is present.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/oxygen/oxygen_lib.c')
-rw-r--r-- | sound/pci/oxygen/oxygen_lib.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c index 540e56b75794..6eb36dd11476 100644 --- a/sound/pci/oxygen/oxygen_lib.c +++ b/sound/pci/oxygen/oxygen_lib.c @@ -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) @@ -413,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); |