true, &spec->vmaster_mute.sw_kctl);
if (err < 0)
return err;
+ if (spec->vmaster_mute.hook)
+ snd_hda_add_vmaster_hook(codec, &spec->vmaster_mute, true);
}
alc_free_kctls(codec); /* no longer needed */
snd_hda_gen_apply_verbs(codec);
alc_auto_init_std(codec);
+ if (spec->vmaster_mute.sw_kctl && spec->vmaster_mute.hook)
+ snd_hda_sync_vmaster_hook(&spec->vmaster_mute);
+
alc_apply_fixup(codec, ALC_FIXUP_ACT_INIT);
hda_call_check_power_status(codec, 0x01);
const struct alc_fixup *fix, int action)
{
struct alc_spec *spec = codec->spec;
- switch (action) {
- case ALC_FIXUP_ACT_BUILD:
+ if (action == ALC_FIXUP_ACT_PROBE)
spec->vmaster_mute.hook = alc269_fixup_mic1_mute_hook;
- snd_hda_add_vmaster_hook(codec, &spec->vmaster_mute, true);
- /* fallthru */
- case ALC_FIXUP_ACT_INIT:
- snd_hda_sync_vmaster_hook(&spec->vmaster_mute);
- break;
- }
}
/* update mute-LED according to the speaker mute state via mic2 VREF pin */
const struct alc_fixup *fix, int action)
{
struct alc_spec *spec = codec->spec;
- switch (action) {
- case ALC_FIXUP_ACT_BUILD:
+ if (action == ALC_FIXUP_ACT_PROBE)
spec->vmaster_mute.hook = alc269_fixup_mic2_mute_hook;
- snd_hda_add_vmaster_hook(codec, &spec->vmaster_mute, true);
- /* fallthru */
- case ALC_FIXUP_ACT_INIT:
- snd_hda_sync_vmaster_hook(&spec->vmaster_mute);
- break;
- }
}
static void alc271_hp_gate_mic_jack(struct hda_codec *codec,