Loading include/sound/trident.h +2 −0 Original line number Diff line number Diff line Loading @@ -452,6 +452,8 @@ void snd_trident_free_voice(struct snd_trident * trident, struct snd_trident_voi void snd_trident_start_voice(struct snd_trident * trident, unsigned int voice); void snd_trident_stop_voice(struct snd_trident * trident, unsigned int voice); void snd_trident_write_voice_regs(struct snd_trident * trident, struct snd_trident_voice *voice); int snd_trident_suspend(struct pci_dev *pci, pm_message_t state); int snd_trident_resume(struct pci_dev *pci); /* TLB memory allocation */ struct snd_util_memblk *snd_trident_alloc_pages(struct snd_trident *trident, Loading sound/pci/trident/trident.c +5 −1 Original line number Diff line number Diff line Loading @@ -100,6 +100,7 @@ static int __devinit snd_trident_probe(struct pci_dev *pci, snd_card_free(card); return err; } card->private_data = trident; switch (trident->device) { case TRIDENT_DEVICE_ID_DX: Loading Loading @@ -180,7 +181,10 @@ static struct pci_driver driver = { .id_table = snd_trident_ids, .probe = snd_trident_probe, .remove = __devexit_p(snd_trident_remove), SND_PCI_PM_CALLBACKS #ifdef CONFIG_PM .suspend = snd_trident_suspend, .resume = snd_trident_resume, #endif }; static int __init alsa_card_trident_init(void) Loading sound/pci/trident/trident_main.c +17 −24 Original line number Diff line number Diff line Loading @@ -52,10 +52,6 @@ static int snd_trident_pcm_mixer_free(struct snd_trident *trident, struct snd_pcm_substream *substream); static irqreturn_t snd_trident_interrupt(int irq, void *dev_id, struct pt_regs *regs); #ifdef CONFIG_PM static int snd_trident_suspend(struct snd_card *card, pm_message_t state); static int snd_trident_resume(struct snd_card *card); #endif static int snd_trident_sis_reset(struct snd_trident *trident); static void snd_trident_clear_voices(struct snd_trident * trident, Loading Loading @@ -3661,8 +3657,6 @@ int __devinit snd_trident_create(struct snd_card *card, snd_trident_enable_eso(trident); snd_card_set_pm_callback(card, snd_trident_suspend, snd_trident_resume, trident); snd_trident_proc_init(trident); snd_card_set_dev(card, &pci->dev); *rtrident = trident; Loading Loading @@ -3938,19 +3932,18 @@ static void snd_trident_clear_voices(struct snd_trident * trident, unsigned shor } #ifdef CONFIG_PM static int snd_trident_suspend(struct snd_card *card, pm_message_t state) int snd_trident_suspend(struct pci_dev *pci, pm_message_t state) { struct snd_trident *trident = card->pm_private_data; struct snd_card *card = pci_get_drvdata(pci); struct snd_trident *trident = card->private_data; trident->in_suspend = 1; snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); snd_pcm_suspend_all(trident->pcm); if (trident->foldback) snd_pcm_suspend_all(trident->foldback); if (trident->spdif) snd_pcm_suspend_all(trident->spdif); snd_ac97_suspend(trident->ac97); if (trident->ac97_sec) snd_ac97_suspend(trident->ac97_sec); switch (trident->device) { Loading @@ -3960,19 +3953,19 @@ static int snd_trident_suspend(struct snd_card *card, pm_message_t state) case TRIDENT_DEVICE_ID_SI7018: break; } pci_disable_device(trident->pci); pci_disable_device(pci); pci_save_state(pci); return 0; } static int snd_trident_resume(struct snd_card *card) int snd_trident_resume(struct pci_dev *pci) { struct snd_trident *trident = card->pm_private_data; struct snd_card *card = pci_get_drvdata(pci); struct snd_trident *trident = card->private_data; pci_enable_device(trident->pci); if (pci_set_dma_mask(trident->pci, 0x3fffffff) < 0 || pci_set_consistent_dma_mask(trident->pci, 0x3fffffff) < 0) snd_printk(KERN_WARNING "trident: can't set the proper DMA mask\n"); pci_set_master(trident->pci); /* to be sure */ pci_restore_state(pci); pci_enable_device(pci); pci_set_master(pci); /* to be sure */ switch (trident->device) { case TRIDENT_DEVICE_ID_DX: Loading @@ -3987,7 +3980,6 @@ static int snd_trident_resume(struct snd_card *card) } snd_ac97_resume(trident->ac97); if (trident->ac97_sec) snd_ac97_resume(trident->ac97_sec); /* restore some registers */ Loading @@ -3995,6 +3987,7 @@ static int snd_trident_resume(struct snd_card *card) snd_trident_enable_eso(trident); snd_power_change_state(card, SNDRV_CTL_POWER_D0); trident->in_suspend = 0; return 0; } Loading Loading
include/sound/trident.h +2 −0 Original line number Diff line number Diff line Loading @@ -452,6 +452,8 @@ void snd_trident_free_voice(struct snd_trident * trident, struct snd_trident_voi void snd_trident_start_voice(struct snd_trident * trident, unsigned int voice); void snd_trident_stop_voice(struct snd_trident * trident, unsigned int voice); void snd_trident_write_voice_regs(struct snd_trident * trident, struct snd_trident_voice *voice); int snd_trident_suspend(struct pci_dev *pci, pm_message_t state); int snd_trident_resume(struct pci_dev *pci); /* TLB memory allocation */ struct snd_util_memblk *snd_trident_alloc_pages(struct snd_trident *trident, Loading
sound/pci/trident/trident.c +5 −1 Original line number Diff line number Diff line Loading @@ -100,6 +100,7 @@ static int __devinit snd_trident_probe(struct pci_dev *pci, snd_card_free(card); return err; } card->private_data = trident; switch (trident->device) { case TRIDENT_DEVICE_ID_DX: Loading Loading @@ -180,7 +181,10 @@ static struct pci_driver driver = { .id_table = snd_trident_ids, .probe = snd_trident_probe, .remove = __devexit_p(snd_trident_remove), SND_PCI_PM_CALLBACKS #ifdef CONFIG_PM .suspend = snd_trident_suspend, .resume = snd_trident_resume, #endif }; static int __init alsa_card_trident_init(void) Loading
sound/pci/trident/trident_main.c +17 −24 Original line number Diff line number Diff line Loading @@ -52,10 +52,6 @@ static int snd_trident_pcm_mixer_free(struct snd_trident *trident, struct snd_pcm_substream *substream); static irqreturn_t snd_trident_interrupt(int irq, void *dev_id, struct pt_regs *regs); #ifdef CONFIG_PM static int snd_trident_suspend(struct snd_card *card, pm_message_t state); static int snd_trident_resume(struct snd_card *card); #endif static int snd_trident_sis_reset(struct snd_trident *trident); static void snd_trident_clear_voices(struct snd_trident * trident, Loading Loading @@ -3661,8 +3657,6 @@ int __devinit snd_trident_create(struct snd_card *card, snd_trident_enable_eso(trident); snd_card_set_pm_callback(card, snd_trident_suspend, snd_trident_resume, trident); snd_trident_proc_init(trident); snd_card_set_dev(card, &pci->dev); *rtrident = trident; Loading Loading @@ -3938,19 +3932,18 @@ static void snd_trident_clear_voices(struct snd_trident * trident, unsigned shor } #ifdef CONFIG_PM static int snd_trident_suspend(struct snd_card *card, pm_message_t state) int snd_trident_suspend(struct pci_dev *pci, pm_message_t state) { struct snd_trident *trident = card->pm_private_data; struct snd_card *card = pci_get_drvdata(pci); struct snd_trident *trident = card->private_data; trident->in_suspend = 1; snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); snd_pcm_suspend_all(trident->pcm); if (trident->foldback) snd_pcm_suspend_all(trident->foldback); if (trident->spdif) snd_pcm_suspend_all(trident->spdif); snd_ac97_suspend(trident->ac97); if (trident->ac97_sec) snd_ac97_suspend(trident->ac97_sec); switch (trident->device) { Loading @@ -3960,19 +3953,19 @@ static int snd_trident_suspend(struct snd_card *card, pm_message_t state) case TRIDENT_DEVICE_ID_SI7018: break; } pci_disable_device(trident->pci); pci_disable_device(pci); pci_save_state(pci); return 0; } static int snd_trident_resume(struct snd_card *card) int snd_trident_resume(struct pci_dev *pci) { struct snd_trident *trident = card->pm_private_data; struct snd_card *card = pci_get_drvdata(pci); struct snd_trident *trident = card->private_data; pci_enable_device(trident->pci); if (pci_set_dma_mask(trident->pci, 0x3fffffff) < 0 || pci_set_consistent_dma_mask(trident->pci, 0x3fffffff) < 0) snd_printk(KERN_WARNING "trident: can't set the proper DMA mask\n"); pci_set_master(trident->pci); /* to be sure */ pci_restore_state(pci); pci_enable_device(pci); pci_set_master(pci); /* to be sure */ switch (trident->device) { case TRIDENT_DEVICE_ID_DX: Loading @@ -3987,7 +3980,6 @@ static int snd_trident_resume(struct snd_card *card) } snd_ac97_resume(trident->ac97); if (trident->ac97_sec) snd_ac97_resume(trident->ac97_sec); /* restore some registers */ Loading @@ -3995,6 +3987,7 @@ static int snd_trident_resume(struct snd_card *card) snd_trident_enable_eso(trident); snd_power_change_state(card, SNDRV_CTL_POWER_D0); trident->in_suspend = 0; return 0; } Loading