From: Takashi Iwai Date: Fri, 20 Apr 2012 10:34:50 +0000 (+0200) Subject: ALSA: hda - Introduce snd_hda_set_pin_ctl*() helper functions X-Git-Tag: v3.5-rc1~83^2~4^2~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdd03cedc5b55da017fcdeff7d47cac2639cded8;p=pandora-kernel.git ALSA: hda - Introduce snd_hda_set_pin_ctl*() helper functions For setting the pin-control values more safely to match with the actual pin capability bits, a copule of new helper functions, snd_hda_set_pin_ctl() and snd_hda_set_pin_ctl_cache(), are introduced. These are simple replacement of the codec verb write with AC_VERB_SET_PIN_WIDGET but do more sanity checks and filter out superfluous pin-control bits if they don't fit with the corresponding pin capabilities. Some codecs are screwed up or ignore the command when such a wrong bit is set. These helpers will avoid such secret errors. Signed-off-by: Takashi Iwai --- Reading git-diff-tree failed