diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-01-10 04:12:22 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-01-12 02:44:33 -0500 |
commit | d3f02d60eecfc43088a3cb95d35e0cf75b4b8266 (patch) | |
tree | 6433b8716a0eb4d6fde115d9455d9567d912659f /sound/pci/hda/patch_realtek.c | |
parent | 1727a771b4ff0fb62cbf32cad3c51493e8a4c167 (diff) |
ALSA: hda/realtek - Read the cached pinctl value in fixups
... instead of reading the value from the codec at each time.
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 | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 183b951fa63b..7a4b78376303 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -1737,8 +1737,7 @@ static void alc889_fixup_mbp_vref(struct hda_codec *codec, | |||
1737 | unsigned int val = snd_hda_codec_get_pincfg(codec, nids[i]); | 1737 | unsigned int val = snd_hda_codec_get_pincfg(codec, nids[i]); |
1738 | if (get_defcfg_device(val) != AC_JACK_HP_OUT) | 1738 | if (get_defcfg_device(val) != AC_JACK_HP_OUT) |
1739 | continue; | 1739 | continue; |
1740 | val = snd_hda_codec_read(codec, nids[i], 0, | 1740 | val = snd_hda_codec_get_pin_target(codec, nids[i]); |
1741 | AC_VERB_GET_PIN_WIDGET_CONTROL, 0); | ||
1742 | val |= AC_PINCTL_VREF_80; | 1741 | val |= AC_PINCTL_VREF_80; |
1743 | snd_hda_set_pin_ctl(codec, nids[i], val); | 1742 | snd_hda_set_pin_ctl(codec, nids[i], val); |
1744 | spec->gen.keep_vref_in_automute = 1; | 1743 | spec->gen.keep_vref_in_automute = 1; |
@@ -1758,8 +1757,7 @@ static void alc889_fixup_imac91_vref(struct hda_codec *codec, | |||
1758 | return; | 1757 | return; |
1759 | for (i = 0; i < ARRAY_SIZE(nids); i++) { | 1758 | for (i = 0; i < ARRAY_SIZE(nids); i++) { |
1760 | unsigned int val; | 1759 | unsigned int val; |
1761 | val = snd_hda_codec_read(codec, nids[i], 0, | 1760 | val = snd_hda_codec_get_pin_target(codec, nids[i]); |
1762 | AC_VERB_GET_PIN_WIDGET_CONTROL, 0); | ||
1763 | val |= AC_PINCTL_VREF_50; | 1761 | val |= AC_PINCTL_VREF_50; |
1764 | snd_hda_set_pin_ctl(codec, nids[i], val); | 1762 | snd_hda_set_pin_ctl(codec, nids[i], val); |
1765 | } | 1763 | } |
@@ -3137,8 +3135,7 @@ static void alc861_fixup_asus_amp_vref_0f(struct hda_codec *codec, | |||
3137 | 3135 | ||
3138 | if (action != HDA_FIXUP_ACT_INIT) | 3136 | if (action != HDA_FIXUP_ACT_INIT) |
3139 | return; | 3137 | return; |
3140 | val = snd_hda_codec_read(codec, 0x0f, 0, | 3138 | val = snd_hda_codec_get_pin_target(codec, 0x0f); |
3141 | AC_VERB_GET_PIN_WIDGET_CONTROL, 0); | ||
3142 | if (!(val & (AC_PINCTL_IN_EN | AC_PINCTL_OUT_EN))) | 3139 | if (!(val & (AC_PINCTL_IN_EN | AC_PINCTL_OUT_EN))) |
3143 | val |= AC_PINCTL_IN_EN; | 3140 | val |= AC_PINCTL_IN_EN; |
3144 | val |= AC_PINCTL_VREF_50; | 3141 | val |= AC_PINCTL_VREF_50; |