diff options
Diffstat (limited to 'sound/pci/hda/hda_local.h')
-rw-r--r-- | sound/pci/hda/hda_local.h | 44 |
1 files changed, 3 insertions, 41 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 618ddad1723..e1abc07f743 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h | |||
@@ -394,11 +394,12 @@ struct auto_pin_cfg_item { | |||
394 | }; | 394 | }; |
395 | 395 | ||
396 | struct auto_pin_cfg; | 396 | struct auto_pin_cfg; |
397 | const char *hda_get_input_pin_label(struct hda_codec *codec, hda_nid_t pin, | ||
398 | int check_location); | ||
399 | const char *hda_get_autocfg_input_label(struct hda_codec *codec, | 397 | const char *hda_get_autocfg_input_label(struct hda_codec *codec, |
400 | const struct auto_pin_cfg *cfg, | 398 | const struct auto_pin_cfg *cfg, |
401 | int input); | 399 | int input); |
400 | int snd_hda_get_pin_label(struct hda_codec *codec, hda_nid_t nid, | ||
401 | const struct auto_pin_cfg *cfg, | ||
402 | char *label, int maxlen, int *indexp); | ||
402 | int snd_hda_add_imux_item(struct hda_input_mux *imux, const char *label, | 403 | int snd_hda_add_imux_item(struct hda_input_mux *imux, const char *label, |
403 | int index, int *type_index_ret); | 404 | int index, int *type_index_ret); |
404 | 405 | ||
@@ -505,21 +506,6 @@ int snd_hda_override_amp_caps(struct hda_codec *codec, hda_nid_t nid, int dir, | |||
505 | u32 snd_hda_query_pin_caps(struct hda_codec *codec, hda_nid_t nid); | 506 | u32 snd_hda_query_pin_caps(struct hda_codec *codec, hda_nid_t nid); |
506 | int snd_hda_override_pin_caps(struct hda_codec *codec, hda_nid_t nid, | 507 | int snd_hda_override_pin_caps(struct hda_codec *codec, hda_nid_t nid, |
507 | unsigned int caps); | 508 | unsigned int caps); |
508 | u32 snd_hda_pin_sense(struct hda_codec *codec, hda_nid_t nid); | ||
509 | int snd_hda_jack_detect(struct hda_codec *codec, hda_nid_t nid); | ||
510 | |||
511 | static inline bool is_jack_detectable(struct hda_codec *codec, hda_nid_t nid) | ||
512 | { | ||
513 | if (!(snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_PRES_DETECT)) | ||
514 | return false; | ||
515 | if (!codec->ignore_misc_bit && | ||
516 | (get_defcfg_misc(snd_hda_codec_get_pincfg(codec, nid)) & | ||
517 | AC_DEFCFG_MISC_NO_PRESENCE)) | ||
518 | return false; | ||
519 | if (!(get_wcaps(codec, nid) & AC_WCAP_UNSOL_CAP)) | ||
520 | return false; | ||
521 | return true; | ||
522 | } | ||
523 | 509 | ||
524 | /* flags for hda_nid_item */ | 510 | /* flags for hda_nid_item */ |
525 | #define HDA_NID_ITEM_AMP (1<<0) | 511 | #define HDA_NID_ITEM_AMP (1<<0) |
@@ -688,28 +674,4 @@ static inline void snd_hda_eld_proc_free(struct hda_codec *codec, | |||
688 | #define SND_PRINT_CHANNEL_ALLOCATION_ADVISED_BUFSIZE 80 | 674 | #define SND_PRINT_CHANNEL_ALLOCATION_ADVISED_BUFSIZE 80 |
689 | void snd_print_channel_allocation(int spk_alloc, char *buf, int buflen); | 675 | void snd_print_channel_allocation(int spk_alloc, char *buf, int buflen); |
690 | 676 | ||
691 | /* | ||
692 | * Input-jack notification support | ||
693 | */ | ||
694 | #ifdef CONFIG_SND_HDA_INPUT_JACK | ||
695 | int snd_hda_input_jack_add(struct hda_codec *codec, hda_nid_t nid, int type, | ||
696 | const char *name); | ||
697 | void snd_hda_input_jack_report(struct hda_codec *codec, hda_nid_t nid); | ||
698 | void snd_hda_input_jack_free(struct hda_codec *codec); | ||
699 | #else /* CONFIG_SND_HDA_INPUT_JACK */ | ||
700 | static inline int snd_hda_input_jack_add(struct hda_codec *codec, | ||
701 | hda_nid_t nid, int type, | ||
702 | const char *name) | ||
703 | { | ||
704 | return 0; | ||
705 | } | ||
706 | static inline void snd_hda_input_jack_report(struct hda_codec *codec, | ||
707 | hda_nid_t nid) | ||
708 | { | ||
709 | } | ||
710 | static inline void snd_hda_input_jack_free(struct hda_codec *codec) | ||
711 | { | ||
712 | } | ||
713 | #endif /* CONFIG_SND_HDA_INPUT_JACK */ | ||
714 | |||
715 | #endif /* __SOUND_HDA_LOCAL_H */ | 677 | #endif /* __SOUND_HDA_LOCAL_H */ |