.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Universal Interface for Intel High Definition Audio Codec |
---|
3 | 4 | * |
---|
.. | .. |
---|
7 | 8 | * PeiSen Hou <pshou@realtek.com.tw> |
---|
8 | 9 | * Takashi Iwai <tiwai@suse.de> |
---|
9 | 10 | * Jonathan Woithe <jwoithe@just42.net> |
---|
10 | | - * |
---|
11 | | - * This driver is free software; you can redistribute it and/or modify |
---|
12 | | - * it under the terms of the GNU General Public License as published by |
---|
13 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
14 | | - * (at your option) any later version. |
---|
15 | | - * |
---|
16 | | - * This driver is distributed in the hope that it will be useful, |
---|
17 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
18 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
19 | | - * GNU General Public License for more details. |
---|
20 | | - * |
---|
21 | | - * You should have received a copy of the GNU General Public License |
---|
22 | | - * along with this program; if not, write to the Free Software |
---|
23 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
24 | 11 | */ |
---|
25 | 12 | |
---|
26 | 13 | #include <linux/init.h> |
---|
.. | .. |
---|
30 | 17 | #include <linux/dmi.h> |
---|
31 | 18 | #include <linux/module.h> |
---|
32 | 19 | #include <linux/input.h> |
---|
| 20 | +#include <linux/leds.h> |
---|
33 | 21 | #include <sound/core.h> |
---|
34 | 22 | #include <sound/jack.h> |
---|
35 | | -#include "hda_codec.h" |
---|
| 23 | +#include <sound/hda_codec.h> |
---|
36 | 24 | #include "hda_local.h" |
---|
37 | 25 | #include "hda_auto_parser.h" |
---|
38 | 26 | #include "hda_jack.h" |
---|
.. | .. |
---|
79 | 67 | unsigned int fixup:1; /* Means that this sku is set by driver, not read from hw */ |
---|
80 | 68 | }; |
---|
81 | 69 | |
---|
| 70 | +struct alc_coef_led { |
---|
| 71 | + unsigned int idx; |
---|
| 72 | + unsigned int mask; |
---|
| 73 | + unsigned int on; |
---|
| 74 | + unsigned int off; |
---|
| 75 | +}; |
---|
| 76 | + |
---|
82 | 77 | struct alc_spec { |
---|
83 | 78 | struct hda_gen_spec gen; /* must be at head */ |
---|
84 | 79 | |
---|
.. | .. |
---|
92 | 87 | unsigned int gpio_data; |
---|
93 | 88 | bool gpio_write_delay; /* add a delay before writing gpio_data */ |
---|
94 | 89 | |
---|
95 | | - /* mute LED for HP laptops, see alc269_fixup_mic_mute_hook() */ |
---|
| 90 | + /* mute LED for HP laptops, see vref_mute_led_set() */ |
---|
96 | 91 | int mute_led_polarity; |
---|
97 | 92 | int micmute_led_polarity; |
---|
98 | 93 | hda_nid_t mute_led_nid; |
---|
.. | .. |
---|
100 | 95 | |
---|
101 | 96 | unsigned int gpio_mute_led_mask; |
---|
102 | 97 | unsigned int gpio_mic_led_mask; |
---|
| 98 | + struct alc_coef_led mute_led_coef; |
---|
| 99 | + struct alc_coef_led mic_led_coef; |
---|
| 100 | + struct mutex coef_mutex; |
---|
103 | 101 | |
---|
104 | 102 | hda_nid_t headset_mic_pin; |
---|
105 | 103 | hda_nid_t headphone_mic_pin; |
---|
.. | .. |
---|
120 | 118 | unsigned int no_depop_delay:1; |
---|
121 | 119 | unsigned int done_hp_init:1; |
---|
122 | 120 | unsigned int no_shutup_pins:1; |
---|
| 121 | + unsigned int ultra_low_power:1; |
---|
| 122 | + unsigned int has_hs_key:1; |
---|
| 123 | + unsigned int no_internal_mic_pin:1; |
---|
123 | 124 | |
---|
124 | 125 | /* for PLL fix */ |
---|
125 | 126 | hda_nid_t pll_nid; |
---|
.. | .. |
---|
133 | 134 | * COEF access helper functions |
---|
134 | 135 | */ |
---|
135 | 136 | |
---|
136 | | -static int alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid, |
---|
137 | | - unsigned int coef_idx) |
---|
| 137 | +static void coef_mutex_lock(struct hda_codec *codec) |
---|
| 138 | +{ |
---|
| 139 | + struct alc_spec *spec = codec->spec; |
---|
| 140 | + |
---|
| 141 | + snd_hda_power_up_pm(codec); |
---|
| 142 | + mutex_lock(&spec->coef_mutex); |
---|
| 143 | +} |
---|
| 144 | + |
---|
| 145 | +static void coef_mutex_unlock(struct hda_codec *codec) |
---|
| 146 | +{ |
---|
| 147 | + struct alc_spec *spec = codec->spec; |
---|
| 148 | + |
---|
| 149 | + mutex_unlock(&spec->coef_mutex); |
---|
| 150 | + snd_hda_power_down_pm(codec); |
---|
| 151 | +} |
---|
| 152 | + |
---|
| 153 | +static int __alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid, |
---|
| 154 | + unsigned int coef_idx) |
---|
138 | 155 | { |
---|
139 | 156 | unsigned int val; |
---|
140 | 157 | |
---|
.. | .. |
---|
143 | 160 | return val; |
---|
144 | 161 | } |
---|
145 | 162 | |
---|
| 163 | +static int alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid, |
---|
| 164 | + unsigned int coef_idx) |
---|
| 165 | +{ |
---|
| 166 | + unsigned int val; |
---|
| 167 | + |
---|
| 168 | + coef_mutex_lock(codec); |
---|
| 169 | + val = __alc_read_coefex_idx(codec, nid, coef_idx); |
---|
| 170 | + coef_mutex_unlock(codec); |
---|
| 171 | + return val; |
---|
| 172 | +} |
---|
| 173 | + |
---|
146 | 174 | #define alc_read_coef_idx(codec, coef_idx) \ |
---|
147 | 175 | alc_read_coefex_idx(codec, 0x20, coef_idx) |
---|
148 | 176 | |
---|
149 | | -static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid, |
---|
150 | | - unsigned int coef_idx, unsigned int coef_val) |
---|
| 177 | +static void __alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid, |
---|
| 178 | + unsigned int coef_idx, unsigned int coef_val) |
---|
151 | 179 | { |
---|
152 | 180 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, coef_idx); |
---|
153 | 181 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PROC_COEF, coef_val); |
---|
154 | 182 | } |
---|
155 | 183 | |
---|
| 184 | +static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid, |
---|
| 185 | + unsigned int coef_idx, unsigned int coef_val) |
---|
| 186 | +{ |
---|
| 187 | + coef_mutex_lock(codec); |
---|
| 188 | + __alc_write_coefex_idx(codec, nid, coef_idx, coef_val); |
---|
| 189 | + coef_mutex_unlock(codec); |
---|
| 190 | +} |
---|
| 191 | + |
---|
156 | 192 | #define alc_write_coef_idx(codec, coef_idx, coef_val) \ |
---|
157 | 193 | alc_write_coefex_idx(codec, 0x20, coef_idx, coef_val) |
---|
| 194 | + |
---|
| 195 | +static void __alc_update_coefex_idx(struct hda_codec *codec, hda_nid_t nid, |
---|
| 196 | + unsigned int coef_idx, unsigned int mask, |
---|
| 197 | + unsigned int bits_set) |
---|
| 198 | +{ |
---|
| 199 | + unsigned int val = __alc_read_coefex_idx(codec, nid, coef_idx); |
---|
| 200 | + |
---|
| 201 | + if (val != -1) |
---|
| 202 | + __alc_write_coefex_idx(codec, nid, coef_idx, |
---|
| 203 | + (val & ~mask) | bits_set); |
---|
| 204 | +} |
---|
158 | 205 | |
---|
159 | 206 | static void alc_update_coefex_idx(struct hda_codec *codec, hda_nid_t nid, |
---|
160 | 207 | unsigned int coef_idx, unsigned int mask, |
---|
161 | 208 | unsigned int bits_set) |
---|
162 | 209 | { |
---|
163 | | - unsigned int val = alc_read_coefex_idx(codec, nid, coef_idx); |
---|
164 | | - |
---|
165 | | - if (val != -1) |
---|
166 | | - alc_write_coefex_idx(codec, nid, coef_idx, |
---|
167 | | - (val & ~mask) | bits_set); |
---|
| 210 | + coef_mutex_lock(codec); |
---|
| 211 | + __alc_update_coefex_idx(codec, nid, coef_idx, mask, bits_set); |
---|
| 212 | + coef_mutex_unlock(codec); |
---|
168 | 213 | } |
---|
169 | 214 | |
---|
170 | 215 | #define alc_update_coef_idx(codec, coef_idx, mask, bits_set) \ |
---|
.. | .. |
---|
197 | 242 | static void alc_process_coef_fw(struct hda_codec *codec, |
---|
198 | 243 | const struct coef_fw *fw) |
---|
199 | 244 | { |
---|
| 245 | + coef_mutex_lock(codec); |
---|
200 | 246 | for (; fw->nid; fw++) { |
---|
201 | 247 | if (fw->mask == (unsigned short)-1) |
---|
202 | | - alc_write_coefex_idx(codec, fw->nid, fw->idx, fw->val); |
---|
| 248 | + __alc_write_coefex_idx(codec, fw->nid, fw->idx, fw->val); |
---|
203 | 249 | else |
---|
204 | | - alc_update_coefex_idx(codec, fw->nid, fw->idx, |
---|
205 | | - fw->mask, fw->val); |
---|
| 250 | + __alc_update_coefex_idx(codec, fw->nid, fw->idx, |
---|
| 251 | + fw->mask, fw->val); |
---|
206 | 252 | } |
---|
| 253 | + coef_mutex_unlock(codec); |
---|
207 | 254 | } |
---|
208 | 255 | |
---|
209 | 256 | /* |
---|
.. | .. |
---|
287 | 334 | const struct hda_fixup *fix, int action) |
---|
288 | 335 | { |
---|
289 | 336 | alc_fixup_gpio(codec, action, 0x04); |
---|
| 337 | +} |
---|
| 338 | + |
---|
| 339 | +static void alc_fixup_micmute_led(struct hda_codec *codec, |
---|
| 340 | + const struct hda_fixup *fix, int action) |
---|
| 341 | +{ |
---|
| 342 | + if (action == HDA_FIXUP_ACT_PROBE) |
---|
| 343 | + snd_hda_gen_add_micmute_led_cdev(codec, NULL); |
---|
290 | 344 | } |
---|
291 | 345 | |
---|
292 | 346 | /* |
---|
.. | .. |
---|
376 | 430 | case 0x10ec0295: |
---|
377 | 431 | case 0x10ec0299: |
---|
378 | 432 | alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000); |
---|
379 | | - /* fallthrough */ |
---|
| 433 | + fallthrough; |
---|
380 | 434 | case 0x10ec0215: |
---|
| 435 | + case 0x10ec0230: |
---|
381 | 436 | case 0x10ec0233: |
---|
382 | 437 | case 0x10ec0235: |
---|
383 | 438 | case 0x10ec0236: |
---|
384 | 439 | case 0x10ec0245: |
---|
385 | 440 | case 0x10ec0255: |
---|
386 | 441 | case 0x10ec0256: |
---|
| 442 | + case 0x19e58326: |
---|
387 | 443 | case 0x10ec0257: |
---|
388 | 444 | case 0x10ec0282: |
---|
389 | 445 | case 0x10ec0283: |
---|
.. | .. |
---|
482 | 538 | static void alc_auto_setup_eapd(struct hda_codec *codec, bool on) |
---|
483 | 539 | { |
---|
484 | 540 | /* We currently only handle front, HP */ |
---|
485 | | - static hda_nid_t pins[] = { |
---|
| 541 | + static const hda_nid_t pins[] = { |
---|
486 | 542 | 0x0f, 0x10, 0x14, 0x15, 0x17, 0 |
---|
487 | 543 | }; |
---|
488 | | - hda_nid_t *p; |
---|
| 544 | + const hda_nid_t *p; |
---|
489 | 545 | for (p = pins; *p; p++) |
---|
490 | 546 | set_eapd(codec, *p, on); |
---|
491 | 547 | } |
---|
.. | .. |
---|
521 | 577 | switch (codec->core.vendor_id) { |
---|
522 | 578 | case 0x10ec0236: |
---|
523 | 579 | case 0x10ec0256: |
---|
| 580 | + case 0x19e58326: |
---|
524 | 581 | case 0x10ec0283: |
---|
525 | 582 | case 0x10ec0286: |
---|
526 | 583 | case 0x10ec0288: |
---|
.. | .. |
---|
550 | 607 | /* generic EAPD initialization */ |
---|
551 | 608 | static void alc_auto_init_amp(struct hda_codec *codec, int type) |
---|
552 | 609 | { |
---|
553 | | - alc_fill_eapd_coef(codec); |
---|
554 | 610 | alc_auto_setup_eapd(codec, true); |
---|
555 | 611 | alc_write_gpio(codec); |
---|
556 | 612 | switch (type) { |
---|
.. | .. |
---|
847 | 903 | * Common callbacks |
---|
848 | 904 | */ |
---|
849 | 905 | |
---|
| 906 | +static void alc_pre_init(struct hda_codec *codec) |
---|
| 907 | +{ |
---|
| 908 | + alc_fill_eapd_coef(codec); |
---|
| 909 | +} |
---|
| 910 | + |
---|
| 911 | +#define is_s3_resume(codec) \ |
---|
| 912 | + ((codec)->core.dev.power.power_state.event == PM_EVENT_RESUME) |
---|
| 913 | +#define is_s4_resume(codec) \ |
---|
| 914 | + ((codec)->core.dev.power.power_state.event == PM_EVENT_RESTORE) |
---|
| 915 | + |
---|
850 | 916 | static int alc_init(struct hda_codec *codec) |
---|
851 | 917 | { |
---|
852 | 918 | struct alc_spec *spec = codec->spec; |
---|
| 919 | + |
---|
| 920 | + /* hibernation resume needs the full chip initialization */ |
---|
| 921 | + if (is_s4_resume(codec)) |
---|
| 922 | + alc_pre_init(codec); |
---|
853 | 923 | |
---|
854 | 924 | if (spec->init_hook) |
---|
855 | 925 | spec->init_hook(codec); |
---|
.. | .. |
---|
914 | 984 | if (!spec->no_depop_delay) |
---|
915 | 985 | msleep(150); /* to avoid pop noise */ |
---|
916 | 986 | codec->patch_ops.init(codec); |
---|
917 | | - regcache_sync(codec->core.regmap); |
---|
| 987 | + snd_hda_regmap_sync(codec); |
---|
918 | 988 | hda_call_check_power_status(codec, 0x01); |
---|
919 | 989 | return 0; |
---|
920 | 990 | } |
---|
.. | .. |
---|
956 | 1026 | const char *name; |
---|
957 | 1027 | }; |
---|
958 | 1028 | |
---|
959 | | -static struct alc_codec_rename_table rename_tbl[] = { |
---|
| 1029 | +static const struct alc_codec_rename_table rename_tbl[] = { |
---|
960 | 1030 | { 0x10ec0221, 0xf00f, 0x1003, "ALC231" }, |
---|
961 | 1031 | { 0x10ec0269, 0xfff0, 0x3010, "ALC277" }, |
---|
962 | 1032 | { 0x10ec0269, 0xf0f0, 0x2010, "ALC259" }, |
---|
.. | .. |
---|
977 | 1047 | { } /* terminator */ |
---|
978 | 1048 | }; |
---|
979 | 1049 | |
---|
980 | | -static struct alc_codec_rename_pci_table rename_pci_tbl[] = { |
---|
| 1050 | +static const struct alc_codec_rename_pci_table rename_pci_tbl[] = { |
---|
981 | 1051 | { 0x10ec0280, 0x1028, 0, "ALC3220" }, |
---|
982 | 1052 | { 0x10ec0282, 0x1028, 0, "ALC3221" }, |
---|
983 | 1053 | { 0x10ec0283, 0x1028, 0, "ALC3223" }, |
---|
.. | .. |
---|
1065 | 1135 | return 0; |
---|
1066 | 1136 | } |
---|
1067 | 1137 | |
---|
1068 | | -static const struct snd_pci_quirk beep_white_list[] = { |
---|
| 1138 | +static const struct snd_pci_quirk beep_allow_list[] = { |
---|
1069 | 1139 | SND_PCI_QUIRK(0x1043, 0x103c, "ASUS", 1), |
---|
1070 | 1140 | SND_PCI_QUIRK(0x1043, 0x115d, "ASUS", 1), |
---|
1071 | 1141 | SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1), |
---|
.. | .. |
---|
1075 | 1145 | SND_PCI_QUIRK(0x1043, 0x834a, "EeePC", 1), |
---|
1076 | 1146 | SND_PCI_QUIRK(0x1458, 0xa002, "GA-MA790X", 1), |
---|
1077 | 1147 | SND_PCI_QUIRK(0x8086, 0xd613, "Intel", 1), |
---|
1078 | | - /* blacklist -- no beep available */ |
---|
| 1148 | + /* denylist -- no beep available */ |
---|
1079 | 1149 | SND_PCI_QUIRK(0x17aa, 0x309e, "Lenovo ThinkCentre M73", 0), |
---|
1080 | 1150 | SND_PCI_QUIRK(0x17aa, 0x30a3, "Lenovo ThinkCentre M93", 0), |
---|
1081 | 1151 | {} |
---|
.. | .. |
---|
1085 | 1155 | { |
---|
1086 | 1156 | struct alc_spec *spec = codec->spec; |
---|
1087 | 1157 | const struct snd_pci_quirk *q; |
---|
1088 | | - q = snd_pci_quirk_lookup(codec->bus->pci, beep_white_list); |
---|
| 1158 | + q = snd_pci_quirk_lookup(codec->bus->pci, beep_allow_list); |
---|
1089 | 1159 | if (q) |
---|
1090 | 1160 | return q->value; |
---|
1091 | 1161 | return spec->cdefine.enable_pcbeep; |
---|
.. | .. |
---|
1137 | 1207 | codec->single_adc_amp = 1; |
---|
1138 | 1208 | /* FIXME: do we need this for all Realtek codec models? */ |
---|
1139 | 1209 | codec->spdif_status_reset = 1; |
---|
| 1210 | + codec->forced_resume = 1; |
---|
1140 | 1211 | codec->patch_ops = alc_patch_ops; |
---|
| 1212 | + mutex_init(&spec->coef_mutex); |
---|
1141 | 1213 | |
---|
1142 | 1214 | err = alc_codec_rename_from_preset(codec); |
---|
1143 | 1215 | if (err < 0) { |
---|
.. | .. |
---|
1584 | 1656 | |
---|
1585 | 1657 | codec->patch_ops.unsol_event = alc880_unsol_event; |
---|
1586 | 1658 | |
---|
| 1659 | + alc_pre_init(codec); |
---|
| 1660 | + |
---|
1587 | 1661 | snd_hda_pick_fixup(codec, alc880_fixup_models, alc880_fixup_tbl, |
---|
1588 | 1662 | alc880_fixups); |
---|
1589 | 1663 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); |
---|
.. | .. |
---|
1835 | 1909 | |
---|
1836 | 1910 | spec->shutup = alc_eapd_shutup; |
---|
1837 | 1911 | |
---|
| 1912 | + alc_pre_init(codec); |
---|
| 1913 | + |
---|
1838 | 1914 | snd_hda_pick_fixup(codec, alc260_fixup_models, alc260_fixup_tbl, |
---|
1839 | 1915 | alc260_fixups); |
---|
1840 | 1916 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); |
---|
.. | .. |
---|
1916 | 1992 | ALC1220_FIXUP_CLEVO_PB51ED_PINS, |
---|
1917 | 1993 | ALC887_FIXUP_ASUS_AUDIO, |
---|
1918 | 1994 | ALC887_FIXUP_ASUS_HMIC, |
---|
| 1995 | + ALCS1200A_FIXUP_MIC_VREF, |
---|
1919 | 1996 | }; |
---|
1920 | 1997 | |
---|
1921 | 1998 | static void alc889_fixup_coef(struct hda_codec *codec, |
---|
.. | .. |
---|
1945 | 2022 | { |
---|
1946 | 2023 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
1947 | 2024 | /* fake the connections during parsing the tree */ |
---|
1948 | | - hda_nid_t conn1[2] = { 0x0c, 0x0d }; |
---|
1949 | | - hda_nid_t conn2[2] = { 0x0e, 0x0f }; |
---|
1950 | | - snd_hda_override_conn_list(codec, 0x14, 2, conn1); |
---|
1951 | | - snd_hda_override_conn_list(codec, 0x15, 2, conn1); |
---|
1952 | | - snd_hda_override_conn_list(codec, 0x18, 2, conn2); |
---|
1953 | | - snd_hda_override_conn_list(codec, 0x1a, 2, conn2); |
---|
| 2025 | + static const hda_nid_t conn1[] = { 0x0c, 0x0d }; |
---|
| 2026 | + static const hda_nid_t conn2[] = { 0x0e, 0x0f }; |
---|
| 2027 | + snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1); |
---|
| 2028 | + snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn1), conn1); |
---|
| 2029 | + snd_hda_override_conn_list(codec, 0x18, ARRAY_SIZE(conn2), conn2); |
---|
| 2030 | + snd_hda_override_conn_list(codec, 0x1a, ARRAY_SIZE(conn2), conn2); |
---|
1954 | 2031 | } else if (action == HDA_FIXUP_ACT_PROBE) { |
---|
1955 | 2032 | /* restore the connections */ |
---|
1956 | | - hda_nid_t conn[5] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 }; |
---|
1957 | | - snd_hda_override_conn_list(codec, 0x14, 5, conn); |
---|
1958 | | - snd_hda_override_conn_list(codec, 0x15, 5, conn); |
---|
1959 | | - snd_hda_override_conn_list(codec, 0x18, 5, conn); |
---|
1960 | | - snd_hda_override_conn_list(codec, 0x1a, 5, conn); |
---|
| 2033 | + static const hda_nid_t conn[] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 }; |
---|
| 2034 | + snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn); |
---|
| 2035 | + snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn), conn); |
---|
| 2036 | + snd_hda_override_conn_list(codec, 0x18, ARRAY_SIZE(conn), conn); |
---|
| 2037 | + snd_hda_override_conn_list(codec, 0x1a, ARRAY_SIZE(conn), conn); |
---|
1961 | 2038 | } |
---|
1962 | 2039 | } |
---|
1963 | 2040 | |
---|
.. | .. |
---|
1965 | 2042 | static void alc889_fixup_mbp_vref(struct hda_codec *codec, |
---|
1966 | 2043 | const struct hda_fixup *fix, int action) |
---|
1967 | 2044 | { |
---|
| 2045 | + static const hda_nid_t nids[] = { 0x14, 0x15, 0x19 }; |
---|
1968 | 2046 | struct alc_spec *spec = codec->spec; |
---|
1969 | | - static hda_nid_t nids[3] = { 0x14, 0x15, 0x19 }; |
---|
1970 | 2047 | int i; |
---|
1971 | 2048 | |
---|
1972 | 2049 | if (action != HDA_FIXUP_ACT_INIT) |
---|
.. | .. |
---|
2002 | 2079 | static void alc889_fixup_imac91_vref(struct hda_codec *codec, |
---|
2003 | 2080 | const struct hda_fixup *fix, int action) |
---|
2004 | 2081 | { |
---|
2005 | | - static hda_nid_t nids[2] = { 0x18, 0x1a }; |
---|
| 2082 | + static const hda_nid_t nids[] = { 0x18, 0x1a }; |
---|
2006 | 2083 | |
---|
2007 | 2084 | if (action == HDA_FIXUP_ACT_INIT) |
---|
2008 | 2085 | alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); |
---|
.. | .. |
---|
2012 | 2089 | static void alc889_fixup_mba11_vref(struct hda_codec *codec, |
---|
2013 | 2090 | const struct hda_fixup *fix, int action) |
---|
2014 | 2091 | { |
---|
2015 | | - static hda_nid_t nids[1] = { 0x18 }; |
---|
| 2092 | + static const hda_nid_t nids[] = { 0x18 }; |
---|
2016 | 2093 | |
---|
2017 | 2094 | if (action == HDA_FIXUP_ACT_INIT) |
---|
2018 | 2095 | alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); |
---|
.. | .. |
---|
2022 | 2099 | static void alc889_fixup_mba21_vref(struct hda_codec *codec, |
---|
2023 | 2100 | const struct hda_fixup *fix, int action) |
---|
2024 | 2101 | { |
---|
2025 | | - static hda_nid_t nids[2] = { 0x18, 0x19 }; |
---|
| 2102 | + static const hda_nid_t nids[] = { 0x18, 0x19 }; |
---|
2026 | 2103 | |
---|
2027 | 2104 | if (action == HDA_FIXUP_ACT_INIT) |
---|
2028 | 2105 | alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); |
---|
.. | .. |
---|
2128 | 2205 | const struct hda_fixup *fix, |
---|
2129 | 2206 | int action) |
---|
2130 | 2207 | { |
---|
2131 | | - hda_nid_t conn1[1] = { 0x0c }; |
---|
| 2208 | + static const hda_nid_t conn1[] = { 0x0c }; |
---|
2132 | 2209 | |
---|
2133 | 2210 | if (action != HDA_FIXUP_ACT_PRE_PROBE) |
---|
2134 | 2211 | return; |
---|
.. | .. |
---|
2137 | 2214 | /* We therefore want to make sure 0x14 (front headphone) and |
---|
2138 | 2215 | * 0x1b (speakers) use the stereo DAC 0x02 |
---|
2139 | 2216 | */ |
---|
2140 | | - snd_hda_override_conn_list(codec, 0x14, 1, conn1); |
---|
2141 | | - snd_hda_override_conn_list(codec, 0x1b, 1, conn1); |
---|
| 2217 | + snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1); |
---|
| 2218 | + snd_hda_override_conn_list(codec, 0x1b, ARRAY_SIZE(conn1), conn1); |
---|
2142 | 2219 | } |
---|
2143 | 2220 | |
---|
2144 | 2221 | static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec, |
---|
.. | .. |
---|
2461 | 2538 | .chained = true, |
---|
2462 | 2539 | .chain_id = ALC887_FIXUP_ASUS_AUDIO, |
---|
2463 | 2540 | }, |
---|
| 2541 | + [ALCS1200A_FIXUP_MIC_VREF] = { |
---|
| 2542 | + .type = HDA_FIXUP_PINCTLS, |
---|
| 2543 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 2544 | + { 0x18, PIN_VREF50 }, /* rear mic */ |
---|
| 2545 | + { 0x19, PIN_VREF50 }, /* front mic */ |
---|
| 2546 | + {} |
---|
| 2547 | + } |
---|
| 2548 | + }, |
---|
2464 | 2549 | }; |
---|
2465 | 2550 | |
---|
2466 | 2551 | static const struct snd_pci_quirk alc882_fixup_tbl[] = { |
---|
.. | .. |
---|
2498 | 2583 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601), |
---|
2499 | 2584 | SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS), |
---|
2500 | 2585 | SND_PCI_QUIRK(0x1043, 0x8691, "ASUS ROG Ranger VIII", ALC882_FIXUP_GPIO3), |
---|
| 2586 | + SND_PCI_QUIRK(0x1043, 0x8797, "ASUS TUF B550M-PLUS", ALCS1200A_FIXUP_MIC_VREF), |
---|
2501 | 2587 | SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP), |
---|
2502 | 2588 | SND_PCI_QUIRK(0x104d, 0x9044, "Sony VAIO AiO", ALC882_FIXUP_NO_PRIMARY_HP), |
---|
2503 | 2589 | SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT), |
---|
.. | .. |
---|
2552 | 2638 | SND_PCI_QUIRK(0x1558, 0x65e1, "Clevo PB51[ED][DF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2553 | 2639 | SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2554 | 2640 | SND_PCI_QUIRK(0x1558, 0x65f1, "Clevo PC50HS", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
| 2641 | + SND_PCI_QUIRK(0x1558, 0x65f5, "Clevo PD50PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2555 | 2642 | SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2556 | 2643 | SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2557 | 2644 | SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2558 | 2645 | SND_PCI_QUIRK(0x1558, 0x67f1, "Clevo PC70H[PRS]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
| 2646 | + SND_PCI_QUIRK(0x1558, 0x67f5, "Clevo PD70PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2559 | 2647 | SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2560 | 2648 | SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170SM", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2561 | 2649 | SND_PCI_QUIRK(0x1558, 0x7715, "Clevo X170KM-G", ALC1220_FIXUP_CLEVO_PB51ED), |
---|
.. | .. |
---|
2614 | 2702 | {} |
---|
2615 | 2703 | }; |
---|
2616 | 2704 | |
---|
| 2705 | +static const struct snd_hda_pin_quirk alc882_pin_fixup_tbl[] = { |
---|
| 2706 | + SND_HDA_PIN_QUIRK(0x10ec1220, 0x1043, "ASUS", ALC1220_FIXUP_CLEVO_P950, |
---|
| 2707 | + {0x14, 0x01014010}, |
---|
| 2708 | + {0x15, 0x01011012}, |
---|
| 2709 | + {0x16, 0x01016011}, |
---|
| 2710 | + {0x18, 0x01a19040}, |
---|
| 2711 | + {0x19, 0x02a19050}, |
---|
| 2712 | + {0x1a, 0x0181304f}, |
---|
| 2713 | + {0x1b, 0x0221401f}, |
---|
| 2714 | + {0x1e, 0x01456130}), |
---|
| 2715 | + SND_HDA_PIN_QUIRK(0x10ec1220, 0x1462, "MS-7C35", ALC1220_FIXUP_CLEVO_P950, |
---|
| 2716 | + {0x14, 0x01015010}, |
---|
| 2717 | + {0x15, 0x01011012}, |
---|
| 2718 | + {0x16, 0x01011011}, |
---|
| 2719 | + {0x18, 0x01a11040}, |
---|
| 2720 | + {0x19, 0x02a19050}, |
---|
| 2721 | + {0x1a, 0x0181104f}, |
---|
| 2722 | + {0x1b, 0x0221401f}, |
---|
| 2723 | + {0x1e, 0x01451130}), |
---|
| 2724 | + {} |
---|
| 2725 | +}; |
---|
| 2726 | + |
---|
2617 | 2727 | /* |
---|
2618 | 2728 | * BIOS auto configuration |
---|
2619 | 2729 | */ |
---|
.. | .. |
---|
2651 | 2761 | break; |
---|
2652 | 2762 | } |
---|
2653 | 2763 | |
---|
| 2764 | + alc_pre_init(codec); |
---|
| 2765 | + |
---|
2654 | 2766 | snd_hda_pick_fixup(codec, alc882_fixup_models, alc882_fixup_tbl, |
---|
2655 | 2767 | alc882_fixups); |
---|
| 2768 | + snd_hda_pick_pin_fixup(codec, alc882_pin_fixup_tbl, alc882_fixups, true); |
---|
2656 | 2769 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); |
---|
2657 | 2770 | |
---|
2658 | 2771 | alc_auto_parse_customize_define(codec); |
---|
.. | .. |
---|
2825 | 2938 | #endif |
---|
2826 | 2939 | alc_fix_pll_init(codec, 0x20, 0x0a, 10); |
---|
2827 | 2940 | |
---|
| 2941 | + alc_pre_init(codec); |
---|
| 2942 | + |
---|
2828 | 2943 | snd_hda_pick_fixup(codec, alc262_fixup_models, alc262_fixup_tbl, |
---|
2829 | 2944 | alc262_fixups); |
---|
2830 | 2945 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); |
---|
.. | .. |
---|
2965 | 3080 | return err; |
---|
2966 | 3081 | |
---|
2967 | 3082 | spec = codec->spec; |
---|
2968 | | - spec->gen.beep_nid = 0x01; |
---|
| 3083 | + if (has_cdefine_beep(codec)) |
---|
| 3084 | + spec->gen.beep_nid = 0x01; |
---|
2969 | 3085 | |
---|
2970 | 3086 | spec->shutup = alc_eapd_shutup; |
---|
| 3087 | + |
---|
| 3088 | + alc_pre_init(codec); |
---|
2971 | 3089 | |
---|
2972 | 3090 | snd_hda_pick_fixup(codec, alc268_fixup_models, alc268_fixup_tbl, alc268_fixups); |
---|
2973 | 3091 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); |
---|
.. | .. |
---|
3085 | 3203 | return alc_parse_auto_config(codec, alc269_ignore, ssids); |
---|
3086 | 3204 | } |
---|
3087 | 3205 | |
---|
| 3206 | +static const struct hda_jack_keymap alc_headset_btn_keymap[] = { |
---|
| 3207 | + { SND_JACK_BTN_0, KEY_PLAYPAUSE }, |
---|
| 3208 | + { SND_JACK_BTN_1, KEY_VOICECOMMAND }, |
---|
| 3209 | + { SND_JACK_BTN_2, KEY_VOLUMEUP }, |
---|
| 3210 | + { SND_JACK_BTN_3, KEY_VOLUMEDOWN }, |
---|
| 3211 | + {} |
---|
| 3212 | +}; |
---|
| 3213 | + |
---|
| 3214 | +static void alc_headset_btn_callback(struct hda_codec *codec, |
---|
| 3215 | + struct hda_jack_callback *jack) |
---|
| 3216 | +{ |
---|
| 3217 | + int report = 0; |
---|
| 3218 | + |
---|
| 3219 | + if (jack->unsol_res & (7 << 13)) |
---|
| 3220 | + report |= SND_JACK_BTN_0; |
---|
| 3221 | + |
---|
| 3222 | + if (jack->unsol_res & (1 << 16 | 3 << 8)) |
---|
| 3223 | + report |= SND_JACK_BTN_1; |
---|
| 3224 | + |
---|
| 3225 | + /* Volume up key */ |
---|
| 3226 | + if (jack->unsol_res & (7 << 23)) |
---|
| 3227 | + report |= SND_JACK_BTN_2; |
---|
| 3228 | + |
---|
| 3229 | + /* Volume down key */ |
---|
| 3230 | + if (jack->unsol_res & (7 << 10)) |
---|
| 3231 | + report |= SND_JACK_BTN_3; |
---|
| 3232 | + |
---|
| 3233 | + jack->jack->button_state = report; |
---|
| 3234 | +} |
---|
| 3235 | + |
---|
| 3236 | +static void alc_disable_headset_jack_key(struct hda_codec *codec) |
---|
| 3237 | +{ |
---|
| 3238 | + struct alc_spec *spec = codec->spec; |
---|
| 3239 | + |
---|
| 3240 | + if (!spec->has_hs_key) |
---|
| 3241 | + return; |
---|
| 3242 | + |
---|
| 3243 | + switch (codec->core.vendor_id) { |
---|
| 3244 | + case 0x10ec0215: |
---|
| 3245 | + case 0x10ec0225: |
---|
| 3246 | + case 0x10ec0285: |
---|
| 3247 | + case 0x10ec0287: |
---|
| 3248 | + case 0x10ec0295: |
---|
| 3249 | + case 0x10ec0289: |
---|
| 3250 | + case 0x10ec0299: |
---|
| 3251 | + alc_write_coef_idx(codec, 0x48, 0x0); |
---|
| 3252 | + alc_update_coef_idx(codec, 0x49, 0x0045, 0x0); |
---|
| 3253 | + alc_update_coef_idx(codec, 0x44, 0x0045 << 8, 0x0); |
---|
| 3254 | + break; |
---|
| 3255 | + case 0x10ec0230: |
---|
| 3256 | + case 0x10ec0236: |
---|
| 3257 | + case 0x10ec0256: |
---|
| 3258 | + case 0x19e58326: |
---|
| 3259 | + alc_write_coef_idx(codec, 0x48, 0x0); |
---|
| 3260 | + alc_update_coef_idx(codec, 0x49, 0x0045, 0x0); |
---|
| 3261 | + break; |
---|
| 3262 | + } |
---|
| 3263 | +} |
---|
| 3264 | + |
---|
| 3265 | +static void alc_enable_headset_jack_key(struct hda_codec *codec) |
---|
| 3266 | +{ |
---|
| 3267 | + struct alc_spec *spec = codec->spec; |
---|
| 3268 | + |
---|
| 3269 | + if (!spec->has_hs_key) |
---|
| 3270 | + return; |
---|
| 3271 | + |
---|
| 3272 | + switch (codec->core.vendor_id) { |
---|
| 3273 | + case 0x10ec0215: |
---|
| 3274 | + case 0x10ec0225: |
---|
| 3275 | + case 0x10ec0285: |
---|
| 3276 | + case 0x10ec0287: |
---|
| 3277 | + case 0x10ec0295: |
---|
| 3278 | + case 0x10ec0289: |
---|
| 3279 | + case 0x10ec0299: |
---|
| 3280 | + alc_write_coef_idx(codec, 0x48, 0xd011); |
---|
| 3281 | + alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045); |
---|
| 3282 | + alc_update_coef_idx(codec, 0x44, 0x007f << 8, 0x0045 << 8); |
---|
| 3283 | + break; |
---|
| 3284 | + case 0x10ec0230: |
---|
| 3285 | + case 0x10ec0236: |
---|
| 3286 | + case 0x10ec0256: |
---|
| 3287 | + case 0x19e58326: |
---|
| 3288 | + alc_write_coef_idx(codec, 0x48, 0xd011); |
---|
| 3289 | + alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045); |
---|
| 3290 | + break; |
---|
| 3291 | + } |
---|
| 3292 | +} |
---|
| 3293 | + |
---|
| 3294 | +static void alc_fixup_headset_jack(struct hda_codec *codec, |
---|
| 3295 | + const struct hda_fixup *fix, int action) |
---|
| 3296 | +{ |
---|
| 3297 | + struct alc_spec *spec = codec->spec; |
---|
| 3298 | + |
---|
| 3299 | + switch (action) { |
---|
| 3300 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 3301 | + spec->has_hs_key = 1; |
---|
| 3302 | + snd_hda_jack_detect_enable_callback(codec, 0x55, |
---|
| 3303 | + alc_headset_btn_callback); |
---|
| 3304 | + snd_hda_jack_add_kctl(codec, 0x55, "Headset Jack", false, |
---|
| 3305 | + SND_JACK_HEADSET, alc_headset_btn_keymap); |
---|
| 3306 | + break; |
---|
| 3307 | + case HDA_FIXUP_ACT_INIT: |
---|
| 3308 | + alc_enable_headset_jack_key(codec); |
---|
| 3309 | + break; |
---|
| 3310 | + } |
---|
| 3311 | +} |
---|
| 3312 | + |
---|
3088 | 3313 | static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up) |
---|
3089 | 3314 | { |
---|
3090 | 3315 | alc_update_coef_idx(codec, 0x04, 1 << 11, power_up ? (1 << 11) : 0); |
---|
.. | .. |
---|
3103 | 3328 | alc_shutup_pins(codec); |
---|
3104 | 3329 | } |
---|
3105 | 3330 | |
---|
3106 | | -static struct coef_fw alc282_coefs[] = { |
---|
| 3331 | +static const struct coef_fw alc282_coefs[] = { |
---|
3107 | 3332 | WRITE_COEF(0x03, 0x0002), /* Power Down Control */ |
---|
3108 | 3333 | UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */ |
---|
3109 | 3334 | WRITE_COEF(0x07, 0x0200), /* DMIC control */ |
---|
.. | .. |
---|
3215 | 3440 | alc_write_coef_idx(codec, 0x78, coef78); |
---|
3216 | 3441 | } |
---|
3217 | 3442 | |
---|
3218 | | -static struct coef_fw alc283_coefs[] = { |
---|
| 3443 | +static const struct coef_fw alc283_coefs[] = { |
---|
3219 | 3444 | WRITE_COEF(0x03, 0x0002), /* Power Down Control */ |
---|
3220 | 3445 | UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */ |
---|
3221 | 3446 | WRITE_COEF(0x07, 0x0200), /* DMIC control */ |
---|
.. | .. |
---|
3337 | 3562 | bool hp_pin_sense; |
---|
3338 | 3563 | |
---|
3339 | 3564 | if (!hp_pin) |
---|
3340 | | - return; |
---|
| 3565 | + hp_pin = 0x21; |
---|
3341 | 3566 | |
---|
3342 | 3567 | msleep(30); |
---|
3343 | 3568 | |
---|
.. | .. |
---|
3347 | 3572 | msleep(2); |
---|
3348 | 3573 | |
---|
3349 | 3574 | alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */ |
---|
| 3575 | + if (spec->ultra_low_power) { |
---|
| 3576 | + alc_update_coef_idx(codec, 0x03, 1<<1, 1<<1); |
---|
| 3577 | + alc_update_coef_idx(codec, 0x08, 3<<2, 3<<2); |
---|
| 3578 | + alc_update_coef_idx(codec, 0x08, 7<<4, 0); |
---|
| 3579 | + alc_update_coef_idx(codec, 0x3b, 1<<15, 0); |
---|
| 3580 | + alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6); |
---|
| 3581 | + msleep(30); |
---|
| 3582 | + } |
---|
3350 | 3583 | |
---|
3351 | 3584 | snd_hda_codec_write(codec, hp_pin, 0, |
---|
3352 | 3585 | AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); |
---|
3353 | 3586 | |
---|
3354 | | - if (hp_pin_sense) |
---|
| 3587 | + if (hp_pin_sense || spec->ultra_low_power) |
---|
3355 | 3588 | msleep(85); |
---|
3356 | 3589 | |
---|
3357 | 3590 | snd_hda_codec_write(codec, hp_pin, 0, |
---|
3358 | 3591 | AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); |
---|
3359 | 3592 | |
---|
3360 | | - if (hp_pin_sense) |
---|
| 3593 | + if (hp_pin_sense || spec->ultra_low_power) |
---|
3361 | 3594 | msleep(100); |
---|
3362 | 3595 | |
---|
3363 | 3596 | alc_update_coef_idx(codec, 0x46, 3 << 12, 0); |
---|
.. | .. |
---|
3379 | 3612 | hda_nid_t hp_pin = alc_get_hp_pin(spec); |
---|
3380 | 3613 | bool hp_pin_sense; |
---|
3381 | 3614 | |
---|
3382 | | - if (!hp_pin) { |
---|
3383 | | - alc269_shutup(codec); |
---|
3384 | | - return; |
---|
3385 | | - } |
---|
| 3615 | + if (!hp_pin) |
---|
| 3616 | + hp_pin = 0x21; |
---|
3386 | 3617 | |
---|
3387 | 3618 | hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); |
---|
3388 | 3619 | |
---|
.. | .. |
---|
3392 | 3623 | snd_hda_codec_write(codec, hp_pin, 0, |
---|
3393 | 3624 | AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); |
---|
3394 | 3625 | |
---|
3395 | | - if (hp_pin_sense) |
---|
| 3626 | + if (hp_pin_sense || spec->ultra_low_power) |
---|
3396 | 3627 | msleep(85); |
---|
3397 | 3628 | |
---|
3398 | 3629 | /* 3k pull low control for Headset jack. */ |
---|
.. | .. |
---|
3400 | 3631 | /* If disable 3k pulldown control for alc257, the Mic detection will not work correctly |
---|
3401 | 3632 | * when booting with headset plugged. So skip setting it for the codec alc257 |
---|
3402 | 3633 | */ |
---|
3403 | | - if (spec->codec_variant != ALC269_TYPE_ALC257 && |
---|
3404 | | - spec->codec_variant != ALC269_TYPE_ALC256) |
---|
| 3634 | + if (codec->core.vendor_id != 0x10ec0236 && |
---|
| 3635 | + codec->core.vendor_id != 0x10ec0257) |
---|
3405 | 3636 | alc_update_coef_idx(codec, 0x46, 0, 3 << 12); |
---|
3406 | 3637 | |
---|
3407 | 3638 | if (!spec->no_shutup_pins) |
---|
3408 | 3639 | snd_hda_codec_write(codec, hp_pin, 0, |
---|
3409 | 3640 | AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); |
---|
3410 | 3641 | |
---|
3411 | | - if (hp_pin_sense) |
---|
| 3642 | + if (hp_pin_sense || spec->ultra_low_power) |
---|
3412 | 3643 | msleep(100); |
---|
3413 | 3644 | |
---|
3414 | 3645 | alc_auto_setup_eapd(codec, false); |
---|
3415 | 3646 | alc_shutup_pins(codec); |
---|
| 3647 | + if (spec->ultra_low_power) { |
---|
| 3648 | + msleep(50); |
---|
| 3649 | + alc_update_coef_idx(codec, 0x03, 1<<1, 0); |
---|
| 3650 | + alc_update_coef_idx(codec, 0x08, 7<<4, 7<<4); |
---|
| 3651 | + alc_update_coef_idx(codec, 0x08, 3<<2, 0); |
---|
| 3652 | + alc_update_coef_idx(codec, 0x3b, 1<<15, 1<<15); |
---|
| 3653 | + alc_update_coef_idx(codec, 0x0e, 7<<6, 0); |
---|
| 3654 | + msleep(30); |
---|
| 3655 | + } |
---|
3416 | 3656 | } |
---|
3417 | 3657 | |
---|
3418 | 3658 | static void alc225_init(struct hda_codec *codec) |
---|
.. | .. |
---|
3422 | 3662 | bool hp1_pin_sense, hp2_pin_sense; |
---|
3423 | 3663 | |
---|
3424 | 3664 | if (!hp_pin) |
---|
3425 | | - return; |
---|
3426 | | - |
---|
| 3665 | + hp_pin = 0x21; |
---|
3427 | 3666 | msleep(30); |
---|
3428 | 3667 | |
---|
3429 | 3668 | hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin); |
---|
.. | .. |
---|
3433 | 3672 | msleep(2); |
---|
3434 | 3673 | |
---|
3435 | 3674 | alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */ |
---|
| 3675 | + if (spec->ultra_low_power) { |
---|
| 3676 | + alc_update_coef_idx(codec, 0x08, 0x0f << 2, 3<<2); |
---|
| 3677 | + alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6); |
---|
| 3678 | + alc_update_coef_idx(codec, 0x33, 1<<11, 0); |
---|
| 3679 | + msleep(30); |
---|
| 3680 | + } |
---|
3436 | 3681 | |
---|
3437 | | - if (hp1_pin_sense) |
---|
| 3682 | + if (hp1_pin_sense || spec->ultra_low_power) |
---|
3438 | 3683 | snd_hda_codec_write(codec, hp_pin, 0, |
---|
3439 | 3684 | AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); |
---|
3440 | 3685 | if (hp2_pin_sense) |
---|
3441 | 3686 | snd_hda_codec_write(codec, 0x16, 0, |
---|
3442 | 3687 | AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); |
---|
3443 | 3688 | |
---|
3444 | | - if (hp1_pin_sense || hp2_pin_sense) |
---|
| 3689 | + if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) |
---|
3445 | 3690 | msleep(85); |
---|
3446 | 3691 | |
---|
3447 | | - if (hp1_pin_sense) |
---|
| 3692 | + if (hp1_pin_sense || spec->ultra_low_power) |
---|
3448 | 3693 | snd_hda_codec_write(codec, hp_pin, 0, |
---|
3449 | 3694 | AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); |
---|
3450 | 3695 | if (hp2_pin_sense) |
---|
3451 | 3696 | snd_hda_codec_write(codec, 0x16, 0, |
---|
3452 | 3697 | AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); |
---|
3453 | 3698 | |
---|
3454 | | - if (hp1_pin_sense || hp2_pin_sense) |
---|
| 3699 | + if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) |
---|
3455 | 3700 | msleep(100); |
---|
3456 | 3701 | |
---|
3457 | 3702 | alc_update_coef_idx(codec, 0x4a, 3 << 10, 0); |
---|
.. | .. |
---|
3464 | 3709 | hda_nid_t hp_pin = alc_get_hp_pin(spec); |
---|
3465 | 3710 | bool hp1_pin_sense, hp2_pin_sense; |
---|
3466 | 3711 | |
---|
3467 | | - if (!hp_pin) { |
---|
3468 | | - alc269_shutup(codec); |
---|
3469 | | - return; |
---|
3470 | | - } |
---|
| 3712 | + if (!hp_pin) |
---|
| 3713 | + hp_pin = 0x21; |
---|
3471 | 3714 | |
---|
| 3715 | + alc_disable_headset_jack_key(codec); |
---|
3472 | 3716 | /* 3k pull low control for Headset jack. */ |
---|
3473 | 3717 | alc_update_coef_idx(codec, 0x4a, 0, 3 << 10); |
---|
3474 | 3718 | |
---|
.. | .. |
---|
3478 | 3722 | if (hp1_pin_sense || hp2_pin_sense) |
---|
3479 | 3723 | msleep(2); |
---|
3480 | 3724 | |
---|
3481 | | - if (hp1_pin_sense) |
---|
| 3725 | + if (hp1_pin_sense || spec->ultra_low_power) |
---|
3482 | 3726 | snd_hda_codec_write(codec, hp_pin, 0, |
---|
3483 | 3727 | AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); |
---|
3484 | 3728 | if (hp2_pin_sense) |
---|
3485 | 3729 | snd_hda_codec_write(codec, 0x16, 0, |
---|
3486 | 3730 | AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); |
---|
3487 | 3731 | |
---|
3488 | | - if (hp1_pin_sense || hp2_pin_sense) |
---|
| 3732 | + if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) |
---|
3489 | 3733 | msleep(85); |
---|
3490 | 3734 | |
---|
3491 | | - if (hp1_pin_sense) |
---|
| 3735 | + if (hp1_pin_sense || spec->ultra_low_power) |
---|
3492 | 3736 | snd_hda_codec_write(codec, hp_pin, 0, |
---|
3493 | 3737 | AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); |
---|
3494 | 3738 | if (hp2_pin_sense) |
---|
3495 | 3739 | snd_hda_codec_write(codec, 0x16, 0, |
---|
3496 | 3740 | AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); |
---|
3497 | 3741 | |
---|
3498 | | - if (hp1_pin_sense || hp2_pin_sense) |
---|
| 3742 | + if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) |
---|
3499 | 3743 | msleep(100); |
---|
3500 | 3744 | |
---|
3501 | 3745 | alc_auto_setup_eapd(codec, false); |
---|
3502 | 3746 | alc_shutup_pins(codec); |
---|
| 3747 | + if (spec->ultra_low_power) { |
---|
| 3748 | + msleep(50); |
---|
| 3749 | + alc_update_coef_idx(codec, 0x08, 0x0f << 2, 0x0c << 2); |
---|
| 3750 | + alc_update_coef_idx(codec, 0x0e, 7<<6, 0); |
---|
| 3751 | + alc_update_coef_idx(codec, 0x33, 1<<11, 1<<11); |
---|
| 3752 | + alc_update_coef_idx(codec, 0x4a, 3<<4, 2<<4); |
---|
| 3753 | + msleep(30); |
---|
| 3754 | + } |
---|
| 3755 | + |
---|
| 3756 | + alc_update_coef_idx(codec, 0x4a, 3 << 10, 0); |
---|
| 3757 | + alc_enable_headset_jack_key(codec); |
---|
3503 | 3758 | } |
---|
3504 | 3759 | |
---|
3505 | 3760 | static void alc_default_init(struct hda_codec *codec) |
---|
.. | .. |
---|
3694 | 3949 | } |
---|
3695 | 3950 | |
---|
3696 | 3951 | #ifdef HALT_REALTEK_ALC5505 |
---|
3697 | | -#define alc5505_dsp_suspend(codec) /* NOP */ |
---|
3698 | | -#define alc5505_dsp_resume(codec) /* NOP */ |
---|
| 3952 | +#define alc5505_dsp_suspend(codec) do { } while (0) /* NOP */ |
---|
| 3953 | +#define alc5505_dsp_resume(codec) do { } while (0) /* NOP */ |
---|
3699 | 3954 | #else |
---|
3700 | 3955 | #define alc5505_dsp_suspend(codec) alc5505_dsp_halt(codec) |
---|
3701 | 3956 | #define alc5505_dsp_resume(codec) alc5505_dsp_back_from_halt(codec) |
---|
.. | .. |
---|
3731 | 3986 | msleep(200); |
---|
3732 | 3987 | } |
---|
3733 | 3988 | |
---|
3734 | | - regcache_sync(codec->core.regmap); |
---|
| 3989 | + snd_hda_regmap_sync(codec); |
---|
3735 | 3990 | hda_call_check_power_status(codec, 0x01); |
---|
3736 | 3991 | |
---|
3737 | 3992 | /* on some machine, the BIOS will clear the codec gpio data when enter |
---|
.. | .. |
---|
3804 | 4059 | snd_hda_sequence_write(codec, verbs); |
---|
3805 | 4060 | } |
---|
3806 | 4061 | |
---|
| 4062 | +/* Fix the speaker amp after resume, etc */ |
---|
| 4063 | +static void alc269vb_fixup_aspire_e1_coef(struct hda_codec *codec, |
---|
| 4064 | + const struct hda_fixup *fix, |
---|
| 4065 | + int action) |
---|
| 4066 | +{ |
---|
| 4067 | + if (action == HDA_FIXUP_ACT_INIT) |
---|
| 4068 | + alc_update_coef_idx(codec, 0x0d, 0x6000, 0x6000); |
---|
| 4069 | +} |
---|
| 4070 | + |
---|
3807 | 4071 | static void alc269_fixup_pcm_44k(struct hda_codec *codec, |
---|
3808 | 4072 | const struct hda_fixup *fix, int action) |
---|
3809 | 4073 | { |
---|
.. | .. |
---|
3865 | 4129 | vref); |
---|
3866 | 4130 | } |
---|
3867 | 4131 | |
---|
| 4132 | +/* |
---|
| 4133 | + * Magic sequence to make Huawei Matebook X right speaker working (bko#197801) |
---|
| 4134 | + */ |
---|
| 4135 | +struct hda_alc298_mbxinit { |
---|
| 4136 | + unsigned char value_0x23; |
---|
| 4137 | + unsigned char value_0x25; |
---|
| 4138 | +}; |
---|
| 4139 | + |
---|
| 4140 | +static void alc298_huawei_mbx_stereo_seq(struct hda_codec *codec, |
---|
| 4141 | + const struct hda_alc298_mbxinit *initval, |
---|
| 4142 | + bool first) |
---|
| 4143 | +{ |
---|
| 4144 | + snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x0); |
---|
| 4145 | + alc_write_coef_idx(codec, 0x26, 0xb000); |
---|
| 4146 | + |
---|
| 4147 | + if (first) |
---|
| 4148 | + snd_hda_codec_write(codec, 0x21, 0, AC_VERB_GET_PIN_SENSE, 0x0); |
---|
| 4149 | + |
---|
| 4150 | + snd_hda_codec_write(codec, 0x6, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x80); |
---|
| 4151 | + alc_write_coef_idx(codec, 0x26, 0xf000); |
---|
| 4152 | + alc_write_coef_idx(codec, 0x23, initval->value_0x23); |
---|
| 4153 | + |
---|
| 4154 | + if (initval->value_0x23 != 0x1e) |
---|
| 4155 | + alc_write_coef_idx(codec, 0x25, initval->value_0x25); |
---|
| 4156 | + |
---|
| 4157 | + snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 0x26); |
---|
| 4158 | + snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0xb010); |
---|
| 4159 | +} |
---|
| 4160 | + |
---|
| 4161 | +static void alc298_fixup_huawei_mbx_stereo(struct hda_codec *codec, |
---|
| 4162 | + const struct hda_fixup *fix, |
---|
| 4163 | + int action) |
---|
| 4164 | +{ |
---|
| 4165 | + /* Initialization magic */ |
---|
| 4166 | + static const struct hda_alc298_mbxinit dac_init[] = { |
---|
| 4167 | + {0x0c, 0x00}, {0x0d, 0x00}, {0x0e, 0x00}, {0x0f, 0x00}, |
---|
| 4168 | + {0x10, 0x00}, {0x1a, 0x40}, {0x1b, 0x82}, {0x1c, 0x00}, |
---|
| 4169 | + {0x1d, 0x00}, {0x1e, 0x00}, {0x1f, 0x00}, |
---|
| 4170 | + {0x20, 0xc2}, {0x21, 0xc8}, {0x22, 0x26}, {0x23, 0x24}, |
---|
| 4171 | + {0x27, 0xff}, {0x28, 0xff}, {0x29, 0xff}, {0x2a, 0x8f}, |
---|
| 4172 | + {0x2b, 0x02}, {0x2c, 0x48}, {0x2d, 0x34}, {0x2e, 0x00}, |
---|
| 4173 | + {0x2f, 0x00}, |
---|
| 4174 | + {0x30, 0x00}, {0x31, 0x00}, {0x32, 0x00}, {0x33, 0x00}, |
---|
| 4175 | + {0x34, 0x00}, {0x35, 0x01}, {0x36, 0x93}, {0x37, 0x0c}, |
---|
| 4176 | + {0x38, 0x00}, {0x39, 0x00}, {0x3a, 0xf8}, {0x38, 0x80}, |
---|
| 4177 | + {} |
---|
| 4178 | + }; |
---|
| 4179 | + const struct hda_alc298_mbxinit *seq; |
---|
| 4180 | + |
---|
| 4181 | + if (action != HDA_FIXUP_ACT_INIT) |
---|
| 4182 | + return; |
---|
| 4183 | + |
---|
| 4184 | + /* Start */ |
---|
| 4185 | + snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x00); |
---|
| 4186 | + snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x80); |
---|
| 4187 | + alc_write_coef_idx(codec, 0x26, 0xf000); |
---|
| 4188 | + alc_write_coef_idx(codec, 0x22, 0x31); |
---|
| 4189 | + alc_write_coef_idx(codec, 0x23, 0x0b); |
---|
| 4190 | + alc_write_coef_idx(codec, 0x25, 0x00); |
---|
| 4191 | + snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 0x26); |
---|
| 4192 | + snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0xb010); |
---|
| 4193 | + |
---|
| 4194 | + for (seq = dac_init; seq->value_0x23; seq++) |
---|
| 4195 | + alc298_huawei_mbx_stereo_seq(codec, seq, seq == dac_init); |
---|
| 4196 | +} |
---|
| 4197 | + |
---|
3868 | 4198 | static void alc269_fixup_x101_headset_mic(struct hda_codec *codec, |
---|
3869 | 4199 | const struct hda_fixup *fix, int action) |
---|
3870 | 4200 | { |
---|
.. | .. |
---|
3875 | 4205 | } |
---|
3876 | 4206 | } |
---|
3877 | 4207 | |
---|
3878 | | - |
---|
3879 | | -/* update mute-LED according to the speaker mute state via mic VREF pin */ |
---|
3880 | | -static void alc269_fixup_mic_mute_hook(void *private_data, int enabled) |
---|
| 4208 | +static void alc_update_vref_led(struct hda_codec *codec, hda_nid_t pin, |
---|
| 4209 | + bool polarity, bool on) |
---|
3881 | 4210 | { |
---|
3882 | | - struct hda_codec *codec = private_data; |
---|
3883 | | - struct alc_spec *spec = codec->spec; |
---|
3884 | 4211 | unsigned int pinval; |
---|
3885 | 4212 | |
---|
3886 | | - if (spec->mute_led_polarity) |
---|
3887 | | - enabled = !enabled; |
---|
3888 | | - pinval = snd_hda_codec_get_pin_target(codec, spec->mute_led_nid); |
---|
| 4213 | + if (!pin) |
---|
| 4214 | + return; |
---|
| 4215 | + if (polarity) |
---|
| 4216 | + on = !on; |
---|
| 4217 | + pinval = snd_hda_codec_get_pin_target(codec, pin); |
---|
3889 | 4218 | pinval &= ~AC_PINCTL_VREFEN; |
---|
3890 | | - pinval |= enabled ? AC_PINCTL_VREF_HIZ : AC_PINCTL_VREF_80; |
---|
3891 | | - if (spec->mute_led_nid) { |
---|
3892 | | - /* temporarily power up/down for setting VREF */ |
---|
3893 | | - snd_hda_power_up_pm(codec); |
---|
3894 | | - snd_hda_set_pin_ctl_cache(codec, spec->mute_led_nid, pinval); |
---|
3895 | | - snd_hda_power_down_pm(codec); |
---|
3896 | | - } |
---|
| 4219 | + pinval |= on ? AC_PINCTL_VREF_80 : AC_PINCTL_VREF_HIZ; |
---|
| 4220 | + /* temporarily power up/down for setting VREF */ |
---|
| 4221 | + snd_hda_power_up_pm(codec); |
---|
| 4222 | + snd_hda_set_pin_ctl_cache(codec, pin, pinval); |
---|
| 4223 | + snd_hda_power_down_pm(codec); |
---|
| 4224 | +} |
---|
| 4225 | + |
---|
| 4226 | +/* update mute-LED according to the speaker mute state via mic VREF pin */ |
---|
| 4227 | +static int vref_mute_led_set(struct led_classdev *led_cdev, |
---|
| 4228 | + enum led_brightness brightness) |
---|
| 4229 | +{ |
---|
| 4230 | + struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); |
---|
| 4231 | + struct alc_spec *spec = codec->spec; |
---|
| 4232 | + |
---|
| 4233 | + alc_update_vref_led(codec, spec->mute_led_nid, |
---|
| 4234 | + spec->mute_led_polarity, brightness); |
---|
| 4235 | + return 0; |
---|
3897 | 4236 | } |
---|
3898 | 4237 | |
---|
3899 | 4238 | /* Make sure the led works even in runtime suspend */ |
---|
.. | .. |
---|
3931 | 4270 | break; |
---|
3932 | 4271 | spec->mute_led_polarity = pol; |
---|
3933 | 4272 | spec->mute_led_nid = pin - 0x0a + 0x18; |
---|
3934 | | - spec->gen.vmaster_mute.hook = alc269_fixup_mic_mute_hook; |
---|
3935 | | - spec->gen.vmaster_mute_enum = 1; |
---|
| 4273 | + snd_hda_gen_add_mute_led_cdev(codec, vref_mute_led_set); |
---|
3936 | 4274 | codec->power_filter = led_power_filter; |
---|
3937 | 4275 | codec_dbg(codec, |
---|
3938 | 4276 | "Detected mute LED for %x:%d\n", spec->mute_led_nid, |
---|
.. | .. |
---|
3950 | 4288 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
3951 | 4289 | spec->mute_led_polarity = 0; |
---|
3952 | 4290 | spec->mute_led_nid = pin; |
---|
3953 | | - spec->gen.vmaster_mute.hook = alc269_fixup_mic_mute_hook; |
---|
3954 | | - spec->gen.vmaster_mute_enum = 1; |
---|
| 4291 | + snd_hda_gen_add_mute_led_cdev(codec, vref_mute_led_set); |
---|
3955 | 4292 | codec->power_filter = led_power_filter; |
---|
3956 | 4293 | } |
---|
3957 | 4294 | } |
---|
.. | .. |
---|
3984 | 4321 | } |
---|
3985 | 4322 | |
---|
3986 | 4323 | /* turn on/off mute LED via GPIO per vmaster hook */ |
---|
3987 | | -static void alc_fixup_gpio_mute_hook(void *private_data, int enabled) |
---|
| 4324 | +static int gpio_mute_led_set(struct led_classdev *led_cdev, |
---|
| 4325 | + enum led_brightness brightness) |
---|
3988 | 4326 | { |
---|
3989 | | - struct hda_codec *codec = private_data; |
---|
| 4327 | + struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); |
---|
3990 | 4328 | struct alc_spec *spec = codec->spec; |
---|
3991 | 4329 | |
---|
3992 | 4330 | alc_update_gpio_led(codec, spec->gpio_mute_led_mask, |
---|
3993 | | - spec->mute_led_polarity, enabled); |
---|
| 4331 | + spec->mute_led_polarity, !brightness); |
---|
| 4332 | + return 0; |
---|
3994 | 4333 | } |
---|
3995 | 4334 | |
---|
3996 | 4335 | /* turn on/off mic-mute LED via GPIO per capture hook */ |
---|
3997 | | -static void alc_gpio_micmute_update(struct hda_codec *codec) |
---|
| 4336 | +static int micmute_led_set(struct led_classdev *led_cdev, |
---|
| 4337 | + enum led_brightness brightness) |
---|
3998 | 4338 | { |
---|
| 4339 | + struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); |
---|
3999 | 4340 | struct alc_spec *spec = codec->spec; |
---|
4000 | 4341 | |
---|
4001 | 4342 | alc_update_gpio_led(codec, spec->gpio_mic_led_mask, |
---|
4002 | | - spec->micmute_led_polarity, |
---|
4003 | | - spec->gen.micmute_led.led_value); |
---|
| 4343 | + spec->micmute_led_polarity, !brightness); |
---|
| 4344 | + return 0; |
---|
4004 | 4345 | } |
---|
4005 | 4346 | |
---|
4006 | 4347 | /* setup mute and mic-mute GPIO bits, add hooks appropriately */ |
---|
.. | .. |
---|
4017 | 4358 | return; |
---|
4018 | 4359 | if (mute_mask) { |
---|
4019 | 4360 | spec->gpio_mute_led_mask = mute_mask; |
---|
4020 | | - spec->gen.vmaster_mute.hook = alc_fixup_gpio_mute_hook; |
---|
| 4361 | + snd_hda_gen_add_mute_led_cdev(codec, gpio_mute_led_set); |
---|
4021 | 4362 | } |
---|
4022 | 4363 | if (micmute_mask) { |
---|
4023 | 4364 | spec->gpio_mic_led_mask = micmute_mask; |
---|
4024 | | - snd_hda_gen_add_micmute_led(codec, alc_gpio_micmute_update); |
---|
| 4365 | + snd_hda_gen_add_micmute_led_cdev(codec, micmute_led_set); |
---|
4025 | 4366 | } |
---|
| 4367 | +} |
---|
| 4368 | + |
---|
| 4369 | +static void alc236_fixup_hp_gpio_led(struct hda_codec *codec, |
---|
| 4370 | + const struct hda_fixup *fix, int action) |
---|
| 4371 | +{ |
---|
| 4372 | + alc_fixup_hp_gpio_led(codec, action, 0x02, 0x01); |
---|
4026 | 4373 | } |
---|
4027 | 4374 | |
---|
4028 | 4375 | static void alc269_fixup_hp_gpio_led(struct hda_codec *codec, |
---|
.. | .. |
---|
4034 | 4381 | static void alc285_fixup_hp_gpio_led(struct hda_codec *codec, |
---|
4035 | 4382 | const struct hda_fixup *fix, int action) |
---|
4036 | 4383 | { |
---|
4037 | | - struct alc_spec *spec = codec->spec; |
---|
4038 | | - |
---|
4039 | | - spec->micmute_led_polarity = 1; |
---|
4040 | | - |
---|
4041 | 4384 | alc_fixup_hp_gpio_led(codec, action, 0x04, 0x01); |
---|
4042 | 4385 | } |
---|
4043 | 4386 | |
---|
.. | .. |
---|
4047 | 4390 | alc_fixup_hp_gpio_led(codec, action, 0x02, 0x20); |
---|
4048 | 4391 | } |
---|
4049 | 4392 | |
---|
4050 | | -/* turn on/off mic-mute LED per capture hook */ |
---|
4051 | | -static void alc_cap_micmute_update(struct hda_codec *codec) |
---|
| 4393 | +static void alc287_fixup_hp_gpio_led(struct hda_codec *codec, |
---|
| 4394 | + const struct hda_fixup *fix, int action) |
---|
| 4395 | +{ |
---|
| 4396 | + alc_fixup_hp_gpio_led(codec, action, 0x10, 0); |
---|
| 4397 | +} |
---|
| 4398 | + |
---|
| 4399 | +static void alc245_fixup_hp_gpio_led(struct hda_codec *codec, |
---|
| 4400 | + const struct hda_fixup *fix, int action) |
---|
4052 | 4401 | { |
---|
4053 | 4402 | struct alc_spec *spec = codec->spec; |
---|
4054 | | - unsigned int pinval; |
---|
4055 | 4403 | |
---|
4056 | | - if (!spec->cap_mute_led_nid) |
---|
4057 | | - return; |
---|
4058 | | - pinval = snd_hda_codec_get_pin_target(codec, spec->cap_mute_led_nid); |
---|
4059 | | - pinval &= ~AC_PINCTL_VREFEN; |
---|
4060 | | - if (spec->gen.micmute_led.led_value) |
---|
4061 | | - pinval |= AC_PINCTL_VREF_80; |
---|
4062 | | - else |
---|
4063 | | - pinval |= AC_PINCTL_VREF_HIZ; |
---|
4064 | | - snd_hda_set_pin_ctl_cache(codec, spec->cap_mute_led_nid, pinval); |
---|
| 4404 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) |
---|
| 4405 | + spec->micmute_led_polarity = 1; |
---|
| 4406 | + alc_fixup_hp_gpio_led(codec, action, 0, 0x04); |
---|
| 4407 | +} |
---|
| 4408 | + |
---|
| 4409 | +/* turn on/off mic-mute LED per capture hook via VREF change */ |
---|
| 4410 | +static int vref_micmute_led_set(struct led_classdev *led_cdev, |
---|
| 4411 | + enum led_brightness brightness) |
---|
| 4412 | +{ |
---|
| 4413 | + struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); |
---|
| 4414 | + struct alc_spec *spec = codec->spec; |
---|
| 4415 | + |
---|
| 4416 | + alc_update_vref_led(codec, spec->cap_mute_led_nid, |
---|
| 4417 | + spec->micmute_led_polarity, brightness); |
---|
| 4418 | + return 0; |
---|
4065 | 4419 | } |
---|
4066 | 4420 | |
---|
4067 | 4421 | static void alc269_fixup_hp_gpio_mic1_led(struct hda_codec *codec, |
---|
.. | .. |
---|
4077 | 4431 | spec->gpio_mask |= 0x10; |
---|
4078 | 4432 | spec->gpio_dir |= 0x10; |
---|
4079 | 4433 | spec->cap_mute_led_nid = 0x18; |
---|
4080 | | - snd_hda_gen_add_micmute_led(codec, alc_cap_micmute_update); |
---|
| 4434 | + snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set); |
---|
4081 | 4435 | codec->power_filter = led_power_filter; |
---|
4082 | 4436 | } |
---|
4083 | 4437 | } |
---|
.. | .. |
---|
4090 | 4444 | alc_fixup_hp_gpio_led(codec, action, 0x08, 0); |
---|
4091 | 4445 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
4092 | 4446 | spec->cap_mute_led_nid = 0x18; |
---|
4093 | | - snd_hda_gen_add_micmute_led(codec, alc_cap_micmute_update); |
---|
| 4447 | + snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set); |
---|
4094 | 4448 | codec->power_filter = led_power_filter; |
---|
| 4449 | + } |
---|
| 4450 | +} |
---|
| 4451 | + |
---|
| 4452 | +/* HP Spectre x360 14 model needs a unique workaround for enabling the amp; |
---|
| 4453 | + * it needs to toggle the GPIO0 once on and off at each time (bko#210633) |
---|
| 4454 | + */ |
---|
| 4455 | +static void alc245_fixup_hp_x360_amp(struct hda_codec *codec, |
---|
| 4456 | + const struct hda_fixup *fix, int action) |
---|
| 4457 | +{ |
---|
| 4458 | + struct alc_spec *spec = codec->spec; |
---|
| 4459 | + |
---|
| 4460 | + switch (action) { |
---|
| 4461 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 4462 | + spec->gpio_mask |= 0x01; |
---|
| 4463 | + spec->gpio_dir |= 0x01; |
---|
| 4464 | + break; |
---|
| 4465 | + case HDA_FIXUP_ACT_INIT: |
---|
| 4466 | + /* need to toggle GPIO to enable the amp */ |
---|
| 4467 | + alc_update_gpio_data(codec, 0x01, true); |
---|
| 4468 | + msleep(100); |
---|
| 4469 | + alc_update_gpio_data(codec, 0x01, false); |
---|
| 4470 | + break; |
---|
| 4471 | + } |
---|
| 4472 | +} |
---|
| 4473 | + |
---|
| 4474 | +/* toggle GPIO2 at each time stream is started; we use PREPARE state instead */ |
---|
| 4475 | +static void alc274_hp_envy_pcm_hook(struct hda_pcm_stream *hinfo, |
---|
| 4476 | + struct hda_codec *codec, |
---|
| 4477 | + struct snd_pcm_substream *substream, |
---|
| 4478 | + int action) |
---|
| 4479 | +{ |
---|
| 4480 | + switch (action) { |
---|
| 4481 | + case HDA_GEN_PCM_ACT_PREPARE: |
---|
| 4482 | + alc_update_gpio_data(codec, 0x04, true); |
---|
| 4483 | + break; |
---|
| 4484 | + case HDA_GEN_PCM_ACT_CLEANUP: |
---|
| 4485 | + alc_update_gpio_data(codec, 0x04, false); |
---|
| 4486 | + break; |
---|
| 4487 | + } |
---|
| 4488 | +} |
---|
| 4489 | + |
---|
| 4490 | +static void alc274_fixup_hp_envy_gpio(struct hda_codec *codec, |
---|
| 4491 | + const struct hda_fixup *fix, |
---|
| 4492 | + int action) |
---|
| 4493 | +{ |
---|
| 4494 | + struct alc_spec *spec = codec->spec; |
---|
| 4495 | + |
---|
| 4496 | + if (action == HDA_FIXUP_ACT_PROBE) { |
---|
| 4497 | + spec->gpio_mask |= 0x04; |
---|
| 4498 | + spec->gpio_dir |= 0x04; |
---|
| 4499 | + spec->gen.pcm_playback_hook = alc274_hp_envy_pcm_hook; |
---|
| 4500 | + } |
---|
| 4501 | +} |
---|
| 4502 | + |
---|
| 4503 | +static void alc_update_coef_led(struct hda_codec *codec, |
---|
| 4504 | + struct alc_coef_led *led, |
---|
| 4505 | + bool polarity, bool on) |
---|
| 4506 | +{ |
---|
| 4507 | + if (polarity) |
---|
| 4508 | + on = !on; |
---|
| 4509 | + /* temporarily power up/down for setting COEF bit */ |
---|
| 4510 | + alc_update_coef_idx(codec, led->idx, led->mask, |
---|
| 4511 | + on ? led->on : led->off); |
---|
| 4512 | +} |
---|
| 4513 | + |
---|
| 4514 | +/* update mute-LED according to the speaker mute state via COEF bit */ |
---|
| 4515 | +static int coef_mute_led_set(struct led_classdev *led_cdev, |
---|
| 4516 | + enum led_brightness brightness) |
---|
| 4517 | +{ |
---|
| 4518 | + struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); |
---|
| 4519 | + struct alc_spec *spec = codec->spec; |
---|
| 4520 | + |
---|
| 4521 | + alc_update_coef_led(codec, &spec->mute_led_coef, |
---|
| 4522 | + spec->mute_led_polarity, brightness); |
---|
| 4523 | + return 0; |
---|
| 4524 | +} |
---|
| 4525 | + |
---|
| 4526 | +static void alc285_fixup_hp_mute_led_coefbit(struct hda_codec *codec, |
---|
| 4527 | + const struct hda_fixup *fix, |
---|
| 4528 | + int action) |
---|
| 4529 | +{ |
---|
| 4530 | + struct alc_spec *spec = codec->spec; |
---|
| 4531 | + |
---|
| 4532 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
| 4533 | + spec->mute_led_polarity = 0; |
---|
| 4534 | + spec->mute_led_coef.idx = 0x0b; |
---|
| 4535 | + spec->mute_led_coef.mask = 1 << 3; |
---|
| 4536 | + spec->mute_led_coef.on = 1 << 3; |
---|
| 4537 | + spec->mute_led_coef.off = 0; |
---|
| 4538 | + snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set); |
---|
| 4539 | + } |
---|
| 4540 | +} |
---|
| 4541 | + |
---|
| 4542 | +static void alc236_fixup_hp_mute_led_coefbit(struct hda_codec *codec, |
---|
| 4543 | + const struct hda_fixup *fix, |
---|
| 4544 | + int action) |
---|
| 4545 | +{ |
---|
| 4546 | + struct alc_spec *spec = codec->spec; |
---|
| 4547 | + |
---|
| 4548 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
| 4549 | + spec->mute_led_polarity = 0; |
---|
| 4550 | + spec->mute_led_coef.idx = 0x34; |
---|
| 4551 | + spec->mute_led_coef.mask = 1 << 5; |
---|
| 4552 | + spec->mute_led_coef.on = 0; |
---|
| 4553 | + spec->mute_led_coef.off = 1 << 5; |
---|
| 4554 | + snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set); |
---|
| 4555 | + } |
---|
| 4556 | +} |
---|
| 4557 | + |
---|
| 4558 | +/* turn on/off mic-mute LED per capture hook by coef bit */ |
---|
| 4559 | +static int coef_micmute_led_set(struct led_classdev *led_cdev, |
---|
| 4560 | + enum led_brightness brightness) |
---|
| 4561 | +{ |
---|
| 4562 | + struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); |
---|
| 4563 | + struct alc_spec *spec = codec->spec; |
---|
| 4564 | + |
---|
| 4565 | + alc_update_coef_led(codec, &spec->mic_led_coef, |
---|
| 4566 | + spec->micmute_led_polarity, brightness); |
---|
| 4567 | + return 0; |
---|
| 4568 | +} |
---|
| 4569 | + |
---|
| 4570 | +static void alc285_fixup_hp_coef_micmute_led(struct hda_codec *codec, |
---|
| 4571 | + const struct hda_fixup *fix, int action) |
---|
| 4572 | +{ |
---|
| 4573 | + struct alc_spec *spec = codec->spec; |
---|
| 4574 | + |
---|
| 4575 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
| 4576 | + spec->mic_led_coef.idx = 0x19; |
---|
| 4577 | + spec->mic_led_coef.mask = 1 << 13; |
---|
| 4578 | + spec->mic_led_coef.on = 1 << 13; |
---|
| 4579 | + spec->mic_led_coef.off = 0; |
---|
| 4580 | + snd_hda_gen_add_micmute_led_cdev(codec, coef_micmute_led_set); |
---|
| 4581 | + } |
---|
| 4582 | +} |
---|
| 4583 | + |
---|
| 4584 | +static void alc236_fixup_hp_coef_micmute_led(struct hda_codec *codec, |
---|
| 4585 | + const struct hda_fixup *fix, int action) |
---|
| 4586 | +{ |
---|
| 4587 | + struct alc_spec *spec = codec->spec; |
---|
| 4588 | + |
---|
| 4589 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
| 4590 | + spec->mic_led_coef.idx = 0x35; |
---|
| 4591 | + spec->mic_led_coef.mask = 3 << 2; |
---|
| 4592 | + spec->mic_led_coef.on = 2 << 2; |
---|
| 4593 | + spec->mic_led_coef.off = 1 << 2; |
---|
| 4594 | + snd_hda_gen_add_micmute_led_cdev(codec, coef_micmute_led_set); |
---|
| 4595 | + } |
---|
| 4596 | +} |
---|
| 4597 | + |
---|
| 4598 | +static void alc285_fixup_hp_mute_led(struct hda_codec *codec, |
---|
| 4599 | + const struct hda_fixup *fix, int action) |
---|
| 4600 | +{ |
---|
| 4601 | + alc285_fixup_hp_mute_led_coefbit(codec, fix, action); |
---|
| 4602 | + alc285_fixup_hp_coef_micmute_led(codec, fix, action); |
---|
| 4603 | +} |
---|
| 4604 | + |
---|
| 4605 | +static void alc236_fixup_hp_mute_led(struct hda_codec *codec, |
---|
| 4606 | + const struct hda_fixup *fix, int action) |
---|
| 4607 | +{ |
---|
| 4608 | + alc236_fixup_hp_mute_led_coefbit(codec, fix, action); |
---|
| 4609 | + alc236_fixup_hp_coef_micmute_led(codec, fix, action); |
---|
| 4610 | +} |
---|
| 4611 | + |
---|
| 4612 | +static void alc236_fixup_hp_micmute_led_vref(struct hda_codec *codec, |
---|
| 4613 | + const struct hda_fixup *fix, int action) |
---|
| 4614 | +{ |
---|
| 4615 | + struct alc_spec *spec = codec->spec; |
---|
| 4616 | + |
---|
| 4617 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
| 4618 | + spec->cap_mute_led_nid = 0x1a; |
---|
| 4619 | + snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set); |
---|
| 4620 | + codec->power_filter = led_power_filter; |
---|
| 4621 | + } |
---|
| 4622 | +} |
---|
| 4623 | + |
---|
| 4624 | +static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec *codec, |
---|
| 4625 | + const struct hda_fixup *fix, int action) |
---|
| 4626 | +{ |
---|
| 4627 | + alc236_fixup_hp_mute_led_coefbit(codec, fix, action); |
---|
| 4628 | + alc236_fixup_hp_micmute_led_vref(codec, fix, action); |
---|
| 4629 | +} |
---|
| 4630 | + |
---|
| 4631 | +static inline void alc298_samsung_write_coef_pack(struct hda_codec *codec, |
---|
| 4632 | + const unsigned short coefs[2]) |
---|
| 4633 | +{ |
---|
| 4634 | + alc_write_coef_idx(codec, 0x23, coefs[0]); |
---|
| 4635 | + alc_write_coef_idx(codec, 0x25, coefs[1]); |
---|
| 4636 | + alc_write_coef_idx(codec, 0x26, 0xb011); |
---|
| 4637 | +} |
---|
| 4638 | + |
---|
| 4639 | +struct alc298_samsung_amp_desc { |
---|
| 4640 | + unsigned char nid; |
---|
| 4641 | + unsigned short init_seq[2][2]; |
---|
| 4642 | +}; |
---|
| 4643 | + |
---|
| 4644 | +static void alc298_fixup_samsung_amp(struct hda_codec *codec, |
---|
| 4645 | + const struct hda_fixup *fix, int action) |
---|
| 4646 | +{ |
---|
| 4647 | + int i, j; |
---|
| 4648 | + static const unsigned short init_seq[][2] = { |
---|
| 4649 | + { 0x19, 0x00 }, { 0x20, 0xc0 }, { 0x22, 0x44 }, { 0x23, 0x08 }, |
---|
| 4650 | + { 0x24, 0x85 }, { 0x25, 0x41 }, { 0x35, 0x40 }, { 0x36, 0x01 }, |
---|
| 4651 | + { 0x38, 0x81 }, { 0x3a, 0x03 }, { 0x3b, 0x81 }, { 0x40, 0x3e }, |
---|
| 4652 | + { 0x41, 0x07 }, { 0x400, 0x1 } |
---|
| 4653 | + }; |
---|
| 4654 | + static const struct alc298_samsung_amp_desc amps[] = { |
---|
| 4655 | + { 0x3a, { { 0x18, 0x1 }, { 0x26, 0x0 } } }, |
---|
| 4656 | + { 0x39, { { 0x18, 0x2 }, { 0x26, 0x1 } } } |
---|
| 4657 | + }; |
---|
| 4658 | + |
---|
| 4659 | + if (action != HDA_FIXUP_ACT_INIT) |
---|
| 4660 | + return; |
---|
| 4661 | + |
---|
| 4662 | + for (i = 0; i < ARRAY_SIZE(amps); i++) { |
---|
| 4663 | + alc_write_coef_idx(codec, 0x22, amps[i].nid); |
---|
| 4664 | + |
---|
| 4665 | + for (j = 0; j < ARRAY_SIZE(amps[i].init_seq); j++) |
---|
| 4666 | + alc298_samsung_write_coef_pack(codec, amps[i].init_seq[j]); |
---|
| 4667 | + |
---|
| 4668 | + for (j = 0; j < ARRAY_SIZE(init_seq); j++) |
---|
| 4669 | + alc298_samsung_write_coef_pack(codec, init_seq[j]); |
---|
4095 | 4670 | } |
---|
4096 | 4671 | } |
---|
4097 | 4672 | |
---|
.. | .. |
---|
4184 | 4759 | { |
---|
4185 | 4760 | struct alc_spec *spec = codec->spec; |
---|
4186 | 4761 | |
---|
4187 | | - spec->micmute_led_polarity = 1; |
---|
4188 | 4762 | alc_fixup_hp_gpio_led(codec, action, 0, 0x04); |
---|
4189 | 4763 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
4190 | 4764 | spec->init_amp = ALC_INIT_DEFAULT; |
---|
.. | .. |
---|
4218 | 4792 | alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x1a); |
---|
4219 | 4793 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
4220 | 4794 | spec->cap_mute_led_nid = 0x18; |
---|
4221 | | - snd_hda_gen_add_micmute_led(codec, alc_cap_micmute_update); |
---|
| 4795 | + snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set); |
---|
4222 | 4796 | } |
---|
4223 | 4797 | } |
---|
4224 | 4798 | |
---|
4225 | | -static struct coef_fw alc225_pre_hsmode[] = { |
---|
| 4799 | +static const struct coef_fw alc225_pre_hsmode[] = { |
---|
4226 | 4800 | UPDATE_COEF(0x4a, 1<<8, 0), |
---|
4227 | 4801 | UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), |
---|
4228 | 4802 | UPDATE_COEF(0x63, 3<<14, 3<<14), |
---|
.. | .. |
---|
4235 | 4809 | |
---|
4236 | 4810 | static void alc_headset_mode_unplugged(struct hda_codec *codec) |
---|
4237 | 4811 | { |
---|
4238 | | - static struct coef_fw coef0255[] = { |
---|
| 4812 | + struct alc_spec *spec = codec->spec; |
---|
| 4813 | + static const struct coef_fw coef0255[] = { |
---|
4239 | 4814 | WRITE_COEF(0x1b, 0x0c0b), /* LDO and MISC control */ |
---|
4240 | 4815 | WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */ |
---|
4241 | 4816 | UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/ |
---|
.. | .. |
---|
4243 | 4818 | WRITE_COEFEX(0x57, 0x03, 0x8aa6), /* Direct Drive HP Amp control */ |
---|
4244 | 4819 | {} |
---|
4245 | 4820 | }; |
---|
4246 | | - static struct coef_fw coef0256[] = { |
---|
| 4821 | + static const struct coef_fw coef0256[] = { |
---|
4247 | 4822 | WRITE_COEF(0x1b, 0x0c4b), /* LDO and MISC control */ |
---|
4248 | 4823 | WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */ |
---|
4249 | 4824 | WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */ |
---|
.. | .. |
---|
4251 | 4826 | UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/ |
---|
4252 | 4827 | {} |
---|
4253 | 4828 | }; |
---|
4254 | | - static struct coef_fw coef0233[] = { |
---|
| 4829 | + static const struct coef_fw coef0233[] = { |
---|
4255 | 4830 | WRITE_COEF(0x1b, 0x0c0b), |
---|
4256 | 4831 | WRITE_COEF(0x45, 0xc429), |
---|
4257 | 4832 | UPDATE_COEF(0x35, 0x4000, 0), |
---|
.. | .. |
---|
4261 | 4836 | WRITE_COEF(0x32, 0x42a3), |
---|
4262 | 4837 | {} |
---|
4263 | 4838 | }; |
---|
4264 | | - static struct coef_fw coef0288[] = { |
---|
| 4839 | + static const struct coef_fw coef0288[] = { |
---|
4265 | 4840 | UPDATE_COEF(0x4f, 0xfcc0, 0xc400), |
---|
4266 | 4841 | UPDATE_COEF(0x50, 0x2000, 0x2000), |
---|
4267 | 4842 | UPDATE_COEF(0x56, 0x0006, 0x0006), |
---|
.. | .. |
---|
4269 | 4844 | UPDATE_COEF(0x67, 0x2000, 0), |
---|
4270 | 4845 | {} |
---|
4271 | 4846 | }; |
---|
4272 | | - static struct coef_fw coef0298[] = { |
---|
| 4847 | + static const struct coef_fw coef0298[] = { |
---|
4273 | 4848 | UPDATE_COEF(0x19, 0x1300, 0x0300), |
---|
4274 | 4849 | {} |
---|
4275 | 4850 | }; |
---|
4276 | | - static struct coef_fw coef0292[] = { |
---|
| 4851 | + static const struct coef_fw coef0292[] = { |
---|
4277 | 4852 | WRITE_COEF(0x76, 0x000e), |
---|
4278 | 4853 | WRITE_COEF(0x6c, 0x2400), |
---|
4279 | 4854 | WRITE_COEF(0x18, 0x7308), |
---|
4280 | 4855 | WRITE_COEF(0x6b, 0xc429), |
---|
4281 | 4856 | {} |
---|
4282 | 4857 | }; |
---|
4283 | | - static struct coef_fw coef0293[] = { |
---|
| 4858 | + static const struct coef_fw coef0293[] = { |
---|
4284 | 4859 | UPDATE_COEF(0x10, 7<<8, 6<<8), /* SET Line1 JD to 0 */ |
---|
4285 | 4860 | UPDATE_COEFEX(0x57, 0x05, 1<<15|1<<13, 0x0), /* SET charge pump by verb */ |
---|
4286 | 4861 | UPDATE_COEFEX(0x57, 0x03, 1<<10, 1<<10), /* SET EN_OSW to 1 */ |
---|
.. | .. |
---|
4289 | 4864 | UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */ |
---|
4290 | 4865 | {} |
---|
4291 | 4866 | }; |
---|
4292 | | - static struct coef_fw coef0668[] = { |
---|
| 4867 | + static const struct coef_fw coef0668[] = { |
---|
4293 | 4868 | WRITE_COEF(0x15, 0x0d40), |
---|
4294 | 4869 | WRITE_COEF(0xb7, 0x802b), |
---|
4295 | 4870 | {} |
---|
4296 | 4871 | }; |
---|
4297 | | - static struct coef_fw coef0225[] = { |
---|
| 4872 | + static const struct coef_fw coef0225[] = { |
---|
4298 | 4873 | UPDATE_COEF(0x63, 3<<14, 0), |
---|
4299 | 4874 | {} |
---|
4300 | 4875 | }; |
---|
4301 | | - static struct coef_fw coef0274[] = { |
---|
| 4876 | + static const struct coef_fw coef0274[] = { |
---|
4302 | 4877 | UPDATE_COEF(0x4a, 0x0100, 0), |
---|
4303 | 4878 | UPDATE_COEFEX(0x57, 0x05, 0x4000, 0), |
---|
4304 | 4879 | UPDATE_COEF(0x6b, 0xf000, 0x5000), |
---|
.. | .. |
---|
4309 | 4884 | {} |
---|
4310 | 4885 | }; |
---|
4311 | 4886 | |
---|
| 4887 | + if (spec->no_internal_mic_pin) { |
---|
| 4888 | + alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12); |
---|
| 4889 | + return; |
---|
| 4890 | + } |
---|
| 4891 | + |
---|
4312 | 4892 | switch (codec->core.vendor_id) { |
---|
4313 | 4893 | case 0x10ec0255: |
---|
4314 | 4894 | alc_process_coef_fw(codec, coef0255); |
---|
4315 | 4895 | break; |
---|
| 4896 | + case 0x10ec0230: |
---|
4316 | 4897 | case 0x10ec0236: |
---|
4317 | 4898 | case 0x10ec0256: |
---|
| 4899 | + case 0x19e58326: |
---|
4318 | 4900 | alc_process_coef_fw(codec, coef0256); |
---|
4319 | 4901 | break; |
---|
4320 | 4902 | case 0x10ec0234: |
---|
.. | .. |
---|
4363 | 4945 | static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin, |
---|
4364 | 4946 | hda_nid_t mic_pin) |
---|
4365 | 4947 | { |
---|
4366 | | - static struct coef_fw coef0255[] = { |
---|
| 4948 | + static const struct coef_fw coef0255[] = { |
---|
4367 | 4949 | WRITE_COEFEX(0x57, 0x03, 0x8aa6), |
---|
4368 | 4950 | WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */ |
---|
4369 | 4951 | {} |
---|
4370 | 4952 | }; |
---|
4371 | | - static struct coef_fw coef0256[] = { |
---|
| 4953 | + static const struct coef_fw coef0256[] = { |
---|
4372 | 4954 | UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14), /* Direct Drive HP Amp control(Set to verb control)*/ |
---|
4373 | 4955 | WRITE_COEFEX(0x57, 0x03, 0x09a3), |
---|
4374 | 4956 | WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */ |
---|
4375 | 4957 | {} |
---|
4376 | 4958 | }; |
---|
4377 | | - static struct coef_fw coef0233[] = { |
---|
| 4959 | + static const struct coef_fw coef0233[] = { |
---|
4378 | 4960 | UPDATE_COEF(0x35, 0, 1<<14), |
---|
4379 | 4961 | WRITE_COEF(0x06, 0x2100), |
---|
4380 | 4962 | WRITE_COEF(0x1a, 0x0021), |
---|
4381 | 4963 | WRITE_COEF(0x26, 0x008c), |
---|
4382 | 4964 | {} |
---|
4383 | 4965 | }; |
---|
4384 | | - static struct coef_fw coef0288[] = { |
---|
| 4966 | + static const struct coef_fw coef0288[] = { |
---|
4385 | 4967 | UPDATE_COEF(0x4f, 0x00c0, 0), |
---|
4386 | 4968 | UPDATE_COEF(0x50, 0x2000, 0), |
---|
4387 | 4969 | UPDATE_COEF(0x56, 0x0006, 0), |
---|
.. | .. |
---|
4390 | 4972 | UPDATE_COEF(0x67, 0x2000, 0x2000), |
---|
4391 | 4973 | {} |
---|
4392 | 4974 | }; |
---|
4393 | | - static struct coef_fw coef0292[] = { |
---|
| 4975 | + static const struct coef_fw coef0292[] = { |
---|
4394 | 4976 | WRITE_COEF(0x19, 0xa208), |
---|
4395 | 4977 | WRITE_COEF(0x2e, 0xacf0), |
---|
4396 | 4978 | {} |
---|
4397 | 4979 | }; |
---|
4398 | | - static struct coef_fw coef0293[] = { |
---|
| 4980 | + static const struct coef_fw coef0293[] = { |
---|
4399 | 4981 | UPDATE_COEFEX(0x57, 0x05, 0, 1<<15|1<<13), /* SET charge pump by verb */ |
---|
4400 | 4982 | UPDATE_COEFEX(0x57, 0x03, 1<<10, 0), /* SET EN_OSW to 0 */ |
---|
4401 | 4983 | UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */ |
---|
4402 | 4984 | {} |
---|
4403 | 4985 | }; |
---|
4404 | | - static struct coef_fw coef0688[] = { |
---|
| 4986 | + static const struct coef_fw coef0688[] = { |
---|
4405 | 4987 | WRITE_COEF(0xb7, 0x802b), |
---|
4406 | 4988 | WRITE_COEF(0xb5, 0x1040), |
---|
4407 | 4989 | UPDATE_COEF(0xc3, 0, 1<<12), |
---|
4408 | 4990 | {} |
---|
4409 | 4991 | }; |
---|
4410 | | - static struct coef_fw coef0225[] = { |
---|
| 4992 | + static const struct coef_fw coef0225[] = { |
---|
4411 | 4993 | UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14), |
---|
4412 | 4994 | UPDATE_COEF(0x4a, 3<<4, 2<<4), |
---|
4413 | 4995 | UPDATE_COEF(0x63, 3<<14, 0), |
---|
4414 | 4996 | {} |
---|
4415 | 4997 | }; |
---|
4416 | | - static struct coef_fw coef0274[] = { |
---|
| 4998 | + static const struct coef_fw coef0274[] = { |
---|
4417 | 4999 | UPDATE_COEFEX(0x57, 0x05, 0x4000, 0x4000), |
---|
4418 | 5000 | UPDATE_COEF(0x4a, 0x0010, 0), |
---|
4419 | 5001 | UPDATE_COEF(0x6b, 0xf000, 0), |
---|
.. | .. |
---|
4427 | 5009 | alc_process_coef_fw(codec, coef0255); |
---|
4428 | 5010 | snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); |
---|
4429 | 5011 | break; |
---|
| 5012 | + case 0x10ec0230: |
---|
4430 | 5013 | case 0x10ec0236: |
---|
4431 | 5014 | case 0x10ec0256: |
---|
| 5015 | + case 0x19e58326: |
---|
4432 | 5016 | alc_write_coef_idx(codec, 0x45, 0xc489); |
---|
4433 | 5017 | snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); |
---|
4434 | 5018 | alc_process_coef_fw(codec, coef0256); |
---|
.. | .. |
---|
4469 | 5053 | break; |
---|
4470 | 5054 | case 0x10ec0867: |
---|
4471 | 5055 | alc_update_coefex_idx(codec, 0x57, 0x5, 0, 1<<14); |
---|
4472 | | - /* fallthru */ |
---|
| 5056 | + fallthrough; |
---|
4473 | 5057 | case 0x10ec0221: |
---|
4474 | 5058 | case 0x10ec0662: |
---|
4475 | 5059 | snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); |
---|
.. | .. |
---|
4499 | 5083 | |
---|
4500 | 5084 | static void alc_headset_mode_default(struct hda_codec *codec) |
---|
4501 | 5085 | { |
---|
4502 | | - static struct coef_fw coef0225[] = { |
---|
| 5086 | + static const struct coef_fw coef0225[] = { |
---|
4503 | 5087 | UPDATE_COEF(0x45, 0x3f<<10, 0x30<<10), |
---|
4504 | 5088 | UPDATE_COEF(0x45, 0x3f<<10, 0x31<<10), |
---|
4505 | 5089 | UPDATE_COEF(0x49, 3<<8, 0<<8), |
---|
.. | .. |
---|
4508 | 5092 | UPDATE_COEF(0x67, 0xf000, 0x3000), |
---|
4509 | 5093 | {} |
---|
4510 | 5094 | }; |
---|
4511 | | - static struct coef_fw coef0255[] = { |
---|
| 5095 | + static const struct coef_fw coef0255[] = { |
---|
4512 | 5096 | WRITE_COEF(0x45, 0xc089), |
---|
4513 | 5097 | WRITE_COEF(0x45, 0xc489), |
---|
4514 | 5098 | WRITE_COEFEX(0x57, 0x03, 0x8ea6), |
---|
4515 | 5099 | WRITE_COEF(0x49, 0x0049), |
---|
4516 | 5100 | {} |
---|
4517 | 5101 | }; |
---|
4518 | | - static struct coef_fw coef0256[] = { |
---|
| 5102 | + static const struct coef_fw coef0256[] = { |
---|
4519 | 5103 | WRITE_COEF(0x45, 0xc489), |
---|
4520 | 5104 | WRITE_COEFEX(0x57, 0x03, 0x0da3), |
---|
4521 | 5105 | WRITE_COEF(0x49, 0x0049), |
---|
.. | .. |
---|
4523 | 5107 | WRITE_COEF(0x06, 0x6100), |
---|
4524 | 5108 | {} |
---|
4525 | 5109 | }; |
---|
4526 | | - static struct coef_fw coef0233[] = { |
---|
| 5110 | + static const struct coef_fw coef0233[] = { |
---|
4527 | 5111 | WRITE_COEF(0x06, 0x2100), |
---|
4528 | 5112 | WRITE_COEF(0x32, 0x4ea3), |
---|
4529 | 5113 | {} |
---|
4530 | 5114 | }; |
---|
4531 | | - static struct coef_fw coef0288[] = { |
---|
| 5115 | + static const struct coef_fw coef0288[] = { |
---|
4532 | 5116 | UPDATE_COEF(0x4f, 0xfcc0, 0xc400), /* Set to TRS type */ |
---|
4533 | 5117 | UPDATE_COEF(0x50, 0x2000, 0x2000), |
---|
4534 | 5118 | UPDATE_COEF(0x56, 0x0006, 0x0006), |
---|
.. | .. |
---|
4536 | 5120 | UPDATE_COEF(0x67, 0x2000, 0), |
---|
4537 | 5121 | {} |
---|
4538 | 5122 | }; |
---|
4539 | | - static struct coef_fw coef0292[] = { |
---|
| 5123 | + static const struct coef_fw coef0292[] = { |
---|
4540 | 5124 | WRITE_COEF(0x76, 0x000e), |
---|
4541 | 5125 | WRITE_COEF(0x6c, 0x2400), |
---|
4542 | 5126 | WRITE_COEF(0x6b, 0xc429), |
---|
4543 | 5127 | WRITE_COEF(0x18, 0x7308), |
---|
4544 | 5128 | {} |
---|
4545 | 5129 | }; |
---|
4546 | | - static struct coef_fw coef0293[] = { |
---|
| 5130 | + static const struct coef_fw coef0293[] = { |
---|
4547 | 5131 | UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */ |
---|
4548 | 5132 | WRITE_COEF(0x45, 0xC429), /* Set to TRS type */ |
---|
4549 | 5133 | UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */ |
---|
4550 | 5134 | {} |
---|
4551 | 5135 | }; |
---|
4552 | | - static struct coef_fw coef0688[] = { |
---|
| 5136 | + static const struct coef_fw coef0688[] = { |
---|
4553 | 5137 | WRITE_COEF(0x11, 0x0041), |
---|
4554 | 5138 | WRITE_COEF(0x15, 0x0d40), |
---|
4555 | 5139 | WRITE_COEF(0xb7, 0x802b), |
---|
4556 | 5140 | {} |
---|
4557 | 5141 | }; |
---|
4558 | | - static struct coef_fw coef0274[] = { |
---|
| 5142 | + static const struct coef_fw coef0274[] = { |
---|
4559 | 5143 | WRITE_COEF(0x45, 0x4289), |
---|
4560 | 5144 | UPDATE_COEF(0x4a, 0x0010, 0x0010), |
---|
4561 | 5145 | UPDATE_COEF(0x6b, 0x0f00, 0), |
---|
.. | .. |
---|
4576 | 5160 | case 0x10ec0255: |
---|
4577 | 5161 | alc_process_coef_fw(codec, coef0255); |
---|
4578 | 5162 | break; |
---|
| 5163 | + case 0x10ec0230: |
---|
4579 | 5164 | case 0x10ec0236: |
---|
4580 | 5165 | case 0x10ec0256: |
---|
| 5166 | + case 0x19e58326: |
---|
4581 | 5167 | alc_write_coef_idx(codec, 0x1b, 0x0e4b); |
---|
4582 | 5168 | alc_write_coef_idx(codec, 0x45, 0xc089); |
---|
4583 | 5169 | msleep(50); |
---|
.. | .. |
---|
4618 | 5204 | { |
---|
4619 | 5205 | int val; |
---|
4620 | 5206 | |
---|
4621 | | - static struct coef_fw coef0255[] = { |
---|
| 5207 | + static const struct coef_fw coef0255[] = { |
---|
4622 | 5208 | WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */ |
---|
4623 | 5209 | WRITE_COEF(0x1b, 0x0c2b), |
---|
4624 | 5210 | WRITE_COEFEX(0x57, 0x03, 0x8ea6), |
---|
4625 | 5211 | {} |
---|
4626 | 5212 | }; |
---|
4627 | | - static struct coef_fw coef0256[] = { |
---|
| 5213 | + static const struct coef_fw coef0256[] = { |
---|
4628 | 5214 | WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */ |
---|
4629 | 5215 | WRITE_COEF(0x1b, 0x0e6b), |
---|
4630 | 5216 | {} |
---|
4631 | 5217 | }; |
---|
4632 | | - static struct coef_fw coef0233[] = { |
---|
| 5218 | + static const struct coef_fw coef0233[] = { |
---|
4633 | 5219 | WRITE_COEF(0x45, 0xd429), |
---|
4634 | 5220 | WRITE_COEF(0x1b, 0x0c2b), |
---|
4635 | 5221 | WRITE_COEF(0x32, 0x4ea3), |
---|
4636 | 5222 | {} |
---|
4637 | 5223 | }; |
---|
4638 | | - static struct coef_fw coef0288[] = { |
---|
| 5224 | + static const struct coef_fw coef0288[] = { |
---|
4639 | 5225 | UPDATE_COEF(0x50, 0x2000, 0x2000), |
---|
4640 | 5226 | UPDATE_COEF(0x56, 0x0006, 0x0006), |
---|
4641 | 5227 | UPDATE_COEF(0x66, 0x0008, 0), |
---|
4642 | 5228 | UPDATE_COEF(0x67, 0x2000, 0), |
---|
4643 | 5229 | {} |
---|
4644 | 5230 | }; |
---|
4645 | | - static struct coef_fw coef0292[] = { |
---|
| 5231 | + static const struct coef_fw coef0292[] = { |
---|
4646 | 5232 | WRITE_COEF(0x6b, 0xd429), |
---|
4647 | 5233 | WRITE_COEF(0x76, 0x0008), |
---|
4648 | 5234 | WRITE_COEF(0x18, 0x7388), |
---|
4649 | 5235 | {} |
---|
4650 | 5236 | }; |
---|
4651 | | - static struct coef_fw coef0293[] = { |
---|
| 5237 | + static const struct coef_fw coef0293[] = { |
---|
4652 | 5238 | WRITE_COEF(0x45, 0xd429), /* Set to ctia type */ |
---|
4653 | 5239 | UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */ |
---|
4654 | 5240 | {} |
---|
4655 | 5241 | }; |
---|
4656 | | - static struct coef_fw coef0688[] = { |
---|
| 5242 | + static const struct coef_fw coef0688[] = { |
---|
4657 | 5243 | WRITE_COEF(0x11, 0x0001), |
---|
4658 | 5244 | WRITE_COEF(0x15, 0x0d60), |
---|
4659 | 5245 | WRITE_COEF(0xc3, 0x0000), |
---|
4660 | 5246 | {} |
---|
4661 | 5247 | }; |
---|
4662 | | - static struct coef_fw coef0225_1[] = { |
---|
| 5248 | + static const struct coef_fw coef0225_1[] = { |
---|
4663 | 5249 | UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10), |
---|
4664 | 5250 | UPDATE_COEF(0x63, 3<<14, 2<<14), |
---|
4665 | 5251 | {} |
---|
4666 | 5252 | }; |
---|
4667 | | - static struct coef_fw coef0225_2[] = { |
---|
| 5253 | + static const struct coef_fw coef0225_2[] = { |
---|
4668 | 5254 | UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10), |
---|
4669 | 5255 | UPDATE_COEF(0x63, 3<<14, 1<<14), |
---|
4670 | 5256 | {} |
---|
.. | .. |
---|
4674 | 5260 | case 0x10ec0255: |
---|
4675 | 5261 | alc_process_coef_fw(codec, coef0255); |
---|
4676 | 5262 | break; |
---|
| 5263 | + case 0x10ec0230: |
---|
4677 | 5264 | case 0x10ec0236: |
---|
4678 | 5265 | case 0x10ec0256: |
---|
| 5266 | + case 0x19e58326: |
---|
4679 | 5267 | alc_process_coef_fw(codec, coef0256); |
---|
4680 | 5268 | break; |
---|
4681 | 5269 | case 0x10ec0234: |
---|
.. | .. |
---|
4736 | 5324 | /* Nokia type */ |
---|
4737 | 5325 | static void alc_headset_mode_omtp(struct hda_codec *codec) |
---|
4738 | 5326 | { |
---|
4739 | | - static struct coef_fw coef0255[] = { |
---|
| 5327 | + static const struct coef_fw coef0255[] = { |
---|
4740 | 5328 | WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */ |
---|
4741 | 5329 | WRITE_COEF(0x1b, 0x0c2b), |
---|
4742 | 5330 | WRITE_COEFEX(0x57, 0x03, 0x8ea6), |
---|
4743 | 5331 | {} |
---|
4744 | 5332 | }; |
---|
4745 | | - static struct coef_fw coef0256[] = { |
---|
| 5333 | + static const struct coef_fw coef0256[] = { |
---|
4746 | 5334 | WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */ |
---|
4747 | 5335 | WRITE_COEF(0x1b, 0x0e6b), |
---|
4748 | 5336 | {} |
---|
4749 | 5337 | }; |
---|
4750 | | - static struct coef_fw coef0233[] = { |
---|
| 5338 | + static const struct coef_fw coef0233[] = { |
---|
4751 | 5339 | WRITE_COEF(0x45, 0xe429), |
---|
4752 | 5340 | WRITE_COEF(0x1b, 0x0c2b), |
---|
4753 | 5341 | WRITE_COEF(0x32, 0x4ea3), |
---|
4754 | 5342 | {} |
---|
4755 | 5343 | }; |
---|
4756 | | - static struct coef_fw coef0288[] = { |
---|
| 5344 | + static const struct coef_fw coef0288[] = { |
---|
4757 | 5345 | UPDATE_COEF(0x50, 0x2000, 0x2000), |
---|
4758 | 5346 | UPDATE_COEF(0x56, 0x0006, 0x0006), |
---|
4759 | 5347 | UPDATE_COEF(0x66, 0x0008, 0), |
---|
4760 | 5348 | UPDATE_COEF(0x67, 0x2000, 0), |
---|
4761 | 5349 | {} |
---|
4762 | 5350 | }; |
---|
4763 | | - static struct coef_fw coef0292[] = { |
---|
| 5351 | + static const struct coef_fw coef0292[] = { |
---|
4764 | 5352 | WRITE_COEF(0x6b, 0xe429), |
---|
4765 | 5353 | WRITE_COEF(0x76, 0x0008), |
---|
4766 | 5354 | WRITE_COEF(0x18, 0x7388), |
---|
4767 | 5355 | {} |
---|
4768 | 5356 | }; |
---|
4769 | | - static struct coef_fw coef0293[] = { |
---|
| 5357 | + static const struct coef_fw coef0293[] = { |
---|
4770 | 5358 | WRITE_COEF(0x45, 0xe429), /* Set to omtp type */ |
---|
4771 | 5359 | UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */ |
---|
4772 | 5360 | {} |
---|
4773 | 5361 | }; |
---|
4774 | | - static struct coef_fw coef0688[] = { |
---|
| 5362 | + static const struct coef_fw coef0688[] = { |
---|
4775 | 5363 | WRITE_COEF(0x11, 0x0001), |
---|
4776 | 5364 | WRITE_COEF(0x15, 0x0d50), |
---|
4777 | 5365 | WRITE_COEF(0xc3, 0x0000), |
---|
4778 | 5366 | {} |
---|
4779 | 5367 | }; |
---|
4780 | | - static struct coef_fw coef0225[] = { |
---|
| 5368 | + static const struct coef_fw coef0225[] = { |
---|
4781 | 5369 | UPDATE_COEF(0x45, 0x3f<<10, 0x39<<10), |
---|
4782 | 5370 | UPDATE_COEF(0x63, 3<<14, 2<<14), |
---|
4783 | 5371 | {} |
---|
.. | .. |
---|
4787 | 5375 | case 0x10ec0255: |
---|
4788 | 5376 | alc_process_coef_fw(codec, coef0255); |
---|
4789 | 5377 | break; |
---|
| 5378 | + case 0x10ec0230: |
---|
4790 | 5379 | case 0x10ec0236: |
---|
4791 | 5380 | case 0x10ec0256: |
---|
| 5381 | + case 0x19e58326: |
---|
4792 | 5382 | alc_process_coef_fw(codec, coef0256); |
---|
4793 | 5383 | break; |
---|
4794 | 5384 | case 0x10ec0234: |
---|
.. | .. |
---|
4837 | 5427 | int val; |
---|
4838 | 5428 | bool is_ctia = false; |
---|
4839 | 5429 | struct alc_spec *spec = codec->spec; |
---|
4840 | | - static struct coef_fw coef0255[] = { |
---|
| 5430 | + static const struct coef_fw coef0255[] = { |
---|
4841 | 5431 | WRITE_COEF(0x45, 0xd089), /* combo jack auto switch control(Check type)*/ |
---|
4842 | 5432 | WRITE_COEF(0x49, 0x0149), /* combo jack auto switch control(Vref |
---|
4843 | 5433 | conteol) */ |
---|
4844 | 5434 | {} |
---|
4845 | 5435 | }; |
---|
4846 | | - static struct coef_fw coef0288[] = { |
---|
| 5436 | + static const struct coef_fw coef0288[] = { |
---|
4847 | 5437 | UPDATE_COEF(0x4f, 0xfcc0, 0xd400), /* Check Type */ |
---|
4848 | 5438 | {} |
---|
4849 | 5439 | }; |
---|
4850 | | - static struct coef_fw coef0298[] = { |
---|
| 5440 | + static const struct coef_fw coef0298[] = { |
---|
4851 | 5441 | UPDATE_COEF(0x50, 0x2000, 0x2000), |
---|
4852 | 5442 | UPDATE_COEF(0x56, 0x0006, 0x0006), |
---|
4853 | 5443 | UPDATE_COEF(0x66, 0x0008, 0), |
---|
.. | .. |
---|
4855 | 5445 | UPDATE_COEF(0x19, 0x1300, 0x1300), |
---|
4856 | 5446 | {} |
---|
4857 | 5447 | }; |
---|
4858 | | - static struct coef_fw coef0293[] = { |
---|
| 5448 | + static const struct coef_fw coef0293[] = { |
---|
4859 | 5449 | UPDATE_COEF(0x4a, 0x000f, 0x0008), /* Combo Jack auto detect */ |
---|
4860 | 5450 | WRITE_COEF(0x45, 0xD429), /* Set to ctia type */ |
---|
4861 | 5451 | {} |
---|
4862 | 5452 | }; |
---|
4863 | | - static struct coef_fw coef0688[] = { |
---|
| 5453 | + static const struct coef_fw coef0688[] = { |
---|
4864 | 5454 | WRITE_COEF(0x11, 0x0001), |
---|
4865 | 5455 | WRITE_COEF(0xb7, 0x802b), |
---|
4866 | 5456 | WRITE_COEF(0x15, 0x0d60), |
---|
4867 | 5457 | WRITE_COEF(0xc3, 0x0c00), |
---|
4868 | 5458 | {} |
---|
4869 | 5459 | }; |
---|
4870 | | - static struct coef_fw coef0274[] = { |
---|
| 5460 | + static const struct coef_fw coef0274[] = { |
---|
4871 | 5461 | UPDATE_COEF(0x4a, 0x0010, 0), |
---|
4872 | 5462 | UPDATE_COEF(0x4a, 0x8000, 0), |
---|
4873 | 5463 | WRITE_COEF(0x45, 0xd289), |
---|
4874 | 5464 | UPDATE_COEF(0x49, 0x0300, 0x0300), |
---|
4875 | 5465 | {} |
---|
4876 | 5466 | }; |
---|
| 5467 | + |
---|
| 5468 | + if (spec->no_internal_mic_pin) { |
---|
| 5469 | + alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12); |
---|
| 5470 | + return; |
---|
| 5471 | + } |
---|
4877 | 5472 | |
---|
4878 | 5473 | switch (codec->core.vendor_id) { |
---|
4879 | 5474 | case 0x10ec0255: |
---|
.. | .. |
---|
4882 | 5477 | val = alc_read_coef_idx(codec, 0x46); |
---|
4883 | 5478 | is_ctia = (val & 0x0070) == 0x0070; |
---|
4884 | 5479 | break; |
---|
| 5480 | + case 0x10ec0230: |
---|
4885 | 5481 | case 0x10ec0236: |
---|
4886 | 5482 | case 0x10ec0256: |
---|
| 5483 | + case 0x19e58326: |
---|
4887 | 5484 | alc_write_coef_idx(codec, 0x1b, 0x0e4b); |
---|
4888 | 5485 | alc_write_coef_idx(codec, 0x06, 0x6104); |
---|
4889 | 5486 | alc_write_coefex_idx(codec, 0x57, 0x3, 0x09a3); |
---|
.. | .. |
---|
5051 | 5648 | switch (new_headset_mode) { |
---|
5052 | 5649 | case ALC_HEADSET_MODE_UNPLUGGED: |
---|
5053 | 5650 | alc_headset_mode_unplugged(codec); |
---|
| 5651 | + spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN; |
---|
| 5652 | + spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN; |
---|
5054 | 5653 | spec->gen.hp_jack_present = false; |
---|
5055 | 5654 | break; |
---|
5056 | 5655 | case ALC_HEADSET_MODE_HEADSET: |
---|
.. | .. |
---|
5093 | 5692 | static void alc_update_headset_jack_cb(struct hda_codec *codec, |
---|
5094 | 5693 | struct hda_jack_callback *jack) |
---|
5095 | 5694 | { |
---|
5096 | | - struct alc_spec *spec = codec->spec; |
---|
5097 | | - spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN; |
---|
5098 | 5695 | snd_hda_gen_hp_automute(codec, jack); |
---|
5099 | 5696 | alc_update_headset_mode(codec); |
---|
5100 | 5697 | } |
---|
.. | .. |
---|
5132 | 5729 | alc_probe_headset_mode(codec); |
---|
5133 | 5730 | break; |
---|
5134 | 5731 | case HDA_FIXUP_ACT_INIT: |
---|
5135 | | - spec->current_headset_mode = 0; |
---|
| 5732 | + if (is_s3_resume(codec) || is_s4_resume(codec)) { |
---|
| 5733 | + spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN; |
---|
| 5734 | + spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN; |
---|
| 5735 | + } |
---|
5136 | 5736 | alc_update_headset_mode(codec); |
---|
5137 | 5737 | break; |
---|
5138 | 5738 | } |
---|
.. | .. |
---|
5152 | 5752 | static void alc255_set_default_jack_type(struct hda_codec *codec) |
---|
5153 | 5753 | { |
---|
5154 | 5754 | /* Set to iphone type */ |
---|
5155 | | - static struct coef_fw alc255fw[] = { |
---|
| 5755 | + static const struct coef_fw alc255fw[] = { |
---|
5156 | 5756 | WRITE_COEF(0x1b, 0x880b), |
---|
5157 | 5757 | WRITE_COEF(0x45, 0xd089), |
---|
5158 | 5758 | WRITE_COEF(0x1b, 0x080b), |
---|
.. | .. |
---|
5160 | 5760 | WRITE_COEF(0x1b, 0x0c0b), |
---|
5161 | 5761 | {} |
---|
5162 | 5762 | }; |
---|
5163 | | - static struct coef_fw alc256fw[] = { |
---|
| 5763 | + static const struct coef_fw alc256fw[] = { |
---|
5164 | 5764 | WRITE_COEF(0x1b, 0x884b), |
---|
5165 | 5765 | WRITE_COEF(0x45, 0xd089), |
---|
5166 | 5766 | WRITE_COEF(0x1b, 0x084b), |
---|
.. | .. |
---|
5172 | 5772 | case 0x10ec0255: |
---|
5173 | 5773 | alc_process_coef_fw(codec, alc255fw); |
---|
5174 | 5774 | break; |
---|
| 5775 | + case 0x10ec0230: |
---|
5175 | 5776 | case 0x10ec0236: |
---|
5176 | 5777 | case 0x10ec0256: |
---|
| 5778 | + case 0x19e58326: |
---|
5177 | 5779 | alc_process_coef_fw(codec, alc256fw); |
---|
5178 | 5780 | break; |
---|
5179 | 5781 | } |
---|
.. | .. |
---|
5301 | 5903 | * the speaker output becomes too low by some reason on Thinkpads with |
---|
5302 | 5904 | * ALC298 codec |
---|
5303 | 5905 | */ |
---|
5304 | | - static hda_nid_t preferred_pairs[] = { |
---|
| 5906 | + static const hda_nid_t preferred_pairs[] = { |
---|
5305 | 5907 | 0x14, 0x03, 0x17, 0x02, 0x21, 0x02, |
---|
5306 | 5908 | 0 |
---|
| 5909 | + }; |
---|
| 5910 | + struct alc_spec *spec = codec->spec; |
---|
| 5911 | + |
---|
| 5912 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) |
---|
| 5913 | + spec->gen.preferred_dacs = preferred_pairs; |
---|
| 5914 | +} |
---|
| 5915 | + |
---|
| 5916 | +static void alc295_fixup_asus_dacs(struct hda_codec *codec, |
---|
| 5917 | + const struct hda_fixup *fix, int action) |
---|
| 5918 | +{ |
---|
| 5919 | + static const hda_nid_t preferred_pairs[] = { |
---|
| 5920 | + 0x17, 0x02, 0x21, 0x03, 0 |
---|
5307 | 5921 | }; |
---|
5308 | 5922 | struct alc_spec *spec = codec->spec; |
---|
5309 | 5923 | |
---|
.. | .. |
---|
5552 | 6166 | /* DAC node 0x03 is giving mono output. We therefore want to |
---|
5553 | 6167 | make sure 0x14 (front speaker) and 0x15 (headphones) use the |
---|
5554 | 6168 | stereo DAC, while leaving 0x17 (bass speaker) for node 0x03. */ |
---|
5555 | | - hda_nid_t conn1[2] = { 0x0c }; |
---|
5556 | | - snd_hda_override_conn_list(codec, 0x14, 1, conn1); |
---|
5557 | | - snd_hda_override_conn_list(codec, 0x15, 1, conn1); |
---|
| 6169 | + static const hda_nid_t conn1[] = { 0x0c }; |
---|
| 6170 | + snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1); |
---|
| 6171 | + snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn1), conn1); |
---|
5558 | 6172 | } |
---|
5559 | 6173 | } |
---|
5560 | 6174 | |
---|
.. | .. |
---|
5569 | 6183 | Pin Complex), since Node 0x02 has Amp-out caps, we can adjust |
---|
5570 | 6184 | speaker's volume now. */ |
---|
5571 | 6185 | |
---|
5572 | | - hda_nid_t conn1[1] = { 0x0c }; |
---|
5573 | | - snd_hda_override_conn_list(codec, 0x17, 1, conn1); |
---|
| 6186 | + static const hda_nid_t conn1[] = { 0x0c }; |
---|
| 6187 | + snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn1), conn1); |
---|
5574 | 6188 | } |
---|
5575 | 6189 | } |
---|
5576 | 6190 | |
---|
.. | .. |
---|
5579 | 6193 | const struct hda_fixup *fix, int action) |
---|
5580 | 6194 | { |
---|
5581 | 6195 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
5582 | | - hda_nid_t conn[2] = { 0x02, 0x03 }; |
---|
5583 | | - snd_hda_override_conn_list(codec, 0x17, 2, conn); |
---|
| 6196 | + static const hda_nid_t conn[] = { 0x02, 0x03 }; |
---|
| 6197 | + snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); |
---|
5584 | 6198 | } |
---|
5585 | 6199 | } |
---|
5586 | 6200 | |
---|
.. | .. |
---|
5589 | 6203 | const struct hda_fixup *fix, int action) |
---|
5590 | 6204 | { |
---|
5591 | 6205 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
5592 | | - hda_nid_t conn[1] = { 0x02 }; |
---|
5593 | | - snd_hda_override_conn_list(codec, 0x17, 1, conn); |
---|
| 6206 | + static const hda_nid_t conn[] = { 0x02 }; |
---|
| 6207 | + snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); |
---|
5594 | 6208 | } |
---|
5595 | 6209 | } |
---|
5596 | 6210 | |
---|
.. | .. |
---|
5640 | 6254 | } |
---|
5641 | 6255 | } |
---|
5642 | 6256 | |
---|
| 6257 | +/* Quirk for Thinkpad X1 7th and 8th Gen |
---|
| 6258 | + * The following fixed routing needed |
---|
| 6259 | + * DAC1 (NID 0x02) -> Speaker (NID 0x14); some eq applied secretly |
---|
| 6260 | + * DAC2 (NID 0x03) -> Bass (NID 0x17) & Headphone (NID 0x21); sharing a DAC |
---|
| 6261 | + * DAC3 (NID 0x06) -> Unused, due to the lack of volume amp |
---|
| 6262 | + */ |
---|
| 6263 | +static void alc285_fixup_thinkpad_x1_gen7(struct hda_codec *codec, |
---|
| 6264 | + const struct hda_fixup *fix, int action) |
---|
| 6265 | +{ |
---|
| 6266 | + static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */ |
---|
| 6267 | + static const hda_nid_t preferred_pairs[] = { |
---|
| 6268 | + 0x14, 0x02, 0x17, 0x03, 0x21, 0x03, 0 |
---|
| 6269 | + }; |
---|
| 6270 | + struct alc_spec *spec = codec->spec; |
---|
| 6271 | + |
---|
| 6272 | + switch (action) { |
---|
| 6273 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 6274 | + snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); |
---|
| 6275 | + spec->gen.preferred_dacs = preferred_pairs; |
---|
| 6276 | + break; |
---|
| 6277 | + case HDA_FIXUP_ACT_BUILD: |
---|
| 6278 | + /* The generic parser creates somewhat unintuitive volume ctls |
---|
| 6279 | + * with the fixed routing above, and the shared DAC2 may be |
---|
| 6280 | + * confusing for PA. |
---|
| 6281 | + * Rename those to unique names so that PA doesn't touch them |
---|
| 6282 | + * and use only Master volume. |
---|
| 6283 | + */ |
---|
| 6284 | + rename_ctl(codec, "Front Playback Volume", "DAC1 Playback Volume"); |
---|
| 6285 | + rename_ctl(codec, "Bass Speaker Playback Volume", "DAC2 Playback Volume"); |
---|
| 6286 | + break; |
---|
| 6287 | + } |
---|
| 6288 | +} |
---|
| 6289 | + |
---|
5643 | 6290 | static void alc233_alc662_fixup_lenovo_dual_codecs(struct hda_codec *codec, |
---|
5644 | 6291 | const struct hda_fixup *fix, |
---|
5645 | 6292 | int action) |
---|
.. | .. |
---|
5678 | 6325 | const struct hda_fixup *fix, int action) |
---|
5679 | 6326 | { |
---|
5680 | 6327 | struct alc_spec *spec = codec->spec; |
---|
5681 | | - static hda_nid_t preferred_pairs[] = { |
---|
| 6328 | + static const hda_nid_t preferred_pairs[] = { |
---|
5682 | 6329 | 0x21, 0x03, 0x1b, 0x03, 0x16, 0x02, |
---|
5683 | 6330 | 0 |
---|
5684 | 6331 | }; |
---|
.. | .. |
---|
5691 | 6338 | codec->power_save_node = 0; |
---|
5692 | 6339 | } |
---|
5693 | 6340 | |
---|
| 6341 | +/* avoid DAC 0x06 for bass speaker 0x17; it has no volume control */ |
---|
| 6342 | +static void alc289_fixup_asus_ga401(struct hda_codec *codec, |
---|
| 6343 | + const struct hda_fixup *fix, int action) |
---|
| 6344 | +{ |
---|
| 6345 | + static const hda_nid_t preferred_pairs[] = { |
---|
| 6346 | + 0x14, 0x02, 0x17, 0x02, 0x21, 0x03, 0 |
---|
| 6347 | + }; |
---|
| 6348 | + struct alc_spec *spec = codec->spec; |
---|
| 6349 | + |
---|
| 6350 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
| 6351 | + spec->gen.preferred_dacs = preferred_pairs; |
---|
| 6352 | + spec->gen.obey_preferred_dacs = 1; |
---|
| 6353 | + } |
---|
| 6354 | +} |
---|
| 6355 | + |
---|
5694 | 6356 | /* The DAC of NID 0x3 will introduce click/pop noise on headphones, so invalidate it */ |
---|
5695 | 6357 | static void alc285_fixup_invalidate_dacs(struct hda_codec *codec, |
---|
5696 | 6358 | const struct hda_fixup *fix, int action) |
---|
.. | .. |
---|
5701 | 6363 | snd_hda_override_wcaps(codec, 0x03, 0); |
---|
5702 | 6364 | } |
---|
5703 | 6365 | |
---|
| 6366 | +static void alc_combo_jack_hp_jd_restart(struct hda_codec *codec) |
---|
| 6367 | +{ |
---|
| 6368 | + switch (codec->core.vendor_id) { |
---|
| 6369 | + case 0x10ec0274: |
---|
| 6370 | + case 0x10ec0294: |
---|
| 6371 | + case 0x10ec0225: |
---|
| 6372 | + case 0x10ec0295: |
---|
| 6373 | + case 0x10ec0299: |
---|
| 6374 | + alc_update_coef_idx(codec, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */ |
---|
| 6375 | + alc_update_coef_idx(codec, 0x4a, 0x8000, 0 << 15); |
---|
| 6376 | + break; |
---|
| 6377 | + case 0x10ec0230: |
---|
| 6378 | + case 0x10ec0235: |
---|
| 6379 | + case 0x10ec0236: |
---|
| 6380 | + case 0x10ec0255: |
---|
| 6381 | + case 0x10ec0256: |
---|
| 6382 | + case 0x19e58326: |
---|
| 6383 | + alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */ |
---|
| 6384 | + alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15); |
---|
| 6385 | + break; |
---|
| 6386 | + } |
---|
| 6387 | +} |
---|
| 6388 | + |
---|
| 6389 | +static void alc295_fixup_chromebook(struct hda_codec *codec, |
---|
| 6390 | + const struct hda_fixup *fix, int action) |
---|
| 6391 | +{ |
---|
| 6392 | + struct alc_spec *spec = codec->spec; |
---|
| 6393 | + |
---|
| 6394 | + switch (action) { |
---|
| 6395 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 6396 | + spec->ultra_low_power = true; |
---|
| 6397 | + break; |
---|
| 6398 | + case HDA_FIXUP_ACT_INIT: |
---|
| 6399 | + alc_combo_jack_hp_jd_restart(codec); |
---|
| 6400 | + break; |
---|
| 6401 | + } |
---|
| 6402 | +} |
---|
| 6403 | + |
---|
5704 | 6404 | static void alc_fixup_disable_mic_vref(struct hda_codec *codec, |
---|
5705 | 6405 | const struct hda_fixup *fix, int action) |
---|
5706 | 6406 | { |
---|
5707 | 6407 | if (action == HDA_FIXUP_ACT_PRE_PROBE) |
---|
5708 | 6408 | snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ); |
---|
| 6409 | +} |
---|
| 6410 | + |
---|
| 6411 | + |
---|
| 6412 | +static void alc294_gx502_toggle_output(struct hda_codec *codec, |
---|
| 6413 | + struct hda_jack_callback *cb) |
---|
| 6414 | +{ |
---|
| 6415 | + /* The Windows driver sets the codec up in a very different way where |
---|
| 6416 | + * it appears to leave 0x10 = 0x8a20 set. For Linux we need to toggle it |
---|
| 6417 | + */ |
---|
| 6418 | + if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT) |
---|
| 6419 | + alc_write_coef_idx(codec, 0x10, 0x8a20); |
---|
| 6420 | + else |
---|
| 6421 | + alc_write_coef_idx(codec, 0x10, 0x0a20); |
---|
| 6422 | +} |
---|
| 6423 | + |
---|
| 6424 | +static void alc294_fixup_gx502_hp(struct hda_codec *codec, |
---|
| 6425 | + const struct hda_fixup *fix, int action) |
---|
| 6426 | +{ |
---|
| 6427 | + /* Pin 0x21: headphones/headset mic */ |
---|
| 6428 | + if (!is_jack_detectable(codec, 0x21)) |
---|
| 6429 | + return; |
---|
| 6430 | + |
---|
| 6431 | + switch (action) { |
---|
| 6432 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 6433 | + snd_hda_jack_detect_enable_callback(codec, 0x21, |
---|
| 6434 | + alc294_gx502_toggle_output); |
---|
| 6435 | + break; |
---|
| 6436 | + case HDA_FIXUP_ACT_INIT: |
---|
| 6437 | + /* Make sure to start in a correct state, i.e. if |
---|
| 6438 | + * headphones have been plugged in before powering up the system |
---|
| 6439 | + */ |
---|
| 6440 | + alc294_gx502_toggle_output(codec, NULL); |
---|
| 6441 | + break; |
---|
| 6442 | + } |
---|
| 6443 | +} |
---|
| 6444 | + |
---|
| 6445 | +static void alc294_gu502_toggle_output(struct hda_codec *codec, |
---|
| 6446 | + struct hda_jack_callback *cb) |
---|
| 6447 | +{ |
---|
| 6448 | + /* Windows sets 0x10 to 0x8420 for Node 0x20 which is |
---|
| 6449 | + * responsible from changes between speakers and headphones |
---|
| 6450 | + */ |
---|
| 6451 | + if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT) |
---|
| 6452 | + alc_write_coef_idx(codec, 0x10, 0x8420); |
---|
| 6453 | + else |
---|
| 6454 | + alc_write_coef_idx(codec, 0x10, 0x0a20); |
---|
| 6455 | +} |
---|
| 6456 | + |
---|
| 6457 | +static void alc294_fixup_gu502_hp(struct hda_codec *codec, |
---|
| 6458 | + const struct hda_fixup *fix, int action) |
---|
| 6459 | +{ |
---|
| 6460 | + if (!is_jack_detectable(codec, 0x21)) |
---|
| 6461 | + return; |
---|
| 6462 | + |
---|
| 6463 | + switch (action) { |
---|
| 6464 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 6465 | + snd_hda_jack_detect_enable_callback(codec, 0x21, |
---|
| 6466 | + alc294_gu502_toggle_output); |
---|
| 6467 | + break; |
---|
| 6468 | + case HDA_FIXUP_ACT_INIT: |
---|
| 6469 | + alc294_gu502_toggle_output(codec, NULL); |
---|
| 6470 | + break; |
---|
| 6471 | + } |
---|
| 6472 | +} |
---|
| 6473 | + |
---|
| 6474 | +static void alc285_fixup_hp_gpio_amp_init(struct hda_codec *codec, |
---|
| 6475 | + const struct hda_fixup *fix, int action) |
---|
| 6476 | +{ |
---|
| 6477 | + if (action != HDA_FIXUP_ACT_INIT) |
---|
| 6478 | + return; |
---|
| 6479 | + |
---|
| 6480 | + msleep(100); |
---|
| 6481 | + alc_write_coef_idx(codec, 0x65, 0x0); |
---|
| 6482 | +} |
---|
| 6483 | + |
---|
| 6484 | +static void alc274_fixup_hp_headset_mic(struct hda_codec *codec, |
---|
| 6485 | + const struct hda_fixup *fix, int action) |
---|
| 6486 | +{ |
---|
| 6487 | + switch (action) { |
---|
| 6488 | + case HDA_FIXUP_ACT_INIT: |
---|
| 6489 | + alc_combo_jack_hp_jd_restart(codec); |
---|
| 6490 | + break; |
---|
| 6491 | + } |
---|
| 6492 | +} |
---|
| 6493 | + |
---|
| 6494 | +static void alc_fixup_no_int_mic(struct hda_codec *codec, |
---|
| 6495 | + const struct hda_fixup *fix, int action) |
---|
| 6496 | +{ |
---|
| 6497 | + struct alc_spec *spec = codec->spec; |
---|
| 6498 | + |
---|
| 6499 | + switch (action) { |
---|
| 6500 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 6501 | + /* Mic RING SLEEVE swap for combo jack */ |
---|
| 6502 | + alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12); |
---|
| 6503 | + spec->no_internal_mic_pin = true; |
---|
| 6504 | + break; |
---|
| 6505 | + case HDA_FIXUP_ACT_INIT: |
---|
| 6506 | + alc_combo_jack_hp_jd_restart(codec); |
---|
| 6507 | + break; |
---|
| 6508 | + } |
---|
| 6509 | +} |
---|
| 6510 | + |
---|
| 6511 | +/* GPIO1 = amplifier on/off |
---|
| 6512 | + * GPIO3 = mic mute LED |
---|
| 6513 | + */ |
---|
| 6514 | +static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec, |
---|
| 6515 | + const struct hda_fixup *fix, int action) |
---|
| 6516 | +{ |
---|
| 6517 | + static const hda_nid_t conn[] = { 0x02 }; |
---|
| 6518 | + |
---|
| 6519 | + struct alc_spec *spec = codec->spec; |
---|
| 6520 | + static const struct hda_pintbl pincfgs[] = { |
---|
| 6521 | + { 0x14, 0x90170110 }, /* front/high speakers */ |
---|
| 6522 | + { 0x17, 0x90170130 }, /* back/bass speakers */ |
---|
| 6523 | + { } |
---|
| 6524 | + }; |
---|
| 6525 | + |
---|
| 6526 | + //enable micmute led |
---|
| 6527 | + alc_fixup_hp_gpio_led(codec, action, 0x00, 0x04); |
---|
| 6528 | + |
---|
| 6529 | + switch (action) { |
---|
| 6530 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 6531 | + spec->micmute_led_polarity = 1; |
---|
| 6532 | + /* needed for amp of back speakers */ |
---|
| 6533 | + spec->gpio_mask |= 0x01; |
---|
| 6534 | + spec->gpio_dir |= 0x01; |
---|
| 6535 | + snd_hda_apply_pincfgs(codec, pincfgs); |
---|
| 6536 | + /* share DAC to have unified volume control */ |
---|
| 6537 | + snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn); |
---|
| 6538 | + snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); |
---|
| 6539 | + break; |
---|
| 6540 | + case HDA_FIXUP_ACT_INIT: |
---|
| 6541 | + /* need to toggle GPIO to enable the amp of back speakers */ |
---|
| 6542 | + alc_update_gpio_data(codec, 0x01, true); |
---|
| 6543 | + msleep(100); |
---|
| 6544 | + alc_update_gpio_data(codec, 0x01, false); |
---|
| 6545 | + break; |
---|
| 6546 | + } |
---|
| 6547 | +} |
---|
| 6548 | + |
---|
| 6549 | +static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec, |
---|
| 6550 | + const struct hda_fixup *fix, int action) |
---|
| 6551 | +{ |
---|
| 6552 | + static const hda_nid_t conn[] = { 0x02 }; |
---|
| 6553 | + static const struct hda_pintbl pincfgs[] = { |
---|
| 6554 | + { 0x14, 0x90170110 }, /* rear speaker */ |
---|
| 6555 | + { } |
---|
| 6556 | + }; |
---|
| 6557 | + |
---|
| 6558 | + switch (action) { |
---|
| 6559 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 6560 | + snd_hda_apply_pincfgs(codec, pincfgs); |
---|
| 6561 | + /* force front speaker to DAC1 */ |
---|
| 6562 | + snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); |
---|
| 6563 | + break; |
---|
| 6564 | + } |
---|
5709 | 6565 | } |
---|
5710 | 6566 | |
---|
5711 | 6567 | /* for hda_fixup_thinkpad_acpi() */ |
---|
.. | .. |
---|
5718 | 6574 | hda_fixup_thinkpad_acpi(codec, fix, action); |
---|
5719 | 6575 | } |
---|
5720 | 6576 | |
---|
5721 | | -/* for dell wmi mic mute led */ |
---|
5722 | | -#include "dell_wmi_helper.c" |
---|
| 6577 | +/* Fixup for Lenovo Legion 15IMHg05 speaker output on headset removal. */ |
---|
| 6578 | +static void alc287_fixup_legion_15imhg05_speakers(struct hda_codec *codec, |
---|
| 6579 | + const struct hda_fixup *fix, |
---|
| 6580 | + int action) |
---|
| 6581 | +{ |
---|
| 6582 | + struct alc_spec *spec = codec->spec; |
---|
| 6583 | + |
---|
| 6584 | + switch (action) { |
---|
| 6585 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 6586 | + spec->gen.suppress_auto_mute = 1; |
---|
| 6587 | + break; |
---|
| 6588 | + } |
---|
| 6589 | +} |
---|
5723 | 6590 | |
---|
5724 | 6591 | /* for alc295_fixup_hp_top_speakers */ |
---|
5725 | 6592 | #include "hp_x360_helper.c" |
---|
| 6593 | + |
---|
| 6594 | +/* for alc285_fixup_ideapad_s740_coef() */ |
---|
| 6595 | +#include "ideapad_s740_helper.c" |
---|
| 6596 | + |
---|
| 6597 | +static const struct coef_fw alc256_fixup_set_coef_defaults_coefs[] = { |
---|
| 6598 | + WRITE_COEF(0x10, 0x0020), WRITE_COEF(0x24, 0x0000), |
---|
| 6599 | + WRITE_COEF(0x26, 0x0000), WRITE_COEF(0x29, 0x3000), |
---|
| 6600 | + WRITE_COEF(0x37, 0xfe05), WRITE_COEF(0x45, 0x5089), |
---|
| 6601 | + {} |
---|
| 6602 | +}; |
---|
| 6603 | + |
---|
| 6604 | +static void alc256_fixup_set_coef_defaults(struct hda_codec *codec, |
---|
| 6605 | + const struct hda_fixup *fix, |
---|
| 6606 | + int action) |
---|
| 6607 | +{ |
---|
| 6608 | + /* |
---|
| 6609 | + * A certain other OS sets these coeffs to different values. On at least |
---|
| 6610 | + * one TongFang barebone these settings might survive even a cold |
---|
| 6611 | + * reboot. So to restore a clean slate the values are explicitly reset |
---|
| 6612 | + * to default here. Without this, the external microphone is always in a |
---|
| 6613 | + * plugged-in state, while the internal microphone is always in an |
---|
| 6614 | + * unplugged state, breaking the ability to use the internal microphone. |
---|
| 6615 | + */ |
---|
| 6616 | + alc_process_coef_fw(codec, alc256_fixup_set_coef_defaults_coefs); |
---|
| 6617 | +} |
---|
| 6618 | + |
---|
| 6619 | +static const struct coef_fw alc233_fixup_no_audio_jack_coefs[] = { |
---|
| 6620 | + WRITE_COEF(0x1a, 0x9003), WRITE_COEF(0x1b, 0x0e2b), WRITE_COEF(0x37, 0xfe06), |
---|
| 6621 | + WRITE_COEF(0x38, 0x4981), WRITE_COEF(0x45, 0xd489), WRITE_COEF(0x46, 0x0074), |
---|
| 6622 | + WRITE_COEF(0x49, 0x0149), |
---|
| 6623 | + {} |
---|
| 6624 | +}; |
---|
| 6625 | + |
---|
| 6626 | +static void alc233_fixup_no_audio_jack(struct hda_codec *codec, |
---|
| 6627 | + const struct hda_fixup *fix, |
---|
| 6628 | + int action) |
---|
| 6629 | +{ |
---|
| 6630 | + /* |
---|
| 6631 | + * The audio jack input and output is not detected on the ASRock NUC Box |
---|
| 6632 | + * 1100 series when cold booting without this fix. Warm rebooting from a |
---|
| 6633 | + * certain other OS makes the audio functional, as COEF settings are |
---|
| 6634 | + * preserved in this case. This fix sets these altered COEF values as |
---|
| 6635 | + * the default. |
---|
| 6636 | + */ |
---|
| 6637 | + alc_process_coef_fw(codec, alc233_fixup_no_audio_jack_coefs); |
---|
| 6638 | +} |
---|
| 6639 | + |
---|
| 6640 | +static void alc256_fixup_mic_no_presence_and_resume(struct hda_codec *codec, |
---|
| 6641 | + const struct hda_fixup *fix, |
---|
| 6642 | + int action) |
---|
| 6643 | +{ |
---|
| 6644 | + /* |
---|
| 6645 | + * The Clevo NJ51CU comes either with the ALC293 or the ALC256 codec, |
---|
| 6646 | + * but uses the 0x8686 subproduct id in both cases. The ALC256 codec |
---|
| 6647 | + * needs an additional quirk for sound working after suspend and resume. |
---|
| 6648 | + */ |
---|
| 6649 | + if (codec->core.vendor_id == 0x10ec0256) { |
---|
| 6650 | + alc_update_coef_idx(codec, 0x10, 1<<9, 0); |
---|
| 6651 | + snd_hda_codec_set_pincfg(codec, 0x19, 0x04a11120); |
---|
| 6652 | + } else { |
---|
| 6653 | + snd_hda_codec_set_pincfg(codec, 0x1a, 0x04a1113c); |
---|
| 6654 | + } |
---|
| 6655 | +} |
---|
5726 | 6656 | |
---|
5727 | 6657 | enum { |
---|
5728 | 6658 | ALC269_FIXUP_GPIO2, |
---|
.. | .. |
---|
5778 | 6708 | ALC269_FIXUP_LIMIT_INT_MIC_BOOST, |
---|
5779 | 6709 | ALC269VB_FIXUP_ASUS_ZENBOOK, |
---|
5780 | 6710 | ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A, |
---|
| 6711 | + ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE, |
---|
5781 | 6712 | ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED, |
---|
5782 | 6713 | ALC269VB_FIXUP_ORDISSIMO_EVE2, |
---|
5783 | 6714 | ALC283_FIXUP_CHROME_BOOK, |
---|
.. | .. |
---|
5800 | 6731 | ALC292_FIXUP_TPT440_DOCK, |
---|
5801 | 6732 | ALC292_FIXUP_TPT440, |
---|
5802 | 6733 | ALC283_FIXUP_HEADSET_MIC, |
---|
5803 | | - ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED, |
---|
| 6734 | + ALC255_FIXUP_MIC_MUTE_LED, |
---|
5804 | 6735 | ALC282_FIXUP_ASPIRE_V5_PINS, |
---|
| 6736 | + ALC269VB_FIXUP_ASPIRE_E1_COEF, |
---|
5805 | 6737 | ALC280_FIXUP_HP_GPIO4, |
---|
5806 | 6738 | ALC286_FIXUP_HP_GPIO_LED, |
---|
5807 | 6739 | ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, |
---|
5808 | 6740 | ALC280_FIXUP_HP_DOCK_PINS, |
---|
5809 | 6741 | ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, |
---|
5810 | 6742 | ALC280_FIXUP_HP_9480M, |
---|
| 6743 | + ALC245_FIXUP_HP_X360_AMP, |
---|
| 6744 | + ALC285_FIXUP_HP_SPECTRE_X360_EB1, |
---|
5811 | 6745 | ALC288_FIXUP_DELL_HEADSET_MODE, |
---|
5812 | 6746 | ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
5813 | 6747 | ALC288_FIXUP_DELL_XPS_13, |
---|
5814 | 6748 | ALC288_FIXUP_DISABLE_AAMIX, |
---|
| 6749 | + ALC292_FIXUP_DELL_E7X_AAMIX, |
---|
5815 | 6750 | ALC292_FIXUP_DELL_E7X, |
---|
5816 | 6751 | ALC292_FIXUP_DISABLE_AAMIX, |
---|
5817 | 6752 | ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK, |
---|
| 6753 | + ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE, |
---|
5818 | 6754 | ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
5819 | 6755 | ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE, |
---|
5820 | 6756 | ALC275_FIXUP_DELL_XPS, |
---|
.. | .. |
---|
5832 | 6768 | ALC298_FIXUP_LENOVO_SPK_VOLUME, |
---|
5833 | 6769 | ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER, |
---|
5834 | 6770 | ALC269_FIXUP_ATIV_BOOK_8, |
---|
| 6771 | + ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE, |
---|
5835 | 6772 | ALC221_FIXUP_HP_MIC_NO_PRESENCE, |
---|
5836 | 6773 | ALC256_FIXUP_ASUS_HEADSET_MODE, |
---|
5837 | 6774 | ALC256_FIXUP_ASUS_MIC, |
---|
.. | .. |
---|
5850 | 6787 | ALC298_FIXUP_TPT470_DOCK, |
---|
5851 | 6788 | ALC255_FIXUP_DUMMY_LINEOUT_VERB, |
---|
5852 | 6789 | ALC255_FIXUP_DELL_HEADSET_MIC, |
---|
5853 | | - ALC256_FIXUP_HUAWEI_MBXP_PINS, |
---|
| 6790 | + ALC256_FIXUP_HUAWEI_MACH_WX9_PINS, |
---|
| 6791 | + ALC298_FIXUP_HUAWEI_MBX_STEREO, |
---|
5854 | 6792 | ALC295_FIXUP_HP_X360, |
---|
5855 | 6793 | ALC221_FIXUP_HP_HEADSET_MIC, |
---|
5856 | 6794 | ALC285_FIXUP_LENOVO_HEADPHONE_NOISE, |
---|
.. | .. |
---|
5862 | 6800 | ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE, |
---|
5863 | 6801 | ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE, |
---|
5864 | 6802 | ALC255_FIXUP_ACER_HEADSET_MIC, |
---|
| 6803 | + ALC295_FIXUP_CHROME_BOOK, |
---|
| 6804 | + ALC225_FIXUP_HEADSET_JACK, |
---|
5865 | 6805 | ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE, |
---|
5866 | 6806 | ALC225_FIXUP_WYSE_AUTO_MUTE, |
---|
5867 | 6807 | ALC225_FIXUP_WYSE_DISABLE_MIC_VREF, |
---|
.. | .. |
---|
5874 | 6814 | ALC289_FIXUP_DUAL_SPK, |
---|
5875 | 6815 | ALC294_FIXUP_SPK2_TO_DAC1, |
---|
5876 | 6816 | ALC294_FIXUP_ASUS_DUAL_SPK, |
---|
| 6817 | + ALC285_FIXUP_THINKPAD_X1_GEN7, |
---|
| 6818 | + ALC285_FIXUP_THINKPAD_HEADSET_JACK, |
---|
5877 | 6819 | ALC294_FIXUP_ASUS_HPE, |
---|
| 6820 | + ALC294_FIXUP_ASUS_COEF_1B, |
---|
| 6821 | + ALC294_FIXUP_ASUS_GX502_HP, |
---|
| 6822 | + ALC294_FIXUP_ASUS_GX502_PINS, |
---|
| 6823 | + ALC294_FIXUP_ASUS_GX502_VERBS, |
---|
| 6824 | + ALC294_FIXUP_ASUS_GU502_HP, |
---|
| 6825 | + ALC294_FIXUP_ASUS_GU502_PINS, |
---|
| 6826 | + ALC294_FIXUP_ASUS_GU502_VERBS, |
---|
| 6827 | + ALC294_FIXUP_ASUS_G513_PINS, |
---|
| 6828 | + ALC285_FIXUP_ASUS_G533Z_PINS, |
---|
5878 | 6829 | ALC285_FIXUP_HP_GPIO_LED, |
---|
| 6830 | + ALC285_FIXUP_HP_MUTE_LED, |
---|
| 6831 | + ALC236_FIXUP_HP_GPIO_LED, |
---|
| 6832 | + ALC236_FIXUP_HP_MUTE_LED, |
---|
| 6833 | + ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF, |
---|
| 6834 | + ALC298_FIXUP_SAMSUNG_AMP, |
---|
| 6835 | + ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, |
---|
| 6836 | + ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, |
---|
| 6837 | + ALC295_FIXUP_ASUS_MIC_NO_PRESENCE, |
---|
| 6838 | + ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS, |
---|
| 6839 | + ALC269VC_FIXUP_ACER_HEADSET_MIC, |
---|
| 6840 | + ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE, |
---|
| 6841 | + ALC289_FIXUP_ASUS_GA401, |
---|
| 6842 | + ALC289_FIXUP_ASUS_GA502, |
---|
| 6843 | + ALC256_FIXUP_ACER_MIC_NO_PRESENCE, |
---|
| 6844 | + ALC285_FIXUP_HP_GPIO_AMP_INIT, |
---|
| 6845 | + ALC269_FIXUP_CZC_B20, |
---|
| 6846 | + ALC269_FIXUP_CZC_TMI, |
---|
| 6847 | + ALC269_FIXUP_CZC_L101, |
---|
| 6848 | + ALC269_FIXUP_LEMOTE_A1802, |
---|
| 6849 | + ALC269_FIXUP_LEMOTE_A190X, |
---|
| 6850 | + ALC256_FIXUP_INTEL_NUC8_RUGGED, |
---|
| 6851 | + ALC233_FIXUP_INTEL_NUC8_DMIC, |
---|
| 6852 | + ALC233_FIXUP_INTEL_NUC8_BOOST, |
---|
| 6853 | + ALC256_FIXUP_INTEL_NUC10, |
---|
| 6854 | + ALC255_FIXUP_XIAOMI_HEADSET_MIC, |
---|
| 6855 | + ALC274_FIXUP_HP_MIC, |
---|
| 6856 | + ALC274_FIXUP_HP_HEADSET_MIC, |
---|
| 6857 | + ALC274_FIXUP_HP_ENVY_GPIO, |
---|
| 6858 | + ALC256_FIXUP_ASUS_HPE, |
---|
| 6859 | + ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK, |
---|
| 6860 | + ALC287_FIXUP_HP_GPIO_LED, |
---|
| 6861 | + ALC256_FIXUP_HP_HEADSET_MIC, |
---|
| 6862 | + ALC245_FIXUP_HP_GPIO_LED, |
---|
| 6863 | + ALC236_FIXUP_DELL_AIO_HEADSET_MIC, |
---|
| 6864 | + ALC282_FIXUP_ACER_DISABLE_LINEOUT, |
---|
| 6865 | + ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST, |
---|
| 6866 | + ALC256_FIXUP_ACER_HEADSET_MIC, |
---|
| 6867 | + ALC285_FIXUP_IDEAPAD_S740_COEF, |
---|
| 6868 | + ALC295_FIXUP_ASUS_DACS, |
---|
| 6869 | + ALC295_FIXUP_HP_OMEN, |
---|
| 6870 | + ALC285_FIXUP_HP_SPECTRE_X360, |
---|
| 6871 | + ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, |
---|
| 6872 | + ALC623_FIXUP_LENOVO_THINKSTATION_P340, |
---|
| 6873 | + ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, |
---|
| 6874 | + ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST, |
---|
| 6875 | + ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS, |
---|
| 6876 | + ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE, |
---|
| 6877 | + ALC287_FIXUP_YOGA7_14ITL_SPEAKERS, |
---|
| 6878 | + ALC298_FIXUP_LENOVO_C940_DUET7, |
---|
| 6879 | + ALC287_FIXUP_13S_GEN2_SPEAKERS, |
---|
| 6880 | + ALC256_FIXUP_SET_COEF_DEFAULTS, |
---|
| 6881 | + ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE, |
---|
| 6882 | + ALC233_FIXUP_NO_AUDIO_JACK, |
---|
| 6883 | + ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME, |
---|
| 6884 | + ALC285_FIXUP_LEGION_Y9000X_SPEAKERS, |
---|
| 6885 | + ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE, |
---|
| 6886 | + ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED, |
---|
5879 | 6887 | }; |
---|
| 6888 | + |
---|
| 6889 | +/* A special fixup for Lenovo C940 and Yoga Duet 7; |
---|
| 6890 | + * both have the very same PCI SSID, and we need to apply different fixups |
---|
| 6891 | + * depending on the codec ID |
---|
| 6892 | + */ |
---|
| 6893 | +static void alc298_fixup_lenovo_c940_duet7(struct hda_codec *codec, |
---|
| 6894 | + const struct hda_fixup *fix, |
---|
| 6895 | + int action) |
---|
| 6896 | +{ |
---|
| 6897 | + int id; |
---|
| 6898 | + |
---|
| 6899 | + if (codec->core.vendor_id == 0x10ec0298) |
---|
| 6900 | + id = ALC298_FIXUP_LENOVO_SPK_VOLUME; /* C940 */ |
---|
| 6901 | + else |
---|
| 6902 | + id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* Duet 7 */ |
---|
| 6903 | + __snd_hda_apply_fixup(codec, id, action, 0); |
---|
| 6904 | +} |
---|
5880 | 6905 | |
---|
5881 | 6906 | static const struct hda_fixup alc269_fixups[] = { |
---|
5882 | 6907 | [ALC269_FIXUP_GPIO2] = { |
---|
.. | .. |
---|
6133 | 7158 | .type = HDA_FIXUP_FUNC, |
---|
6134 | 7159 | .v.func = alc_fixup_headset_mode, |
---|
6135 | 7160 | .chained = true, |
---|
6136 | | - .chain_id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED |
---|
| 7161 | + .chain_id = ALC255_FIXUP_MIC_MUTE_LED |
---|
6137 | 7162 | }, |
---|
6138 | 7163 | [ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC] = { |
---|
6139 | 7164 | .type = HDA_FIXUP_FUNC, |
---|
.. | .. |
---|
6157 | 7182 | .chained = true, |
---|
6158 | 7183 | .chain_id = ALC269_FIXUP_HEADSET_MIC |
---|
6159 | 7184 | }, |
---|
6160 | | - [ALC256_FIXUP_HUAWEI_MBXP_PINS] = { |
---|
| 7185 | + [ALC256_FIXUP_HUAWEI_MACH_WX9_PINS] = { |
---|
6161 | 7186 | .type = HDA_FIXUP_PINS, |
---|
6162 | 7187 | .v.pins = (const struct hda_pintbl[]) { |
---|
6163 | 7188 | {0x12, 0x90a60130}, |
---|
.. | .. |
---|
6172 | 7197 | {0x21, 0x04211020}, |
---|
6173 | 7198 | { } |
---|
6174 | 7199 | }, |
---|
| 7200 | + .chained = true, |
---|
| 7201 | + .chain_id = ALC255_FIXUP_MIC_MUTE_LED |
---|
| 7202 | + }, |
---|
| 7203 | + [ALC298_FIXUP_HUAWEI_MBX_STEREO] = { |
---|
| 7204 | + .type = HDA_FIXUP_FUNC, |
---|
| 7205 | + .v.func = alc298_fixup_huawei_mbx_stereo, |
---|
| 7206 | + .chained = true, |
---|
| 7207 | + .chain_id = ALC255_FIXUP_MIC_MUTE_LED |
---|
6175 | 7208 | }, |
---|
6176 | 7209 | [ALC269_FIXUP_ASUS_X101_FUNC] = { |
---|
6177 | 7210 | .type = HDA_FIXUP_FUNC, |
---|
.. | .. |
---|
6254 | 7287 | }, |
---|
6255 | 7288 | .chained = true, |
---|
6256 | 7289 | .chain_id = ALC269VB_FIXUP_ASUS_ZENBOOK, |
---|
| 7290 | + }, |
---|
| 7291 | + [ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE] = { |
---|
| 7292 | + .type = HDA_FIXUP_PINS, |
---|
| 7293 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 7294 | + { 0x18, 0x01a110f0 }, /* use as headset mic */ |
---|
| 7295 | + { } |
---|
| 7296 | + }, |
---|
| 7297 | + .chained = true, |
---|
| 7298 | + .chain_id = ALC269_FIXUP_HEADSET_MIC |
---|
6257 | 7299 | }, |
---|
6258 | 7300 | [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = { |
---|
6259 | 7301 | .type = HDA_FIXUP_FUNC, |
---|
.. | .. |
---|
6375 | 7417 | .type = HDA_FIXUP_FUNC, |
---|
6376 | 7418 | .v.func = alc_fixup_headset_mode_alc255, |
---|
6377 | 7419 | .chained = true, |
---|
6378 | | - .chain_id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED |
---|
| 7420 | + .chain_id = ALC255_FIXUP_MIC_MUTE_LED |
---|
6379 | 7421 | }, |
---|
6380 | 7422 | [ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC] = { |
---|
6381 | 7423 | .type = HDA_FIXUP_FUNC, |
---|
.. | .. |
---|
6410 | 7452 | { }, |
---|
6411 | 7453 | }, |
---|
6412 | 7454 | }, |
---|
6413 | | - [ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED] = { |
---|
| 7455 | + [ALC255_FIXUP_MIC_MUTE_LED] = { |
---|
6414 | 7456 | .type = HDA_FIXUP_FUNC, |
---|
6415 | | - .v.func = alc_fixup_dell_wmi, |
---|
| 7457 | + .v.func = alc_fixup_micmute_led, |
---|
6416 | 7458 | }, |
---|
6417 | 7459 | [ALC282_FIXUP_ASPIRE_V5_PINS] = { |
---|
6418 | 7460 | .type = HDA_FIXUP_PINS, |
---|
.. | .. |
---|
6429 | 7471 | { 0x21, 0x0321101f }, |
---|
6430 | 7472 | { }, |
---|
6431 | 7473 | }, |
---|
| 7474 | + }, |
---|
| 7475 | + [ALC269VB_FIXUP_ASPIRE_E1_COEF] = { |
---|
| 7476 | + .type = HDA_FIXUP_FUNC, |
---|
| 7477 | + .v.func = alc269vb_fixup_aspire_e1_coef, |
---|
6432 | 7478 | }, |
---|
6433 | 7479 | [ALC280_FIXUP_HP_GPIO4] = { |
---|
6434 | 7480 | .type = HDA_FIXUP_FUNC, |
---|
.. | .. |
---|
6467 | 7513 | .type = HDA_FIXUP_FUNC, |
---|
6468 | 7514 | .v.func = alc280_fixup_hp_9480m, |
---|
6469 | 7515 | }, |
---|
| 7516 | + [ALC245_FIXUP_HP_X360_AMP] = { |
---|
| 7517 | + .type = HDA_FIXUP_FUNC, |
---|
| 7518 | + .v.func = alc245_fixup_hp_x360_amp, |
---|
| 7519 | + .chained = true, |
---|
| 7520 | + .chain_id = ALC245_FIXUP_HP_GPIO_LED |
---|
| 7521 | + }, |
---|
6470 | 7522 | [ALC288_FIXUP_DELL_HEADSET_MODE] = { |
---|
6471 | 7523 | .type = HDA_FIXUP_FUNC, |
---|
6472 | 7524 | .v.func = alc_fixup_headset_mode_dell_alc288, |
---|
6473 | 7525 | .chained = true, |
---|
6474 | | - .chain_id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED |
---|
| 7526 | + .chain_id = ALC255_FIXUP_MIC_MUTE_LED |
---|
6475 | 7527 | }, |
---|
6476 | 7528 | [ALC288_FIXUP_DELL1_MIC_NO_PRESENCE] = { |
---|
6477 | 7529 | .type = HDA_FIXUP_PINS, |
---|
.. | .. |
---|
6507 | 7559 | .chained = true, |
---|
6508 | 7560 | .chain_id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE |
---|
6509 | 7561 | }, |
---|
6510 | | - [ALC292_FIXUP_DELL_E7X] = { |
---|
| 7562 | + [ALC292_FIXUP_DELL_E7X_AAMIX] = { |
---|
6511 | 7563 | .type = HDA_FIXUP_FUNC, |
---|
6512 | 7564 | .v.func = alc_fixup_dell_xps13, |
---|
6513 | 7565 | .chained = true, |
---|
6514 | 7566 | .chain_id = ALC292_FIXUP_DISABLE_AAMIX |
---|
| 7567 | + }, |
---|
| 7568 | + [ALC292_FIXUP_DELL_E7X] = { |
---|
| 7569 | + .type = HDA_FIXUP_FUNC, |
---|
| 7570 | + .v.func = alc_fixup_micmute_led, |
---|
| 7571 | + /* micmute fixup must be applied at last */ |
---|
| 7572 | + .chained_before = true, |
---|
| 7573 | + .chain_id = ALC292_FIXUP_DELL_E7X_AAMIX, |
---|
| 7574 | + }, |
---|
| 7575 | + [ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE] = { |
---|
| 7576 | + .type = HDA_FIXUP_PINS, |
---|
| 7577 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 7578 | + { 0x18, 0x01a1913c }, /* headset mic w/o jack detect */ |
---|
| 7579 | + { } |
---|
| 7580 | + }, |
---|
| 7581 | + .chained_before = true, |
---|
| 7582 | + .chain_id = ALC269_FIXUP_HEADSET_MODE, |
---|
6515 | 7583 | }, |
---|
6516 | 7584 | [ALC298_FIXUP_DELL1_MIC_NO_PRESENCE] = { |
---|
6517 | 7585 | .type = HDA_FIXUP_PINS, |
---|
.. | .. |
---|
6552 | 7620 | [ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY] = { |
---|
6553 | 7621 | .type = HDA_FIXUP_FUNC, |
---|
6554 | 7622 | .v.func = alc233_fixup_lenovo_line2_mic_hotkey, |
---|
| 7623 | + }, |
---|
| 7624 | + [ALC233_FIXUP_INTEL_NUC8_DMIC] = { |
---|
| 7625 | + .type = HDA_FIXUP_FUNC, |
---|
| 7626 | + .v.func = alc_fixup_inv_dmic, |
---|
| 7627 | + .chained = true, |
---|
| 7628 | + .chain_id = ALC233_FIXUP_INTEL_NUC8_BOOST, |
---|
| 7629 | + }, |
---|
| 7630 | + [ALC233_FIXUP_INTEL_NUC8_BOOST] = { |
---|
| 7631 | + .type = HDA_FIXUP_FUNC, |
---|
| 7632 | + .v.func = alc269_fixup_limit_int_mic_boost |
---|
6555 | 7633 | }, |
---|
6556 | 7634 | [ALC255_FIXUP_DELL_SPK_NOISE] = { |
---|
6557 | 7635 | .type = HDA_FIXUP_FUNC, |
---|
.. | .. |
---|
6629 | 7707 | .v.func = alc_fixup_auto_mute_via_amp, |
---|
6630 | 7708 | .chained = true, |
---|
6631 | 7709 | .chain_id = ALC269_FIXUP_NO_SHUTUP |
---|
| 7710 | + }, |
---|
| 7711 | + [ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE] = { |
---|
| 7712 | + .type = HDA_FIXUP_PINS, |
---|
| 7713 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 7714 | + { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ |
---|
| 7715 | + { 0x1a, 0x01813030 }, /* use as headphone mic, without its own jack detect */ |
---|
| 7716 | + { } |
---|
| 7717 | + }, |
---|
| 7718 | + .chained = true, |
---|
| 7719 | + .chain_id = ALC269_FIXUP_HEADSET_MODE |
---|
6632 | 7720 | }, |
---|
6633 | 7721 | [ALC221_FIXUP_HP_MIC_NO_PRESENCE] = { |
---|
6634 | 7722 | .type = HDA_FIXUP_PINS, |
---|
.. | .. |
---|
6851 | 7939 | .chained = true, |
---|
6852 | 7940 | .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC |
---|
6853 | 7941 | }, |
---|
| 7942 | + [ALC295_FIXUP_CHROME_BOOK] = { |
---|
| 7943 | + .type = HDA_FIXUP_FUNC, |
---|
| 7944 | + .v.func = alc295_fixup_chromebook, |
---|
| 7945 | + .chained = true, |
---|
| 7946 | + .chain_id = ALC225_FIXUP_HEADSET_JACK |
---|
| 7947 | + }, |
---|
| 7948 | + [ALC225_FIXUP_HEADSET_JACK] = { |
---|
| 7949 | + .type = HDA_FIXUP_FUNC, |
---|
| 7950 | + .v.func = alc_fixup_headset_jack, |
---|
| 7951 | + }, |
---|
6854 | 7952 | [ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = { |
---|
6855 | 7953 | .type = HDA_FIXUP_PINS, |
---|
6856 | 7954 | .v.pins = (const struct hda_pintbl[]) { |
---|
.. | .. |
---|
6976 | 8074 | .chained = true, |
---|
6977 | 8075 | .chain_id = ALC294_FIXUP_SPK2_TO_DAC1 |
---|
6978 | 8076 | }, |
---|
| 8077 | + [ALC285_FIXUP_THINKPAD_X1_GEN7] = { |
---|
| 8078 | + .type = HDA_FIXUP_FUNC, |
---|
| 8079 | + .v.func = alc285_fixup_thinkpad_x1_gen7, |
---|
| 8080 | + .chained = true, |
---|
| 8081 | + .chain_id = ALC269_FIXUP_THINKPAD_ACPI |
---|
| 8082 | + }, |
---|
| 8083 | + [ALC285_FIXUP_THINKPAD_HEADSET_JACK] = { |
---|
| 8084 | + .type = HDA_FIXUP_FUNC, |
---|
| 8085 | + .v.func = alc_fixup_headset_jack, |
---|
| 8086 | + .chained = true, |
---|
| 8087 | + .chain_id = ALC285_FIXUP_THINKPAD_X1_GEN7 |
---|
| 8088 | + }, |
---|
6979 | 8089 | [ALC294_FIXUP_ASUS_HPE] = { |
---|
6980 | 8090 | .type = HDA_FIXUP_VERBS, |
---|
6981 | 8091 | .v.verbs = (const struct hda_verb[]) { |
---|
.. | .. |
---|
6987 | 8097 | .chained = true, |
---|
6988 | 8098 | .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC |
---|
6989 | 8099 | }, |
---|
| 8100 | + [ALC294_FIXUP_ASUS_GX502_PINS] = { |
---|
| 8101 | + .type = HDA_FIXUP_PINS, |
---|
| 8102 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8103 | + { 0x19, 0x03a11050 }, /* front HP mic */ |
---|
| 8104 | + { 0x1a, 0x01a11830 }, /* rear external mic */ |
---|
| 8105 | + { 0x21, 0x03211020 }, /* front HP out */ |
---|
| 8106 | + { } |
---|
| 8107 | + }, |
---|
| 8108 | + .chained = true, |
---|
| 8109 | + .chain_id = ALC294_FIXUP_ASUS_GX502_VERBS |
---|
| 8110 | + }, |
---|
| 8111 | + [ALC294_FIXUP_ASUS_GX502_VERBS] = { |
---|
| 8112 | + .type = HDA_FIXUP_VERBS, |
---|
| 8113 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8114 | + /* set 0x15 to HP-OUT ctrl */ |
---|
| 8115 | + { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 }, |
---|
| 8116 | + /* unmute the 0x15 amp */ |
---|
| 8117 | + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 }, |
---|
| 8118 | + { } |
---|
| 8119 | + }, |
---|
| 8120 | + .chained = true, |
---|
| 8121 | + .chain_id = ALC294_FIXUP_ASUS_GX502_HP |
---|
| 8122 | + }, |
---|
| 8123 | + [ALC294_FIXUP_ASUS_GX502_HP] = { |
---|
| 8124 | + .type = HDA_FIXUP_FUNC, |
---|
| 8125 | + .v.func = alc294_fixup_gx502_hp, |
---|
| 8126 | + }, |
---|
| 8127 | + [ALC294_FIXUP_ASUS_GU502_PINS] = { |
---|
| 8128 | + .type = HDA_FIXUP_PINS, |
---|
| 8129 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8130 | + { 0x19, 0x01a11050 }, /* rear HP mic */ |
---|
| 8131 | + { 0x1a, 0x01a11830 }, /* rear external mic */ |
---|
| 8132 | + { 0x21, 0x012110f0 }, /* rear HP out */ |
---|
| 8133 | + { } |
---|
| 8134 | + }, |
---|
| 8135 | + .chained = true, |
---|
| 8136 | + .chain_id = ALC294_FIXUP_ASUS_GU502_VERBS |
---|
| 8137 | + }, |
---|
| 8138 | + [ALC294_FIXUP_ASUS_GU502_VERBS] = { |
---|
| 8139 | + .type = HDA_FIXUP_VERBS, |
---|
| 8140 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8141 | + /* set 0x15 to HP-OUT ctrl */ |
---|
| 8142 | + { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 }, |
---|
| 8143 | + /* unmute the 0x15 amp */ |
---|
| 8144 | + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 }, |
---|
| 8145 | + /* set 0x1b to HP-OUT */ |
---|
| 8146 | + { 0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, |
---|
| 8147 | + { } |
---|
| 8148 | + }, |
---|
| 8149 | + .chained = true, |
---|
| 8150 | + .chain_id = ALC294_FIXUP_ASUS_GU502_HP |
---|
| 8151 | + }, |
---|
| 8152 | + [ALC294_FIXUP_ASUS_GU502_HP] = { |
---|
| 8153 | + .type = HDA_FIXUP_FUNC, |
---|
| 8154 | + .v.func = alc294_fixup_gu502_hp, |
---|
| 8155 | + }, |
---|
| 8156 | + [ALC294_FIXUP_ASUS_G513_PINS] = { |
---|
| 8157 | + .type = HDA_FIXUP_PINS, |
---|
| 8158 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8159 | + { 0x19, 0x03a11050 }, /* front HP mic */ |
---|
| 8160 | + { 0x1a, 0x03a11c30 }, /* rear external mic */ |
---|
| 8161 | + { 0x21, 0x03211420 }, /* front HP out */ |
---|
| 8162 | + { } |
---|
| 8163 | + }, |
---|
| 8164 | + }, |
---|
| 8165 | + [ALC285_FIXUP_ASUS_G533Z_PINS] = { |
---|
| 8166 | + .type = HDA_FIXUP_PINS, |
---|
| 8167 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8168 | + { 0x14, 0x90170152 }, /* Speaker Surround Playback Switch */ |
---|
| 8169 | + { 0x19, 0x03a19020 }, /* Mic Boost Volume */ |
---|
| 8170 | + { 0x1a, 0x03a11c30 }, /* Mic Boost Volume */ |
---|
| 8171 | + { 0x1e, 0x90170151 }, /* Rear jack, IN OUT EAPD Detect */ |
---|
| 8172 | + { 0x21, 0x03211420 }, |
---|
| 8173 | + { } |
---|
| 8174 | + }, |
---|
| 8175 | + }, |
---|
| 8176 | + [ALC294_FIXUP_ASUS_COEF_1B] = { |
---|
| 8177 | + .type = HDA_FIXUP_VERBS, |
---|
| 8178 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8179 | + /* Set bit 10 to correct noisy output after reboot from |
---|
| 8180 | + * Windows 10 (due to pop noise reduction?) |
---|
| 8181 | + */ |
---|
| 8182 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x1b }, |
---|
| 8183 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x4e4b }, |
---|
| 8184 | + { } |
---|
| 8185 | + }, |
---|
| 8186 | + .chained = true, |
---|
| 8187 | + .chain_id = ALC289_FIXUP_ASUS_GA401, |
---|
| 8188 | + }, |
---|
6990 | 8189 | [ALC285_FIXUP_HP_GPIO_LED] = { |
---|
6991 | 8190 | .type = HDA_FIXUP_FUNC, |
---|
6992 | 8191 | .v.func = alc285_fixup_hp_gpio_led, |
---|
| 8192 | + }, |
---|
| 8193 | + [ALC285_FIXUP_HP_MUTE_LED] = { |
---|
| 8194 | + .type = HDA_FIXUP_FUNC, |
---|
| 8195 | + .v.func = alc285_fixup_hp_mute_led, |
---|
| 8196 | + }, |
---|
| 8197 | + [ALC236_FIXUP_HP_GPIO_LED] = { |
---|
| 8198 | + .type = HDA_FIXUP_FUNC, |
---|
| 8199 | + .v.func = alc236_fixup_hp_gpio_led, |
---|
| 8200 | + }, |
---|
| 8201 | + [ALC236_FIXUP_HP_MUTE_LED] = { |
---|
| 8202 | + .type = HDA_FIXUP_FUNC, |
---|
| 8203 | + .v.func = alc236_fixup_hp_mute_led, |
---|
| 8204 | + }, |
---|
| 8205 | + [ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF] = { |
---|
| 8206 | + .type = HDA_FIXUP_FUNC, |
---|
| 8207 | + .v.func = alc236_fixup_hp_mute_led_micmute_vref, |
---|
| 8208 | + }, |
---|
| 8209 | + [ALC298_FIXUP_SAMSUNG_AMP] = { |
---|
| 8210 | + .type = HDA_FIXUP_FUNC, |
---|
| 8211 | + .v.func = alc298_fixup_samsung_amp, |
---|
| 8212 | + .chained = true, |
---|
| 8213 | + .chain_id = ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET |
---|
| 8214 | + }, |
---|
| 8215 | + [ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = { |
---|
| 8216 | + .type = HDA_FIXUP_VERBS, |
---|
| 8217 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8218 | + { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc5 }, |
---|
| 8219 | + { } |
---|
| 8220 | + }, |
---|
| 8221 | + }, |
---|
| 8222 | + [ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = { |
---|
| 8223 | + .type = HDA_FIXUP_VERBS, |
---|
| 8224 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8225 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x08}, |
---|
| 8226 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x2fcf}, |
---|
| 8227 | + { } |
---|
| 8228 | + }, |
---|
| 8229 | + }, |
---|
| 8230 | + [ALC295_FIXUP_ASUS_MIC_NO_PRESENCE] = { |
---|
| 8231 | + .type = HDA_FIXUP_PINS, |
---|
| 8232 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8233 | + { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ |
---|
| 8234 | + { } |
---|
| 8235 | + }, |
---|
| 8236 | + .chained = true, |
---|
| 8237 | + .chain_id = ALC269_FIXUP_HEADSET_MODE |
---|
| 8238 | + }, |
---|
| 8239 | + [ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS] = { |
---|
| 8240 | + .type = HDA_FIXUP_PINS, |
---|
| 8241 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8242 | + { 0x14, 0x90100120 }, /* use as internal speaker */ |
---|
| 8243 | + { 0x18, 0x02a111f0 }, /* use as headset mic, without its own jack detect */ |
---|
| 8244 | + { 0x1a, 0x01011020 }, /* use as line out */ |
---|
| 8245 | + { }, |
---|
| 8246 | + }, |
---|
| 8247 | + .chained = true, |
---|
| 8248 | + .chain_id = ALC269_FIXUP_HEADSET_MIC |
---|
| 8249 | + }, |
---|
| 8250 | + [ALC269VC_FIXUP_ACER_HEADSET_MIC] = { |
---|
| 8251 | + .type = HDA_FIXUP_PINS, |
---|
| 8252 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8253 | + { 0x18, 0x02a11030 }, /* use as headset mic */ |
---|
| 8254 | + { } |
---|
| 8255 | + }, |
---|
| 8256 | + .chained = true, |
---|
| 8257 | + .chain_id = ALC269_FIXUP_HEADSET_MIC |
---|
| 8258 | + }, |
---|
| 8259 | + [ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE] = { |
---|
| 8260 | + .type = HDA_FIXUP_PINS, |
---|
| 8261 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8262 | + { 0x18, 0x01a11130 }, /* use as headset mic, without its own jack detect */ |
---|
| 8263 | + { } |
---|
| 8264 | + }, |
---|
| 8265 | + .chained = true, |
---|
| 8266 | + .chain_id = ALC269_FIXUP_HEADSET_MIC |
---|
| 8267 | + }, |
---|
| 8268 | + [ALC289_FIXUP_ASUS_GA401] = { |
---|
| 8269 | + .type = HDA_FIXUP_FUNC, |
---|
| 8270 | + .v.func = alc289_fixup_asus_ga401, |
---|
| 8271 | + .chained = true, |
---|
| 8272 | + .chain_id = ALC289_FIXUP_ASUS_GA502, |
---|
| 8273 | + }, |
---|
| 8274 | + [ALC289_FIXUP_ASUS_GA502] = { |
---|
| 8275 | + .type = HDA_FIXUP_PINS, |
---|
| 8276 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8277 | + { 0x19, 0x03a11020 }, /* headset mic with jack detect */ |
---|
| 8278 | + { } |
---|
| 8279 | + }, |
---|
| 8280 | + }, |
---|
| 8281 | + [ALC256_FIXUP_ACER_MIC_NO_PRESENCE] = { |
---|
| 8282 | + .type = HDA_FIXUP_PINS, |
---|
| 8283 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8284 | + { 0x19, 0x02a11120 }, /* use as headset mic, without its own jack detect */ |
---|
| 8285 | + { } |
---|
| 8286 | + }, |
---|
| 8287 | + .chained = true, |
---|
| 8288 | + .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE |
---|
| 8289 | + }, |
---|
| 8290 | + [ALC285_FIXUP_HP_GPIO_AMP_INIT] = { |
---|
| 8291 | + .type = HDA_FIXUP_FUNC, |
---|
| 8292 | + .v.func = alc285_fixup_hp_gpio_amp_init, |
---|
| 8293 | + .chained = true, |
---|
| 8294 | + .chain_id = ALC285_FIXUP_HP_GPIO_LED |
---|
| 8295 | + }, |
---|
| 8296 | + [ALC269_FIXUP_CZC_B20] = { |
---|
| 8297 | + .type = HDA_FIXUP_PINS, |
---|
| 8298 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8299 | + { 0x12, 0x411111f0 }, |
---|
| 8300 | + { 0x14, 0x90170110 }, /* speaker */ |
---|
| 8301 | + { 0x15, 0x032f1020 }, /* HP out */ |
---|
| 8302 | + { 0x17, 0x411111f0 }, |
---|
| 8303 | + { 0x18, 0x03ab1040 }, /* mic */ |
---|
| 8304 | + { 0x19, 0xb7a7013f }, |
---|
| 8305 | + { 0x1a, 0x0181305f }, |
---|
| 8306 | + { 0x1b, 0x411111f0 }, |
---|
| 8307 | + { 0x1d, 0x411111f0 }, |
---|
| 8308 | + { 0x1e, 0x411111f0 }, |
---|
| 8309 | + { } |
---|
| 8310 | + }, |
---|
| 8311 | + .chain_id = ALC269_FIXUP_DMIC, |
---|
| 8312 | + }, |
---|
| 8313 | + [ALC269_FIXUP_CZC_TMI] = { |
---|
| 8314 | + .type = HDA_FIXUP_PINS, |
---|
| 8315 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8316 | + { 0x12, 0x4000c000 }, |
---|
| 8317 | + { 0x14, 0x90170110 }, /* speaker */ |
---|
| 8318 | + { 0x15, 0x0421401f }, /* HP out */ |
---|
| 8319 | + { 0x17, 0x411111f0 }, |
---|
| 8320 | + { 0x18, 0x04a19020 }, /* mic */ |
---|
| 8321 | + { 0x19, 0x411111f0 }, |
---|
| 8322 | + { 0x1a, 0x411111f0 }, |
---|
| 8323 | + { 0x1b, 0x411111f0 }, |
---|
| 8324 | + { 0x1d, 0x40448505 }, |
---|
| 8325 | + { 0x1e, 0x411111f0 }, |
---|
| 8326 | + { 0x20, 0x8000ffff }, |
---|
| 8327 | + { } |
---|
| 8328 | + }, |
---|
| 8329 | + .chain_id = ALC269_FIXUP_DMIC, |
---|
| 8330 | + }, |
---|
| 8331 | + [ALC269_FIXUP_CZC_L101] = { |
---|
| 8332 | + .type = HDA_FIXUP_PINS, |
---|
| 8333 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8334 | + { 0x12, 0x40000000 }, |
---|
| 8335 | + { 0x14, 0x01014010 }, /* speaker */ |
---|
| 8336 | + { 0x15, 0x411111f0 }, /* HP out */ |
---|
| 8337 | + { 0x16, 0x411111f0 }, |
---|
| 8338 | + { 0x18, 0x01a19020 }, /* mic */ |
---|
| 8339 | + { 0x19, 0x02a19021 }, |
---|
| 8340 | + { 0x1a, 0x0181302f }, |
---|
| 8341 | + { 0x1b, 0x0221401f }, |
---|
| 8342 | + { 0x1c, 0x411111f0 }, |
---|
| 8343 | + { 0x1d, 0x4044c601 }, |
---|
| 8344 | + { 0x1e, 0x411111f0 }, |
---|
| 8345 | + { } |
---|
| 8346 | + }, |
---|
| 8347 | + .chain_id = ALC269_FIXUP_DMIC, |
---|
| 8348 | + }, |
---|
| 8349 | + [ALC269_FIXUP_LEMOTE_A1802] = { |
---|
| 8350 | + .type = HDA_FIXUP_PINS, |
---|
| 8351 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8352 | + { 0x12, 0x40000000 }, |
---|
| 8353 | + { 0x14, 0x90170110 }, /* speaker */ |
---|
| 8354 | + { 0x17, 0x411111f0 }, |
---|
| 8355 | + { 0x18, 0x03a19040 }, /* mic1 */ |
---|
| 8356 | + { 0x19, 0x90a70130 }, /* mic2 */ |
---|
| 8357 | + { 0x1a, 0x411111f0 }, |
---|
| 8358 | + { 0x1b, 0x411111f0 }, |
---|
| 8359 | + { 0x1d, 0x40489d2d }, |
---|
| 8360 | + { 0x1e, 0x411111f0 }, |
---|
| 8361 | + { 0x20, 0x0003ffff }, |
---|
| 8362 | + { 0x21, 0x03214020 }, |
---|
| 8363 | + { } |
---|
| 8364 | + }, |
---|
| 8365 | + .chain_id = ALC269_FIXUP_DMIC, |
---|
| 8366 | + }, |
---|
| 8367 | + [ALC269_FIXUP_LEMOTE_A190X] = { |
---|
| 8368 | + .type = HDA_FIXUP_PINS, |
---|
| 8369 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8370 | + { 0x14, 0x99130110 }, /* speaker */ |
---|
| 8371 | + { 0x15, 0x0121401f }, /* HP out */ |
---|
| 8372 | + { 0x18, 0x01a19c20 }, /* rear mic */ |
---|
| 8373 | + { 0x19, 0x99a3092f }, /* front mic */ |
---|
| 8374 | + { 0x1b, 0x0201401f }, /* front lineout */ |
---|
| 8375 | + { } |
---|
| 8376 | + }, |
---|
| 8377 | + .chain_id = ALC269_FIXUP_DMIC, |
---|
| 8378 | + }, |
---|
| 8379 | + [ALC256_FIXUP_INTEL_NUC8_RUGGED] = { |
---|
| 8380 | + .type = HDA_FIXUP_PINS, |
---|
| 8381 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8382 | + { 0x1b, 0x01a1913c }, /* use as headset mic, without its own jack detect */ |
---|
| 8383 | + { } |
---|
| 8384 | + }, |
---|
| 8385 | + .chained = true, |
---|
| 8386 | + .chain_id = ALC269_FIXUP_HEADSET_MODE |
---|
| 8387 | + }, |
---|
| 8388 | + [ALC256_FIXUP_INTEL_NUC10] = { |
---|
| 8389 | + .type = HDA_FIXUP_PINS, |
---|
| 8390 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8391 | + { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ |
---|
| 8392 | + { } |
---|
| 8393 | + }, |
---|
| 8394 | + .chained = true, |
---|
| 8395 | + .chain_id = ALC269_FIXUP_HEADSET_MODE |
---|
| 8396 | + }, |
---|
| 8397 | + [ALC255_FIXUP_XIAOMI_HEADSET_MIC] = { |
---|
| 8398 | + .type = HDA_FIXUP_VERBS, |
---|
| 8399 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8400 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 }, |
---|
| 8401 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 }, |
---|
| 8402 | + { } |
---|
| 8403 | + }, |
---|
| 8404 | + .chained = true, |
---|
| 8405 | + .chain_id = ALC289_FIXUP_ASUS_GA502 |
---|
| 8406 | + }, |
---|
| 8407 | + [ALC274_FIXUP_HP_MIC] = { |
---|
| 8408 | + .type = HDA_FIXUP_VERBS, |
---|
| 8409 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8410 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 }, |
---|
| 8411 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 }, |
---|
| 8412 | + { } |
---|
| 8413 | + }, |
---|
| 8414 | + }, |
---|
| 8415 | + [ALC274_FIXUP_HP_HEADSET_MIC] = { |
---|
| 8416 | + .type = HDA_FIXUP_FUNC, |
---|
| 8417 | + .v.func = alc274_fixup_hp_headset_mic, |
---|
| 8418 | + .chained = true, |
---|
| 8419 | + .chain_id = ALC274_FIXUP_HP_MIC |
---|
| 8420 | + }, |
---|
| 8421 | + [ALC274_FIXUP_HP_ENVY_GPIO] = { |
---|
| 8422 | + .type = HDA_FIXUP_FUNC, |
---|
| 8423 | + .v.func = alc274_fixup_hp_envy_gpio, |
---|
| 8424 | + }, |
---|
| 8425 | + [ALC256_FIXUP_ASUS_HPE] = { |
---|
| 8426 | + .type = HDA_FIXUP_VERBS, |
---|
| 8427 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8428 | + /* Set EAPD high */ |
---|
| 8429 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f }, |
---|
| 8430 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x7778 }, |
---|
| 8431 | + { } |
---|
| 8432 | + }, |
---|
| 8433 | + .chained = true, |
---|
| 8434 | + .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC |
---|
| 8435 | + }, |
---|
| 8436 | + [ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK] = { |
---|
| 8437 | + .type = HDA_FIXUP_FUNC, |
---|
| 8438 | + .v.func = alc_fixup_headset_jack, |
---|
| 8439 | + .chained = true, |
---|
| 8440 | + .chain_id = ALC269_FIXUP_THINKPAD_ACPI |
---|
| 8441 | + }, |
---|
| 8442 | + [ALC287_FIXUP_HP_GPIO_LED] = { |
---|
| 8443 | + .type = HDA_FIXUP_FUNC, |
---|
| 8444 | + .v.func = alc287_fixup_hp_gpio_led, |
---|
| 8445 | + }, |
---|
| 8446 | + [ALC256_FIXUP_HP_HEADSET_MIC] = { |
---|
| 8447 | + .type = HDA_FIXUP_FUNC, |
---|
| 8448 | + .v.func = alc274_fixup_hp_headset_mic, |
---|
| 8449 | + }, |
---|
| 8450 | + [ALC236_FIXUP_DELL_AIO_HEADSET_MIC] = { |
---|
| 8451 | + .type = HDA_FIXUP_FUNC, |
---|
| 8452 | + .v.func = alc_fixup_no_int_mic, |
---|
| 8453 | + .chained = true, |
---|
| 8454 | + .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE |
---|
| 8455 | + }, |
---|
| 8456 | + [ALC282_FIXUP_ACER_DISABLE_LINEOUT] = { |
---|
| 8457 | + .type = HDA_FIXUP_PINS, |
---|
| 8458 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8459 | + { 0x1b, 0x411111f0 }, |
---|
| 8460 | + { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */ |
---|
| 8461 | + { }, |
---|
| 8462 | + }, |
---|
| 8463 | + .chained = true, |
---|
| 8464 | + .chain_id = ALC269_FIXUP_HEADSET_MODE |
---|
| 8465 | + }, |
---|
| 8466 | + [ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST] = { |
---|
| 8467 | + .type = HDA_FIXUP_FUNC, |
---|
| 8468 | + .v.func = alc269_fixup_limit_int_mic_boost, |
---|
| 8469 | + .chained = true, |
---|
| 8470 | + .chain_id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE, |
---|
| 8471 | + }, |
---|
| 8472 | + [ALC256_FIXUP_ACER_HEADSET_MIC] = { |
---|
| 8473 | + .type = HDA_FIXUP_PINS, |
---|
| 8474 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8475 | + { 0x19, 0x02a1113c }, /* use as headset mic, without its own jack detect */ |
---|
| 8476 | + { 0x1a, 0x90a1092f }, /* use as internal mic */ |
---|
| 8477 | + { } |
---|
| 8478 | + }, |
---|
| 8479 | + .chained = true, |
---|
| 8480 | + .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC |
---|
| 8481 | + }, |
---|
| 8482 | + [ALC285_FIXUP_IDEAPAD_S740_COEF] = { |
---|
| 8483 | + .type = HDA_FIXUP_FUNC, |
---|
| 8484 | + .v.func = alc285_fixup_ideapad_s740_coef, |
---|
| 8485 | + .chained = true, |
---|
| 8486 | + .chain_id = ALC269_FIXUP_THINKPAD_ACPI, |
---|
| 8487 | + }, |
---|
| 8488 | + [ALC295_FIXUP_ASUS_DACS] = { |
---|
| 8489 | + .type = HDA_FIXUP_FUNC, |
---|
| 8490 | + .v.func = alc295_fixup_asus_dacs, |
---|
| 8491 | + }, |
---|
| 8492 | + [ALC295_FIXUP_HP_OMEN] = { |
---|
| 8493 | + .type = HDA_FIXUP_PINS, |
---|
| 8494 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8495 | + { 0x12, 0xb7a60130 }, |
---|
| 8496 | + { 0x13, 0x40000000 }, |
---|
| 8497 | + { 0x14, 0x411111f0 }, |
---|
| 8498 | + { 0x16, 0x411111f0 }, |
---|
| 8499 | + { 0x17, 0x90170110 }, |
---|
| 8500 | + { 0x18, 0x411111f0 }, |
---|
| 8501 | + { 0x19, 0x02a11030 }, |
---|
| 8502 | + { 0x1a, 0x411111f0 }, |
---|
| 8503 | + { 0x1b, 0x04a19030 }, |
---|
| 8504 | + { 0x1d, 0x40600001 }, |
---|
| 8505 | + { 0x1e, 0x411111f0 }, |
---|
| 8506 | + { 0x21, 0x03211020 }, |
---|
| 8507 | + {} |
---|
| 8508 | + }, |
---|
| 8509 | + .chained = true, |
---|
| 8510 | + .chain_id = ALC269_FIXUP_HP_LINE1_MIC1_LED, |
---|
| 8511 | + }, |
---|
| 8512 | + [ALC285_FIXUP_HP_SPECTRE_X360] = { |
---|
| 8513 | + .type = HDA_FIXUP_FUNC, |
---|
| 8514 | + .v.func = alc285_fixup_hp_spectre_x360, |
---|
| 8515 | + }, |
---|
| 8516 | + [ALC285_FIXUP_HP_SPECTRE_X360_EB1] = { |
---|
| 8517 | + .type = HDA_FIXUP_FUNC, |
---|
| 8518 | + .v.func = alc285_fixup_hp_spectre_x360_eb1 |
---|
| 8519 | + }, |
---|
| 8520 | + [ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP] = { |
---|
| 8521 | + .type = HDA_FIXUP_FUNC, |
---|
| 8522 | + .v.func = alc285_fixup_ideapad_s740_coef, |
---|
| 8523 | + .chained = true, |
---|
| 8524 | + .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK, |
---|
| 8525 | + }, |
---|
| 8526 | + [ALC623_FIXUP_LENOVO_THINKSTATION_P340] = { |
---|
| 8527 | + .type = HDA_FIXUP_FUNC, |
---|
| 8528 | + .v.func = alc_fixup_no_shutup, |
---|
| 8529 | + .chained = true, |
---|
| 8530 | + .chain_id = ALC283_FIXUP_HEADSET_MIC, |
---|
| 8531 | + }, |
---|
| 8532 | + [ALC255_FIXUP_ACER_HEADPHONE_AND_MIC] = { |
---|
| 8533 | + .type = HDA_FIXUP_PINS, |
---|
| 8534 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8535 | + { 0x21, 0x03211030 }, /* Change the Headphone location to Left */ |
---|
| 8536 | + { } |
---|
| 8537 | + }, |
---|
| 8538 | + .chained = true, |
---|
| 8539 | + .chain_id = ALC255_FIXUP_XIAOMI_HEADSET_MIC |
---|
| 8540 | + }, |
---|
| 8541 | + [ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST] = { |
---|
| 8542 | + .type = HDA_FIXUP_FUNC, |
---|
| 8543 | + .v.func = alc269_fixup_limit_int_mic_boost, |
---|
| 8544 | + .chained = true, |
---|
| 8545 | + .chain_id = ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF, |
---|
| 8546 | + }, |
---|
| 8547 | + [ALC285_FIXUP_LEGION_Y9000X_SPEAKERS] = { |
---|
| 8548 | + .type = HDA_FIXUP_FUNC, |
---|
| 8549 | + .v.func = alc285_fixup_ideapad_s740_coef, |
---|
| 8550 | + .chained = true, |
---|
| 8551 | + .chain_id = ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE, |
---|
| 8552 | + }, |
---|
| 8553 | + [ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE] = { |
---|
| 8554 | + .type = HDA_FIXUP_FUNC, |
---|
| 8555 | + .v.func = alc287_fixup_legion_15imhg05_speakers, |
---|
| 8556 | + .chained = true, |
---|
| 8557 | + .chain_id = ALC269_FIXUP_THINKPAD_ACPI, |
---|
| 8558 | + }, |
---|
| 8559 | + [ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS] = { |
---|
| 8560 | + .type = HDA_FIXUP_VERBS, |
---|
| 8561 | + //.v.verbs = legion_15imhg05_coefs, |
---|
| 8562 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8563 | + // set left speaker Legion 7i. |
---|
| 8564 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, |
---|
| 8565 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x41 }, |
---|
| 8566 | + |
---|
| 8567 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, |
---|
| 8568 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, |
---|
| 8569 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8570 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x1a }, |
---|
| 8571 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, |
---|
| 8572 | + |
---|
| 8573 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, |
---|
| 8574 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, |
---|
| 8575 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8576 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8577 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, |
---|
| 8578 | + |
---|
| 8579 | + // set right speaker Legion 7i. |
---|
| 8580 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, |
---|
| 8581 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x42 }, |
---|
| 8582 | + |
---|
| 8583 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, |
---|
| 8584 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, |
---|
| 8585 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8586 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x2a }, |
---|
| 8587 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, |
---|
| 8588 | + |
---|
| 8589 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, |
---|
| 8590 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, |
---|
| 8591 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8592 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8593 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, |
---|
| 8594 | + {} |
---|
| 8595 | + }, |
---|
| 8596 | + .chained = true, |
---|
| 8597 | + .chain_id = ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE, |
---|
| 8598 | + }, |
---|
| 8599 | + [ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE] = { |
---|
| 8600 | + .type = HDA_FIXUP_FUNC, |
---|
| 8601 | + .v.func = alc287_fixup_legion_15imhg05_speakers, |
---|
| 8602 | + .chained = true, |
---|
| 8603 | + .chain_id = ALC269_FIXUP_HEADSET_MODE, |
---|
| 8604 | + }, |
---|
| 8605 | + [ALC287_FIXUP_YOGA7_14ITL_SPEAKERS] = { |
---|
| 8606 | + .type = HDA_FIXUP_VERBS, |
---|
| 8607 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8608 | + // set left speaker Yoga 7i. |
---|
| 8609 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, |
---|
| 8610 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x41 }, |
---|
| 8611 | + |
---|
| 8612 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, |
---|
| 8613 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, |
---|
| 8614 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8615 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x1a }, |
---|
| 8616 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, |
---|
| 8617 | + |
---|
| 8618 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, |
---|
| 8619 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, |
---|
| 8620 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8621 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8622 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, |
---|
| 8623 | + |
---|
| 8624 | + // set right speaker Yoga 7i. |
---|
| 8625 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, |
---|
| 8626 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x46 }, |
---|
| 8627 | + |
---|
| 8628 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, |
---|
| 8629 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, |
---|
| 8630 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8631 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x2a }, |
---|
| 8632 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, |
---|
| 8633 | + |
---|
| 8634 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, |
---|
| 8635 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, |
---|
| 8636 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8637 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8638 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, |
---|
| 8639 | + {} |
---|
| 8640 | + }, |
---|
| 8641 | + .chained = true, |
---|
| 8642 | + .chain_id = ALC269_FIXUP_HEADSET_MODE, |
---|
| 8643 | + }, |
---|
| 8644 | + [ALC298_FIXUP_LENOVO_C940_DUET7] = { |
---|
| 8645 | + .type = HDA_FIXUP_FUNC, |
---|
| 8646 | + .v.func = alc298_fixup_lenovo_c940_duet7, |
---|
| 8647 | + }, |
---|
| 8648 | + [ALC287_FIXUP_13S_GEN2_SPEAKERS] = { |
---|
| 8649 | + .type = HDA_FIXUP_VERBS, |
---|
| 8650 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8651 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, |
---|
| 8652 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x41 }, |
---|
| 8653 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, |
---|
| 8654 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, |
---|
| 8655 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8656 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8657 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, |
---|
| 8658 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, |
---|
| 8659 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x42 }, |
---|
| 8660 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, |
---|
| 8661 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, |
---|
| 8662 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8663 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8664 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, |
---|
| 8665 | + {} |
---|
| 8666 | + }, |
---|
| 8667 | + .chained = true, |
---|
| 8668 | + .chain_id = ALC269_FIXUP_HEADSET_MODE, |
---|
| 8669 | + }, |
---|
| 8670 | + [ALC256_FIXUP_SET_COEF_DEFAULTS] = { |
---|
| 8671 | + .type = HDA_FIXUP_FUNC, |
---|
| 8672 | + .v.func = alc256_fixup_set_coef_defaults, |
---|
| 8673 | + }, |
---|
| 8674 | + [ALC245_FIXUP_HP_GPIO_LED] = { |
---|
| 8675 | + .type = HDA_FIXUP_FUNC, |
---|
| 8676 | + .v.func = alc245_fixup_hp_gpio_led, |
---|
| 8677 | + }, |
---|
| 8678 | + [ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = { |
---|
| 8679 | + .type = HDA_FIXUP_PINS, |
---|
| 8680 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8681 | + { 0x19, 0x03a11120 }, /* use as headset mic, without its own jack detect */ |
---|
| 8682 | + { } |
---|
| 8683 | + }, |
---|
| 8684 | + .chained = true, |
---|
| 8685 | + .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, |
---|
| 8686 | + }, |
---|
| 8687 | + [ALC233_FIXUP_NO_AUDIO_JACK] = { |
---|
| 8688 | + .type = HDA_FIXUP_FUNC, |
---|
| 8689 | + .v.func = alc233_fixup_no_audio_jack, |
---|
| 8690 | + }, |
---|
| 8691 | + [ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME] = { |
---|
| 8692 | + .type = HDA_FIXUP_FUNC, |
---|
| 8693 | + .v.func = alc256_fixup_mic_no_presence_and_resume, |
---|
| 8694 | + .chained = true, |
---|
| 8695 | + .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC |
---|
| 8696 | + }, |
---|
| 8697 | + [ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED] = { |
---|
| 8698 | + .type = HDA_FIXUP_VERBS, |
---|
| 8699 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8700 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x19 }, |
---|
| 8701 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x8e11 }, |
---|
| 8702 | + { } |
---|
| 8703 | + }, |
---|
| 8704 | + .chained = true, |
---|
| 8705 | + .chain_id = ALC285_FIXUP_HP_MUTE_LED, |
---|
6993 | 8706 | }, |
---|
6994 | 8707 | }; |
---|
6995 | 8708 | |
---|
.. | .. |
---|
6999 | 8712 | SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC), |
---|
7000 | 8713 | SND_PCI_QUIRK(0x1025, 0x047c, "Acer AC700", ALC269_FIXUP_ACER_AC700), |
---|
7001 | 8714 | SND_PCI_QUIRK(0x1025, 0x072d, "Acer Aspire V5-571G", ALC269_FIXUP_ASPIRE_HEADSET_MIC), |
---|
7002 | | - SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC), |
---|
7003 | 8715 | SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK), |
---|
7004 | 8716 | SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK), |
---|
7005 | 8717 | SND_PCI_QUIRK(0x1025, 0x0762, "Acer Aspire E1-472", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572), |
---|
7006 | 8718 | SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572), |
---|
7007 | 8719 | SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS), |
---|
| 8720 | + SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC), |
---|
| 8721 | + SND_PCI_QUIRK(0x1025, 0x0840, "Acer Aspire E1", ALC269VB_FIXUP_ASPIRE_E1_COEF), |
---|
| 8722 | + SND_PCI_QUIRK(0x1025, 0x101c, "Acer Veriton N2510G", ALC269_FIXUP_LIFEBOOK), |
---|
7008 | 8723 | SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE), |
---|
| 8724 | + SND_PCI_QUIRK(0x1025, 0x1065, "Acer Aspire C20-820", ALC269VC_FIXUP_ACER_HEADSET_MIC), |
---|
7009 | 8725 | SND_PCI_QUIRK(0x1025, 0x106d, "Acer Cloudbook 14", ALC283_FIXUP_CHROME_BOOK), |
---|
| 8726 | + SND_PCI_QUIRK(0x1025, 0x1094, "Acer Aspire E5-575T", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST), |
---|
7010 | 8727 | SND_PCI_QUIRK(0x1025, 0x1099, "Acer Aspire E5-523G", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), |
---|
7011 | 8728 | SND_PCI_QUIRK(0x1025, 0x110e, "Acer Aspire ES1-432", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), |
---|
| 8729 | + SND_PCI_QUIRK(0x1025, 0x1166, "Acer Veriton N4640G", ALC269_FIXUP_LIFEBOOK), |
---|
| 8730 | + SND_PCI_QUIRK(0x1025, 0x1167, "Acer Veriton N6640G", ALC269_FIXUP_LIFEBOOK), |
---|
7012 | 8731 | SND_PCI_QUIRK(0x1025, 0x1246, "Acer Predator Helios 500", ALC299_FIXUP_PREDATOR_SPK), |
---|
| 8732 | + SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS), |
---|
| 8733 | + SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE), |
---|
| 8734 | + SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC), |
---|
7013 | 8735 | SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), |
---|
7014 | 8736 | SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), |
---|
7015 | 8737 | SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), |
---|
| 8738 | + SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC), |
---|
| 8739 | + SND_PCI_QUIRK(0x1025, 0x129d, "Acer SWIFT SF313-51", ALC256_FIXUP_ACER_MIC_NO_PRESENCE), |
---|
| 8740 | + SND_PCI_QUIRK(0x1025, 0x1300, "Acer SWIFT SF314-56", ALC256_FIXUP_ACER_MIC_NO_PRESENCE), |
---|
7016 | 8741 | SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), |
---|
7017 | 8742 | SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC), |
---|
7018 | 8743 | SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC), |
---|
| 8744 | + SND_PCI_QUIRK(0x1025, 0x141f, "Acer Spin SP513-54N", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), |
---|
| 8745 | + SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), |
---|
| 8746 | + SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE), |
---|
| 8747 | + SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC), |
---|
7019 | 8748 | SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), |
---|
| 8749 | + SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X), |
---|
7020 | 8750 | SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS), |
---|
7021 | 8751 | SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X), |
---|
7022 | 8752 | SND_PCI_QUIRK(0x1028, 0x05be, "Dell Latitude E6540", ALC292_FIXUP_DELL_E7X), |
---|
.. | .. |
---|
7064 | 8794 | SND_PCI_QUIRK(0x1028, 0x097e, "Dell Precision", ALC289_FIXUP_DUAL_SPK), |
---|
7065 | 8795 | SND_PCI_QUIRK(0x1028, 0x098d, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE), |
---|
7066 | 8796 | SND_PCI_QUIRK(0x1028, 0x09bf, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE), |
---|
| 8797 | + SND_PCI_QUIRK(0x1028, 0x0a2e, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC), |
---|
| 8798 | + SND_PCI_QUIRK(0x1028, 0x0a30, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC), |
---|
| 8799 | + SND_PCI_QUIRK(0x1028, 0x0a58, "Dell", ALC255_FIXUP_DELL_HEADSET_MIC), |
---|
| 8800 | + SND_PCI_QUIRK(0x1028, 0x0a61, "Dell XPS 15 9510", ALC289_FIXUP_DUAL_SPK), |
---|
| 8801 | + SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK), |
---|
| 8802 | + SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE), |
---|
| 8803 | + SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE), |
---|
| 8804 | + SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK), |
---|
| 8805 | + SND_PCI_QUIRK(0x1028, 0x0b1a, "Dell Precision 5570", ALC289_FIXUP_DUAL_SPK), |
---|
7067 | 8806 | SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), |
---|
7068 | 8807 | SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), |
---|
7069 | 8808 | SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), |
---|
.. | .. |
---|
7123 | 8862 | SND_PCI_QUIRK(0x103c, 0x2335, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
---|
7124 | 8863 | SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
---|
7125 | 8864 | SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
---|
| 8865 | + SND_PCI_QUIRK(0x103c, 0x2b5e, "HP 288 Pro G2 MT", ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE), |
---|
7126 | 8866 | SND_PCI_QUIRK(0x103c, 0x802e, "HP Z240 SFF", ALC221_FIXUP_HP_MIC_NO_PRESENCE), |
---|
7127 | 8867 | SND_PCI_QUIRK(0x103c, 0x802f, "HP Z240", ALC221_FIXUP_HP_MIC_NO_PRESENCE), |
---|
| 8868 | + SND_PCI_QUIRK(0x103c, 0x8077, "HP", ALC256_FIXUP_HP_HEADSET_MIC), |
---|
| 8869 | + SND_PCI_QUIRK(0x103c, 0x8158, "HP", ALC256_FIXUP_HP_HEADSET_MIC), |
---|
7128 | 8870 | SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3), |
---|
7129 | 8871 | SND_PCI_QUIRK(0x103c, 0x8256, "HP", ALC221_FIXUP_HP_FRONT_MIC), |
---|
7130 | 8872 | SND_PCI_QUIRK(0x103c, 0x827e, "HP x360", ALC295_FIXUP_HP_X360), |
---|
.. | .. |
---|
7134 | 8876 | SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3), |
---|
7135 | 8877 | SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3), |
---|
7136 | 8878 | SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3), |
---|
| 8879 | + SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN), |
---|
7137 | 8880 | SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3), |
---|
7138 | | - SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_LED), |
---|
| 8881 | + SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360), |
---|
| 8882 | + SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT), |
---|
| 8883 | + SND_PCI_QUIRK(0x103c, 0x861f, "HP Elite Dragonfly G1", ALC285_FIXUP_HP_GPIO_AMP_INIT), |
---|
| 8884 | + SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED), |
---|
| 8885 | + SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO), |
---|
| 8886 | + SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), |
---|
| 8887 | + SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), |
---|
| 8888 | + SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), |
---|
| 8889 | + SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), |
---|
| 8890 | + SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED), |
---|
| 8891 | + SND_PCI_QUIRK(0x103c, 0x8728, "HP EliteBook 840 G7", ALC285_FIXUP_HP_GPIO_LED), |
---|
| 8892 | + SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED), |
---|
| 8893 | + SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), |
---|
| 8894 | + SND_PCI_QUIRK(0x103c, 0x8735, "HP ProBook 435 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), |
---|
| 8895 | + SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT), |
---|
| 8896 | + SND_PCI_QUIRK(0x103c, 0x8760, "HP", ALC285_FIXUP_HP_MUTE_LED), |
---|
| 8897 | + SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED), |
---|
| 8898 | + SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED), |
---|
| 8899 | + SND_PCI_QUIRK(0x103c, 0x8780, "HP ZBook Fury 17 G7 Mobile Workstation", |
---|
| 8900 | + ALC285_FIXUP_HP_GPIO_AMP_INIT), |
---|
| 8901 | + SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation", |
---|
| 8902 | + ALC285_FIXUP_HP_GPIO_AMP_INIT), |
---|
| 8903 | + SND_PCI_QUIRK(0x103c, 0x8786, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED), |
---|
| 8904 | + SND_PCI_QUIRK(0x103c, 0x8787, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED), |
---|
| 8905 | + SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED), |
---|
| 8906 | + SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED), |
---|
| 8907 | + SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), |
---|
| 8908 | + SND_PCI_QUIRK(0x103c, 0x87e7, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), |
---|
| 8909 | + SND_PCI_QUIRK(0x103c, 0x87f1, "HP ProBook 630 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), |
---|
| 8910 | + SND_PCI_QUIRK(0x103c, 0x87f2, "HP ProBook 640 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), |
---|
| 8911 | + SND_PCI_QUIRK(0x103c, 0x87f4, "HP", ALC287_FIXUP_HP_GPIO_LED), |
---|
| 8912 | + SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED), |
---|
| 8913 | + SND_PCI_QUIRK(0x103c, 0x87f6, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP), |
---|
| 8914 | + SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP), |
---|
| 8915 | + SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), |
---|
| 8916 | + SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), |
---|
| 8917 | + SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), |
---|
| 8918 | + SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), |
---|
| 8919 | + SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), |
---|
| 8920 | + SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), |
---|
| 8921 | + SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), |
---|
| 8922 | + SND_PCI_QUIRK(0x103c, 0x884c, "HP EliteBook 840 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), |
---|
| 8923 | + SND_PCI_QUIRK(0x103c, 0x8862, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST), |
---|
| 8924 | + SND_PCI_QUIRK(0x103c, 0x8863, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST), |
---|
| 8925 | + SND_PCI_QUIRK(0x103c, 0x886d, "HP ZBook Fury 17.3 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), |
---|
| 8926 | + SND_PCI_QUIRK(0x103c, 0x8870, "HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), |
---|
| 8927 | + SND_PCI_QUIRK(0x103c, 0x8873, "HP ZBook Studio 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), |
---|
| 8928 | + SND_PCI_QUIRK(0x103c, 0x888d, "HP ZBook Power 15.6 inch G8 Mobile Workstation PC", ALC236_FIXUP_HP_GPIO_LED), |
---|
| 8929 | + SND_PCI_QUIRK(0x103c, 0x8895, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED), |
---|
| 8930 | + SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED), |
---|
| 8931 | + SND_PCI_QUIRK(0x103c, 0x89aa, "HP EliteBook 630 G9", ALC236_FIXUP_HP_GPIO_LED), |
---|
7139 | 8932 | SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), |
---|
7140 | 8933 | SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), |
---|
7141 | 8934 | SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
---|
.. | .. |
---|
7144 | 8937 | SND_PCI_QUIRK(0x1043, 0x10d0, "ASUS X540LA/X540LJ", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), |
---|
7145 | 8938 | SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
---|
7146 | 8939 | SND_PCI_QUIRK(0x1043, 0x11c0, "ASUS X556UR", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), |
---|
| 8940 | + SND_PCI_QUIRK(0x1043, 0x125e, "ASUS Q524UQK", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), |
---|
7147 | 8941 | SND_PCI_QUIRK(0x1043, 0x1271, "ASUS X430UN", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), |
---|
7148 | 8942 | SND_PCI_QUIRK(0x1043, 0x1290, "ASUS X441SA", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE), |
---|
7149 | 8943 | SND_PCI_QUIRK(0x1043, 0x12a0, "ASUS X441UV", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE), |
---|
7150 | | - SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC), |
---|
7151 | 8944 | SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC), |
---|
| 8945 | + SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC), |
---|
| 8946 | + SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE), |
---|
7152 | 8947 | SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC), |
---|
7153 | 8948 | SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK), |
---|
7154 | 8949 | SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A), |
---|
| 8950 | + SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK), |
---|
| 8951 | + SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401), |
---|
7155 | 8952 | SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), |
---|
| 8953 | + SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS), |
---|
7156 | 8954 | SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK), |
---|
| 8955 | + SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS), |
---|
7157 | 8956 | SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC), |
---|
| 8957 | + SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC), |
---|
| 8958 | + SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE), |
---|
| 8959 | + SND_PCI_QUIRK(0x1043, 0x1970, "ASUS UX550VE", ALC289_FIXUP_ASUS_GA401), |
---|
| 8960 | + SND_PCI_QUIRK(0x1043, 0x1982, "ASUS B1400CEPE", ALC256_FIXUP_ASUS_HPE), |
---|
7158 | 8961 | SND_PCI_QUIRK(0x1043, 0x19ce, "ASUS B9450FA", ALC294_FIXUP_ASUS_HPE), |
---|
| 8962 | + SND_PCI_QUIRK(0x1043, 0x19e1, "ASUS UX581LV", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE), |
---|
7159 | 8963 | SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), |
---|
7160 | 8964 | SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC), |
---|
| 8965 | + SND_PCI_QUIRK(0x1043, 0x1b11, "ASUS UX431DA", ALC294_FIXUP_ASUS_COEF_1B), |
---|
7161 | 8966 | SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC), |
---|
7162 | 8967 | SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), |
---|
7163 | 8968 | SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
---|
7164 | | - SND_PCI_QUIRK(0x1043, 0x125e, "ASUS Q524UQK", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), |
---|
| 8969 | + SND_PCI_QUIRK(0x1043, 0x1c92, "ASUS ROG Strix G15", ALC285_FIXUP_ASUS_G533Z_PINS), |
---|
7165 | 8970 | SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC), |
---|
| 8971 | + SND_PCI_QUIRK(0x1043, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401), |
---|
| 8972 | + SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE), |
---|
| 8973 | + SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502), |
---|
| 8974 | + SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15", ALC294_FIXUP_ASUS_GU502_PINS), |
---|
| 8975 | + SND_PCI_QUIRK(0x1043, 0x1e5e, "ASUS ROG Strix G513", ALC294_FIXUP_ASUS_G513_PINS), |
---|
| 8976 | + SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401), |
---|
| 8977 | + SND_PCI_QUIRK(0x1043, 0x1c52, "ASUS Zephyrus G15 2022", ALC289_FIXUP_ASUS_GA401), |
---|
| 8978 | + SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401), |
---|
| 8979 | + SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16", ALC289_FIXUP_ASUS_GA401), |
---|
7166 | 8980 | SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2), |
---|
7167 | 8981 | SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC), |
---|
7168 | 8982 | SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC), |
---|
.. | .. |
---|
7178 | 8992 | SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK), |
---|
7179 | 8993 | SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT), |
---|
7180 | 8994 | SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN), |
---|
7181 | | - SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN), |
---|
7182 | 8995 | SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC), |
---|
| 8996 | + SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN), |
---|
7183 | 8997 | SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC), |
---|
7184 | 8998 | SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE), |
---|
| 8999 | + SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE), |
---|
| 9000 | + SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), |
---|
| 9001 | + SND_PCI_QUIRK(0x10ec, 0x124c, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), |
---|
| 9002 | + SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), |
---|
| 9003 | + SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), |
---|
7185 | 9004 | SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE), |
---|
7186 | 9005 | SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC), |
---|
| 9006 | + SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_AMP), |
---|
| 9007 | + SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_AMP), |
---|
| 9008 | + SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_AMP), |
---|
| 9009 | + SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_AMP), |
---|
| 9010 | + SND_PCI_QUIRK(0x144d, 0xc1a3, "Samsung Galaxy Book Pro (NP935XDB-KC1SE)", ALC298_FIXUP_SAMSUNG_AMP), |
---|
| 9011 | + SND_PCI_QUIRK(0x144d, 0xc1a6, "Samsung Galaxy Book Pro 360 (NP930QBD)", ALC298_FIXUP_SAMSUNG_AMP), |
---|
7187 | 9012 | SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8), |
---|
| 9013 | + SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_AMP), |
---|
| 9014 | + SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_AMP), |
---|
| 9015 | + SND_PCI_QUIRK(0x144d, 0xc832, "Samsung Galaxy Book Flex Alpha (NP730QCJ)", ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), |
---|
7188 | 9016 | SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC), |
---|
7189 | 9017 | SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC), |
---|
7190 | 9018 | SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC), |
---|
.. | .. |
---|
7198 | 9026 | SND_PCI_QUIRK(0x1558, 0x4018, "Clevo NV40M[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7199 | 9027 | SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7200 | 9028 | SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9029 | + SND_PCI_QUIRK(0x1558, 0x4041, "Clevo NV4[15]PZ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7201 | 9030 | SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7202 | 9031 | SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7203 | 9032 | SND_PCI_QUIRK(0x1558, 0x40d1, "Clevo NL41DU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9033 | + SND_PCI_QUIRK(0x1558, 0x5015, "Clevo NH5[58]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9034 | + SND_PCI_QUIRK(0x1558, 0x5017, "Clevo NH7[79]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7204 | 9035 | SND_PCI_QUIRK(0x1558, 0x50a3, "Clevo NJ51GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7205 | 9036 | SND_PCI_QUIRK(0x1558, 0x50b3, "Clevo NK50S[BEZ]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7206 | 9037 | SND_PCI_QUIRK(0x1558, 0x50b6, "Clevo NK50S5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7207 | 9038 | SND_PCI_QUIRK(0x1558, 0x50b8, "Clevo NK50SZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7208 | 9039 | SND_PCI_QUIRK(0x1558, 0x50d5, "Clevo NP50D5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9040 | + SND_PCI_QUIRK(0x1558, 0x50e1, "Clevo NH5[58]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9041 | + SND_PCI_QUIRK(0x1558, 0x50e2, "Clevo NH7[79]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7209 | 9042 | SND_PCI_QUIRK(0x1558, 0x50f0, "Clevo NH50A[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7210 | 9043 | SND_PCI_QUIRK(0x1558, 0x50f2, "Clevo NH50E[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7211 | 9044 | SND_PCI_QUIRK(0x1558, 0x50f3, "Clevo NH58DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
.. | .. |
---|
7220 | 9053 | SND_PCI_QUIRK(0x1558, 0x70f3, "Clevo NH77DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7221 | 9054 | SND_PCI_QUIRK(0x1558, 0x70f4, "Clevo NH77EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7222 | 9055 | SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9056 | + SND_PCI_QUIRK(0x1558, 0x7716, "Clevo NS50PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9057 | + SND_PCI_QUIRK(0x1558, 0x7717, "Clevo NS70PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9058 | + SND_PCI_QUIRK(0x1558, 0x7718, "Clevo L140PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7223 | 9059 | SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7224 | 9060 | SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7225 | 9061 | SND_PCI_QUIRK(0x1558, 0x8521, "Clevo NH77D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
.. | .. |
---|
7231 | 9067 | SND_PCI_QUIRK(0x1558, 0x8561, "System76 Gazelle (gaze14)", ALC269_FIXUP_HEADSET_MIC), |
---|
7232 | 9068 | SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[5|7][0-9]RZ[Q]", ALC269_FIXUP_DMIC), |
---|
7233 | 9069 | SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9070 | + SND_PCI_QUIRK(0x1558, 0x866d, "Clevo NP5[05]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9071 | + SND_PCI_QUIRK(0x1558, 0x867c, "Clevo NP7[01]PNP", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9072 | + SND_PCI_QUIRK(0x1558, 0x867d, "Clevo NP7[01]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7234 | 9073 | SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7235 | | - SND_PCI_QUIRK(0x1558, 0x8686, "Clevo NH50[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9074 | + SND_PCI_QUIRK(0x1558, 0x8686, "Clevo NH50[CZ]U", ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME), |
---|
7236 | 9075 | SND_PCI_QUIRK(0x1558, 0x8a20, "Clevo NH55DCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7237 | 9076 | SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7238 | 9077 | SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
.. | .. |
---|
7249 | 9088 | SND_PCI_QUIRK(0x1558, 0xc019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7250 | 9089 | SND_PCI_QUIRK(0x1558, 0xc022, "Clevo NH77[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7251 | 9090 | SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS), |
---|
7252 | | - SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), |
---|
| 9091 | + SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340), |
---|
7253 | 9092 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE), |
---|
7254 | 9093 | SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE), |
---|
7255 | 9094 | SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE), |
---|
.. | .. |
---|
7283 | 9122 | SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), |
---|
7284 | 9123 | SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), |
---|
7285 | 9124 | SND_PCI_QUIRK(0x17aa, 0x225d, "Thinkpad T480", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
---|
7286 | | - SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Yoga 7th", ALC285_FIXUP_SPEAKER2_TO_DAC1), |
---|
7287 | | - SND_PCI_QUIRK(0x17aa, 0x2293, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_SPEAKER2_TO_DAC1), |
---|
| 9125 | + SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK), |
---|
| 9126 | + SND_PCI_QUIRK(0x17aa, 0x22be, "Thinkpad X1 Carbon 8th", ALC285_FIXUP_THINKPAD_HEADSET_JACK), |
---|
| 9127 | + SND_PCI_QUIRK(0x17aa, 0x22c1, "Thinkpad P1 Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK), |
---|
| 9128 | + SND_PCI_QUIRK(0x17aa, 0x22c2, "Thinkpad X1 Extreme Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK), |
---|
7288 | 9129 | SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), |
---|
7289 | 9130 | SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), |
---|
7290 | 9131 | SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), |
---|
.. | .. |
---|
7295 | 9136 | SND_PCI_QUIRK(0x17aa, 0x3151, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), |
---|
7296 | 9137 | SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), |
---|
7297 | 9138 | SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), |
---|
7298 | | - SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940", ALC298_FIXUP_LENOVO_SPK_VOLUME), |
---|
| 9139 | + SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340), |
---|
| 9140 | + SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), |
---|
| 9141 | + SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS), |
---|
| 9142 | + SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7), |
---|
| 9143 | + SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS), |
---|
| 9144 | + SND_PCI_QUIRK(0x17aa, 0x3820, "Yoga Duet 7 13ITL6", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), |
---|
| 9145 | + SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS), |
---|
| 9146 | + SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF), |
---|
| 9147 | + SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), |
---|
| 9148 | + SND_PCI_QUIRK(0x17aa, 0x383d, "Legion Y9000X 2019", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS), |
---|
| 9149 | + SND_PCI_QUIRK(0x17aa, 0x3843, "Yoga 9i", ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP), |
---|
| 9150 | + SND_PCI_QUIRK(0x17aa, 0x384a, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), |
---|
| 9151 | + SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), |
---|
| 9152 | + SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), |
---|
7299 | 9153 | SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI), |
---|
7300 | 9154 | SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC), |
---|
7301 | 9155 | SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI), |
---|
.. | .. |
---|
7315 | 9169 | SND_PCI_QUIRK(0x17aa, 0x505d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), |
---|
7316 | 9170 | SND_PCI_QUIRK(0x17aa, 0x505f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), |
---|
7317 | 9171 | SND_PCI_QUIRK(0x17aa, 0x5062, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), |
---|
| 9172 | + SND_PCI_QUIRK(0x17aa, 0x508b, "Thinkpad X12 Gen 1", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS), |
---|
7318 | 9173 | SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
---|
7319 | 9174 | SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), |
---|
7320 | 9175 | SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), |
---|
7321 | 9176 | SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), |
---|
7322 | | - SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MBXP", ALC256_FIXUP_HUAWEI_MBXP_PINS), |
---|
| 9177 | + SND_PCI_QUIRK(0x1849, 0x1233, "ASRock NUC Box 1100", ALC233_FIXUP_NO_AUDIO_JACK), |
---|
| 9178 | + SND_PCI_QUIRK(0x1849, 0xa233, "Positivo Master C6300", ALC269_FIXUP_HEADSET_MIC), |
---|
| 9179 | + SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS), |
---|
| 9180 | + SND_PCI_QUIRK(0x19e5, 0x320f, "Huawei WRT-WX9 ", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), |
---|
| 9181 | + SND_PCI_QUIRK(0x1b35, 0x1235, "CZC B20", ALC269_FIXUP_CZC_B20), |
---|
| 9182 | + SND_PCI_QUIRK(0x1b35, 0x1236, "CZC TMI", ALC269_FIXUP_CZC_TMI), |
---|
| 9183 | + SND_PCI_QUIRK(0x1b35, 0x1237, "CZC L101", ALC269_FIXUP_CZC_L101), |
---|
7323 | 9184 | SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */ |
---|
| 9185 | + SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802), |
---|
| 9186 | + SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X), |
---|
| 9187 | + SND_PCI_QUIRK(0x1d05, 0x1132, "TongFang PHxTxX1", ALC256_FIXUP_SET_COEF_DEFAULTS), |
---|
| 9188 | + SND_PCI_QUIRK(0x1d05, 0x1096, "TongFang GMxMRxx", ALC269_FIXUP_NO_SHUTUP), |
---|
| 9189 | + SND_PCI_QUIRK(0x1d05, 0x1100, "TongFang GKxNRxx", ALC269_FIXUP_NO_SHUTUP), |
---|
| 9190 | + SND_PCI_QUIRK(0x1d05, 0x1111, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP), |
---|
| 9191 | + SND_PCI_QUIRK(0x1d05, 0x1119, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP), |
---|
| 9192 | + SND_PCI_QUIRK(0x1d05, 0x1129, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP), |
---|
| 9193 | + SND_PCI_QUIRK(0x1d05, 0x1147, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP), |
---|
| 9194 | + SND_PCI_QUIRK(0x1d05, 0x115c, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP), |
---|
| 9195 | + SND_PCI_QUIRK(0x1d05, 0x121b, "TongFang GMxAGxx", ALC269_FIXUP_NO_SHUTUP), |
---|
| 9196 | + SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC), |
---|
| 9197 | + SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE), |
---|
7324 | 9198 | SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC), |
---|
7325 | | - SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE), |
---|
| 9199 | + SND_PCI_QUIRK(0x1d72, 0x1945, "Redmi G", ALC256_FIXUP_ASUS_HEADSET_MIC), |
---|
| 9200 | + SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC), |
---|
| 9201 | + SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC), |
---|
| 9202 | + SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED), |
---|
| 9203 | + SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10), |
---|
7326 | 9204 | |
---|
7327 | 9205 | #if 0 |
---|
7328 | 9206 | /* Below is a quirk table taken from the old code. |
---|
.. | .. |
---|
7380 | 9258 | SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED), |
---|
7381 | 9259 | SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), |
---|
7382 | 9260 | SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI), |
---|
| 9261 | + SND_PCI_QUIRK_VENDOR(0x19e5, "Huawei Matebook", ALC255_FIXUP_MIC_MUTE_LED), |
---|
7383 | 9262 | {} |
---|
7384 | 9263 | }; |
---|
7385 | 9264 | |
---|
.. | .. |
---|
7449 | 9328 | {.id = ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "alc255-dell2"}, |
---|
7450 | 9329 | {.id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc293-dell1"}, |
---|
7451 | 9330 | {.id = ALC283_FIXUP_HEADSET_MIC, .name = "alc283-headset"}, |
---|
7452 | | - {.id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED, .name = "alc255-dell-mute"}, |
---|
| 9331 | + {.id = ALC255_FIXUP_MIC_MUTE_LED, .name = "alc255-dell-mute"}, |
---|
7453 | 9332 | {.id = ALC282_FIXUP_ASPIRE_V5_PINS, .name = "aspire-v5"}, |
---|
| 9333 | + {.id = ALC269VB_FIXUP_ASPIRE_E1_COEF, .name = "aspire-e1-coef"}, |
---|
7454 | 9334 | {.id = ALC280_FIXUP_HP_GPIO4, .name = "hp-gpio4"}, |
---|
7455 | 9335 | {.id = ALC286_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, |
---|
7456 | 9336 | {.id = ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, .name = "hp-gpio2-hotkey"}, |
---|
.. | .. |
---|
7488 | 9368 | {.id = ALC255_FIXUP_DUMMY_LINEOUT_VERB, .name = "alc255-dummy-lineout"}, |
---|
7489 | 9369 | {.id = ALC255_FIXUP_DELL_HEADSET_MIC, .name = "alc255-dell-headset"}, |
---|
7490 | 9370 | {.id = ALC295_FIXUP_HP_X360, .name = "alc295-hp-x360"}, |
---|
| 9371 | + {.id = ALC225_FIXUP_HEADSET_JACK, .name = "alc-headset-jack"}, |
---|
| 9372 | + {.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-chrome-book"}, |
---|
7491 | 9373 | {.id = ALC299_FIXUP_PREDATOR_SPK, .name = "predator-spk"}, |
---|
| 9374 | + {.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"}, |
---|
7492 | 9375 | {.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"}, |
---|
| 9376 | + {.id = ALC298_FIXUP_SAMSUNG_AMP, .name = "alc298-samsung-amp"}, |
---|
| 9377 | + {.id = ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc256-samsung-headphone"}, |
---|
| 9378 | + {.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"}, |
---|
| 9379 | + {.id = ALC274_FIXUP_HP_MIC, .name = "alc274-hp-mic-detect"}, |
---|
| 9380 | + {.id = ALC245_FIXUP_HP_X360_AMP, .name = "alc245-hp-x360-amp"}, |
---|
| 9381 | + {.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"}, |
---|
| 9382 | + {.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"}, |
---|
| 9383 | + {.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"}, |
---|
| 9384 | + {.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"}, |
---|
| 9385 | + {.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"}, |
---|
| 9386 | + {.id = ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, .name = "alc255-acer-headphone-and-mic"}, |
---|
| 9387 | + {.id = ALC285_FIXUP_HP_GPIO_AMP_INIT, .name = "alc285-hp-amp-init"}, |
---|
7493 | 9388 | {} |
---|
7494 | 9389 | }; |
---|
7495 | 9390 | #define ALC225_STANDARD_PINS \ |
---|
.. | .. |
---|
7584 | 9479 | {0x19, 0x02a11020}, |
---|
7585 | 9480 | {0x1a, 0x02a11030}, |
---|
7586 | 9481 | {0x21, 0x0221101f}), |
---|
7587 | | - SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
7588 | | - {0x12, 0x90a60140}, |
---|
| 9482 | + SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC, |
---|
| 9483 | + {0x21, 0x02211010}), |
---|
| 9484 | + SND_HDA_PIN_QUIRK(0x10ec0236, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC, |
---|
7589 | 9485 | {0x14, 0x90170110}, |
---|
7590 | | - {0x21, 0x02211020}), |
---|
7591 | | - SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
7592 | | - {0x12, 0x90a60140}, |
---|
7593 | | - {0x14, 0x90170150}, |
---|
7594 | | - {0x21, 0x02211020}), |
---|
7595 | | - SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
7596 | | - {0x21, 0x02211020}), |
---|
7597 | | - SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
7598 | | - {0x12, 0x40000000}, |
---|
7599 | | - {0x14, 0x90170110}, |
---|
7600 | | - {0x21, 0x02211020}), |
---|
| 9486 | + {0x19, 0x02a11020}, |
---|
| 9487 | + {0x21, 0x02211030}), |
---|
7601 | 9488 | SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, |
---|
7602 | 9489 | {0x14, 0x90170110}, |
---|
7603 | 9490 | {0x21, 0x02211020}), |
---|
.. | .. |
---|
7680 | 9567 | SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
7681 | 9568 | {0x1b, 0x01011020}, |
---|
7682 | 9569 | {0x21, 0x02211010}), |
---|
7683 | | - SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
7684 | | - {0x12, 0x90a60130}, |
---|
7685 | | - {0x14, 0x90170110}, |
---|
7686 | | - {0x1b, 0x01011020}, |
---|
7687 | | - {0x21, 0x0221101f}), |
---|
7688 | | - SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
7689 | | - {0x12, 0x90a60160}, |
---|
7690 | | - {0x14, 0x90170120}, |
---|
7691 | | - {0x21, 0x02211030}), |
---|
7692 | | - SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
7693 | | - {0x12, 0x90a60170}, |
---|
7694 | | - {0x14, 0x90170120}, |
---|
7695 | | - {0x21, 0x02211030}), |
---|
7696 | | - SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell Inspiron 5468", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
7697 | | - {0x12, 0x90a60180}, |
---|
7698 | | - {0x14, 0x90170120}, |
---|
7699 | | - {0x21, 0x02211030}), |
---|
7700 | | - SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
7701 | | - {0x12, 0xb7a60130}, |
---|
7702 | | - {0x14, 0x90170110}, |
---|
7703 | | - {0x21, 0x02211020}), |
---|
7704 | | - SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
7705 | | - {0x12, 0x90a60130}, |
---|
7706 | | - {0x14, 0x90170110}, |
---|
7707 | | - {0x14, 0x01011020}, |
---|
7708 | | - {0x21, 0x0221101f}), |
---|
7709 | | - SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
7710 | | - ALC256_STANDARD_PINS), |
---|
7711 | | - SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
7712 | | - {0x14, 0x90170110}, |
---|
7713 | | - {0x1b, 0x01011020}, |
---|
7714 | | - {0x21, 0x0221101f}), |
---|
7715 | 9570 | SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC, |
---|
7716 | 9571 | {0x14, 0x90170110}, |
---|
7717 | 9572 | {0x1b, 0x90a70130}, |
---|
.. | .. |
---|
7732 | 9587 | {0x1a, 0x90a70130}, |
---|
7733 | 9588 | {0x1b, 0x90170110}, |
---|
7734 | 9589 | {0x21, 0x03211020}), |
---|
7735 | | - SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, |
---|
7736 | | - {0x12, 0xb7a60130}, |
---|
7737 | | - {0x13, 0xb8a61140}, |
---|
7738 | | - {0x16, 0x90170110}, |
---|
7739 | | - {0x21, 0x04211020}), |
---|
| 9590 | + SND_HDA_PIN_QUIRK(0x10ec0256, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC, |
---|
| 9591 | + {0x14, 0x90170110}, |
---|
| 9592 | + {0x19, 0x02a11020}, |
---|
| 9593 | + {0x21, 0x0221101f}), |
---|
| 9594 | + SND_HDA_PIN_QUIRK(0x10ec0274, 0x103c, "HP", ALC274_FIXUP_HP_HEADSET_MIC, |
---|
| 9595 | + {0x17, 0x90170110}, |
---|
| 9596 | + {0x19, 0x03a11030}, |
---|
| 9597 | + {0x21, 0x03211020}), |
---|
7740 | 9598 | SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4, |
---|
7741 | 9599 | {0x12, 0x90a60130}, |
---|
7742 | 9600 | {0x14, 0x90170110}, |
---|
.. | .. |
---|
7774 | 9632 | {0x12, 0x90a60140}, |
---|
7775 | 9633 | {0x19, 0x04a11030}, |
---|
7776 | 9634 | {0x21, 0x04211020}), |
---|
| 9635 | + SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT, |
---|
| 9636 | + ALC282_STANDARD_PINS, |
---|
| 9637 | + {0x12, 0x90a609c0}, |
---|
| 9638 | + {0x18, 0x03a11830}, |
---|
| 9639 | + {0x19, 0x04a19831}, |
---|
| 9640 | + {0x1a, 0x0481303f}, |
---|
| 9641 | + {0x1b, 0x04211020}, |
---|
| 9642 | + {0x21, 0x0321101f}), |
---|
| 9643 | + SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT, |
---|
| 9644 | + ALC282_STANDARD_PINS, |
---|
| 9645 | + {0x12, 0x90a60940}, |
---|
| 9646 | + {0x18, 0x03a11830}, |
---|
| 9647 | + {0x19, 0x04a19831}, |
---|
| 9648 | + {0x1a, 0x0481303f}, |
---|
| 9649 | + {0x1b, 0x04211020}, |
---|
| 9650 | + {0x21, 0x0321101f}), |
---|
7777 | 9651 | SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
7778 | 9652 | ALC282_STANDARD_PINS, |
---|
7779 | 9653 | {0x12, 0x90a60130}, |
---|
.. | .. |
---|
7792 | 9666 | {0x14, 0x90170110}, |
---|
7793 | 9667 | {0x19, 0x04a11040}, |
---|
7794 | 9668 | {0x21, 0x04211020}), |
---|
| 9669 | + SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE, |
---|
| 9670 | + {0x14, 0x90170110}, |
---|
| 9671 | + {0x19, 0x04a11040}, |
---|
| 9672 | + {0x1d, 0x40600001}, |
---|
| 9673 | + {0x21, 0x04211020}), |
---|
| 9674 | + SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK, |
---|
| 9675 | + {0x14, 0x90170110}, |
---|
| 9676 | + {0x19, 0x04a11040}, |
---|
| 9677 | + {0x21, 0x04211020}), |
---|
| 9678 | + SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_HEADSET_JACK, |
---|
| 9679 | + {0x14, 0x90170110}, |
---|
| 9680 | + {0x17, 0x90170111}, |
---|
| 9681 | + {0x19, 0x03a11030}, |
---|
| 9682 | + {0x21, 0x03211020}), |
---|
7795 | 9683 | SND_HDA_PIN_QUIRK(0x10ec0286, 0x1025, "Acer", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE, |
---|
7796 | 9684 | {0x12, 0x90a60130}, |
---|
7797 | 9685 | {0x17, 0x90170110}, |
---|
.. | .. |
---|
7800 | 9688 | {0x12, 0x90a60120}, |
---|
7801 | 9689 | {0x14, 0x90170110}, |
---|
7802 | 9690 | {0x21, 0x0321101f}), |
---|
7803 | | - SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, |
---|
7804 | | - {0x12, 0xb7a60130}, |
---|
7805 | | - {0x14, 0x90170110}, |
---|
7806 | | - {0x21, 0x04211020}), |
---|
7807 | 9691 | SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, |
---|
7808 | 9692 | ALC290_STANDARD_PINS, |
---|
7809 | 9693 | {0x15, 0x04211040}, |
---|
.. | .. |
---|
7878 | 9762 | {0x12, 0x90a60130}, |
---|
7879 | 9763 | {0x17, 0x90170110}, |
---|
7880 | 9764 | {0x21, 0x03211020}), |
---|
| 9765 | + SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE, |
---|
| 9766 | + {0x12, 0x90a60120}, |
---|
| 9767 | + {0x17, 0x90170110}, |
---|
| 9768 | + {0x21, 0x04211030}), |
---|
| 9769 | + SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE, |
---|
| 9770 | + {0x12, 0x90a60130}, |
---|
| 9771 | + {0x17, 0x90170110}, |
---|
| 9772 | + {0x21, 0x03211020}), |
---|
| 9773 | + SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE, |
---|
| 9774 | + {0x12, 0x90a60130}, |
---|
| 9775 | + {0x17, 0x90170110}, |
---|
| 9776 | + {0x21, 0x03211020}), |
---|
7881 | 9777 | SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, |
---|
7882 | 9778 | {0x14, 0x90170110}, |
---|
7883 | 9779 | {0x21, 0x04211020}), |
---|
.. | .. |
---|
7909 | 9805 | {0x17, 0x90170110}, |
---|
7910 | 9806 | {0x1a, 0x03011020}, |
---|
7911 | 9807 | {0x21, 0x03211030}), |
---|
| 9808 | + SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE, |
---|
| 9809 | + {0x12, 0xb7a60140}, |
---|
| 9810 | + {0x17, 0x90170110}, |
---|
| 9811 | + {0x1a, 0x03a11030}, |
---|
| 9812 | + {0x21, 0x03211020}), |
---|
7912 | 9813 | SND_HDA_PIN_QUIRK(0x10ec0299, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, |
---|
7913 | 9814 | ALC225_STANDARD_PINS, |
---|
7914 | 9815 | {0x12, 0xb7a60130}, |
---|
.. | .. |
---|
7919 | 9820 | {0x18, 0x02a11030}, |
---|
7920 | 9821 | {0x19, 0x02a1103f}, |
---|
7921 | 9822 | {0x21, 0x0221101f}), |
---|
| 9823 | + {} |
---|
| 9824 | +}; |
---|
| 9825 | + |
---|
| 9826 | +/* This is the fallback pin_fixup_tbl for alc269 family, to make the tbl match |
---|
| 9827 | + * more machines, don't need to match all valid pins, just need to match |
---|
| 9828 | + * all the pins defined in the tbl. Just because of this reason, it is possible |
---|
| 9829 | + * that a single machine matches multiple tbls, so there is one limitation: |
---|
| 9830 | + * at most one tbl is allowed to define for the same vendor and same codec |
---|
| 9831 | + */ |
---|
| 9832 | +static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = { |
---|
| 9833 | + SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, |
---|
| 9834 | + {0x19, 0x40000000}, |
---|
| 9835 | + {0x1b, 0x40000000}), |
---|
| 9836 | + SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
| 9837 | + {0x19, 0x40000000}, |
---|
| 9838 | + {0x1a, 0x40000000}), |
---|
| 9839 | + SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
| 9840 | + {0x19, 0x40000000}, |
---|
| 9841 | + {0x1a, 0x40000000}), |
---|
| 9842 | + SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, |
---|
| 9843 | + {0x19, 0x40000000}, |
---|
| 9844 | + {0x1a, 0x40000000}), |
---|
7922 | 9845 | {} |
---|
7923 | 9846 | }; |
---|
7924 | 9847 | |
---|
.. | .. |
---|
8050 | 9973 | spec->shutup = alc256_shutup; |
---|
8051 | 9974 | spec->init_hook = alc256_init; |
---|
8052 | 9975 | break; |
---|
| 9976 | + case 0x10ec0230: |
---|
8053 | 9977 | case 0x10ec0236: |
---|
8054 | 9978 | case 0x10ec0256: |
---|
| 9979 | + case 0x19e58326: |
---|
8055 | 9980 | spec->codec_variant = ALC269_TYPE_ALC256; |
---|
8056 | 9981 | spec->shutup = alc256_shutup; |
---|
8057 | 9982 | spec->init_hook = alc256_init; |
---|
.. | .. |
---|
8113 | 10038 | spec->init_hook = alc5505_dsp_init; |
---|
8114 | 10039 | } |
---|
8115 | 10040 | |
---|
| 10041 | + alc_pre_init(codec); |
---|
| 10042 | + |
---|
8116 | 10043 | snd_hda_pick_fixup(codec, alc269_fixup_models, |
---|
8117 | 10044 | alc269_fixup_tbl, alc269_fixups); |
---|
8118 | | - snd_hda_pick_pin_fixup(codec, alc269_pin_fixup_tbl, alc269_fixups); |
---|
| 10045 | + /* FIXME: both TX300 and ROG Strix G17 have the same SSID, and |
---|
| 10046 | + * the quirk breaks the latter (bko#214101). |
---|
| 10047 | + * Clear the wrong entry. |
---|
| 10048 | + */ |
---|
| 10049 | + if (codec->fixup_id == ALC282_FIXUP_ASUS_TX300 && |
---|
| 10050 | + codec->core.vendor_id == 0x10ec0294) { |
---|
| 10051 | + codec_dbg(codec, "Clear wrong fixup for ASUS ROG Strix G17\n"); |
---|
| 10052 | + codec->fixup_id = HDA_FIXUP_ID_NOT_SET; |
---|
| 10053 | + } |
---|
| 10054 | + |
---|
| 10055 | + snd_hda_pick_pin_fixup(codec, alc269_pin_fixup_tbl, alc269_fixups, true); |
---|
| 10056 | + snd_hda_pick_pin_fixup(codec, alc269_fallback_pin_fixup_tbl, alc269_fixups, false); |
---|
8119 | 10057 | snd_hda_pick_fixup(codec, NULL, alc269_fixup_vendor_tbl, |
---|
8120 | 10058 | alc269_fixups); |
---|
8121 | 10059 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); |
---|
.. | .. |
---|
8248 | 10186 | return err; |
---|
8249 | 10187 | |
---|
8250 | 10188 | spec = codec->spec; |
---|
8251 | | - spec->gen.beep_nid = 0x23; |
---|
| 10189 | + if (has_cdefine_beep(codec)) |
---|
| 10190 | + spec->gen.beep_nid = 0x23; |
---|
8252 | 10191 | |
---|
8253 | 10192 | #ifdef CONFIG_PM |
---|
8254 | 10193 | spec->power_hook = alc_power_eapd; |
---|
8255 | 10194 | #endif |
---|
| 10195 | + |
---|
| 10196 | + alc_pre_init(codec); |
---|
8256 | 10197 | |
---|
8257 | 10198 | snd_hda_pick_fixup(codec, NULL, alc861_fixup_tbl, alc861_fixups); |
---|
8258 | 10199 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); |
---|
.. | .. |
---|
8347 | 10288 | return err; |
---|
8348 | 10289 | |
---|
8349 | 10290 | spec = codec->spec; |
---|
8350 | | - spec->gen.beep_nid = 0x23; |
---|
| 10291 | + if (has_cdefine_beep(codec)) |
---|
| 10292 | + spec->gen.beep_nid = 0x23; |
---|
8351 | 10293 | |
---|
8352 | 10294 | spec->shutup = alc_eapd_shutup; |
---|
| 10295 | + |
---|
| 10296 | + alc_pre_init(codec); |
---|
8353 | 10297 | |
---|
8354 | 10298 | snd_hda_pick_fixup(codec, NULL, alc861vd_fixup_tbl, alc861vd_fixups); |
---|
8355 | 10299 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); |
---|
.. | .. |
---|
8485 | 10429 | } |
---|
8486 | 10430 | } |
---|
8487 | 10431 | |
---|
8488 | | -static struct coef_fw alc668_coefs[] = { |
---|
| 10432 | +static void alc662_aspire_ethos_mute_speakers(struct hda_codec *codec, |
---|
| 10433 | + struct hda_jack_callback *cb) |
---|
| 10434 | +{ |
---|
| 10435 | + /* surround speakers at 0x1b already get muted automatically when |
---|
| 10436 | + * headphones are plugged in, but we have to mute/unmute the remaining |
---|
| 10437 | + * channels manually: |
---|
| 10438 | + * 0x15 - front left/front right |
---|
| 10439 | + * 0x18 - front center/ LFE |
---|
| 10440 | + */ |
---|
| 10441 | + if (snd_hda_jack_detect_state(codec, 0x1b) == HDA_JACK_PRESENT) { |
---|
| 10442 | + snd_hda_set_pin_ctl_cache(codec, 0x15, 0); |
---|
| 10443 | + snd_hda_set_pin_ctl_cache(codec, 0x18, 0); |
---|
| 10444 | + } else { |
---|
| 10445 | + snd_hda_set_pin_ctl_cache(codec, 0x15, PIN_OUT); |
---|
| 10446 | + snd_hda_set_pin_ctl_cache(codec, 0x18, PIN_OUT); |
---|
| 10447 | + } |
---|
| 10448 | +} |
---|
| 10449 | + |
---|
| 10450 | +static void alc662_fixup_aspire_ethos_hp(struct hda_codec *codec, |
---|
| 10451 | + const struct hda_fixup *fix, int action) |
---|
| 10452 | +{ |
---|
| 10453 | + /* Pin 0x1b: shared headphones jack and surround speakers */ |
---|
| 10454 | + if (!is_jack_detectable(codec, 0x1b)) |
---|
| 10455 | + return; |
---|
| 10456 | + |
---|
| 10457 | + switch (action) { |
---|
| 10458 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 10459 | + snd_hda_jack_detect_enable_callback(codec, 0x1b, |
---|
| 10460 | + alc662_aspire_ethos_mute_speakers); |
---|
| 10461 | + /* subwoofer needs an extra GPIO setting to become audible */ |
---|
| 10462 | + alc_setup_gpio(codec, 0x02); |
---|
| 10463 | + break; |
---|
| 10464 | + case HDA_FIXUP_ACT_INIT: |
---|
| 10465 | + /* Make sure to start in a correct state, i.e. if |
---|
| 10466 | + * headphones have been plugged in before powering up the system |
---|
| 10467 | + */ |
---|
| 10468 | + alc662_aspire_ethos_mute_speakers(codec, NULL); |
---|
| 10469 | + break; |
---|
| 10470 | + } |
---|
| 10471 | +} |
---|
| 10472 | + |
---|
| 10473 | +static void alc671_fixup_hp_headset_mic2(struct hda_codec *codec, |
---|
| 10474 | + const struct hda_fixup *fix, int action) |
---|
| 10475 | +{ |
---|
| 10476 | + struct alc_spec *spec = codec->spec; |
---|
| 10477 | + |
---|
| 10478 | + static const struct hda_pintbl pincfgs[] = { |
---|
| 10479 | + { 0x19, 0x02a11040 }, /* use as headset mic, with its own jack detect */ |
---|
| 10480 | + { 0x1b, 0x0181304f }, |
---|
| 10481 | + { } |
---|
| 10482 | + }; |
---|
| 10483 | + |
---|
| 10484 | + switch (action) { |
---|
| 10485 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 10486 | + spec->gen.mixer_nid = 0; |
---|
| 10487 | + spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; |
---|
| 10488 | + snd_hda_apply_pincfgs(codec, pincfgs); |
---|
| 10489 | + break; |
---|
| 10490 | + case HDA_FIXUP_ACT_INIT: |
---|
| 10491 | + alc_write_coef_idx(codec, 0x19, 0xa054); |
---|
| 10492 | + break; |
---|
| 10493 | + } |
---|
| 10494 | +} |
---|
| 10495 | + |
---|
| 10496 | +static void alc897_hp_automute_hook(struct hda_codec *codec, |
---|
| 10497 | + struct hda_jack_callback *jack) |
---|
| 10498 | +{ |
---|
| 10499 | + struct alc_spec *spec = codec->spec; |
---|
| 10500 | + int vref; |
---|
| 10501 | + |
---|
| 10502 | + snd_hda_gen_hp_automute(codec, jack); |
---|
| 10503 | + vref = spec->gen.hp_jack_present ? (PIN_HP | AC_PINCTL_VREF_100) : PIN_HP; |
---|
| 10504 | + snd_hda_codec_write(codec, 0x1b, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, |
---|
| 10505 | + vref); |
---|
| 10506 | +} |
---|
| 10507 | + |
---|
| 10508 | +static void alc897_fixup_lenovo_headset_mic(struct hda_codec *codec, |
---|
| 10509 | + const struct hda_fixup *fix, int action) |
---|
| 10510 | +{ |
---|
| 10511 | + struct alc_spec *spec = codec->spec; |
---|
| 10512 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
| 10513 | + spec->gen.hp_automute_hook = alc897_hp_automute_hook; |
---|
| 10514 | + } |
---|
| 10515 | +} |
---|
| 10516 | + |
---|
| 10517 | +static const struct coef_fw alc668_coefs[] = { |
---|
8489 | 10518 | WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0), |
---|
8490 | 10519 | WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80), |
---|
8491 | 10520 | WRITE_COEF(0x08, 0x0031), WRITE_COEF(0x0a, 0x0060), WRITE_COEF(0x0b, 0x0), |
---|
.. | .. |
---|
8519 | 10548 | ALC662_FIXUP_LED_GPIO1, |
---|
8520 | 10549 | ALC662_FIXUP_IDEAPAD, |
---|
8521 | 10550 | ALC272_FIXUP_MARIO, |
---|
| 10551 | + ALC662_FIXUP_CZC_ET26, |
---|
8522 | 10552 | ALC662_FIXUP_CZC_P10T, |
---|
8523 | 10553 | ALC662_FIXUP_SKU_IGNORE, |
---|
8524 | 10554 | ALC662_FIXUP_HP_RP5800, |
---|
.. | .. |
---|
8556 | 10586 | ALC662_FIXUP_USI_FUNC, |
---|
8557 | 10587 | ALC662_FIXUP_USI_HEADSET_MODE, |
---|
8558 | 10588 | ALC662_FIXUP_LENOVO_MULTI_CODECS, |
---|
| 10589 | + ALC669_FIXUP_ACER_ASPIRE_ETHOS, |
---|
| 10590 | + ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET, |
---|
| 10591 | + ALC671_FIXUP_HP_HEADSET_MIC2, |
---|
| 10592 | + ALC662_FIXUP_ACER_X2660G_HEADSET_MODE, |
---|
| 10593 | + ALC662_FIXUP_ACER_NITRO_HEADSET_MODE, |
---|
| 10594 | + ALC668_FIXUP_ASUS_NO_HEADSET_MIC, |
---|
| 10595 | + ALC668_FIXUP_HEADSET_MIC, |
---|
| 10596 | + ALC668_FIXUP_MIC_DET_COEF, |
---|
| 10597 | + ALC897_FIXUP_LENOVO_HEADSET_MIC, |
---|
| 10598 | + ALC897_FIXUP_HEADSET_MIC_PIN, |
---|
| 10599 | + ALC897_FIXUP_HP_HSMIC_VERB, |
---|
8559 | 10600 | }; |
---|
8560 | 10601 | |
---|
8561 | 10602 | static const struct hda_fixup alc662_fixups[] = { |
---|
.. | .. |
---|
8582 | 10623 | [ALC272_FIXUP_MARIO] = { |
---|
8583 | 10624 | .type = HDA_FIXUP_FUNC, |
---|
8584 | 10625 | .v.func = alc272_fixup_mario, |
---|
| 10626 | + }, |
---|
| 10627 | + [ALC662_FIXUP_CZC_ET26] = { |
---|
| 10628 | + .type = HDA_FIXUP_PINS, |
---|
| 10629 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 10630 | + {0x12, 0x403cc000}, |
---|
| 10631 | + {0x14, 0x90170110}, /* speaker */ |
---|
| 10632 | + {0x15, 0x411111f0}, |
---|
| 10633 | + {0x16, 0x411111f0}, |
---|
| 10634 | + {0x18, 0x01a19030}, /* mic */ |
---|
| 10635 | + {0x19, 0x90a7013f}, /* int-mic */ |
---|
| 10636 | + {0x1a, 0x01014020}, |
---|
| 10637 | + {0x1b, 0x0121401f}, |
---|
| 10638 | + {0x1c, 0x411111f0}, |
---|
| 10639 | + {0x1d, 0x411111f0}, |
---|
| 10640 | + {0x1e, 0x40478e35}, |
---|
| 10641 | + {} |
---|
| 10642 | + }, |
---|
| 10643 | + .chained = true, |
---|
| 10644 | + .chain_id = ALC662_FIXUP_SKU_IGNORE |
---|
8585 | 10645 | }, |
---|
8586 | 10646 | [ALC662_FIXUP_CZC_P10T] = { |
---|
8587 | 10647 | .type = HDA_FIXUP_VERBS, |
---|
.. | .. |
---|
8882 | 10942 | .type = HDA_FIXUP_FUNC, |
---|
8883 | 10943 | .v.func = alc233_alc662_fixup_lenovo_dual_codecs, |
---|
8884 | 10944 | }, |
---|
| 10945 | + [ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET] = { |
---|
| 10946 | + .type = HDA_FIXUP_FUNC, |
---|
| 10947 | + .v.func = alc662_fixup_aspire_ethos_hp, |
---|
| 10948 | + }, |
---|
| 10949 | + [ALC669_FIXUP_ACER_ASPIRE_ETHOS] = { |
---|
| 10950 | + .type = HDA_FIXUP_PINS, |
---|
| 10951 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 10952 | + { 0x15, 0x92130110 }, /* front speakers */ |
---|
| 10953 | + { 0x18, 0x99130111 }, /* center/subwoofer */ |
---|
| 10954 | + { 0x1b, 0x11130012 }, /* surround plus jack for HP */ |
---|
| 10955 | + { } |
---|
| 10956 | + }, |
---|
| 10957 | + .chained = true, |
---|
| 10958 | + .chain_id = ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET |
---|
| 10959 | + }, |
---|
| 10960 | + [ALC671_FIXUP_HP_HEADSET_MIC2] = { |
---|
| 10961 | + .type = HDA_FIXUP_FUNC, |
---|
| 10962 | + .v.func = alc671_fixup_hp_headset_mic2, |
---|
| 10963 | + }, |
---|
| 10964 | + [ALC662_FIXUP_ACER_X2660G_HEADSET_MODE] = { |
---|
| 10965 | + .type = HDA_FIXUP_PINS, |
---|
| 10966 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 10967 | + { 0x1a, 0x02a1113c }, /* use as headset mic, without its own jack detect */ |
---|
| 10968 | + { } |
---|
| 10969 | + }, |
---|
| 10970 | + .chained = true, |
---|
| 10971 | + .chain_id = ALC662_FIXUP_USI_FUNC |
---|
| 10972 | + }, |
---|
| 10973 | + [ALC662_FIXUP_ACER_NITRO_HEADSET_MODE] = { |
---|
| 10974 | + .type = HDA_FIXUP_PINS, |
---|
| 10975 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 10976 | + { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */ |
---|
| 10977 | + { 0x1b, 0x0221144f }, |
---|
| 10978 | + { } |
---|
| 10979 | + }, |
---|
| 10980 | + .chained = true, |
---|
| 10981 | + .chain_id = ALC662_FIXUP_USI_FUNC |
---|
| 10982 | + }, |
---|
| 10983 | + [ALC668_FIXUP_ASUS_NO_HEADSET_MIC] = { |
---|
| 10984 | + .type = HDA_FIXUP_PINS, |
---|
| 10985 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 10986 | + { 0x1b, 0x04a1112c }, |
---|
| 10987 | + { } |
---|
| 10988 | + }, |
---|
| 10989 | + .chained = true, |
---|
| 10990 | + .chain_id = ALC668_FIXUP_HEADSET_MIC |
---|
| 10991 | + }, |
---|
| 10992 | + [ALC668_FIXUP_HEADSET_MIC] = { |
---|
| 10993 | + .type = HDA_FIXUP_FUNC, |
---|
| 10994 | + .v.func = alc269_fixup_headset_mic, |
---|
| 10995 | + .chained = true, |
---|
| 10996 | + .chain_id = ALC668_FIXUP_MIC_DET_COEF |
---|
| 10997 | + }, |
---|
| 10998 | + [ALC668_FIXUP_MIC_DET_COEF] = { |
---|
| 10999 | + .type = HDA_FIXUP_VERBS, |
---|
| 11000 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 11001 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x15 }, |
---|
| 11002 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0d60 }, |
---|
| 11003 | + {} |
---|
| 11004 | + }, |
---|
| 11005 | + }, |
---|
| 11006 | + [ALC897_FIXUP_LENOVO_HEADSET_MIC] = { |
---|
| 11007 | + .type = HDA_FIXUP_FUNC, |
---|
| 11008 | + .v.func = alc897_fixup_lenovo_headset_mic, |
---|
| 11009 | + }, |
---|
| 11010 | + [ALC897_FIXUP_HEADSET_MIC_PIN] = { |
---|
| 11011 | + .type = HDA_FIXUP_PINS, |
---|
| 11012 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 11013 | + { 0x1a, 0x03a11050 }, |
---|
| 11014 | + { } |
---|
| 11015 | + }, |
---|
| 11016 | + .chained = true, |
---|
| 11017 | + .chain_id = ALC897_FIXUP_LENOVO_HEADSET_MIC |
---|
| 11018 | + }, |
---|
| 11019 | + [ALC897_FIXUP_HP_HSMIC_VERB] = { |
---|
| 11020 | + .type = HDA_FIXUP_PINS, |
---|
| 11021 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 11022 | + { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ |
---|
| 11023 | + { } |
---|
| 11024 | + }, |
---|
| 11025 | + }, |
---|
8885 | 11026 | }; |
---|
8886 | 11027 | |
---|
8887 | 11028 | static const struct snd_pci_quirk alc662_fixup_tbl[] = { |
---|
.. | .. |
---|
8893 | 11034 | SND_PCI_QUIRK(0x1025, 0x0349, "eMachines eM250", ALC662_FIXUP_INV_DMIC), |
---|
8894 | 11035 | SND_PCI_QUIRK(0x1025, 0x034a, "Gateway LT27", ALC662_FIXUP_INV_DMIC), |
---|
8895 | 11036 | SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), |
---|
| 11037 | + SND_PCI_QUIRK(0x1025, 0x0566, "Acer Aspire Ethos 8951G", ALC669_FIXUP_ACER_ASPIRE_ETHOS), |
---|
| 11038 | + SND_PCI_QUIRK(0x1025, 0x123c, "Acer Nitro N50-600", ALC662_FIXUP_ACER_NITRO_HEADSET_MODE), |
---|
| 11039 | + SND_PCI_QUIRK(0x1025, 0x124e, "Acer 2660G", ALC662_FIXUP_ACER_X2660G_HEADSET_MODE), |
---|
8896 | 11040 | SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
---|
8897 | 11041 | SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
---|
8898 | 11042 | SND_PCI_QUIRK(0x1028, 0x05fe, "Dell XPS 15", ALC668_FIXUP_DELL_XPS13), |
---|
.. | .. |
---|
8904 | 11048 | SND_PCI_QUIRK(0x1028, 0x0698, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
---|
8905 | 11049 | SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
---|
8906 | 11050 | SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), |
---|
| 11051 | + SND_PCI_QUIRK(0x103c, 0x8719, "HP", ALC897_FIXUP_HP_HSMIC_VERB), |
---|
| 11052 | + SND_PCI_QUIRK(0x103c, 0x873e, "HP", ALC671_FIXUP_HP_HEADSET_MIC2), |
---|
| 11053 | + SND_PCI_QUIRK(0x103c, 0x877e, "HP 288 Pro G6", ALC671_FIXUP_HP_HEADSET_MIC2), |
---|
| 11054 | + SND_PCI_QUIRK(0x103c, 0x885f, "HP 288 Pro G8", ALC671_FIXUP_HP_HEADSET_MIC2), |
---|
8907 | 11055 | SND_PCI_QUIRK(0x1043, 0x1080, "Asus UX501VW", ALC668_FIXUP_HEADSET_MODE), |
---|
8908 | 11056 | SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_ASUS_Nx50), |
---|
8909 | | - SND_PCI_QUIRK(0x1043, 0x13df, "Asus N550JX", ALC662_FIXUP_BASS_1A), |
---|
8910 | 11057 | SND_PCI_QUIRK(0x1043, 0x129d, "Asus N750", ALC662_FIXUP_ASUS_Nx50), |
---|
8911 | 11058 | SND_PCI_QUIRK(0x1043, 0x12ff, "ASUS G751", ALC668_FIXUP_ASUS_G751), |
---|
| 11059 | + SND_PCI_QUIRK(0x1043, 0x13df, "Asus N550JX", ALC662_FIXUP_BASS_1A), |
---|
8912 | 11060 | SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_MODE4_CHMAP), |
---|
8913 | 11061 | SND_PCI_QUIRK(0x1043, 0x15a7, "ASUS UX51VZH", ALC662_FIXUP_BASS_16), |
---|
8914 | 11062 | SND_PCI_QUIRK(0x1043, 0x177d, "ASUS N551", ALC668_FIXUP_ASUS_Nx51), |
---|
8915 | 11063 | SND_PCI_QUIRK(0x1043, 0x17bd, "ASUS N751", ALC668_FIXUP_ASUS_Nx51), |
---|
| 11064 | + SND_PCI_QUIRK(0x1043, 0x185d, "ASUS G551JW", ALC668_FIXUP_ASUS_NO_HEADSET_MIC), |
---|
8916 | 11065 | SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71SL", ALC662_FIXUP_ASUS_MODE8), |
---|
8917 | 11066 | SND_PCI_QUIRK(0x1043, 0x1b73, "ASUS N55SF", ALC662_FIXUP_BASS_16), |
---|
8918 | 11067 | SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_BASS_MODE4_CHMAP), |
---|
.. | .. |
---|
8921 | 11070 | SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD), |
---|
8922 | 11071 | SND_PCI_QUIRK(0x14cd, 0x5003, "USI", ALC662_FIXUP_USI_HEADSET_MODE), |
---|
8923 | 11072 | SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC662_FIXUP_LENOVO_MULTI_CODECS), |
---|
| 11073 | + SND_PCI_QUIRK(0x17aa, 0x1057, "Lenovo P360", ALC897_FIXUP_HEADSET_MIC_PIN), |
---|
| 11074 | + SND_PCI_QUIRK(0x17aa, 0x32ca, "Lenovo ThinkCentre M80", ALC897_FIXUP_HEADSET_MIC_PIN), |
---|
| 11075 | + SND_PCI_QUIRK(0x17aa, 0x32cb, "Lenovo ThinkCentre M70", ALC897_FIXUP_HEADSET_MIC_PIN), |
---|
| 11076 | + SND_PCI_QUIRK(0x17aa, 0x32cf, "Lenovo ThinkCentre M950", ALC897_FIXUP_HEADSET_MIC_PIN), |
---|
| 11077 | + SND_PCI_QUIRK(0x17aa, 0x32f7, "Lenovo ThinkCentre M90", ALC897_FIXUP_HEADSET_MIC_PIN), |
---|
8924 | 11078 | SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD), |
---|
8925 | 11079 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD), |
---|
8926 | 11080 | SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO), |
---|
8927 | 11081 | SND_PCI_QUIRK(0x19da, 0xa130, "Zotac Z68", ALC662_FIXUP_ZOTAC_Z68), |
---|
8928 | 11082 | SND_PCI_QUIRK(0x1b0a, 0x01b8, "ACER Veriton", ALC662_FIXUP_ACER_VERITON), |
---|
| 11083 | + SND_PCI_QUIRK(0x1b35, 0x1234, "CZC ET26", ALC662_FIXUP_CZC_ET26), |
---|
8929 | 11084 | SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T), |
---|
8930 | 11085 | |
---|
8931 | 11086 | #if 0 |
---|
.. | .. |
---|
9013 | 11168 | {.id = ALC668_FIXUP_DELL_XPS13, .name = "dell-xps13"}, |
---|
9014 | 11169 | {.id = ALC662_FIXUP_ASUS_Nx50, .name = "asus-nx50"}, |
---|
9015 | 11170 | {.id = ALC668_FIXUP_ASUS_Nx51, .name = "asus-nx51"}, |
---|
| 11171 | + {.id = ALC668_FIXUP_ASUS_G751, .name = "asus-g751"}, |
---|
9016 | 11172 | {.id = ALC891_FIXUP_HEADSET_MODE, .name = "alc891-headset"}, |
---|
9017 | 11173 | {.id = ALC891_FIXUP_DELL_MIC_NO_PRESENCE, .name = "alc891-headset-multi"}, |
---|
9018 | 11174 | {.id = ALC662_FIXUP_ACER_VERITON, .name = "acer-veriton"}, |
---|
9019 | 11175 | {.id = ALC892_FIXUP_ASROCK_MOBO, .name = "asrock-mobo"}, |
---|
9020 | 11176 | {.id = ALC662_FIXUP_USI_HEADSET_MODE, .name = "usi-headset"}, |
---|
9021 | 11177 | {.id = ALC662_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"}, |
---|
| 11178 | + {.id = ALC669_FIXUP_ACER_ASPIRE_ETHOS, .name = "aspire-ethos"}, |
---|
9022 | 11179 | {} |
---|
9023 | 11180 | }; |
---|
9024 | 11181 | |
---|
.. | .. |
---|
9061 | 11218 | {0x12, 0x90a60130}, |
---|
9062 | 11219 | {0x14, 0x90170110}, |
---|
9063 | 11220 | {0x15, 0x0321101f}), |
---|
| 11221 | + SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2, |
---|
| 11222 | + {0x14, 0x01014010}, |
---|
| 11223 | + {0x17, 0x90170150}, |
---|
| 11224 | + {0x19, 0x02a11060}, |
---|
| 11225 | + {0x1b, 0x01813030}, |
---|
| 11226 | + {0x21, 0x02211020}), |
---|
| 11227 | + SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2, |
---|
| 11228 | + {0x14, 0x01014010}, |
---|
| 11229 | + {0x18, 0x01a19040}, |
---|
| 11230 | + {0x1b, 0x01813030}, |
---|
| 11231 | + {0x21, 0x02211020}), |
---|
| 11232 | + SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2, |
---|
| 11233 | + {0x14, 0x01014020}, |
---|
| 11234 | + {0x17, 0x90170110}, |
---|
| 11235 | + {0x18, 0x01a19050}, |
---|
| 11236 | + {0x1b, 0x01813040}, |
---|
| 11237 | + {0x21, 0x02211030}), |
---|
9064 | 11238 | {} |
---|
9065 | 11239 | }; |
---|
9066 | 11240 | |
---|
.. | .. |
---|
9090 | 11264 | break; |
---|
9091 | 11265 | } |
---|
9092 | 11266 | |
---|
| 11267 | + alc_pre_init(codec); |
---|
| 11268 | + |
---|
9093 | 11269 | snd_hda_pick_fixup(codec, alc662_fixup_models, |
---|
9094 | 11270 | alc662_fixup_tbl, alc662_fixups); |
---|
9095 | | - snd_hda_pick_pin_fixup(codec, alc662_pin_fixup_tbl, alc662_fixups); |
---|
| 11271 | + snd_hda_pick_pin_fixup(codec, alc662_pin_fixup_tbl, alc662_fixups, true); |
---|
9096 | 11272 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); |
---|
9097 | 11273 | |
---|
9098 | 11274 | alc_auto_parse_customize_define(codec); |
---|
.. | .. |
---|
9179 | 11355 | HDA_CODEC_ENTRY(0x10ec0221, "ALC221", patch_alc269), |
---|
9180 | 11356 | HDA_CODEC_ENTRY(0x10ec0222, "ALC222", patch_alc269), |
---|
9181 | 11357 | HDA_CODEC_ENTRY(0x10ec0225, "ALC225", patch_alc269), |
---|
| 11358 | + HDA_CODEC_ENTRY(0x10ec0230, "ALC236", patch_alc269), |
---|
9182 | 11359 | HDA_CODEC_ENTRY(0x10ec0231, "ALC231", patch_alc269), |
---|
9183 | 11360 | HDA_CODEC_ENTRY(0x10ec0233, "ALC233", patch_alc269), |
---|
9184 | 11361 | HDA_CODEC_ENTRY(0x10ec0234, "ALC234", patch_alc269), |
---|
.. | .. |
---|
9252 | 11429 | HDA_CODEC_ENTRY(0x10ec0b00, "ALCS1200A", patch_alc882), |
---|
9253 | 11430 | HDA_CODEC_ENTRY(0x10ec1168, "ALC1220", patch_alc882), |
---|
9254 | 11431 | HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882), |
---|
| 11432 | + HDA_CODEC_ENTRY(0x19e58326, "HW8326", patch_alc269), |
---|
9255 | 11433 | {} /* terminator */ |
---|
9256 | 11434 | }; |
---|
9257 | 11435 | MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_realtek); |
---|