Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210490
b: refs/heads/master
c: 4c25b93
h: refs/heads/master
v: v3
  • Loading branch information
Clemens Ladisch authored and Takashi Iwai committed Sep 8, 2010
1 parent b8e8e32 commit f0076a8
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a2acad8298a42b7be684a32fafaf83332bba9c2b
refs/heads/master: 4c25b93223340deff73381cc47f9244fb379a74d
1 change: 1 addition & 0 deletions trunk/sound/pci/oxygen/oxygen.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ void oxygen_pci_remove(struct pci_dev *pci);
int oxygen_pci_suspend(struct pci_dev *pci, pm_message_t state);
int oxygen_pci_resume(struct pci_dev *pci);
#endif
void oxygen_pci_shutdown(struct pci_dev *pci);

/* oxygen_mixer.c */

Expand Down
21 changes: 18 additions & 3 deletions trunk/sound/pci/oxygen/oxygen_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,16 +519,21 @@ static void oxygen_init(struct oxygen *chip)
}
}

static void oxygen_card_free(struct snd_card *card)
static void oxygen_shutdown(struct oxygen *chip)
{
struct oxygen *chip = card->private_data;

spin_lock_irq(&chip->reg_lock);
chip->interrupt_mask = 0;
chip->pcm_running = 0;
oxygen_write16(chip, OXYGEN_DMA_STATUS, 0);
oxygen_write16(chip, OXYGEN_INTERRUPT_MASK, 0);
spin_unlock_irq(&chip->reg_lock);
}

static void oxygen_card_free(struct snd_card *card)
{
struct oxygen *chip = card->private_data;

oxygen_shutdown(chip);
if (chip->irq >= 0)
free_irq(chip->irq, chip);
flush_scheduled_work();
Expand Down Expand Up @@ -778,3 +783,13 @@ int oxygen_pci_resume(struct pci_dev *pci)
}
EXPORT_SYMBOL(oxygen_pci_resume);
#endif /* CONFIG_PM */

void oxygen_pci_shutdown(struct pci_dev *pci)
{
struct snd_card *card = pci_get_drvdata(pci);
struct oxygen *chip = card->private_data;

oxygen_shutdown(chip);
chip->model.cleanup(chip);
}
EXPORT_SYMBOL(oxygen_pci_shutdown);
1 change: 1 addition & 0 deletions trunk/sound/pci/oxygen/virtuoso.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ static struct pci_driver xonar_driver = {
.suspend = oxygen_pci_suspend,
.resume = oxygen_pci_resume,
#endif
.shutdown = oxygen_pci_shutdown,
};

static int __init alsa_card_xonar_init(void)
Expand Down
1 change: 1 addition & 0 deletions trunk/sound/pci/oxygen/xonar_wm87x6.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ static void xonar_ds_init(struct oxygen *chip)
static void xonar_ds_cleanup(struct oxygen *chip)
{
xonar_disable_output(chip);
wm8776_write(chip, WM8776_RESET, 0);
}

static void xonar_ds_suspend(struct oxygen *chip)
Expand Down

0 comments on commit f0076a8

Please sign in to comment.