diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-04-20 07:06:53 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-04-20 07:06:53 -0400 |
commit | 4740860b534e86d7db3b26cbd980bec8e4c807e8 (patch) | |
tree | df010ab3c53a2b4f3829593b56cdfa19f829115b /sound/pci/hda/hda_local.h | |
parent | cdd03cedc5b55da017fcdeff7d47cac2639cded8 (diff) |
ALSA: hda - Add snd_hda_get_default_vref() helper function
Add a new helper function to guess the default VREF pin control bits
for mic in. This can be used to set the pin control value safely
matching with the actual pin capabilities.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_local.h')
-rw-r--r-- | sound/pci/hda/hda_local.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 17d425775c99..a5cee952547d 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h | |||
@@ -502,6 +502,7 @@ int snd_hda_parse_pin_defcfg(struct hda_codec *codec, | |||
502 | #define PIN_HP (AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN) | 502 | #define PIN_HP (AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN) |
503 | #define PIN_HP_AMP (AC_PINCTL_HP_EN) | 503 | #define PIN_HP_AMP (AC_PINCTL_HP_EN) |
504 | 504 | ||
505 | unsigned int snd_hda_get_default_vref(struct hda_codec *codec, hda_nid_t pin); | ||
505 | int _snd_hda_set_pin_ctl(struct hda_codec *codec, hda_nid_t pin, | 506 | int _snd_hda_set_pin_ctl(struct hda_codec *codec, hda_nid_t pin, |
506 | unsigned int val, bool cached); | 507 | unsigned int val, bool cached); |
507 | 508 | ||
@@ -517,6 +518,7 @@ int _snd_hda_set_pin_ctl(struct hda_codec *codec, hda_nid_t pin, | |||
517 | * HP-drive capability, the HP bit is omitted. | 518 | * HP-drive capability, the HP bit is omitted. |
518 | * | 519 | * |
519 | * The function doesn't check the input VREF capability bits, though. | 520 | * The function doesn't check the input VREF capability bits, though. |
521 | * Use snd_hda_get_default_vref() to guess the right value. | ||
520 | * Also, this function is only for analog pins, not for HDMI pins. | 522 | * Also, this function is only for analog pins, not for HDMI pins. |
521 | */ | 523 | */ |
522 | static inline int | 524 | static inline int |