aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-08-10 11:21:45 -0400
committerJaroslav Kysela <perex@perex.cz>2007-10-16 09:58:46 -0400
commitcb53c626e1145edf1d619bc4953f6293d3a77ace (patch)
tree715c2ef3d56a5ac7c79498800e888f562c1aa961 /sound/pci/hda/patch_sigmatel.c
parentcca3b3718ca96dca51daf1129ac03003bcede751 (diff)
[ALSA] hda-intel - Add POWER_SAVE option
Added CONFIG_SND_HDA_POWER_SAVE kconfig. It's an experimental option to achieve an aggressive power-saving. With this option, the driver will turn on/off the power of each codec and controller chip dynamically on demand. The patch introduces a new module option 'power_save'. It specifies the second of time-out for automatic power-down. As default, it's 10 seconds. Setting 0 means to suppress the power-saving feature. The codec may have analog-input loopbacks, which are usually represented by mixer elements such as 'Mic Playback Switch' or 'CD Playback Switch'. When these are on, we cannot turn off the mixer and the codec chip has to be kept on. For bookkeeping these states, a new codec-callback is introduced. For the bus-controller side, a new callback pm_notify is introduced, which can be used to turn on/off the contoller appropriately. Note that this power-saving might cause slight click-noise at power-on/off. Also, it might take some time to wake up the codec, and might even drop some tones at the very beginning. This seems to be the side-effect of turning off the controller chip. This turn-off of the controller can be disabled by undefining HDA_POWER_SAVE_RESET_CONTOLLER in hda_intel.c. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r--sound/pci/hda/patch_sigmatel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index bf5d91b63d1..4a981399abd 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -1946,7 +1946,7 @@ static void stac92xx_unsol_event(struct hda_codec *codec, unsigned int res)
1946 } 1946 }
1947} 1947}
1948 1948
1949#ifdef CONFIG_PM 1949#ifdef SND_HDA_NEEDS_RESUME
1950static int stac92xx_resume(struct hda_codec *codec) 1950static int stac92xx_resume(struct hda_codec *codec)
1951{ 1951{
1952 stac92xx_set_config_regs(codec); 1952 stac92xx_set_config_regs(codec);
@@ -1963,7 +1963,7 @@ static struct hda_codec_ops stac92xx_patch_ops = {
1963 .init = stac92xx_init, 1963 .init = stac92xx_init,
1964 .free = stac92xx_free, 1964 .free = stac92xx_free,
1965 .unsol_event = stac92xx_unsol_event, 1965 .unsol_event = stac92xx_unsol_event,
1966#ifdef CONFIG_PM 1966#ifdef SND_HDA_NEEDS_RESUME
1967 .resume = stac92xx_resume, 1967 .resume = stac92xx_resume,
1968#endif 1968#endif
1969}; 1969};
@@ -2460,7 +2460,7 @@ static struct hda_codec_ops stac9872_patch_ops = {
2460 .build_pcms = stac92xx_build_pcms, 2460 .build_pcms = stac92xx_build_pcms,
2461 .init = stac92xx_init, 2461 .init = stac92xx_init,
2462 .free = stac92xx_free, 2462 .free = stac92xx_free,
2463#ifdef CONFIG_PM 2463#ifdef SND_HDA_NEEDS_RESUME
2464 .resume = stac92xx_resume, 2464 .resume = stac92xx_resume,
2465#endif 2465#endif
2466}; 2466};