ALSA: hda - Drop power_save value indirection in hda_bus

We used to pass the power_save option value to hda_bus via a given
pointer.  This was needed to refer to the value from the HD-audio core
side.  However, after the transition to the runtime PM, this is no
longer needed.

This patch drops the power_save value indirection in hda_bus above,
and let the controller driver reprograms the autosuspend value
explicitly by a new helper, snd_hda_set_power_save().  Without this
call, the HD-audio core doesn't set up the autosuspend and flip the
runtime PM.  (User may still be able to set up via sysfs, though.)

Along with this change, the pointer argument of azx_bus_create() is
dropped as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai
2015-02-20 09:26:04 +01:00
父節點 cc72da7d4d
當前提交 bb573928e1
共有 6 個文件被更改,包括 29 次插入32 次删除

查看文件

@@ -81,7 +81,7 @@ module_param(power_save, bint, 0644);
MODULE_PARM_DESC(power_save,
"Automatic power-saving timeout (in seconds, 0 = disable).");
#else
static int power_save = 0;
#define power_save 0
#endif
/*
@@ -496,7 +496,7 @@ static int hda_tegra_probe(struct platform_device *pdev)
goto out_free;
/* create codec instances */
err = azx_bus_create(chip, NULL, &power_save);
err = azx_bus_create(chip, NULL);
if (err < 0)
goto out_free;
@@ -525,6 +525,7 @@ static int hda_tegra_probe(struct platform_device *pdev)
chip->running = 1;
power_down_all_codecs(chip);
azx_notifier_register(chip);
snd_hda_set_power_save(chip->bus, power_save * 1000);
return 0;