diff options
| -rw-r--r-- | sound/pci/oxygen/oxygen.h | 1 | ||||
| -rw-r--r-- | sound/pci/oxygen/oxygen_lib.c | 21 | ||||
| -rw-r--r-- | sound/pci/oxygen/virtuoso.c | 1 | ||||
| -rw-r--r-- | sound/pci/oxygen/xonar_wm87x6.c | 1 |
4 files changed, 21 insertions, 3 deletions
diff --git a/sound/pci/oxygen/oxygen.h b/sound/pci/oxygen/oxygen.h index 6147216af744..a3409edcfb50 100644 --- a/sound/pci/oxygen/oxygen.h +++ b/sound/pci/oxygen/oxygen.h | |||
| @@ -155,6 +155,7 @@ void oxygen_pci_remove(struct pci_dev *pci); | |||
| 155 | int oxygen_pci_suspend(struct pci_dev *pci, pm_message_t state); | 155 | int oxygen_pci_suspend(struct pci_dev *pci, pm_message_t state); |
| 156 | int oxygen_pci_resume(struct pci_dev *pci); | 156 | int oxygen_pci_resume(struct pci_dev *pci); |
| 157 | #endif | 157 | #endif |
| 158 | void oxygen_pci_shutdown(struct pci_dev *pci); | ||
| 158 | 159 | ||
| 159 | /* oxygen_mixer.c */ | 160 | /* oxygen_mixer.c */ |
| 160 | 161 | ||
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c index fad03d64e3ad..7e93cf884437 100644 --- a/sound/pci/oxygen/oxygen_lib.c +++ b/sound/pci/oxygen/oxygen_lib.c | |||
| @@ -519,16 +519,21 @@ static void oxygen_init(struct oxygen *chip) | |||
| 519 | } | 519 | } |
| 520 | } | 520 | } |
| 521 | 521 | ||
| 522 | static void oxygen_card_free(struct snd_card *card) | 522 | static void oxygen_shutdown(struct oxygen *chip) |
| 523 | { | 523 | { |
| 524 | struct oxygen *chip = card->private_data; | ||
| 525 | |||
| 526 | spin_lock_irq(&chip->reg_lock); | 524 | spin_lock_irq(&chip->reg_lock); |
| 527 | chip->interrupt_mask = 0; | 525 | chip->interrupt_mask = 0; |
| 528 | chip->pcm_running = 0; | 526 | chip->pcm_running = 0; |
| 529 | oxygen_write16(chip, OXYGEN_DMA_STATUS, 0); | 527 | oxygen_write16(chip, OXYGEN_DMA_STATUS, 0); |
| 530 | oxygen_write16(chip, OXYGEN_INTERRUPT_MASK, 0); | 528 | oxygen_write16(chip, OXYGEN_INTERRUPT_MASK, 0); |
| 531 | spin_unlock_irq(&chip->reg_lock); | 529 | spin_unlock_irq(&chip->reg_lock); |
| 530 | } | ||
| 531 | |||
| 532 | static void oxygen_card_free(struct snd_card *card) | ||
| 533 | { | ||
| 534 | struct oxygen *chip = card->private_data; | ||
| 535 | |||
| 536 | oxygen_shutdown(chip); | ||
| 532 | if (chip->irq >= 0) | 537 | if (chip->irq >= 0) |
| 533 | free_irq(chip->irq, chip); | 538 | free_irq(chip->irq, chip); |
| 534 | flush_scheduled_work(); | 539 | flush_scheduled_work(); |
| @@ -778,3 +783,13 @@ int oxygen_pci_resume(struct pci_dev *pci) | |||
| 778 | } | 783 | } |
| 779 | EXPORT_SYMBOL(oxygen_pci_resume); | 784 | EXPORT_SYMBOL(oxygen_pci_resume); |
| 780 | #endif /* CONFIG_PM */ | 785 | #endif /* CONFIG_PM */ |
| 786 | |||
| 787 | void oxygen_pci_shutdown(struct pci_dev *pci) | ||
| 788 | { | ||
| 789 | struct snd_card *card = pci_get_drvdata(pci); | ||
| 790 | struct oxygen *chip = card->private_data; | ||
| 791 | |||
| 792 | oxygen_shutdown(chip); | ||
| 793 | chip->model.cleanup(chip); | ||
| 794 | } | ||
| 795 | EXPORT_SYMBOL(oxygen_pci_shutdown); | ||
diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c index f03a2f2cffee..06c863e86e3d 100644 --- a/sound/pci/oxygen/virtuoso.c +++ b/sound/pci/oxygen/virtuoso.c | |||
| @@ -95,6 +95,7 @@ static struct pci_driver xonar_driver = { | |||
| 95 | .suspend = oxygen_pci_suspend, | 95 | .suspend = oxygen_pci_suspend, |
| 96 | .resume = oxygen_pci_resume, | 96 | .resume = oxygen_pci_resume, |
| 97 | #endif | 97 | #endif |
| 98 | .shutdown = oxygen_pci_shutdown, | ||
| 98 | }; | 99 | }; |
| 99 | 100 | ||
| 100 | static int __init alsa_card_xonar_init(void) | 101 | static int __init alsa_card_xonar_init(void) |
diff --git a/sound/pci/oxygen/xonar_wm87x6.c b/sound/pci/oxygen/xonar_wm87x6.c index dbc4b89d74e4..0b89932fb8c4 100644 --- a/sound/pci/oxygen/xonar_wm87x6.c +++ b/sound/pci/oxygen/xonar_wm87x6.c | |||
| @@ -193,6 +193,7 @@ static void xonar_ds_init(struct oxygen *chip) | |||
| 193 | static void xonar_ds_cleanup(struct oxygen *chip) | 193 | static void xonar_ds_cleanup(struct oxygen *chip) |
| 194 | { | 194 | { |
| 195 | xonar_disable_output(chip); | 195 | xonar_disable_output(chip); |
| 196 | wm8776_write(chip, WM8776_RESET, 0); | ||
| 196 | } | 197 | } |
| 197 | 198 | ||
| 198 | static void xonar_ds_suspend(struct oxygen *chip) | 199 | static void xonar_ds_suspend(struct oxygen *chip) |
