Explorar o código

ALSA: hda - Add missing check of pin vref 50 and others in Realtek codecs

Some Realtek codecs like ALC861 seem to support only VREF50 while the
current driver assumes it's only VREF80.  Check other VREF bits to set
the correct value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai %!s(int64=16) %!d(string=hai) anos
pai
achega
461c6c3a0a
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      sound/pci/hda/patch_realtek.c

+ 6 - 0
sound/pci/hda/patch_realtek.c

@@ -776,6 +776,12 @@ static void alc_set_input_pin(struct hda_codec *codec, hda_nid_t nid,
 		pincap = (pincap & AC_PINCAP_VREF) >> AC_PINCAP_VREF_SHIFT;
 		pincap = (pincap & AC_PINCAP_VREF) >> AC_PINCAP_VREF_SHIFT;
 		if (pincap & AC_PINCAP_VREF_80)
 		if (pincap & AC_PINCAP_VREF_80)
 			val = PIN_VREF80;
 			val = PIN_VREF80;
+		else if (pincap & AC_PINCAP_VREF_50)
+			val = PIN_VREF50;
+		else if (pincap & AC_PINCAP_VREF_100)
+			val = PIN_VREF100;
+		else if (pincap & AC_PINCAP_VREF_GRD)
+			val = PIN_VREFGRD;
 	}
 	}
 	snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, val);
 	snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, val);
 }
 }