Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257714
b: refs/heads/master
c: 050ea75
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Jun 27, 2011
1 parent 2d1e517 commit c110b14
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 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: 39fa84e94a7df64a6ba27669ef98b51994fb6894
refs/heads/master: 050ea75317f33e376cc413359c0319ad5cc86e2a
29 changes: 20 additions & 9 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -5605,17 +5605,28 @@ static int get_pin_type(int line_out_type)
return PIN_OUT;
}

static void alc880_auto_init_dac(struct hda_codec *codec, hda_nid_t nid)
static void alc880_auto_init_dac(struct hda_codec *codec, hda_nid_t dac)
{
if (!nid)
hda_nid_t nid, mix;

if (!dac)
return;
nid = alc880_idx_to_mixer(alc880_dac_to_idx(nid));
snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE,
AMP_OUT_ZERO);
snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE,
AMP_IN_UNMUTE(0));
snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE,
AMP_IN_UNMUTE(1));
mix = alc880_idx_to_mixer(alc880_dac_to_idx(dac));
if (query_amp_caps(codec, dac, HDA_OUTPUT) & AC_AMPCAP_NUM_STEPS)
nid = dac;
else if (query_amp_caps(codec, mix, HDA_OUTPUT) & AC_AMPCAP_NUM_STEPS)
nid = mix;
else
nid = 0;
if (nid)
snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE,
AMP_OUT_ZERO);
if (query_amp_caps(codec, mix, HDA_INPUT) & AC_AMPCAP_MUTE) {
snd_hda_codec_write(codec, mix, 0, AC_VERB_SET_AMP_GAIN_MUTE,
AMP_IN_UNMUTE(0));
snd_hda_codec_write(codec, mix, 0, AC_VERB_SET_AMP_GAIN_MUTE,
AMP_IN_UNMUTE(1));
}
}

static void alc880_auto_init_multi_out(struct hda_codec *codec)
Expand Down

0 comments on commit c110b14

Please sign in to comment.