val = snd_hda_get_bool_hint(codec, "single_adc_amp");
if (val >= 0)
codec->single_adc_amp = !!val;
- val = snd_hda_get_bool_hint(codec, "power_mgmt");
+ val = snd_hda_get_bool_hint(codec, "power_save_node");
if (val >= 0)
- codec->power_mgmt = !!val;
+ codec->power_save_node = !!val;
val = snd_hda_get_bool_hint(codec, "auto_mute");
if (val >= 0)
struct nid_path *path = snd_array_elem(&spec->paths, n);
if (!path->active)
continue;
- if (codec->power_mgmt) {
+ if (codec->power_save_node) {
if (!path->stream_enabled)
continue;
/* ignore unplugged paths except for DAC/ADC */
path->active = false;
/* make sure the widget is powered up */
- if (enable && (spec->power_down_unused || codec->power_mgmt))
- path_power_update(codec, path, codec->power_mgmt);
+ if (enable && (spec->power_down_unused || codec->power_save_node))
+ path_power_update(codec, path, codec->power_save_node);
for (i = path->depth - 1; i >= 0; i--) {
hda_nid_t nid = path->path[i];
{
struct hda_gen_spec *spec = codec->spec;
- if (!(spec->power_down_unused || codec->power_mgmt) || path->active)
+ if (!(spec->power_down_unused || codec->power_save_node) || path->active)
return;
sync_power_state_change(codec, path_power_update(codec, path, true));
}
{
bool on;
- if (!codec->power_mgmt)
+ if (!codec->power_save_node)
return 0;
on = snd_hda_jack_detect_state(codec, pin) != HDA_JACK_NOT_PRESENT;
struct auto_pin_cfg *cfg = &spec->autocfg;
int i;
- if (!codec->power_mgmt)
+ if (!codec->power_save_node)
return;
add_pin_power_ctls(codec, cfg->line_outs, cfg->line_out_pins, on);
if (cfg->line_out_type != AUTO_PIN_HP_OUT)
struct auto_pin_cfg *cfg = &spec->autocfg;
int i;
- if (!codec->power_mgmt)
+ if (!codec->power_save_node)
return;
sync_pin_power_ctls(codec, cfg->line_outs, cfg->line_out_pins);
if (cfg->line_out_type != AUTO_PIN_HP_OUT)
hda_nid_t nid = spec->beep_nid;
int err;
- if (!codec->power_mgmt || !nid)
+ if (!codec->power_save_node || !nid)
return 0;
err = add_fake_paths(codec, nid, cfg->line_outs, cfg->line_out_pins);
if (err < 0)
}
set_pin_eapd(codec, nid, !mute);
- if (codec->power_mgmt) {
+ if (codec->power_save_node) {
bool on = !mute;
if (on)
on = snd_hda_jack_detect_state(codec, nid)
* @nid: audio widget
* @on: power on/off flag
*
- * Set this in patch_ops.stream_pm. Only valid with power_mgmt flag.
+ * Set this in patch_ops.stream_pm. Only valid with power_save_node flag.
*/
void snd_hda_gen_stream_pm(struct hda_codec *codec, hda_nid_t nid, bool on)
{
- if (codec->power_mgmt)
+ if (codec->power_save_node)
set_path_power(codec, nid, -1, on);
}
EXPORT_SYMBOL_GPL(snd_hda_gen_stream_pm);
dig_only:
parse_digital(codec);
- if (spec->power_down_unused || codec->power_mgmt)
+ if (spec->power_down_unused || codec->power_save_node)
codec->power_filter = snd_hda_gen_path_power_filter;
if (!spec->no_analog && spec->beep_nid) {
err = snd_hda_attach_beep_device(codec, spec->beep_nid);
if (err < 0)
return err;
- if (codec->beep && codec->power_mgmt) {
+ if (codec->beep && codec->power_save_node) {
err = add_fake_beep_paths(codec);
if (err < 0)
return err;
return err;
spec = codec->spec;
- codec->power_mgmt = 1;
+ codec->power_save_node = 1;
spec->linear_tone_beep = 0;
spec->gen.mixer_nid = 0x1d;
spec->have_spdif_mux = 1;
codec->epss = 0; /* longer delay needed for D3 */
spec = codec->spec;
- codec->power_mgmt = 1;
+ codec->power_save_node = 1;
spec->linear_tone_beep = 0;
spec->gen.own_eapd_ctl = 1;
spec->gen.power_down_unused = 1;
codec->epss = 0; /* longer delay needed for D3 */
spec = codec->spec;
- codec->power_mgmt = 1;
+ codec->power_save_node = 1;
spec->linear_tone_beep = 0;
spec->gen.own_eapd_ctl = 1;
spec->gen.power_down_unused = 1;
return err;
spec = codec->spec;
- codec->power_mgmt = 1;
+ codec->power_save_node = 1;
spec->linear_tone_beep = 0;
spec->gen.own_eapd_ctl = 1;
spec->gen.power_down_unused = 1;
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;
}
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;
}
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;
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;
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;
}