[alsa-devel] [PATCH v3 13/16] ALSA: Oxygen: Modify suspend, resume, and cleanup functions

Roman Volkov v1ron at mail.ru
Fri Jan 17 16:08:32 CET 2014

When putting the card into suspended
mode, just disable the audio output. There is no
need to do more actions, since PCI slot will be
already disabled (AFAIK). When resume, we need to
restore erased registers of CS4245 from the
memory. When cleanup, just do the same as in

Signed-off-by: Roman Volkov <v1ron at mail.ru>
 sound/pci/oxygen/xonar_dg.c |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/sound/pci/oxygen/xonar_dg.c b/sound/pci/oxygen/xonar_dg.c
index 953ef09..80fc099 100644
--- a/sound/pci/oxygen/xonar_dg.c
+++ b/sound/pci/oxygen/xonar_dg.c
@@ -197,20 +197,21 @@ void dg_init(struct oxygen *chip)
-static void dg_cleanup(struct oxygen *chip)
+void dg_suspend(struct oxygen *chip)
 	oxygen_clear_bits16(chip, OXYGEN_GPIO_DATA, GPIO_OUTPUT_ENABLE);
-static void dg_suspend(struct oxygen *chip)
+void dg_resume(struct oxygen *chip)
-	dg_cleanup(chip);
+	cs4245_shadow_control(chip, CS4245_LOAD_FROM_SHADOW);
+	msleep(2500);
+	oxygen_set_bits16(chip, OXYGEN_GPIO_DATA, GPIO_OUTPUT_ENABLE);
-static void dg_resume(struct oxygen *chip)
+void dg_cleanup(struct oxygen *chip)
-	/*cs4245_registers_init(chip);*/
-	dg_output_enable(chip);
+	dg_suspend(chip);
 void set_cs4245_dac_params(struct oxygen *chip,

More information about the Alsa-devel mailing list