Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81744
b: refs/heads/master
c: cace16f
h: refs/heads/master
v: v3
  • Loading branch information
Matthew Ranostay authored and Mercurial server committed Jan 31, 2008
1 parent 3d8a447 commit ce9a46b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 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: 493b4acb9ed3193b19d45d62e0e5740d20f47adc
refs/heads/master: cace16f174d971a80f81e68ed04f1124a50dd800
24 changes: 16 additions & 8 deletions trunk/sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2283,15 +2283,23 @@ static int stac92xx_auto_create_multi_out_ctls(struct hda_codec *codec,
}

if (spec->mic_switch) {
unsigned int def_conf;
nid = cfg->input_pins[AUTO_PIN_MIC];
pincap = snd_hda_param_read(codec, nid,
AC_PAR_PIN_CAP);
if (pincap & AC_PINCAP_OUT) {
err = stac92xx_add_control(spec,
STAC_CTL_WIDGET_IO_SWITCH,
"Mic as Output Switch", (nid << 8) | 1);
if (err < 0)
return err;
def_conf = snd_hda_codec_read(codec, nid, 0,
AC_VERB_GET_CONFIG_DEFAULT, 0);

/* some laptops have an internal analog microphone
* which can't be used as a output */
if (get_defcfg_connect(def_conf) != AC_JACK_PORT_FIXED) {
pincap = snd_hda_param_read(codec, nid,
AC_PAR_PIN_CAP);
if (pincap & AC_PINCAP_OUT) {
err = stac92xx_add_control(spec,
STAC_CTL_WIDGET_IO_SWITCH,
"Mic as Output Switch", (nid << 8) | 1);
if (err < 0)
return err;
}
}
}

Expand Down

0 comments on commit ce9a46b

Please sign in to comment.