diff options
Diffstat (limited to 'sound/pci/cs46xx/cs46xx_lib.c')
-rw-r--r-- | sound/pci/cs46xx/cs46xx_lib.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c index 16d4ebf2a33f..2807b9756ef0 100644 --- a/sound/pci/cs46xx/cs46xx_lib.c +++ b/sound/pci/cs46xx/cs46xx_lib.c | |||
@@ -3687,8 +3687,10 @@ int snd_cs46xx_suspend(struct pci_dev *pci, pm_message_t state) | |||
3687 | /* disable CLKRUN */ | 3687 | /* disable CLKRUN */ |
3688 | chip->active_ctrl(chip, -chip->amplifier); | 3688 | chip->active_ctrl(chip, -chip->amplifier); |
3689 | chip->amplifier = amp_saved; /* restore the status */ | 3689 | chip->amplifier = amp_saved; /* restore the status */ |
3690 | |||
3690 | pci_disable_device(pci); | 3691 | pci_disable_device(pci); |
3691 | pci_save_state(pci); | 3692 | pci_save_state(pci); |
3693 | pci_set_power_state(pci, pci_choose_state(pci, state)); | ||
3692 | return 0; | 3694 | return 0; |
3693 | } | 3695 | } |
3694 | 3696 | ||
@@ -3698,9 +3700,16 @@ int snd_cs46xx_resume(struct pci_dev *pci) | |||
3698 | struct snd_cs46xx *chip = card->private_data; | 3700 | struct snd_cs46xx *chip = card->private_data; |
3699 | int amp_saved; | 3701 | int amp_saved; |
3700 | 3702 | ||
3703 | pci_set_power_state(pci, PCI_D0); | ||
3701 | pci_restore_state(pci); | 3704 | pci_restore_state(pci); |
3702 | pci_enable_device(pci); | 3705 | if (pci_enable_device(pci) < 0) { |
3706 | printk(KERN_ERR "cs46xx: pci_enable_device failed, " | ||
3707 | "disabling device\n"); | ||
3708 | snd_card_disconnect(card); | ||
3709 | return -EIO; | ||
3710 | } | ||
3703 | pci_set_master(pci); | 3711 | pci_set_master(pci); |
3712 | |||
3704 | amp_saved = chip->amplifier; | 3713 | amp_saved = chip->amplifier; |
3705 | chip->amplifier = 0; | 3714 | chip->amplifier = 0; |
3706 | chip->active_ctrl(chip, 1); /* force to on */ | 3715 | chip->active_ctrl(chip, 1); /* force to on */ |