aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pci/oxygen/hifier.c7
-rw-r--r--sound/pci/oxygen/oxygen.c7
-rw-r--r--sound/pci/oxygen/virtuoso.c25
3 files changed, 32 insertions, 7 deletions
diff --git a/sound/pci/oxygen/hifier.c b/sound/pci/oxygen/hifier.c
index 088939903ee2..1ab833f843eb 100644
--- a/sound/pci/oxygen/hifier.c
+++ b/sound/pci/oxygen/hifier.c
@@ -94,6 +94,11 @@ static void hifier_cleanup(struct oxygen *chip)
94{ 94{
95} 95}
96 96
97static void hifier_resume(struct oxygen *chip)
98{
99 hifier_registers_init(chip);
100}
101
97static void set_ak4396_params(struct oxygen *chip, 102static void set_ak4396_params(struct oxygen *chip,
98 struct snd_pcm_hw_params *params) 103 struct snd_pcm_hw_params *params)
99{ 104{
@@ -150,7 +155,7 @@ static const struct oxygen_model model_hifier = {
150 .init = hifier_init, 155 .init = hifier_init,
151 .control_filter = hifier_control_filter, 156 .control_filter = hifier_control_filter,
152 .cleanup = hifier_cleanup, 157 .cleanup = hifier_cleanup,
153 .resume = hifier_registers_init, 158 .resume = hifier_resume,
154 .set_dac_params = set_ak4396_params, 159 .set_dac_params = set_ak4396_params,
155 .set_adc_params = set_cs5340_params, 160 .set_adc_params = set_cs5340_params,
156 .update_dac_volume = update_ak4396_volume, 161 .update_dac_volume = update_ak4396_volume,
diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c
index 62888c7b61d4..b60f6212745a 100644
--- a/sound/pci/oxygen/oxygen.c
+++ b/sound/pci/oxygen/oxygen.c
@@ -204,6 +204,11 @@ static void generic_resume(struct oxygen *chip)
204 wm8785_registers_init(chip); 204 wm8785_registers_init(chip);
205} 205}
206 206
207static void meridian_resume(struct oxygen *chip)
208{
209 ak4396_registers_init(chip);
210}
211
207static void set_ak4396_params(struct oxygen *chip, 212static void set_ak4396_params(struct oxygen *chip,
208 struct snd_pcm_hw_params *params) 213 struct snd_pcm_hw_params *params)
209{ 214{
@@ -290,7 +295,7 @@ static int generic_probe(struct oxygen *chip, unsigned long driver_data)
290{ 295{
291 if (driver_data == MODEL_MERIDIAN) { 296 if (driver_data == MODEL_MERIDIAN) {
292 chip->model.init = meridian_init; 297 chip->model.init = meridian_init;
293 chip->model.resume = ak4396_registers_init; 298 chip->model.resume = meridian_resume;
294 chip->model.set_adc_params = set_ak5385_params; 299 chip->model.set_adc_params = set_ak5385_params;
295 chip->model.device_config = PLAYBACK_0_TO_I2S | 300 chip->model.device_config = PLAYBACK_0_TO_I2S |
296 PLAYBACK_1_TO_SPDIF | 301 PLAYBACK_1_TO_SPDIF |
diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c
index befada742ae8..8f65aa80d3bc 100644
--- a/sound/pci/oxygen/virtuoso.c
+++ b/sound/pci/oxygen/virtuoso.c
@@ -349,20 +349,35 @@ static void xonar_d1_init(struct oxygen *chip)
349 snd_component_add(chip->card, "CS5361"); 349 snd_component_add(chip->card, "CS5361");
350} 350}
351 351
352static void xonar_cleanup(struct oxygen *chip) 352static void xonar_disable_output(struct oxygen *chip)
353{ 353{
354 struct xonar_data *data = chip->model_data; 354 struct xonar_data *data = chip->model_data;
355 355
356 oxygen_clear_bits16(chip, OXYGEN_GPIO_DATA, data->output_enable_bit); 356 oxygen_clear_bits16(chip, OXYGEN_GPIO_DATA, data->output_enable_bit);
357} 357}
358 358
359static void xonar_d2_cleanup(struct oxygen *chip)
360{
361 xonar_disable_output(chip);
362}
363
359static void xonar_d1_cleanup(struct oxygen *chip) 364static void xonar_d1_cleanup(struct oxygen *chip)
360{ 365{
361 xonar_cleanup(chip); 366 xonar_disable_output(chip);
362 cs4362a_write(chip, 0x01, CS4362A_PDN | CS4362A_CPEN); 367 cs4362a_write(chip, 0x01, CS4362A_PDN | CS4362A_CPEN);
363 oxygen_clear_bits8(chip, OXYGEN_FUNCTION, OXYGEN_FUNCTION_RESET_CODEC); 368 oxygen_clear_bits8(chip, OXYGEN_FUNCTION, OXYGEN_FUNCTION_RESET_CODEC);
364} 369}
365 370
371static void xonar_d2_suspend(struct oxygen *chip)
372{
373 xonar_d2_cleanup(chip);
374}
375
376static void xonar_d1_suspend(struct oxygen *chip)
377{
378 xonar_d1_cleanup(chip);
379}
380
366static void xonar_d2_resume(struct oxygen *chip) 381static void xonar_d2_resume(struct oxygen *chip)
367{ 382{
368 pcm1796_init(chip); 383 pcm1796_init(chip);
@@ -557,8 +572,8 @@ static const struct oxygen_model model_xonar_d2 = {
557 .init = xonar_d2_init, 572 .init = xonar_d2_init,
558 .control_filter = xonar_d2_control_filter, 573 .control_filter = xonar_d2_control_filter,
559 .mixer_init = xonar_d2_mixer_init, 574 .mixer_init = xonar_d2_mixer_init,
560 .cleanup = xonar_cleanup, 575 .cleanup = xonar_d2_cleanup,
561 .suspend = xonar_cleanup, 576 .suspend = xonar_d2_suspend,
562 .resume = xonar_d2_resume, 577 .resume = xonar_d2_resume,
563 .set_dac_params = set_pcm1796_params, 578 .set_dac_params = set_pcm1796_params,
564 .set_adc_params = set_cs53x1_params, 579 .set_adc_params = set_cs53x1_params,
@@ -591,7 +606,7 @@ static const struct oxygen_model model_xonar_d1 = {
591 .control_filter = xonar_d1_control_filter, 606 .control_filter = xonar_d1_control_filter,
592 .mixer_init = xonar_d1_mixer_init, 607 .mixer_init = xonar_d1_mixer_init,
593 .cleanup = xonar_d1_cleanup, 608 .cleanup = xonar_d1_cleanup,
594 .suspend = xonar_d1_cleanup, 609 .suspend = xonar_d1_suspend,
595 .resume = xonar_d1_resume, 610 .resume = xonar_d1_resume,
596 .set_dac_params = set_cs43xx_params, 611 .set_dac_params = set_cs43xx_params,
597 .set_adc_params = set_cs53x1_params, 612 .set_adc_params = set_cs53x1_params,