Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353266
b: refs/heads/master
c: a0c041c
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Jan 15, 2013
1 parent 62e4998 commit 6446db7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 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: 15e4ba666ca6c2fcc00184cef56fb971a20e8e04
refs/heads/master: a0c041cb6f74f9734d9a3af1061a718b3879a255
26 changes: 10 additions & 16 deletions trunk/sound/pci/hda/patch_ca0132.c
Original file line number Diff line number Diff line change
Expand Up @@ -3158,15 +3158,13 @@ static int ca0132_select_out(struct hda_codec *codec)
/* disable headphone node */
pin_ctl = snd_hda_codec_read(codec, spec->out_pins[1], 0,
AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
snd_hda_codec_write(codec, spec->out_pins[1], 0,
AC_VERB_SET_PIN_WIDGET_CONTROL,
pin_ctl & 0xBF);
snd_hda_set_pin_ctl(codec, spec->out_pins[1],
pin_ctl & ~PIN_HP);
/* enable speaker node */
pin_ctl = snd_hda_codec_read(codec, spec->out_pins[0], 0,
AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
snd_hda_codec_write(codec, spec->out_pins[0], 0,
AC_VERB_SET_PIN_WIDGET_CONTROL,
pin_ctl | 0x40);
snd_hda_set_pin_ctl(codec, spec->out_pins[0],
pin_ctl | PIN_OUT);
} else {
snd_printdd(KERN_INFO "ca0132_select_out hp\n");
/*headphone out config*/
Expand All @@ -3193,15 +3191,13 @@ static int ca0132_select_out(struct hda_codec *codec)
/* disable speaker*/
pin_ctl = snd_hda_codec_read(codec, spec->out_pins[0], 0,
AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
snd_hda_codec_write(codec, spec->out_pins[0], 0,
AC_VERB_SET_PIN_WIDGET_CONTROL,
pin_ctl & 0xBF);
snd_hda_set_pin_ctl(codec, spec->out_pins[0],
pin_ctl & ~PIN_HP);
/* enable headphone*/
pin_ctl = snd_hda_codec_read(codec, spec->out_pins[1], 0,
AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
snd_hda_codec_write(codec, spec->out_pins[1], 0,
AC_VERB_SET_PIN_WIDGET_CONTROL,
pin_ctl | 0x40);
snd_hda_set_pin_ctl(codec, spec->out_pins[1],
pin_ctl | PIN_HP);
}

exit:
Expand Down Expand Up @@ -4065,8 +4061,7 @@ static int ca0132_build_pcms(struct hda_codec *codec)
static void init_output(struct hda_codec *codec, hda_nid_t pin, hda_nid_t dac)
{
if (pin) {
snd_hda_codec_write(codec, pin, 0,
AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP);
snd_hda_set_pin_ctl(codec, pin, PIN_HP);
if (get_wcaps(codec, pin) & AC_WCAP_OUT_AMP)
snd_hda_codec_write(codec, pin, 0,
AC_VERB_SET_AMP_GAIN_MUTE,
Expand All @@ -4080,8 +4075,7 @@ static void init_output(struct hda_codec *codec, hda_nid_t pin, hda_nid_t dac)
static void init_input(struct hda_codec *codec, hda_nid_t pin, hda_nid_t adc)
{
if (pin) {
snd_hda_codec_write(codec, pin, 0,
AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80);
snd_hda_set_pin_ctl(codec, pin, PIN_VREF80);
if (get_wcaps(codec, pin) & AC_WCAP_IN_AMP)
snd_hda_codec_write(codec, pin, 0,
AC_VERB_SET_AMP_GAIN_MUTE,
Expand Down

0 comments on commit 6446db7

Please sign in to comment.