aboutsummaryrefslogtreecommitdiffstats
path: root/sound/drivers/vx
diff options
context:
space:
mode:
Diffstat (limited to 'sound/drivers/vx')
-rw-r--r--sound/drivers/vx/vx_core.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/sound/drivers/vx/vx_core.c b/sound/drivers/vx/vx_core.c
index 5abf42351772..43f615d7a545 100644
--- a/sound/drivers/vx/vx_core.c
+++ b/sound/drivers/vx/vx_core.c
@@ -709,13 +709,11 @@ int snd_vx_dsp_load(struct vx_core *chip, const struct firmware *dsp)
709/* 709/*
710 * suspend 710 * suspend
711 */ 711 */
712static int snd_vx_suspend(struct snd_card *card, pm_message_t state) 712int snd_vx_suspend(struct vx_core *chip, pm_message_t state)
713{ 713{
714 struct vx_core *chip = card->pm_private_data;
715 unsigned int i; 714 unsigned int i;
716 715
717 snd_assert(chip, return -EINVAL); 716 snd_power_change_state(chip->card, SNDRV_CTL_POWER_D3hot);
718
719 chip->chip_status |= VX_STAT_IN_SUSPEND; 717 chip->chip_status |= VX_STAT_IN_SUSPEND;
720 for (i = 0; i < chip->hw->num_codecs; i++) 718 for (i = 0; i < chip->hw->num_codecs; i++)
721 snd_pcm_suspend_all(chip->pcm[i]); 719 snd_pcm_suspend_all(chip->pcm[i]);
@@ -726,13 +724,10 @@ static int snd_vx_suspend(struct snd_card *card, pm_message_t state)
726/* 724/*
727 * resume 725 * resume
728 */ 726 */
729static int snd_vx_resume(struct snd_card *card) 727int snd_vx_resume(struct vx_core *chip)
730{ 728{
731 struct vx_core *chip = card->pm_private_data;
732 int i, err; 729 int i, err;
733 730
734 snd_assert(chip, return -EINVAL);
735
736 chip->chip_status &= ~VX_STAT_CHIP_INIT; 731 chip->chip_status &= ~VX_STAT_CHIP_INIT;
737 732
738 for (i = 0; i < 4; i++) { 733 for (i = 0; i < 4; i++) {
@@ -748,6 +743,7 @@ static int snd_vx_resume(struct snd_card *card)
748 chip->chip_status |= VX_STAT_CHIP_INIT; 743 chip->chip_status |= VX_STAT_CHIP_INIT;
749 chip->chip_status &= ~VX_STAT_IN_SUSPEND; 744 chip->chip_status &= ~VX_STAT_IN_SUSPEND;
750 745
746 snd_power_change_state(chip->card, SNDRV_CTL_POWER_D0);
751 return 0; 747 return 0;
752} 748}
753 749
@@ -789,8 +785,6 @@ struct vx_core *snd_vx_create(struct snd_card *card, struct snd_vx_hardware *hw,
789 strcpy(card->driver, hw->name); 785 strcpy(card->driver, hw->name);
790 sprintf(card->shortname, "Digigram %s", hw->name); 786 sprintf(card->shortname, "Digigram %s", hw->name);
791 787
792 snd_card_set_pm_callback(card, snd_vx_suspend, snd_vx_resume, chip);
793
794 vx_proc_init(chip); 788 vx_proc_init(chip);
795 789
796 return chip; 790 return chip;
@@ -822,3 +816,7 @@ EXPORT_SYMBOL(snd_vx_irq_handler);
822EXPORT_SYMBOL(snd_vx_dsp_boot); 816EXPORT_SYMBOL(snd_vx_dsp_boot);
823EXPORT_SYMBOL(snd_vx_dsp_load); 817EXPORT_SYMBOL(snd_vx_dsp_load);
824EXPORT_SYMBOL(snd_vx_load_boot_image); 818EXPORT_SYMBOL(snd_vx_load_boot_image);
819#ifdef CONFIG_PM
820EXPORT_SYMBOL(snd_vx_suspend);
821EXPORT_SYMBOL(snd_vx_resume);
822#endif