From 62f3a2f718131e6f42746ccd26dbf4eb5eab677a Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 10 Jan 2013 08:56:46 +0100 Subject: ALSA: hda - More strict correction of invalid pinctl bits Check more strictly about the validity of pinctl values in snd_hda_set_pin_ctl() and correct the wrong bits automatically. Also provide the helper function to correct pinctl bits to codec drivers. This automatically fixes the invalid pinctl writes that are found in a few Realtek fixups for NID 0x0f amp like ASUS A6Rp. Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_local.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound/pci/hda/hda_local.h') diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 655a40f9302..aa721aa1921 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h @@ -490,6 +490,8 @@ struct hda_bus_unsolicited { #define PIN_HP_AMP (AC_PINCTL_HP_EN) unsigned int snd_hda_get_default_vref(struct hda_codec *codec, hda_nid_t pin); +unsigned int snd_hda_correct_pin_ctl(struct hda_codec *codec, + hda_nid_t pin, unsigned int val); int _snd_hda_set_pin_ctl(struct hda_codec *codec, hda_nid_t pin, unsigned int val, bool cached); -- cgit v1.2.3-70-g09d2