diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2008-05-13 03:24:39 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-05-19 07:19:17 -0400 |
commit | 4a4bc53bc52978dd6c918531921da925fd047d95 (patch) | |
tree | 3705801799fa4673f8ced7640e4bcf66049e38fd /sound/pci/oxygen/virtuoso.c | |
parent | 92215f3a178080bd9d7c65879499e9474e54d55c (diff) |
[ALSA] oxygen: add PM support
Add suspend/resume support.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/oxygen/virtuoso.c')
-rw-r--r-- | sound/pci/oxygen/virtuoso.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c index abd5313d19b5..9a2c16bf94e0 100644 --- a/sound/pci/oxygen/virtuoso.c +++ b/sound/pci/oxygen/virtuoso.c | |||
@@ -359,6 +359,18 @@ static void xonar_dx_cleanup(struct oxygen *chip) | |||
359 | oxygen_clear_bits8(chip, OXYGEN_FUNCTION, OXYGEN_FUNCTION_RESET_CODEC); | 359 | oxygen_clear_bits8(chip, OXYGEN_FUNCTION, OXYGEN_FUNCTION_RESET_CODEC); |
360 | } | 360 | } |
361 | 361 | ||
362 | static void xonar_d2_resume(struct oxygen *chip) | ||
363 | { | ||
364 | pcm1796_init(chip); | ||
365 | xonar_enable_output(chip); | ||
366 | } | ||
367 | |||
368 | static void xonar_dx_resume(struct oxygen *chip) | ||
369 | { | ||
370 | cs43xx_init(chip); | ||
371 | xonar_enable_output(chip); | ||
372 | } | ||
373 | |||
362 | static void set_pcm1796_params(struct oxygen *chip, | 374 | static void set_pcm1796_params(struct oxygen *chip, |
363 | struct snd_pcm_hw_params *params) | 375 | struct snd_pcm_hw_params *params) |
364 | { | 376 | { |
@@ -551,6 +563,8 @@ static const struct oxygen_model xonar_models[] = { | |||
551 | .control_filter = xonar_d2_control_filter, | 563 | .control_filter = xonar_d2_control_filter, |
552 | .mixer_init = xonar_mixer_init, | 564 | .mixer_init = xonar_mixer_init, |
553 | .cleanup = xonar_cleanup, | 565 | .cleanup = xonar_cleanup, |
566 | .suspend = xonar_cleanup, | ||
567 | .resume = xonar_d2_resume, | ||
554 | .set_dac_params = set_pcm1796_params, | 568 | .set_dac_params = set_pcm1796_params, |
555 | .set_adc_params = set_cs53x1_params, | 569 | .set_adc_params = set_cs53x1_params, |
556 | .update_dac_volume = update_pcm1796_volume, | 570 | .update_dac_volume = update_pcm1796_volume, |
@@ -579,6 +593,8 @@ static const struct oxygen_model xonar_models[] = { | |||
579 | .control_filter = xonar_d2_control_filter, | 593 | .control_filter = xonar_d2_control_filter, |
580 | .mixer_init = xonar_mixer_init, | 594 | .mixer_init = xonar_mixer_init, |
581 | .cleanup = xonar_cleanup, | 595 | .cleanup = xonar_cleanup, |
596 | .suspend = xonar_cleanup, | ||
597 | .resume = xonar_d2_resume, | ||
582 | .set_dac_params = set_pcm1796_params, | 598 | .set_dac_params = set_pcm1796_params, |
583 | .set_adc_params = set_cs53x1_params, | 599 | .set_adc_params = set_cs53x1_params, |
584 | .update_dac_volume = update_pcm1796_volume, | 600 | .update_dac_volume = update_pcm1796_volume, |
@@ -608,6 +624,8 @@ static const struct oxygen_model xonar_models[] = { | |||
608 | .control_filter = xonar_dx_control_filter, | 624 | .control_filter = xonar_dx_control_filter, |
609 | .mixer_init = xonar_dx_mixer_init, | 625 | .mixer_init = xonar_dx_mixer_init, |
610 | .cleanup = xonar_dx_cleanup, | 626 | .cleanup = xonar_dx_cleanup, |
627 | .suspend = xonar_dx_cleanup, | ||
628 | .resume = xonar_dx_resume, | ||
611 | .set_dac_params = set_cs43xx_params, | 629 | .set_dac_params = set_cs43xx_params, |
612 | .set_adc_params = set_cs53x1_params, | 630 | .set_adc_params = set_cs53x1_params, |
613 | .update_dac_volume = update_cs43xx_volume, | 631 | .update_dac_volume = update_cs43xx_volume, |
@@ -652,6 +670,10 @@ static struct pci_driver xonar_driver = { | |||
652 | .id_table = xonar_ids, | 670 | .id_table = xonar_ids, |
653 | .probe = xonar_probe, | 671 | .probe = xonar_probe, |
654 | .remove = __devexit_p(oxygen_pci_remove), | 672 | .remove = __devexit_p(oxygen_pci_remove), |
673 | #ifdef CONFIG_PM | ||
674 | .suspend = oxygen_pci_suspend, | ||
675 | .resume = oxygen_pci_resume, | ||
676 | #endif | ||
655 | }; | 677 | }; |
656 | 678 | ||
657 | static int __init alsa_card_xonar_init(void) | 679 | static int __init alsa_card_xonar_init(void) |