diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-08-24 18:38:08 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-08-30 07:50:13 -0700 |
commit | 83012a7ccbb90dee33c97a004b3e374f988612af (patch) | |
tree | 4e6e4c6f1f21150a4c82cbbefb97995cda924d17 /sound/pci/hda/hda_intel.c | |
parent | 432c641e013d6e294e2ddf06d32a610eb1d4d856 (diff) |
ALSA: hda - Clean up CONFIG_SND_HDA_POWER_SAVE
CONFIG_SND_HDA_POWER_SAVE is no longer an experimental feature and its
behavior can be well controlled via the default value and module
parameter. Let's just replace it with the standard CONFIG_PM.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 1b6e856e7ab1..6a19f6af9517 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -110,7 +110,7 @@ MODULE_PARM_DESC(beep_mode, "Select HDA Beep registration mode " "(0=off, 1=on) (default=1)."); #endif -#ifdef CONFIG_SND_HDA_POWER_SAVE +#ifdef CONFIG_PM static int param_set_xint(const char *val, const struct kernel_param *kp); static struct kernel_param_ops param_ops_xint = { .set = param_set_xint, @@ -130,7 +130,7 @@ MODULE_PARM_DESC(power_save, "Automatic power-saving timeout " static bool power_save_controller = 1; module_param(power_save_controller, bool, 0644); MODULE_PARM_DESC(power_save_controller, "Reset controller in power save mode."); -#endif +#endif /* CONFIG_PM */ static int align_buffer_size = -1; module_param(align_buffer_size, bint, 0644); @@ -1032,7 +1032,7 @@ static unsigned int azx_get_response(struct hda_bus *bus, return azx_rirb_get_response(bus, addr); } -#ifdef CONFIG_SND_HDA_POWER_SAVE +#ifdef CONFIG_PM static void azx_power_notify(struct hda_bus *bus, bool power_up); #endif @@ -1605,7 +1605,7 @@ static int DELAYED_INIT_MARK azx_codec_create(struct azx *chip, const char *mode bus_temp.ops.get_response = azx_get_response; bus_temp.ops.attach_pcm = azx_attach_pcm_stream; bus_temp.ops.bus_reset = azx_bus_reset; -#ifdef CONFIG_SND_HDA_POWER_SAVE +#ifdef CONFIG_PM bus_temp.power_save = &power_save; bus_temp.ops.pm_notify = azx_power_notify; #endif @@ -2404,7 +2404,7 @@ static void azx_stop_chip(struct azx *chip) chip->initialized = 0; } -#ifdef CONFIG_SND_HDA_POWER_SAVE +#ifdef CONFIG_PM /* power-up/down the controller */ static void azx_power_notify(struct hda_bus *bus, bool power_up) { @@ -2457,7 +2457,7 @@ static int param_set_xint(const char *val, const struct kernel_param *kp) #else #define azx_add_card_list(chip) /* NOP */ #define azx_del_card_list(chip) /* NOP */ -#endif /* CONFIG_SND_HDA_POWER_SAVE */ +#endif /* CONFIG_PM */ #if defined(CONFIG_PM_SLEEP) || defined(SUPPORT_VGA_SWITCHEROO) /* @@ -2525,10 +2525,8 @@ static int azx_runtime_suspend(struct device *dev) struct snd_card *card = dev_get_drvdata(dev); struct azx *chip = card->private_data; -#ifdef CONFIG_SND_HDA_POWER_SAVE if (!power_save_controller) return -EAGAIN; -#endif azx_stop_chip(chip); azx_clear_irq_pending(chip); @@ -3232,7 +3230,7 @@ static int DELAYED_INIT_MARK azx_first_init(struct azx *chip) static void power_down_all_codecs(struct azx *chip) { -#ifdef CONFIG_SND_HDA_POWER_SAVE +#ifdef CONFIG_PM /* The codecs were powered up in snd_hda_codec_new(). * Now all initialization done, so turn them down if possible */ |