aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorKailang Yang <kailang@realtek.com.tw>2005-12-05 13:42:22 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:30:20 -0500
commitdf694daa3c0135202e4702cb2d11e68a43f6c51e (patch)
tree1c274f376771ec0ace88200dc97141702ef42a38 /sound/pci/hda/hda_codec.c
parent59acf76e0268e3f0156ef5113e89d838a8c02bb6 (diff)
[ALSA] hda-codec - Add the support of ALC262,ALC883,ALC885,ALC861
Modules: HDA Codec driver,HDA generic driver This patch adds the support of ALC262,ALC883,ALC885,ALC861 to driver More models and improvements for ALC880, ALC260 and ALC882 codecs, too. Signed-off-by: Kailang Yang <kailang@realtek.com.tw> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 5ead2a3d05ad..bd375f895ec0 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1926,8 +1926,18 @@ int snd_hda_multi_out_analog_cleanup(struct hda_codec *codec, struct hda_multi_o
1926/* 1926/*
1927 * Helper for automatic ping configuration 1927 * Helper for automatic ping configuration
1928 */ 1928 */
1929
1930static int is_in_nid_list(hda_nid_t nid, hda_nid_t *list)
1931{
1932 for (; *list; list++)
1933 if (*list == nid)
1934 return 1;
1935 return 0;
1936}
1937
1929/* parse all pin widgets and store the useful pin nids to cfg */ 1938/* parse all pin widgets and store the useful pin nids to cfg */
1930int snd_hda_parse_pin_def_config(struct hda_codec *codec, struct auto_pin_cfg *cfg) 1939int snd_hda_parse_pin_def_config(struct hda_codec *codec, struct auto_pin_cfg *cfg,
1940 hda_nid_t *ignore_nids)
1931{ 1941{
1932 hda_nid_t nid, nid_start; 1942 hda_nid_t nid, nid_start;
1933 int i, j, nodes; 1943 int i, j, nodes;
@@ -1948,6 +1958,10 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec, struct auto_pin_cfg *c
1948 /* read all default configuration for pin complex */ 1958 /* read all default configuration for pin complex */
1949 if (wid_type != AC_WID_PIN) 1959 if (wid_type != AC_WID_PIN)
1950 continue; 1960 continue;
1961 /* ignore the given nids (e.g. pc-beep returns error) */
1962 if (ignore_nids && is_in_nid_list(nid, ignore_nids))
1963 continue;
1964
1951 def_conf = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONFIG_DEFAULT, 0); 1965 def_conf = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONFIG_DEFAULT, 0);
1952 if (get_defcfg_connect(def_conf) == AC_JACK_PORT_NONE) 1966 if (get_defcfg_connect(def_conf) == AC_JACK_PORT_NONE)
1953 continue; 1967 continue;