diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-07-30 04:55:44 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-07-30 04:55:44 -0400 |
commit | 954a29c881bd0c61352af0946f2c39d738d43c1b (patch) | |
tree | e6e99da6232df4568d8800f7a4fc6c7262e81bba /sound/pci/hda/patch_realtek.c | |
parent | 5d4abf93ea3192cc666430225a29a4978c97c57d (diff) |
ALSA: hda - Prefer VREF50 if BIOS sets for Realtek codecs
If BIOS sets up the input pin as VREF 50, use the value as is instead of
overriding forcibly to VREF 80. This fixes the quality of inputs on
some devices like Packard-Bell M5210.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index bdea95aee448..4d3a6f05c703 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -847,9 +847,13 @@ static void alc_set_input_pin(struct hda_codec *codec, hda_nid_t nid, | |||
847 | 847 | ||
848 | if (auto_pin_type <= AUTO_PIN_FRONT_MIC) { | 848 | if (auto_pin_type <= AUTO_PIN_FRONT_MIC) { |
849 | unsigned int pincap; | 849 | unsigned int pincap; |
850 | unsigned int oldval; | ||
851 | oldval = snd_hda_codec_read(codec, nid, 0, | ||
852 | AC_VERB_GET_PIN_WIDGET_CONTROL, 0); | ||
850 | pincap = snd_hda_query_pin_caps(codec, nid); | 853 | pincap = snd_hda_query_pin_caps(codec, nid); |
851 | pincap = (pincap & AC_PINCAP_VREF) >> AC_PINCAP_VREF_SHIFT; | 854 | pincap = (pincap & AC_PINCAP_VREF) >> AC_PINCAP_VREF_SHIFT; |
852 | if (pincap & AC_PINCAP_VREF_80) | 855 | /* if the default pin setup is vref50, we give it priority */ |
856 | if ((pincap & AC_PINCAP_VREF_80) && oldval != PIN_VREF50) | ||
853 | val = PIN_VREF80; | 857 | val = PIN_VREF80; |
854 | else if (pincap & AC_PINCAP_VREF_50) | 858 | else if (pincap & AC_PINCAP_VREF_50) |
855 | val = PIN_VREF50; | 859 | val = PIN_VREF50; |
@@ -10406,7 +10410,8 @@ static struct alc_config_preset alc882_presets[] = { | |||
10406 | * Pin config fixes | 10410 | * Pin config fixes |
10407 | */ | 10411 | */ |
10408 | enum { | 10412 | enum { |
10409 | PINFIX_ABIT_AW9D_MAX | 10413 | PINFIX_ABIT_AW9D_MAX, |
10414 | PINFIX_PB_M5210, | ||
10410 | }; | 10415 | }; |
10411 | 10416 | ||
10412 | static struct alc_pincfg alc882_abit_aw9d_pinfix[] = { | 10417 | static struct alc_pincfg alc882_abit_aw9d_pinfix[] = { |
@@ -10416,13 +10421,22 @@ static struct alc_pincfg alc882_abit_aw9d_pinfix[] = { | |||
10416 | { } | 10421 | { } |
10417 | }; | 10422 | }; |
10418 | 10423 | ||
10424 | static const struct hda_verb pb_m5210_verbs[] = { | ||
10425 | { 0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF50 }, | ||
10426 | {} | ||
10427 | }; | ||
10428 | |||
10419 | static const struct alc_fixup alc882_fixups[] = { | 10429 | static const struct alc_fixup alc882_fixups[] = { |
10420 | [PINFIX_ABIT_AW9D_MAX] = { | 10430 | [PINFIX_ABIT_AW9D_MAX] = { |
10421 | .pins = alc882_abit_aw9d_pinfix | 10431 | .pins = alc882_abit_aw9d_pinfix |
10422 | }, | 10432 | }, |
10433 | [PINFIX_PB_M5210] = { | ||
10434 | .verbs = pb_m5210_verbs | ||
10435 | }, | ||
10423 | }; | 10436 | }; |
10424 | 10437 | ||
10425 | static struct snd_pci_quirk alc882_fixup_tbl[] = { | 10438 | static struct snd_pci_quirk alc882_fixup_tbl[] = { |
10439 | SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", PINFIX_PB_M5210), | ||
10426 | SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", PINFIX_ABIT_AW9D_MAX), | 10440 | SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", PINFIX_ABIT_AW9D_MAX), |
10427 | {} | 10441 | {} |
10428 | }; | 10442 | }; |