Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 254017
b: refs/heads/master
c: ba31a60
h: refs/heads/master
i:
  254015: 7e835bf
v: v3
  • Loading branch information
Lydia Wang authored and Takashi Iwai committed Jun 21, 2011
1 parent cb087ba commit afb62c6
Show file tree
Hide file tree
Showing 2 changed files with 13 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: 42467b32ce4f1ba933673b396f807110e3618ff5
refs/heads/master: ba31a60d0fd8a3976d44d32f2b82491c62646b2a
13 changes: 12 additions & 1 deletion trunk/sound/pci/hda/patch_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -745,12 +745,23 @@ static int via_independent_hp_put(struct snd_kcontrol *kcontrol,
struct via_spec *spec = codec->spec;
hda_nid_t nid = kcontrol->private_value;
unsigned int pinsel = ucontrol->value.enumerated.item[0];
unsigned int parm0, parm1;
/* Get Independent Mode index of headphone pin widget */
spec->hp_independent_mode = spec->hp_independent_mode_index == pinsel
? 1 : 0;
if (spec->codec_type == VT1718S)
if (spec->codec_type == VT1718S) {
snd_hda_codec_write(codec, nid, 0,
AC_VERB_SET_CONNECT_SEL, pinsel ? 2 : 0);
/* Set correct mute switch for MW3 */
parm0 = spec->hp_independent_mode ?
AMP_IN_UNMUTE(0) : AMP_IN_MUTE(0);
parm1 = spec->hp_independent_mode ?
AMP_IN_MUTE(1) : AMP_IN_UNMUTE(1);
snd_hda_codec_write(codec, 0x1b, 0,
AC_VERB_SET_AMP_GAIN_MUTE, parm0);
snd_hda_codec_write(codec, 0x1b, 0,
AC_VERB_SET_AMP_GAIN_MUTE, parm1);
}
else
snd_hda_codec_write(codec, nid, 0,
AC_VERB_SET_CONNECT_SEL, pinsel);
Expand Down

0 comments on commit afb62c6

Please sign in to comment.