diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-07-05 06:13:59 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-07-08 03:42:42 -0400 |
commit | cd63a5ffd24214246b1092365c7d6c2cd5aca29b (patch) | |
tree | 246e3ae7038e395193a797bd86cfdc66668219c8 /sound | |
parent | 38f0ad7c90c2b2091e7d8689dde294fef27db68b (diff) |
ALSA: hda - Keep halting ALC5505 DSP
ALC5505 DSP is enabled even though we don't use the features yet at
all. This results in the unnecessarily high power consumption, more
than 100mV higher. Until we implement the DSP support, better to
bypass DSP for saving more power.
Reported-by: Mengdong Lin <mengdong.lin@intel.com>
[Patch modified by Mengdong to cal alc5505_dsp_init() with extra
acl5505_dsp_halt().]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 14ac9b0e740c..8bd226149868 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -37,6 +37,9 @@ | |||
37 | #include "hda_jack.h" | 37 | #include "hda_jack.h" |
38 | #include "hda_generic.h" | 38 | #include "hda_generic.h" |
39 | 39 | ||
40 | /* keep halting ALC5505 DSP, for power saving */ | ||
41 | #define HALT_REALTEK_ALC5505 | ||
42 | |||
40 | /* unsol event tags */ | 43 | /* unsol event tags */ |
41 | #define ALC_DCVOL_EVENT 0x08 | 44 | #define ALC_DCVOL_EVENT 0x08 |
42 | 45 | ||
@@ -2659,15 +2662,27 @@ static void alc5505_dsp_init(struct hda_codec *codec) | |||
2659 | alc5505_coef_set(codec, 0x880c, 0x00000004); /* DRAM Function control */ | 2662 | alc5505_coef_set(codec, 0x880c, 0x00000004); /* DRAM Function control */ |
2660 | alc5505_coef_set(codec, 0x880c, 0x00000003); | 2663 | alc5505_coef_set(codec, 0x880c, 0x00000003); |
2661 | alc5505_coef_set(codec, 0x880c, 0x00000010); | 2664 | alc5505_coef_set(codec, 0x880c, 0x00000010); |
2665 | |||
2666 | #ifdef HALT_REALTEK_ALC5505 | ||
2667 | alc5505_dsp_halt(codec); | ||
2668 | #endif | ||
2662 | } | 2669 | } |
2663 | 2670 | ||
2671 | #ifdef HALT_REALTEK_ALC5505 | ||
2672 | #define alc5505_dsp_suspend(codec) /* NOP */ | ||
2673 | #define alc5505_dsp_resume(codec) /* NOP */ | ||
2674 | #else | ||
2675 | #define alc5505_dsp_suspend(codec) alc5505_dsp_halt(codec) | ||
2676 | #define alc5505_dsp_resume(codec) alc5505_dsp_back_from_halt(codec) | ||
2677 | #endif | ||
2678 | |||
2664 | #ifdef CONFIG_PM | 2679 | #ifdef CONFIG_PM |
2665 | static int alc269_suspend(struct hda_codec *codec) | 2680 | static int alc269_suspend(struct hda_codec *codec) |
2666 | { | 2681 | { |
2667 | struct alc_spec *spec = codec->spec; | 2682 | struct alc_spec *spec = codec->spec; |
2668 | 2683 | ||
2669 | if (spec->has_alc5505_dsp) | 2684 | if (spec->has_alc5505_dsp) |
2670 | alc5505_dsp_halt(codec); | 2685 | alc5505_dsp_suspend(codec); |
2671 | return alc_suspend(codec); | 2686 | return alc_suspend(codec); |
2672 | } | 2687 | } |
2673 | 2688 | ||
@@ -2696,7 +2711,7 @@ static int alc269_resume(struct hda_codec *codec) | |||
2696 | alc_inv_dmic_sync(codec, true); | 2711 | alc_inv_dmic_sync(codec, true); |
2697 | hda_call_check_power_status(codec, 0x01); | 2712 | hda_call_check_power_status(codec, 0x01); |
2698 | if (spec->has_alc5505_dsp) | 2713 | if (spec->has_alc5505_dsp) |
2699 | alc5505_dsp_back_from_halt(codec); | 2714 | alc5505_dsp_resume(codec); |
2700 | return 0; | 2715 | return 0; |
2701 | } | 2716 | } |
2702 | #endif /* CONFIG_PM */ | 2717 | #endif /* CONFIG_PM */ |