summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_via.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-03-20 18:21:03 +0100
committerTakashi Iwai <tiwai@suse.de>2015-03-20 18:31:18 +0100
commit967b1307b69b8ada8b331e01046ad1ef83742e99 (patch)
tree4974dfe19444e6b75223d616a1f63982c299bc02 /sound/pci/hda/patch_via.c
parentALSA: hda - Fix power of pins used for mute LED with vrefs (diff)
downloadlinux-967b1307b69b8ada8b331e01046ad1ef83742e99.tar.xz
linux-967b1307b69b8ada8b331e01046ad1ef83742e99.zip
ALSA: hda - Rename power_mgmt flag with power_save_node
David suggested that the name "power_mgmt" is too ambiguous. Rename the flag with a bit clearer one "power_save_node". Also, add the corresponding description to HD-Audio.txt, too. Reported-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_via.c')
-rw-r--r--sound/pci/hda/patch_via.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index d5d1dca4f11b..485663bb9101 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -133,7 +133,7 @@ static struct via_spec *via_new_spec(struct hda_codec *codec)
spec->gen.keep_eapd_on = 1;
spec->gen.pcm_playback_hook = via_playback_pcm_hook;
spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO;
- codec->power_mgmt = 1;
+ codec->power_save_node = 1;
spec->gen.power_down_unused = 1;
return spec;
}
@@ -236,7 +236,7 @@ static int via_pin_power_ctl_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
- ucontrol->value.enumerated.item[0] = codec->power_mgmt;
+ ucontrol->value.enumerated.item[0] = codec->power_save_node;
return 0;
}
@@ -247,9 +247,9 @@ static int via_pin_power_ctl_put(struct snd_kcontrol *kcontrol,
struct via_spec *spec = codec->spec;
bool val = !!ucontrol->value.enumerated.item[0];
- if (val == codec->power_mgmt)
+ if (val == codec->power_save_node)
return 0;
- codec->power_mgmt = val;
+ codec->power_save_node = val;
spec->gen.power_down_unused = val;
analog_low_current_mode(codec);
return 1;
@@ -295,7 +295,7 @@ static void __analog_low_current_mode(struct hda_codec *codec, bool force)
bool enable;
unsigned int verb, parm;
- if (!codec->power_mgmt)
+ if (!codec->power_save_node)
enable = false;
else
enable = is_aa_path_mute(codec) && !spec->gen.active_streams;
@@ -517,7 +517,7 @@ static int via_parse_auto_config(struct hda_codec *codec)
return err;
/* disable widget PM at start for compatibility */
- codec->power_mgmt = 0;
+ codec->power_save_node = 0;
spec->gen.power_down_unused = 0;
return 0;
}