Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353030
b: refs/heads/master
c: 3bd7b64
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Jan 12, 2013
1 parent 03bfec8 commit 4fb3829
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 20c18f562a4d0494dd2b99e19cfeb33f55c9c50e
refs/heads/master: 3bd7b644d049feb8df4225492689a324963f42f4
23 changes: 7 additions & 16 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -1687,6 +1687,8 @@ static int __alc_build_controls(struct hda_codec *codec)
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 */
Expand Down Expand Up @@ -1745,6 +1747,9 @@ static int alc_init(struct hda_codec *codec)
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);
Expand Down Expand Up @@ -6025,15 +6030,8 @@ static void alc269_fixup_mic1_mute(struct hda_codec *codec,
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 */
Expand All @@ -6048,15 +6046,8 @@ static void alc269_fixup_mic2_mute(struct hda_codec *codec,
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,
Expand Down

0 comments on commit 4fb3829

Please sign in to comment.