diff options
Diffstat (limited to 'sound/pci/oxygen/virtuoso.c')
-rw-r--r-- | sound/pci/oxygen/virtuoso.c | 25 |
1 files changed, 20 insertions, 5 deletions
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 | ||
352 | static void xonar_cleanup(struct oxygen *chip) | 352 | static 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 | ||
359 | static void xonar_d2_cleanup(struct oxygen *chip) | ||
360 | { | ||
361 | xonar_disable_output(chip); | ||
362 | } | ||
363 | |||
359 | static void xonar_d1_cleanup(struct oxygen *chip) | 364 | static 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 | ||
371 | static void xonar_d2_suspend(struct oxygen *chip) | ||
372 | { | ||
373 | xonar_d2_cleanup(chip); | ||
374 | } | ||
375 | |||
376 | static void xonar_d1_suspend(struct oxygen *chip) | ||
377 | { | ||
378 | xonar_d1_cleanup(chip); | ||
379 | } | ||
380 | |||
366 | static void xonar_d2_resume(struct oxygen *chip) | 381 | static 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, |