Skip to content

Commit

Permalink
ALSA: hda - Change headphone pin control with master volume on cx5051
Browse files Browse the repository at this point in the history
The HP pin (0x16) control has to be changed dynamically depending on
the master volume switch as well as the speaker pin (0x1a).  Otherwise
the headphone still sounds with master off.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Jan 24, 2010
1 parent ecda0cf commit 23d2df5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sound/pci/hda/patch_conexant.c
Original file line number Diff line number Diff line change
Expand Up @@ -1605,6 +1605,11 @@ static void cxt5051_update_speaker(struct hda_codec *codec)
{
struct conexant_spec *spec = codec->spec;
unsigned int pinctl;
/* headphone pin */
pinctl = (spec->hp_present && spec->cur_eapd) ? PIN_HP : 0;
snd_hda_codec_write(codec, 0x16, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
pinctl);
/* speaker pin */
pinctl = (!spec->hp_present && spec->cur_eapd) ? PIN_OUT : 0;
snd_hda_codec_write(codec, 0x1a, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
pinctl);
Expand Down

0 comments on commit 23d2df5

Please sign in to comment.