]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | From: Takashi Iwai <tiwai@suse.de> |
2 | Subject: ALSA: Fix plaback problems on Intel desktops with IDT codecs | |
3 | Patch-mainline: | |
4 | References: | |
5 | ||
6 | The Intel desktops with IDT 92HD* may have no output due to the wrong | |
7 | routing. Also, when the jack-sensing doesn't work for the front panel, | |
8 | no I/O is possible there. | |
9 | ||
10 | This patch fixes several issues: | |
11 | - 92HD73* Intel desktop fix | |
12 | - Add quirk for Dell Studo 17 | |
13 | - no-jd model addition | |
14 | ||
15 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | |
16 | ||
17 | --- | |
18 | ||
19 | --- | |
20 | Documentation/sound/alsa/ALSA-Configuration.txt | 2 + | |
21 | sound/pci/hda/patch_sigmatel.c | 29 +++++++++++++++++++----- | |
22 | 2 files changed, 26 insertions(+), 5 deletions(-) | |
23 | ||
24 | --- a/Documentation/sound/alsa/ALSA-Configuration.txt | |
25 | +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |
26 | @@ -1067,6 +1067,7 @@ Prior to version 0.9.0rc4 options had a | |
27 | ||
28 | STAC9227/9228/9229/927x | |
29 | ref Reference board | |
30 | + ref-no-jd Reference board without HP/Mic jack detection | |
31 | 3stack D965 3stack | |
32 | 5stack D965 5stack + SPDIF | |
33 | dell-3stack Dell Dimension E520 | |
34 | @@ -1080,6 +1081,7 @@ Prior to version 0.9.0rc4 options had a | |
35 | ||
36 | STAC92HD73* | |
37 | ref Reference board | |
38 | + no-jd BIOS setup but without jack-detection | |
39 | dell-m6-amic Dell desktops/laptops with analog mics | |
40 | dell-m6-dmic Dell desktops/laptops with digital mics | |
41 | dell-m6 Dell desktops/laptops with both type of mics | |
42 | --- a/sound/pci/hda/patch_sigmatel.c | |
43 | +++ b/sound/pci/hda/patch_sigmatel.c | |
44 | @@ -69,6 +69,7 @@ enum { | |
45 | }; | |
46 | ||
47 | enum { | |
48 | + STAC_92HD73XX_NO_JD, /* no jack-detection */ | |
49 | STAC_92HD73XX_REF, | |
50 | STAC_DELL_M6_AMIC, | |
51 | STAC_DELL_M6_DMIC, | |
52 | @@ -127,6 +128,7 @@ enum { | |
53 | }; | |
54 | ||
55 | enum { | |
56 | + STAC_D965_REF_NO_JD, /* no jack-detection */ | |
57 | STAC_D965_REF, | |
58 | STAC_D965_3ST, | |
59 | STAC_D965_5ST, | |
60 | @@ -783,8 +785,8 @@ static struct hda_verb dell_m6_core_init | |
61 | { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, | |
62 | /* setup audio connections */ | |
63 | { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00}, | |
64 | - { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x02}, | |
65 | - { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x01}, | |
66 | + { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01}, | |
67 | + { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x02}, | |
68 | /* setup adcs to point to mixer */ | |
69 | { 0x20, AC_VERB_SET_CONNECT_SEL, 0x0b}, | |
70 | { 0x21, AC_VERB_SET_CONNECT_SEL, 0x0b}, | |
71 | @@ -1613,6 +1615,7 @@ static unsigned int *stac92hd73xx_brd_tb | |
72 | }; | |
73 | ||
74 | static const char *stac92hd73xx_models[STAC_92HD73XX_MODELS] = { | |
75 | + [STAC_92HD73XX_NO_JD] = "no-jd", | |
76 | [STAC_92HD73XX_REF] = "ref", | |
77 | [STAC_DELL_M6_AMIC] = "dell-m6-amic", | |
78 | [STAC_DELL_M6_DMIC] = "dell-m6-dmic", | |
79 | @@ -1642,6 +1645,8 @@ static struct snd_pci_quirk stac92hd73xx | |
80 | "unknown Dell", STAC_DELL_M6_DMIC), | |
81 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x029f, | |
82 | "Dell Studio 1537", STAC_DELL_M6_DMIC), | |
83 | + SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02a0, | |
84 | + "Dell Studio 17", STAC_DELL_M6_DMIC), | |
85 | {} /* terminator */ | |
86 | }; | |
87 | ||
88 | @@ -2029,6 +2034,7 @@ static unsigned int dell_3st_pin_configs | |
89 | }; | |
90 | ||
91 | static unsigned int *stac927x_brd_tbl[STAC_927X_MODELS] = { | |
92 | + [STAC_D965_REF_NO_JD] = ref927x_pin_configs, | |
93 | [STAC_D965_REF] = ref927x_pin_configs, | |
94 | [STAC_D965_3ST] = d965_3st_pin_configs, | |
95 | [STAC_D965_5ST] = d965_5st_pin_configs, | |
96 | @@ -2037,6 +2043,7 @@ static unsigned int *stac927x_brd_tbl[ST | |
97 | }; | |
98 | ||
99 | static const char *stac927x_models[STAC_927X_MODELS] = { | |
100 | + [STAC_D965_REF_NO_JD] = "ref-no-jd", | |
101 | [STAC_D965_REF] = "ref", | |
102 | [STAC_D965_3ST] = "3stack", | |
103 | [STAC_D965_5ST] = "5stack", | |
104 | @@ -2899,7 +2906,7 @@ static int stac92xx_auto_create_multi_ou | |
105 | } | |
106 | ||
107 | if ((spec->multiout.num_dacs - cfg->line_outs) > 0 && | |
108 | - cfg->hp_outs && !spec->multiout.hp_nid) | |
109 | + cfg->hp_outs == 1 && !spec->multiout.hp_nid) | |
110 | spec->multiout.hp_nid = nid; | |
111 | ||
112 | if (cfg->hp_outs > 1 && cfg->line_out_type == AUTO_PIN_LINE_OUT) { | |
113 | @@ -4257,14 +4264,17 @@ again: | |
114 | ||
115 | switch (spec->multiout.num_dacs) { | |
116 | case 0x3: /* 6 Channel */ | |
117 | + spec->multiout.hp_nid = 0x17; | |
118 | spec->mixer = stac92hd73xx_6ch_mixer; | |
119 | spec->init = stac92hd73xx_6ch_core_init; | |
120 | break; | |
121 | case 0x4: /* 8 Channel */ | |
122 | + spec->multiout.hp_nid = 0x18; | |
123 | spec->mixer = stac92hd73xx_8ch_mixer; | |
124 | spec->init = stac92hd73xx_8ch_core_init; | |
125 | break; | |
126 | case 0x5: /* 10 Channel */ | |
127 | + spec->multiout.hp_nid = 0x19; | |
128 | spec->mixer = stac92hd73xx_10ch_mixer; | |
129 | spec->init = stac92hd73xx_10ch_core_init; | |
130 | }; | |
131 | @@ -4295,13 +4305,15 @@ again: | |
132 | case STAC_DELL_M6_AMIC: | |
133 | case STAC_DELL_M6_DMIC: | |
134 | case STAC_DELL_M6_BOTH: | |
135 | - if (!spec->init) | |
136 | - spec->init = dell_m6_core_init; | |
137 | spec->num_smuxes = 0; | |
138 | spec->mixer = &stac92hd73xx_6ch_mixer[DELL_M6_MIXER]; | |
139 | spec->amp_nids = &stac92hd73xx_amp_nids[DELL_M6_AMP]; | |
140 | spec->eapd_switch = 0; | |
141 | spec->num_amps = 1; | |
142 | + spec->multiout.hp_nid = 0; /* dual HPs */ | |
143 | + | |
144 | + if (!spec->init) | |
145 | + spec->init = dell_m6_core_init; | |
146 | switch (spec->board_config) { | |
147 | case STAC_DELL_M6_AMIC: /* Analog Mics */ | |
148 | stac92xx_set_config_reg(codec, 0x0b, 0x90A70170); | |
149 | @@ -4353,6 +4365,9 @@ again: | |
150 | return err; | |
151 | } | |
152 | ||
153 | + if (spec->board_config == STAC_92HD73XX_NO_JD) | |
154 | + spec->hp_detect = 0; | |
155 | + | |
156 | codec->patch_ops = stac92xx_patch_ops; | |
157 | ||
158 | return 0; | |
159 | @@ -4901,6 +4916,10 @@ static int patch_stac927x(struct hda_cod | |
160 | */ | |
161 | codec->bus->needs_damn_long_delay = 1; | |
162 | ||
163 | + /* no jack detecion for ref-no-jd model */ | |
164 | + if (spec->board_config == STAC_D965_REF_NO_JD) | |
165 | + spec->hp_detect = 0; | |
166 | + | |
167 | return 0; | |
168 | } | |
169 |