- /* FIXME: restore registers? */
-
- snd_power_change_state(card, SNDRV_CTL_POWER_D0);
-}
-
-/* callback for control API */
-static int snd_ad1848_set_power_state(snd_card_t *card, unsigned int power_state)
-{
- ad1848_t *chip = (ad1848_t *) card->power_state_private_data;
- switch (power_state) {
- case SNDRV_CTL_POWER_D0:
- case SNDRV_CTL_POWER_D1:
- case SNDRV_CTL_POWER_D2:
- snd_ad1848_resume(chip);
- break;
- case SNDRV_CTL_POWER_D3hot:
- case SNDRV_CTL_POWER_D3cold:
- snd_ad1848_suspend(chip);
- break;
- default:
- return -EINVAL;
- }
- return 0;
-}
-
-static int snd_ad1848_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data)
-{
- ad1848_t *chip = snd_magic_cast(ad1848_t, dev->data, return 0);
+ /* clear any pendings IRQ */
+ inb(AD1848P(chip, STATUS));
+ outb(0, AD1848P(chip, STATUS));
+ mb();