aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-02-20 08:11:16 -0500
committerTakashi Iwai <tiwai@suse.de>2009-02-20 10:48:26 -0500
commit3be141494a080a9189b51fa78154c975ad8d9806 (patch)
tree17b62025f9616afe5938a1638195f9b1e9498f11 /sound/pci/hda/hda_codec.h
parentd2f57cd54a602c979e571aa337b206c88609876d (diff)
ALSA: hda - Add generic pincfg initialization
Added the generic pincfg cache and save/restore functions. Also introduced the pin-overriding via hwdep sysfs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.h')
-rw-r--r--sound/pci/hda/hda_codec.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 09a332ada0c6..6d01a8058f0a 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -778,11 +778,14 @@ struct hda_codec {
778 unsigned short spdif_ctls; /* SPDIF control bits */ 778 unsigned short spdif_ctls; /* SPDIF control bits */
779 unsigned int spdif_in_enable; /* SPDIF input enable? */ 779 unsigned int spdif_in_enable; /* SPDIF input enable? */
780 hda_nid_t *slave_dig_outs; /* optional digital out slave widgets */ 780 hda_nid_t *slave_dig_outs; /* optional digital out slave widgets */
781 struct snd_array init_pins; /* initial (BIOS) pin configurations */
782 struct snd_array cur_pins; /* current pin configurations */
781 783
782#ifdef CONFIG_SND_HDA_HWDEP 784#ifdef CONFIG_SND_HDA_HWDEP
783 struct snd_hwdep *hwdep; /* assigned hwdep device */ 785 struct snd_hwdep *hwdep; /* assigned hwdep device */
784 struct snd_array init_verbs; /* additional init verbs */ 786 struct snd_array init_verbs; /* additional init verbs */
785 struct snd_array hints; /* additional hints */ 787 struct snd_array hints; /* additional hints */
788 struct snd_array override_pins; /* default pin configs to override */
786#endif 789#endif
787 790
788 /* misc flags */ 791 /* misc flags */
@@ -855,6 +858,18 @@ void snd_hda_codec_resume_cache(struct hda_codec *codec);
855#define snd_hda_sequence_write_cache snd_hda_sequence_write 858#define snd_hda_sequence_write_cache snd_hda_sequence_write
856#endif 859#endif
857 860
861/* the struct for codec->pin_configs */
862struct hda_pincfg {
863 hda_nid_t nid;
864 unsigned int cfg;
865};
866
867unsigned int snd_hda_codec_get_pincfg(struct hda_codec *codec, hda_nid_t nid);
868int snd_hda_codec_set_pincfg(struct hda_codec *codec, hda_nid_t nid,
869 unsigned int cfg);
870int snd_hda_add_pincfg(struct hda_codec *codec, struct snd_array *list,
871 hda_nid_t nid, unsigned int cfg); /* for hwdep */
872
858/* 873/*
859 * Mixer 874 * Mixer
860 */ 875 */