diff options
Diffstat (limited to 'sound/pci/hda/hda_codec.h')
-rw-r--r-- | sound/pci/hda/hda_codec.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 99552fb5f756..b75da47571e6 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
@@ -255,9 +255,13 @@ enum { | |||
255 | * in HD-audio specification | 255 | * in HD-audio specification |
256 | */ | 256 | */ |
257 | #define AC_PINCAP_HDMI (1<<7) /* HDMI pin */ | 257 | #define AC_PINCAP_HDMI (1<<7) /* HDMI pin */ |
258 | #define AC_PINCAP_DP (1<<24) /* DisplayPort pin, can | ||
259 | * coexist with AC_PINCAP_HDMI | ||
260 | */ | ||
258 | #define AC_PINCAP_VREF (0x37<<8) | 261 | #define AC_PINCAP_VREF (0x37<<8) |
259 | #define AC_PINCAP_VREF_SHIFT 8 | 262 | #define AC_PINCAP_VREF_SHIFT 8 |
260 | #define AC_PINCAP_EAPD (1<<16) /* EAPD capable */ | 263 | #define AC_PINCAP_EAPD (1<<16) /* EAPD capable */ |
264 | #define AC_PINCAP_HBR (1<<27) /* High Bit Rate */ | ||
261 | /* Vref status (used in pin cap) */ | 265 | /* Vref status (used in pin cap) */ |
262 | #define AC_PINCAP_VREF_HIZ (1<<0) /* Hi-Z */ | 266 | #define AC_PINCAP_VREF_HIZ (1<<0) /* Hi-Z */ |
263 | #define AC_PINCAP_VREF_50 (1<<1) /* 50% */ | 267 | #define AC_PINCAP_VREF_50 (1<<1) /* 50% */ |
@@ -286,6 +290,10 @@ enum { | |||
286 | #define AC_PWRST_D1SUP (1<<1) | 290 | #define AC_PWRST_D1SUP (1<<1) |
287 | #define AC_PWRST_D2SUP (1<<2) | 291 | #define AC_PWRST_D2SUP (1<<2) |
288 | #define AC_PWRST_D3SUP (1<<3) | 292 | #define AC_PWRST_D3SUP (1<<3) |
293 | #define AC_PWRST_D3COLDSUP (1<<4) | ||
294 | #define AC_PWRST_S3D3COLDSUP (1<<29) | ||
295 | #define AC_PWRST_CLKSTOP (1<<30) | ||
296 | #define AC_PWRST_EPSS (1U<<31) | ||
289 | 297 | ||
290 | /* Power state values */ | 298 | /* Power state values */ |
291 | #define AC_PWRST_SETTING (0xf<<0) | 299 | #define AC_PWRST_SETTING (0xf<<0) |
@@ -519,6 +527,9 @@ enum { | |||
519 | /* max. codec address */ | 527 | /* max. codec address */ |
520 | #define HDA_MAX_CODEC_ADDRESS 0x0f | 528 | #define HDA_MAX_CODEC_ADDRESS 0x0f |
521 | 529 | ||
530 | /* max number of PCM devics per card */ | ||
531 | #define HDA_MAX_PCMS 10 | ||
532 | |||
522 | /* | 533 | /* |
523 | * generic arrays | 534 | * generic arrays |
524 | */ | 535 | */ |
@@ -631,6 +642,7 @@ struct hda_bus { | |||
631 | unsigned int rirb_error:1; /* error in codec communication */ | 642 | unsigned int rirb_error:1; /* error in codec communication */ |
632 | unsigned int response_reset:1; /* controller was reset */ | 643 | unsigned int response_reset:1; /* controller was reset */ |
633 | unsigned int in_reset:1; /* during reset operation */ | 644 | unsigned int in_reset:1; /* during reset operation */ |
645 | unsigned int power_keep_link_on:1; /* don't power off HDA link */ | ||
634 | }; | 646 | }; |
635 | 647 | ||
636 | /* | 648 | /* |
@@ -674,6 +686,7 @@ struct hda_codec_ops { | |||
674 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 686 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
675 | int (*check_power_status)(struct hda_codec *codec, hda_nid_t nid); | 687 | int (*check_power_status)(struct hda_codec *codec, hda_nid_t nid); |
676 | #endif | 688 | #endif |
689 | void (*reboot_notify)(struct hda_codec *codec); | ||
677 | }; | 690 | }; |
678 | 691 | ||
679 | /* record for amp information cache */ | 692 | /* record for amp information cache */ |
@@ -771,6 +784,7 @@ struct hda_codec { | |||
771 | 784 | ||
772 | /* beep device */ | 785 | /* beep device */ |
773 | struct hda_beep *beep; | 786 | struct hda_beep *beep; |
787 | unsigned int beep_mode; | ||
774 | 788 | ||
775 | /* widget capabilities cache */ | 789 | /* widget capabilities cache */ |
776 | unsigned int num_nodes; | 790 | unsigned int num_nodes; |
@@ -778,6 +792,7 @@ struct hda_codec { | |||
778 | u32 *wcaps; | 792 | u32 *wcaps; |
779 | 793 | ||
780 | struct snd_array mixers; /* list of assigned mixer elements */ | 794 | struct snd_array mixers; /* list of assigned mixer elements */ |
795 | struct snd_array nids; /* list of mapped mixer elements */ | ||
781 | 796 | ||
782 | struct hda_cache_rec amp_cache; /* cache for amp access */ | 797 | struct hda_cache_rec amp_cache; /* cache for amp access */ |
783 | struct hda_cache_rec cmd_cache; /* cache for other commands */ | 798 | struct hda_cache_rec cmd_cache; /* cache for other commands */ |
@@ -806,11 +821,15 @@ struct hda_codec { | |||
806 | unsigned int pin_amp_workaround:1; /* pin out-amp takes index | 821 | unsigned int pin_amp_workaround:1; /* pin out-amp takes index |
807 | * (e.g. Conexant codecs) | 822 | * (e.g. Conexant codecs) |
808 | */ | 823 | */ |
824 | unsigned int no_trigger_sense:1; /* don't trigger at pin-sensing */ | ||
809 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 825 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
810 | unsigned int power_on :1; /* current (global) power-state */ | 826 | unsigned int power_on :1; /* current (global) power-state */ |
811 | unsigned int power_transition :1; /* power-state in transition */ | 827 | unsigned int power_transition :1; /* power-state in transition */ |
812 | int power_count; /* current (global) power refcount */ | 828 | int power_count; /* current (global) power refcount */ |
813 | struct delayed_work power_work; /* delayed task for powerdown */ | 829 | struct delayed_work power_work; /* delayed task for powerdown */ |
830 | unsigned long power_on_acct; | ||
831 | unsigned long power_off_acct; | ||
832 | unsigned long power_jiffies; | ||
814 | #endif | 833 | #endif |
815 | 834 | ||
816 | /* codec-specific additional proc output */ | 835 | /* codec-specific additional proc output */ |
@@ -883,6 +902,7 @@ int snd_hda_codec_set_pincfg(struct hda_codec *codec, hda_nid_t nid, | |||
883 | unsigned int cfg); | 902 | unsigned int cfg); |
884 | int snd_hda_add_pincfg(struct hda_codec *codec, struct snd_array *list, | 903 | int snd_hda_add_pincfg(struct hda_codec *codec, struct snd_array *list, |
885 | hda_nid_t nid, unsigned int cfg); /* for hwdep */ | 904 | hda_nid_t nid, unsigned int cfg); /* for hwdep */ |
905 | void snd_hda_shutup_pins(struct hda_codec *codec); | ||
886 | 906 | ||
887 | /* | 907 | /* |
888 | * Mixer | 908 | * Mixer |
@@ -910,6 +930,7 @@ int snd_hda_is_supported_format(struct hda_codec *codec, hda_nid_t nid, | |||
910 | * Misc | 930 | * Misc |
911 | */ | 931 | */ |
912 | void snd_hda_get_codec_name(struct hda_codec *codec, char *name, int namelen); | 932 | void snd_hda_get_codec_name(struct hda_codec *codec, char *name, int namelen); |
933 | void snd_hda_bus_reboot_notify(struct hda_bus *bus); | ||
913 | 934 | ||
914 | /* | 935 | /* |
915 | * power management | 936 | * power management |
@@ -933,6 +954,7 @@ const char *snd_hda_get_jack_location(u32 cfg); | |||
933 | void snd_hda_power_up(struct hda_codec *codec); | 954 | void snd_hda_power_up(struct hda_codec *codec); |
934 | void snd_hda_power_down(struct hda_codec *codec); | 955 | void snd_hda_power_down(struct hda_codec *codec); |
935 | #define snd_hda_codec_needs_resume(codec) codec->power_count | 956 | #define snd_hda_codec_needs_resume(codec) codec->power_count |
957 | void snd_hda_update_power_acct(struct hda_codec *codec); | ||
936 | #else | 958 | #else |
937 | static inline void snd_hda_power_up(struct hda_codec *codec) {} | 959 | static inline void snd_hda_power_up(struct hda_codec *codec) {} |
938 | static inline void snd_hda_power_down(struct hda_codec *codec) {} | 960 | static inline void snd_hda_power_down(struct hda_codec *codec) {} |