Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133134
b: refs/heads/master
c: 52ca15b
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Mar 23, 2009
1 parent dd6b39b commit 739f83b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: 234b4346a064f8a2a488da10b3c1e640fb778a17
refs/heads/master: 52ca15b7c0c711eb37f5e4b769e8488e5c516d43
9 changes: 8 additions & 1 deletion trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -16750,6 +16750,12 @@ static int alc662_is_input_pin(struct hda_codec *codec, hda_nid_t nid)
return (pincap & AC_PINCAP_IN) != 0;
}

static int alc662_is_output_pin(struct hda_codec *codec, hda_nid_t nid)
{
unsigned int pincap = snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP);
return (pincap & AC_PINCAP_OUT) != 0;
}

/* create playback/capture controls for input pins */
static int alc662_auto_create_analog_input_ctls(struct hda_codec *codec,
const struct auto_pin_cfg *cfg)
Expand Down Expand Up @@ -16837,7 +16843,8 @@ static void alc662_auto_init_analog_input(struct hda_codec *codec)
hda_nid_t nid = spec->autocfg.input_pins[i];
if (alc662_is_input_pin(codec, nid)) {
alc_set_input_pin(codec, nid, i);
if (nid != ALC662_PIN_CD_NID)
if (nid != ALC662_PIN_CD_NID &&
alc662_is_output_pin(codec, nid))
snd_hda_codec_write(codec, nid, 0,
AC_VERB_SET_AMP_GAIN_MUTE,
AMP_OUT_MUTE);
Expand Down

0 comments on commit 739f83b

Please sign in to comment.