aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_ca0110.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-04-20 13:06:53 +0200
committerTakashi Iwai <tiwai@suse.de>2012-04-20 13:06:53 +0200
commit4740860b534e86d7db3b26cbd980bec8e4c807e8 (patch)
treedf010ab3c53a2b4f3829593b56cdfa19f829115b /sound/pci/hda/patch_ca0110.c
parentALSA: hda - Introduce snd_hda_set_pin_ctl*() helper functions (diff)
downloadlinux-dev-4740860b534e86d7db3b26cbd980bec8e4c807e8.tar.xz
linux-dev-4740860b534e86d7db3b26cbd980bec8e4c807e8.zip
ALSA: hda - Add snd_hda_get_default_vref() helper function
Add a new helper function to guess the default VREF pin control bits for mic in. This can be used to set the pin control value safely matching with the actual pin capabilities. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_ca0110.c')
-rw-r--r--sound/pci/hda/patch_ca0110.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_ca0110.c b/sound/pci/hda/patch_ca0110.c
index 646dc976f4bd..a3b70a8f6df8 100644
--- a/sound/pci/hda/patch_ca0110.c
+++ b/sound/pci/hda/patch_ca0110.c
@@ -355,7 +355,8 @@ 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_set_pin_ctl(codec, pin, PIN_VREF80);
+ snd_hda_set_pin_ctl(codec, pin, PIN_IN |
+ snd_hda_get_default_vref(codec, pin));
if (get_wcaps(codec, pin) & AC_WCAP_IN_AMP)
snd_hda_codec_write(codec, pin, 0,
AC_VERB_SET_AMP_GAIN_MUTE,