.. | .. |
---|
| 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; |
---|
| 124 | + unsigned int en_3kpull_low:1; |
---|
123 | 125 | |
---|
124 | 126 | /* for PLL fix */ |
---|
125 | 127 | hda_nid_t pll_nid; |
---|
.. | .. |
---|
133 | 135 | * COEF access helper functions |
---|
134 | 136 | */ |
---|
135 | 137 | |
---|
136 | | -static int alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid, |
---|
137 | | - unsigned int coef_idx) |
---|
| 138 | +static void coef_mutex_lock(struct hda_codec *codec) |
---|
| 139 | +{ |
---|
| 140 | + struct alc_spec *spec = codec->spec; |
---|
| 141 | + |
---|
| 142 | + snd_hda_power_up_pm(codec); |
---|
| 143 | + mutex_lock(&spec->coef_mutex); |
---|
| 144 | +} |
---|
| 145 | + |
---|
| 146 | +static void coef_mutex_unlock(struct hda_codec *codec) |
---|
| 147 | +{ |
---|
| 148 | + struct alc_spec *spec = codec->spec; |
---|
| 149 | + |
---|
| 150 | + mutex_unlock(&spec->coef_mutex); |
---|
| 151 | + snd_hda_power_down_pm(codec); |
---|
| 152 | +} |
---|
| 153 | + |
---|
| 154 | +static int __alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid, |
---|
| 155 | + unsigned int coef_idx) |
---|
138 | 156 | { |
---|
139 | 157 | unsigned int val; |
---|
140 | 158 | |
---|
.. | .. |
---|
143 | 161 | return val; |
---|
144 | 162 | } |
---|
145 | 163 | |
---|
| 164 | +static int alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid, |
---|
| 165 | + unsigned int coef_idx) |
---|
| 166 | +{ |
---|
| 167 | + unsigned int val; |
---|
| 168 | + |
---|
| 169 | + coef_mutex_lock(codec); |
---|
| 170 | + val = __alc_read_coefex_idx(codec, nid, coef_idx); |
---|
| 171 | + coef_mutex_unlock(codec); |
---|
| 172 | + return val; |
---|
| 173 | +} |
---|
| 174 | + |
---|
146 | 175 | #define alc_read_coef_idx(codec, coef_idx) \ |
---|
147 | 176 | alc_read_coefex_idx(codec, 0x20, coef_idx) |
---|
148 | 177 | |
---|
149 | | -static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid, |
---|
150 | | - unsigned int coef_idx, unsigned int coef_val) |
---|
| 178 | +static void __alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid, |
---|
| 179 | + unsigned int coef_idx, unsigned int coef_val) |
---|
151 | 180 | { |
---|
152 | 181 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, coef_idx); |
---|
153 | 182 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PROC_COEF, coef_val); |
---|
154 | 183 | } |
---|
155 | 184 | |
---|
| 185 | +static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid, |
---|
| 186 | + unsigned int coef_idx, unsigned int coef_val) |
---|
| 187 | +{ |
---|
| 188 | + coef_mutex_lock(codec); |
---|
| 189 | + __alc_write_coefex_idx(codec, nid, coef_idx, coef_val); |
---|
| 190 | + coef_mutex_unlock(codec); |
---|
| 191 | +} |
---|
| 192 | + |
---|
156 | 193 | #define alc_write_coef_idx(codec, coef_idx, coef_val) \ |
---|
157 | 194 | alc_write_coefex_idx(codec, 0x20, coef_idx, coef_val) |
---|
| 195 | + |
---|
| 196 | +static void __alc_update_coefex_idx(struct hda_codec *codec, hda_nid_t nid, |
---|
| 197 | + unsigned int coef_idx, unsigned int mask, |
---|
| 198 | + unsigned int bits_set) |
---|
| 199 | +{ |
---|
| 200 | + unsigned int val = __alc_read_coefex_idx(codec, nid, coef_idx); |
---|
| 201 | + |
---|
| 202 | + if (val != -1) |
---|
| 203 | + __alc_write_coefex_idx(codec, nid, coef_idx, |
---|
| 204 | + (val & ~mask) | bits_set); |
---|
| 205 | +} |
---|
158 | 206 | |
---|
159 | 207 | static void alc_update_coefex_idx(struct hda_codec *codec, hda_nid_t nid, |
---|
160 | 208 | unsigned int coef_idx, unsigned int mask, |
---|
161 | 209 | unsigned int bits_set) |
---|
162 | 210 | { |
---|
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); |
---|
| 211 | + coef_mutex_lock(codec); |
---|
| 212 | + __alc_update_coefex_idx(codec, nid, coef_idx, mask, bits_set); |
---|
| 213 | + coef_mutex_unlock(codec); |
---|
168 | 214 | } |
---|
169 | 215 | |
---|
170 | 216 | #define alc_update_coef_idx(codec, coef_idx, mask, bits_set) \ |
---|
.. | .. |
---|
197 | 243 | static void alc_process_coef_fw(struct hda_codec *codec, |
---|
198 | 244 | const struct coef_fw *fw) |
---|
199 | 245 | { |
---|
| 246 | + coef_mutex_lock(codec); |
---|
200 | 247 | for (; fw->nid; fw++) { |
---|
201 | 248 | if (fw->mask == (unsigned short)-1) |
---|
202 | | - alc_write_coefex_idx(codec, fw->nid, fw->idx, fw->val); |
---|
| 249 | + __alc_write_coefex_idx(codec, fw->nid, fw->idx, fw->val); |
---|
203 | 250 | else |
---|
204 | | - alc_update_coefex_idx(codec, fw->nid, fw->idx, |
---|
205 | | - fw->mask, fw->val); |
---|
| 251 | + __alc_update_coefex_idx(codec, fw->nid, fw->idx, |
---|
| 252 | + fw->mask, fw->val); |
---|
206 | 253 | } |
---|
| 254 | + coef_mutex_unlock(codec); |
---|
207 | 255 | } |
---|
208 | 256 | |
---|
209 | 257 | /* |
---|
.. | .. |
---|
287 | 335 | const struct hda_fixup *fix, int action) |
---|
288 | 336 | { |
---|
289 | 337 | alc_fixup_gpio(codec, action, 0x04); |
---|
| 338 | +} |
---|
| 339 | + |
---|
| 340 | +static void alc_fixup_micmute_led(struct hda_codec *codec, |
---|
| 341 | + const struct hda_fixup *fix, int action) |
---|
| 342 | +{ |
---|
| 343 | + if (action == HDA_FIXUP_ACT_PROBE) |
---|
| 344 | + snd_hda_gen_add_micmute_led_cdev(codec, NULL); |
---|
290 | 345 | } |
---|
291 | 346 | |
---|
292 | 347 | /* |
---|
.. | .. |
---|
376 | 431 | case 0x10ec0295: |
---|
377 | 432 | case 0x10ec0299: |
---|
378 | 433 | alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000); |
---|
379 | | - /* fallthrough */ |
---|
| 434 | + fallthrough; |
---|
380 | 435 | case 0x10ec0215: |
---|
| 436 | + case 0x10ec0230: |
---|
381 | 437 | case 0x10ec0233: |
---|
382 | 438 | case 0x10ec0235: |
---|
383 | 439 | case 0x10ec0236: |
---|
384 | 440 | case 0x10ec0245: |
---|
385 | 441 | case 0x10ec0255: |
---|
386 | 442 | case 0x10ec0256: |
---|
| 443 | + case 0x19e58326: |
---|
387 | 444 | case 0x10ec0257: |
---|
388 | 445 | case 0x10ec0282: |
---|
389 | 446 | case 0x10ec0283: |
---|
.. | .. |
---|
482 | 539 | static void alc_auto_setup_eapd(struct hda_codec *codec, bool on) |
---|
483 | 540 | { |
---|
484 | 541 | /* We currently only handle front, HP */ |
---|
485 | | - static hda_nid_t pins[] = { |
---|
| 542 | + static const hda_nid_t pins[] = { |
---|
486 | 543 | 0x0f, 0x10, 0x14, 0x15, 0x17, 0 |
---|
487 | 544 | }; |
---|
488 | | - hda_nid_t *p; |
---|
| 545 | + const hda_nid_t *p; |
---|
489 | 546 | for (p = pins; *p; p++) |
---|
490 | 547 | set_eapd(codec, *p, on); |
---|
491 | 548 | } |
---|
.. | .. |
---|
521 | 578 | switch (codec->core.vendor_id) { |
---|
522 | 579 | case 0x10ec0236: |
---|
523 | 580 | case 0x10ec0256: |
---|
| 581 | + case 0x19e58326: |
---|
524 | 582 | case 0x10ec0283: |
---|
525 | 583 | case 0x10ec0286: |
---|
526 | 584 | case 0x10ec0288: |
---|
.. | .. |
---|
550 | 608 | /* generic EAPD initialization */ |
---|
551 | 609 | static void alc_auto_init_amp(struct hda_codec *codec, int type) |
---|
552 | 610 | { |
---|
553 | | - alc_fill_eapd_coef(codec); |
---|
554 | 611 | alc_auto_setup_eapd(codec, true); |
---|
555 | 612 | alc_write_gpio(codec); |
---|
556 | 613 | switch (type) { |
---|
.. | .. |
---|
771 | 828 | alc_setup_gpio(codec, 0x02); |
---|
772 | 829 | break; |
---|
773 | 830 | case 7: |
---|
774 | | - alc_setup_gpio(codec, 0x03); |
---|
| 831 | + alc_setup_gpio(codec, 0x04); |
---|
775 | 832 | break; |
---|
776 | 833 | case 5: |
---|
777 | 834 | default: |
---|
.. | .. |
---|
847 | 904 | * Common callbacks |
---|
848 | 905 | */ |
---|
849 | 906 | |
---|
| 907 | +static void alc_pre_init(struct hda_codec *codec) |
---|
| 908 | +{ |
---|
| 909 | + alc_fill_eapd_coef(codec); |
---|
| 910 | +} |
---|
| 911 | + |
---|
| 912 | +#define is_s3_resume(codec) \ |
---|
| 913 | + ((codec)->core.dev.power.power_state.event == PM_EVENT_RESUME) |
---|
| 914 | +#define is_s4_resume(codec) \ |
---|
| 915 | + ((codec)->core.dev.power.power_state.event == PM_EVENT_RESTORE) |
---|
| 916 | + |
---|
850 | 917 | static int alc_init(struct hda_codec *codec) |
---|
851 | 918 | { |
---|
852 | 919 | struct alc_spec *spec = codec->spec; |
---|
| 920 | + |
---|
| 921 | + /* hibernation resume needs the full chip initialization */ |
---|
| 922 | + if (is_s4_resume(codec)) |
---|
| 923 | + alc_pre_init(codec); |
---|
853 | 924 | |
---|
854 | 925 | if (spec->init_hook) |
---|
855 | 926 | spec->init_hook(codec); |
---|
.. | .. |
---|
914 | 985 | if (!spec->no_depop_delay) |
---|
915 | 986 | msleep(150); /* to avoid pop noise */ |
---|
916 | 987 | codec->patch_ops.init(codec); |
---|
917 | | - regcache_sync(codec->core.regmap); |
---|
| 988 | + snd_hda_regmap_sync(codec); |
---|
918 | 989 | hda_call_check_power_status(codec, 0x01); |
---|
919 | 990 | return 0; |
---|
920 | 991 | } |
---|
.. | .. |
---|
956 | 1027 | const char *name; |
---|
957 | 1028 | }; |
---|
958 | 1029 | |
---|
959 | | -static struct alc_codec_rename_table rename_tbl[] = { |
---|
| 1030 | +static const struct alc_codec_rename_table rename_tbl[] = { |
---|
960 | 1031 | { 0x10ec0221, 0xf00f, 0x1003, "ALC231" }, |
---|
961 | 1032 | { 0x10ec0269, 0xfff0, 0x3010, "ALC277" }, |
---|
962 | 1033 | { 0x10ec0269, 0xf0f0, 0x2010, "ALC259" }, |
---|
.. | .. |
---|
977 | 1048 | { } /* terminator */ |
---|
978 | 1049 | }; |
---|
979 | 1050 | |
---|
980 | | -static struct alc_codec_rename_pci_table rename_pci_tbl[] = { |
---|
| 1051 | +static const struct alc_codec_rename_pci_table rename_pci_tbl[] = { |
---|
981 | 1052 | { 0x10ec0280, 0x1028, 0, "ALC3220" }, |
---|
982 | 1053 | { 0x10ec0282, 0x1028, 0, "ALC3221" }, |
---|
983 | 1054 | { 0x10ec0283, 0x1028, 0, "ALC3223" }, |
---|
.. | .. |
---|
1065 | 1136 | return 0; |
---|
1066 | 1137 | } |
---|
1067 | 1138 | |
---|
1068 | | -static const struct snd_pci_quirk beep_white_list[] = { |
---|
| 1139 | +static const struct snd_pci_quirk beep_allow_list[] = { |
---|
1069 | 1140 | SND_PCI_QUIRK(0x1043, 0x103c, "ASUS", 1), |
---|
1070 | 1141 | SND_PCI_QUIRK(0x1043, 0x115d, "ASUS", 1), |
---|
1071 | 1142 | SND_PCI_QUIRK(0x1043, 0x829f, "ASUS", 1), |
---|
.. | .. |
---|
1075 | 1146 | SND_PCI_QUIRK(0x1043, 0x834a, "EeePC", 1), |
---|
1076 | 1147 | SND_PCI_QUIRK(0x1458, 0xa002, "GA-MA790X", 1), |
---|
1077 | 1148 | SND_PCI_QUIRK(0x8086, 0xd613, "Intel", 1), |
---|
1078 | | - /* blacklist -- no beep available */ |
---|
| 1149 | + /* denylist -- no beep available */ |
---|
1079 | 1150 | SND_PCI_QUIRK(0x17aa, 0x309e, "Lenovo ThinkCentre M73", 0), |
---|
1080 | 1151 | SND_PCI_QUIRK(0x17aa, 0x30a3, "Lenovo ThinkCentre M93", 0), |
---|
1081 | 1152 | {} |
---|
.. | .. |
---|
1085 | 1156 | { |
---|
1086 | 1157 | struct alc_spec *spec = codec->spec; |
---|
1087 | 1158 | const struct snd_pci_quirk *q; |
---|
1088 | | - q = snd_pci_quirk_lookup(codec->bus->pci, beep_white_list); |
---|
| 1159 | + q = snd_pci_quirk_lookup(codec->bus->pci, beep_allow_list); |
---|
1089 | 1160 | if (q) |
---|
1090 | 1161 | return q->value; |
---|
1091 | 1162 | return spec->cdefine.enable_pcbeep; |
---|
.. | .. |
---|
1137 | 1208 | codec->single_adc_amp = 1; |
---|
1138 | 1209 | /* FIXME: do we need this for all Realtek codec models? */ |
---|
1139 | 1210 | codec->spdif_status_reset = 1; |
---|
| 1211 | + codec->forced_resume = 1; |
---|
1140 | 1212 | codec->patch_ops = alc_patch_ops; |
---|
| 1213 | + mutex_init(&spec->coef_mutex); |
---|
1141 | 1214 | |
---|
1142 | 1215 | err = alc_codec_rename_from_preset(codec); |
---|
1143 | 1216 | if (err < 0) { |
---|
.. | .. |
---|
1584 | 1657 | |
---|
1585 | 1658 | codec->patch_ops.unsol_event = alc880_unsol_event; |
---|
1586 | 1659 | |
---|
| 1660 | + alc_pre_init(codec); |
---|
| 1661 | + |
---|
1587 | 1662 | snd_hda_pick_fixup(codec, alc880_fixup_models, alc880_fixup_tbl, |
---|
1588 | 1663 | alc880_fixups); |
---|
1589 | 1664 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); |
---|
.. | .. |
---|
1835 | 1910 | |
---|
1836 | 1911 | spec->shutup = alc_eapd_shutup; |
---|
1837 | 1912 | |
---|
| 1913 | + alc_pre_init(codec); |
---|
| 1914 | + |
---|
1838 | 1915 | snd_hda_pick_fixup(codec, alc260_fixup_models, alc260_fixup_tbl, |
---|
1839 | 1916 | alc260_fixups); |
---|
1840 | 1917 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); |
---|
.. | .. |
---|
1916 | 1993 | ALC1220_FIXUP_CLEVO_PB51ED_PINS, |
---|
1917 | 1994 | ALC887_FIXUP_ASUS_AUDIO, |
---|
1918 | 1995 | ALC887_FIXUP_ASUS_HMIC, |
---|
| 1996 | + ALCS1200A_FIXUP_MIC_VREF, |
---|
1919 | 1997 | }; |
---|
1920 | 1998 | |
---|
1921 | 1999 | static void alc889_fixup_coef(struct hda_codec *codec, |
---|
.. | .. |
---|
1945 | 2023 | { |
---|
1946 | 2024 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
1947 | 2025 | /* 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); |
---|
| 2026 | + static const hda_nid_t conn1[] = { 0x0c, 0x0d }; |
---|
| 2027 | + static const hda_nid_t conn2[] = { 0x0e, 0x0f }; |
---|
| 2028 | + snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1); |
---|
| 2029 | + snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn1), conn1); |
---|
| 2030 | + snd_hda_override_conn_list(codec, 0x18, ARRAY_SIZE(conn2), conn2); |
---|
| 2031 | + snd_hda_override_conn_list(codec, 0x1a, ARRAY_SIZE(conn2), conn2); |
---|
1954 | 2032 | } else if (action == HDA_FIXUP_ACT_PROBE) { |
---|
1955 | 2033 | /* 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); |
---|
| 2034 | + static const hda_nid_t conn[] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 }; |
---|
| 2035 | + snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn); |
---|
| 2036 | + snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn), conn); |
---|
| 2037 | + snd_hda_override_conn_list(codec, 0x18, ARRAY_SIZE(conn), conn); |
---|
| 2038 | + snd_hda_override_conn_list(codec, 0x1a, ARRAY_SIZE(conn), conn); |
---|
1961 | 2039 | } |
---|
1962 | 2040 | } |
---|
1963 | 2041 | |
---|
.. | .. |
---|
1965 | 2043 | static void alc889_fixup_mbp_vref(struct hda_codec *codec, |
---|
1966 | 2044 | const struct hda_fixup *fix, int action) |
---|
1967 | 2045 | { |
---|
| 2046 | + static const hda_nid_t nids[] = { 0x14, 0x15, 0x19 }; |
---|
1968 | 2047 | struct alc_spec *spec = codec->spec; |
---|
1969 | | - static hda_nid_t nids[3] = { 0x14, 0x15, 0x19 }; |
---|
1970 | 2048 | int i; |
---|
1971 | 2049 | |
---|
1972 | 2050 | if (action != HDA_FIXUP_ACT_INIT) |
---|
.. | .. |
---|
2002 | 2080 | static void alc889_fixup_imac91_vref(struct hda_codec *codec, |
---|
2003 | 2081 | const struct hda_fixup *fix, int action) |
---|
2004 | 2082 | { |
---|
2005 | | - static hda_nid_t nids[2] = { 0x18, 0x1a }; |
---|
| 2083 | + static const hda_nid_t nids[] = { 0x18, 0x1a }; |
---|
2006 | 2084 | |
---|
2007 | 2085 | if (action == HDA_FIXUP_ACT_INIT) |
---|
2008 | 2086 | alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); |
---|
.. | .. |
---|
2012 | 2090 | static void alc889_fixup_mba11_vref(struct hda_codec *codec, |
---|
2013 | 2091 | const struct hda_fixup *fix, int action) |
---|
2014 | 2092 | { |
---|
2015 | | - static hda_nid_t nids[1] = { 0x18 }; |
---|
| 2093 | + static const hda_nid_t nids[] = { 0x18 }; |
---|
2016 | 2094 | |
---|
2017 | 2095 | if (action == HDA_FIXUP_ACT_INIT) |
---|
2018 | 2096 | alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); |
---|
.. | .. |
---|
2022 | 2100 | static void alc889_fixup_mba21_vref(struct hda_codec *codec, |
---|
2023 | 2101 | const struct hda_fixup *fix, int action) |
---|
2024 | 2102 | { |
---|
2025 | | - static hda_nid_t nids[2] = { 0x18, 0x19 }; |
---|
| 2103 | + static const hda_nid_t nids[] = { 0x18, 0x19 }; |
---|
2026 | 2104 | |
---|
2027 | 2105 | if (action == HDA_FIXUP_ACT_INIT) |
---|
2028 | 2106 | alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); |
---|
.. | .. |
---|
2128 | 2206 | const struct hda_fixup *fix, |
---|
2129 | 2207 | int action) |
---|
2130 | 2208 | { |
---|
2131 | | - hda_nid_t conn1[1] = { 0x0c }; |
---|
| 2209 | + static const hda_nid_t conn1[] = { 0x0c }; |
---|
2132 | 2210 | |
---|
2133 | 2211 | if (action != HDA_FIXUP_ACT_PRE_PROBE) |
---|
2134 | 2212 | return; |
---|
.. | .. |
---|
2137 | 2215 | /* We therefore want to make sure 0x14 (front headphone) and |
---|
2138 | 2216 | * 0x1b (speakers) use the stereo DAC 0x02 |
---|
2139 | 2217 | */ |
---|
2140 | | - snd_hda_override_conn_list(codec, 0x14, 1, conn1); |
---|
2141 | | - snd_hda_override_conn_list(codec, 0x1b, 1, conn1); |
---|
| 2218 | + snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1); |
---|
| 2219 | + snd_hda_override_conn_list(codec, 0x1b, ARRAY_SIZE(conn1), conn1); |
---|
2142 | 2220 | } |
---|
2143 | 2221 | |
---|
2144 | 2222 | static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec, |
---|
.. | .. |
---|
2461 | 2539 | .chained = true, |
---|
2462 | 2540 | .chain_id = ALC887_FIXUP_ASUS_AUDIO, |
---|
2463 | 2541 | }, |
---|
| 2542 | + [ALCS1200A_FIXUP_MIC_VREF] = { |
---|
| 2543 | + .type = HDA_FIXUP_PINCTLS, |
---|
| 2544 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 2545 | + { 0x18, PIN_VREF50 }, /* rear mic */ |
---|
| 2546 | + { 0x19, PIN_VREF50 }, /* front mic */ |
---|
| 2547 | + {} |
---|
| 2548 | + } |
---|
| 2549 | + }, |
---|
2464 | 2550 | }; |
---|
2465 | 2551 | |
---|
2466 | 2552 | static const struct snd_pci_quirk alc882_fixup_tbl[] = { |
---|
.. | .. |
---|
2498 | 2584 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601), |
---|
2499 | 2585 | SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS), |
---|
2500 | 2586 | SND_PCI_QUIRK(0x1043, 0x8691, "ASUS ROG Ranger VIII", ALC882_FIXUP_GPIO3), |
---|
| 2587 | + SND_PCI_QUIRK(0x1043, 0x8797, "ASUS TUF B550M-PLUS", ALCS1200A_FIXUP_MIC_VREF), |
---|
2501 | 2588 | SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP), |
---|
2502 | 2589 | SND_PCI_QUIRK(0x104d, 0x9044, "Sony VAIO AiO", ALC882_FIXUP_NO_PRIMARY_HP), |
---|
2503 | 2590 | SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT), |
---|
.. | .. |
---|
2546 | 2633 | SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS), |
---|
2547 | 2634 | SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3), |
---|
2548 | 2635 | SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX), |
---|
| 2636 | + SND_PCI_QUIRK(0x1558, 0x3702, "Clevo X370SN[VW]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2549 | 2637 | SND_PCI_QUIRK(0x1558, 0x50d3, "Clevo PC50[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2550 | 2638 | SND_PCI_QUIRK(0x1558, 0x65d1, "Clevo PB51[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2551 | 2639 | SND_PCI_QUIRK(0x1558, 0x65d2, "Clevo PB51R[CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2552 | 2640 | SND_PCI_QUIRK(0x1558, 0x65e1, "Clevo PB51[ED][DF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2553 | 2641 | SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2554 | 2642 | SND_PCI_QUIRK(0x1558, 0x65f1, "Clevo PC50HS", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
| 2643 | + SND_PCI_QUIRK(0x1558, 0x65f5, "Clevo PD50PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2555 | 2644 | SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2556 | 2645 | SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2557 | 2646 | SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2558 | 2647 | SND_PCI_QUIRK(0x1558, 0x67f1, "Clevo PC70H[PRS]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
| 2648 | + SND_PCI_QUIRK(0x1558, 0x67f5, "Clevo PD70PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2559 | 2649 | SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2560 | 2650 | SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170SM", ALC1220_FIXUP_CLEVO_PB51ED_PINS), |
---|
2561 | 2651 | SND_PCI_QUIRK(0x1558, 0x7715, "Clevo X170KM-G", ALC1220_FIXUP_CLEVO_PB51ED), |
---|
.. | .. |
---|
2614 | 2704 | {} |
---|
2615 | 2705 | }; |
---|
2616 | 2706 | |
---|
| 2707 | +static const struct snd_hda_pin_quirk alc882_pin_fixup_tbl[] = { |
---|
| 2708 | + SND_HDA_PIN_QUIRK(0x10ec1220, 0x1043, "ASUS", ALC1220_FIXUP_CLEVO_P950, |
---|
| 2709 | + {0x14, 0x01014010}, |
---|
| 2710 | + {0x15, 0x01011012}, |
---|
| 2711 | + {0x16, 0x01016011}, |
---|
| 2712 | + {0x18, 0x01a19040}, |
---|
| 2713 | + {0x19, 0x02a19050}, |
---|
| 2714 | + {0x1a, 0x0181304f}, |
---|
| 2715 | + {0x1b, 0x0221401f}, |
---|
| 2716 | + {0x1e, 0x01456130}), |
---|
| 2717 | + SND_HDA_PIN_QUIRK(0x10ec1220, 0x1462, "MS-7C35", ALC1220_FIXUP_CLEVO_P950, |
---|
| 2718 | + {0x14, 0x01015010}, |
---|
| 2719 | + {0x15, 0x01011012}, |
---|
| 2720 | + {0x16, 0x01011011}, |
---|
| 2721 | + {0x18, 0x01a11040}, |
---|
| 2722 | + {0x19, 0x02a19050}, |
---|
| 2723 | + {0x1a, 0x0181104f}, |
---|
| 2724 | + {0x1b, 0x0221401f}, |
---|
| 2725 | + {0x1e, 0x01451130}), |
---|
| 2726 | + {} |
---|
| 2727 | +}; |
---|
| 2728 | + |
---|
2617 | 2729 | /* |
---|
2618 | 2730 | * BIOS auto configuration |
---|
2619 | 2731 | */ |
---|
.. | .. |
---|
2651 | 2763 | break; |
---|
2652 | 2764 | } |
---|
2653 | 2765 | |
---|
| 2766 | + alc_pre_init(codec); |
---|
| 2767 | + |
---|
2654 | 2768 | snd_hda_pick_fixup(codec, alc882_fixup_models, alc882_fixup_tbl, |
---|
2655 | 2769 | alc882_fixups); |
---|
| 2770 | + snd_hda_pick_pin_fixup(codec, alc882_pin_fixup_tbl, alc882_fixups, true); |
---|
2656 | 2771 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); |
---|
2657 | 2772 | |
---|
2658 | 2773 | alc_auto_parse_customize_define(codec); |
---|
.. | .. |
---|
2825 | 2940 | #endif |
---|
2826 | 2941 | alc_fix_pll_init(codec, 0x20, 0x0a, 10); |
---|
2827 | 2942 | |
---|
| 2943 | + alc_pre_init(codec); |
---|
| 2944 | + |
---|
2828 | 2945 | snd_hda_pick_fixup(codec, alc262_fixup_models, alc262_fixup_tbl, |
---|
2829 | 2946 | alc262_fixups); |
---|
2830 | 2947 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); |
---|
.. | .. |
---|
2965 | 3082 | return err; |
---|
2966 | 3083 | |
---|
2967 | 3084 | spec = codec->spec; |
---|
2968 | | - spec->gen.beep_nid = 0x01; |
---|
| 3085 | + if (has_cdefine_beep(codec)) |
---|
| 3086 | + spec->gen.beep_nid = 0x01; |
---|
2969 | 3087 | |
---|
2970 | 3088 | spec->shutup = alc_eapd_shutup; |
---|
| 3089 | + |
---|
| 3090 | + alc_pre_init(codec); |
---|
2971 | 3091 | |
---|
2972 | 3092 | snd_hda_pick_fixup(codec, alc268_fixup_models, alc268_fixup_tbl, alc268_fixups); |
---|
2973 | 3093 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); |
---|
.. | .. |
---|
3085 | 3205 | return alc_parse_auto_config(codec, alc269_ignore, ssids); |
---|
3086 | 3206 | } |
---|
3087 | 3207 | |
---|
| 3208 | +static const struct hda_jack_keymap alc_headset_btn_keymap[] = { |
---|
| 3209 | + { SND_JACK_BTN_0, KEY_PLAYPAUSE }, |
---|
| 3210 | + { SND_JACK_BTN_1, KEY_VOICECOMMAND }, |
---|
| 3211 | + { SND_JACK_BTN_2, KEY_VOLUMEUP }, |
---|
| 3212 | + { SND_JACK_BTN_3, KEY_VOLUMEDOWN }, |
---|
| 3213 | + {} |
---|
| 3214 | +}; |
---|
| 3215 | + |
---|
| 3216 | +static void alc_headset_btn_callback(struct hda_codec *codec, |
---|
| 3217 | + struct hda_jack_callback *jack) |
---|
| 3218 | +{ |
---|
| 3219 | + int report = 0; |
---|
| 3220 | + |
---|
| 3221 | + if (jack->unsol_res & (7 << 13)) |
---|
| 3222 | + report |= SND_JACK_BTN_0; |
---|
| 3223 | + |
---|
| 3224 | + if (jack->unsol_res & (1 << 16 | 3 << 8)) |
---|
| 3225 | + report |= SND_JACK_BTN_1; |
---|
| 3226 | + |
---|
| 3227 | + /* Volume up key */ |
---|
| 3228 | + if (jack->unsol_res & (7 << 23)) |
---|
| 3229 | + report |= SND_JACK_BTN_2; |
---|
| 3230 | + |
---|
| 3231 | + /* Volume down key */ |
---|
| 3232 | + if (jack->unsol_res & (7 << 10)) |
---|
| 3233 | + report |= SND_JACK_BTN_3; |
---|
| 3234 | + |
---|
| 3235 | + jack->jack->button_state = report; |
---|
| 3236 | +} |
---|
| 3237 | + |
---|
| 3238 | +static void alc_disable_headset_jack_key(struct hda_codec *codec) |
---|
| 3239 | +{ |
---|
| 3240 | + struct alc_spec *spec = codec->spec; |
---|
| 3241 | + |
---|
| 3242 | + if (!spec->has_hs_key) |
---|
| 3243 | + return; |
---|
| 3244 | + |
---|
| 3245 | + switch (codec->core.vendor_id) { |
---|
| 3246 | + case 0x10ec0215: |
---|
| 3247 | + case 0x10ec0225: |
---|
| 3248 | + case 0x10ec0285: |
---|
| 3249 | + case 0x10ec0287: |
---|
| 3250 | + case 0x10ec0295: |
---|
| 3251 | + case 0x10ec0289: |
---|
| 3252 | + case 0x10ec0299: |
---|
| 3253 | + alc_write_coef_idx(codec, 0x48, 0x0); |
---|
| 3254 | + alc_update_coef_idx(codec, 0x49, 0x0045, 0x0); |
---|
| 3255 | + alc_update_coef_idx(codec, 0x44, 0x0045 << 8, 0x0); |
---|
| 3256 | + break; |
---|
| 3257 | + case 0x10ec0230: |
---|
| 3258 | + case 0x10ec0236: |
---|
| 3259 | + case 0x10ec0256: |
---|
| 3260 | + case 0x19e58326: |
---|
| 3261 | + alc_write_coef_idx(codec, 0x48, 0x0); |
---|
| 3262 | + alc_update_coef_idx(codec, 0x49, 0x0045, 0x0); |
---|
| 3263 | + break; |
---|
| 3264 | + } |
---|
| 3265 | +} |
---|
| 3266 | + |
---|
| 3267 | +static void alc_enable_headset_jack_key(struct hda_codec *codec) |
---|
| 3268 | +{ |
---|
| 3269 | + struct alc_spec *spec = codec->spec; |
---|
| 3270 | + |
---|
| 3271 | + if (!spec->has_hs_key) |
---|
| 3272 | + return; |
---|
| 3273 | + |
---|
| 3274 | + switch (codec->core.vendor_id) { |
---|
| 3275 | + case 0x10ec0215: |
---|
| 3276 | + case 0x10ec0225: |
---|
| 3277 | + case 0x10ec0285: |
---|
| 3278 | + case 0x10ec0287: |
---|
| 3279 | + case 0x10ec0295: |
---|
| 3280 | + case 0x10ec0289: |
---|
| 3281 | + case 0x10ec0299: |
---|
| 3282 | + alc_write_coef_idx(codec, 0x48, 0xd011); |
---|
| 3283 | + alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045); |
---|
| 3284 | + alc_update_coef_idx(codec, 0x44, 0x007f << 8, 0x0045 << 8); |
---|
| 3285 | + break; |
---|
| 3286 | + case 0x10ec0230: |
---|
| 3287 | + case 0x10ec0236: |
---|
| 3288 | + case 0x10ec0256: |
---|
| 3289 | + case 0x19e58326: |
---|
| 3290 | + alc_write_coef_idx(codec, 0x48, 0xd011); |
---|
| 3291 | + alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045); |
---|
| 3292 | + break; |
---|
| 3293 | + } |
---|
| 3294 | +} |
---|
| 3295 | + |
---|
| 3296 | +static void alc_fixup_headset_jack(struct hda_codec *codec, |
---|
| 3297 | + const struct hda_fixup *fix, int action) |
---|
| 3298 | +{ |
---|
| 3299 | + struct alc_spec *spec = codec->spec; |
---|
| 3300 | + |
---|
| 3301 | + switch (action) { |
---|
| 3302 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 3303 | + spec->has_hs_key = 1; |
---|
| 3304 | + snd_hda_jack_detect_enable_callback(codec, 0x55, |
---|
| 3305 | + alc_headset_btn_callback); |
---|
| 3306 | + snd_hda_jack_add_kctl(codec, 0x55, "Headset Jack", false, |
---|
| 3307 | + SND_JACK_HEADSET, alc_headset_btn_keymap); |
---|
| 3308 | + break; |
---|
| 3309 | + case HDA_FIXUP_ACT_INIT: |
---|
| 3310 | + alc_enable_headset_jack_key(codec); |
---|
| 3311 | + break; |
---|
| 3312 | + } |
---|
| 3313 | +} |
---|
| 3314 | + |
---|
3088 | 3315 | static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up) |
---|
3089 | 3316 | { |
---|
3090 | 3317 | alc_update_coef_idx(codec, 0x04, 1 << 11, power_up ? (1 << 11) : 0); |
---|
.. | .. |
---|
3103 | 3330 | alc_shutup_pins(codec); |
---|
3104 | 3331 | } |
---|
3105 | 3332 | |
---|
3106 | | -static struct coef_fw alc282_coefs[] = { |
---|
| 3333 | +static const struct coef_fw alc282_coefs[] = { |
---|
3107 | 3334 | WRITE_COEF(0x03, 0x0002), /* Power Down Control */ |
---|
3108 | 3335 | UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */ |
---|
3109 | 3336 | WRITE_COEF(0x07, 0x0200), /* DMIC control */ |
---|
.. | .. |
---|
3215 | 3442 | alc_write_coef_idx(codec, 0x78, coef78); |
---|
3216 | 3443 | } |
---|
3217 | 3444 | |
---|
3218 | | -static struct coef_fw alc283_coefs[] = { |
---|
| 3445 | +static const struct coef_fw alc283_coefs[] = { |
---|
3219 | 3446 | WRITE_COEF(0x03, 0x0002), /* Power Down Control */ |
---|
3220 | 3447 | UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */ |
---|
3221 | 3448 | WRITE_COEF(0x07, 0x0200), /* DMIC control */ |
---|
.. | .. |
---|
3336 | 3563 | hda_nid_t hp_pin = alc_get_hp_pin(spec); |
---|
3337 | 3564 | bool hp_pin_sense; |
---|
3338 | 3565 | |
---|
| 3566 | + if (spec->ultra_low_power) { |
---|
| 3567 | + alc_update_coef_idx(codec, 0x03, 1<<1, 1<<1); |
---|
| 3568 | + alc_update_coef_idx(codec, 0x08, 3<<2, 3<<2); |
---|
| 3569 | + alc_update_coef_idx(codec, 0x08, 7<<4, 0); |
---|
| 3570 | + alc_update_coef_idx(codec, 0x3b, 1<<15, 0); |
---|
| 3571 | + alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6); |
---|
| 3572 | + msleep(30); |
---|
| 3573 | + } |
---|
| 3574 | + |
---|
3339 | 3575 | if (!hp_pin) |
---|
3340 | | - return; |
---|
| 3576 | + hp_pin = 0x21; |
---|
3341 | 3577 | |
---|
3342 | 3578 | msleep(30); |
---|
3343 | 3579 | |
---|
.. | .. |
---|
3351 | 3587 | snd_hda_codec_write(codec, hp_pin, 0, |
---|
3352 | 3588 | AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); |
---|
3353 | 3589 | |
---|
3354 | | - if (hp_pin_sense) |
---|
| 3590 | + if (hp_pin_sense || spec->ultra_low_power) |
---|
3355 | 3591 | msleep(85); |
---|
3356 | 3592 | |
---|
3357 | 3593 | snd_hda_codec_write(codec, hp_pin, 0, |
---|
3358 | 3594 | AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); |
---|
3359 | 3595 | |
---|
3360 | | - if (hp_pin_sense) |
---|
| 3596 | + if (hp_pin_sense || spec->ultra_low_power) |
---|
3361 | 3597 | msleep(100); |
---|
3362 | 3598 | |
---|
3363 | 3599 | alc_update_coef_idx(codec, 0x46, 3 << 12, 0); |
---|
.. | .. |
---|
3379 | 3615 | hda_nid_t hp_pin = alc_get_hp_pin(spec); |
---|
3380 | 3616 | bool hp_pin_sense; |
---|
3381 | 3617 | |
---|
3382 | | - if (!hp_pin) { |
---|
3383 | | - alc269_shutup(codec); |
---|
3384 | | - return; |
---|
3385 | | - } |
---|
| 3618 | + if (!hp_pin) |
---|
| 3619 | + hp_pin = 0x21; |
---|
3386 | 3620 | |
---|
| 3621 | + alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */ |
---|
3387 | 3622 | hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); |
---|
3388 | 3623 | |
---|
3389 | 3624 | if (hp_pin_sense) |
---|
.. | .. |
---|
3392 | 3627 | snd_hda_codec_write(codec, hp_pin, 0, |
---|
3393 | 3628 | AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); |
---|
3394 | 3629 | |
---|
3395 | | - if (hp_pin_sense) |
---|
| 3630 | + if (hp_pin_sense || spec->ultra_low_power) |
---|
3396 | 3631 | msleep(85); |
---|
3397 | 3632 | |
---|
3398 | 3633 | /* 3k pull low control for Headset jack. */ |
---|
.. | .. |
---|
3400 | 3635 | /* If disable 3k pulldown control for alc257, the Mic detection will not work correctly |
---|
3401 | 3636 | * when booting with headset plugged. So skip setting it for the codec alc257 |
---|
3402 | 3637 | */ |
---|
3403 | | - if (spec->codec_variant != ALC269_TYPE_ALC257 && |
---|
3404 | | - spec->codec_variant != ALC269_TYPE_ALC256) |
---|
| 3638 | + if (spec->en_3kpull_low) |
---|
3405 | 3639 | alc_update_coef_idx(codec, 0x46, 0, 3 << 12); |
---|
3406 | 3640 | |
---|
3407 | 3641 | if (!spec->no_shutup_pins) |
---|
3408 | 3642 | snd_hda_codec_write(codec, hp_pin, 0, |
---|
3409 | 3643 | AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); |
---|
3410 | 3644 | |
---|
3411 | | - if (hp_pin_sense) |
---|
| 3645 | + if (hp_pin_sense || spec->ultra_low_power) |
---|
3412 | 3646 | msleep(100); |
---|
3413 | 3647 | |
---|
3414 | 3648 | alc_auto_setup_eapd(codec, false); |
---|
3415 | 3649 | alc_shutup_pins(codec); |
---|
| 3650 | + if (spec->ultra_low_power) { |
---|
| 3651 | + msleep(50); |
---|
| 3652 | + alc_update_coef_idx(codec, 0x03, 1<<1, 0); |
---|
| 3653 | + alc_update_coef_idx(codec, 0x08, 7<<4, 7<<4); |
---|
| 3654 | + alc_update_coef_idx(codec, 0x08, 3<<2, 0); |
---|
| 3655 | + alc_update_coef_idx(codec, 0x3b, 1<<15, 1<<15); |
---|
| 3656 | + alc_update_coef_idx(codec, 0x0e, 7<<6, 0); |
---|
| 3657 | + msleep(30); |
---|
| 3658 | + } |
---|
3416 | 3659 | } |
---|
3417 | 3660 | |
---|
3418 | 3661 | static void alc225_init(struct hda_codec *codec) |
---|
.. | .. |
---|
3421 | 3664 | hda_nid_t hp_pin = alc_get_hp_pin(spec); |
---|
3422 | 3665 | bool hp1_pin_sense, hp2_pin_sense; |
---|
3423 | 3666 | |
---|
3424 | | - if (!hp_pin) |
---|
3425 | | - return; |
---|
| 3667 | + if (spec->ultra_low_power) { |
---|
| 3668 | + alc_update_coef_idx(codec, 0x08, 0x0f << 2, 3<<2); |
---|
| 3669 | + alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6); |
---|
| 3670 | + alc_update_coef_idx(codec, 0x33, 1<<11, 0); |
---|
| 3671 | + msleep(30); |
---|
| 3672 | + } |
---|
3426 | 3673 | |
---|
| 3674 | + if (!hp_pin) |
---|
| 3675 | + hp_pin = 0x21; |
---|
3427 | 3676 | msleep(30); |
---|
3428 | 3677 | |
---|
3429 | 3678 | hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin); |
---|
.. | .. |
---|
3434 | 3683 | |
---|
3435 | 3684 | alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */ |
---|
3436 | 3685 | |
---|
3437 | | - if (hp1_pin_sense) |
---|
| 3686 | + if (hp1_pin_sense || spec->ultra_low_power) |
---|
3438 | 3687 | snd_hda_codec_write(codec, hp_pin, 0, |
---|
3439 | 3688 | AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); |
---|
3440 | 3689 | if (hp2_pin_sense) |
---|
3441 | 3690 | snd_hda_codec_write(codec, 0x16, 0, |
---|
3442 | 3691 | AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); |
---|
3443 | 3692 | |
---|
3444 | | - if (hp1_pin_sense || hp2_pin_sense) |
---|
| 3693 | + if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) |
---|
3445 | 3694 | msleep(85); |
---|
3446 | 3695 | |
---|
3447 | | - if (hp1_pin_sense) |
---|
| 3696 | + if (hp1_pin_sense || spec->ultra_low_power) |
---|
3448 | 3697 | snd_hda_codec_write(codec, hp_pin, 0, |
---|
3449 | 3698 | AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); |
---|
3450 | 3699 | if (hp2_pin_sense) |
---|
3451 | 3700 | snd_hda_codec_write(codec, 0x16, 0, |
---|
3452 | 3701 | AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); |
---|
3453 | 3702 | |
---|
3454 | | - if (hp1_pin_sense || hp2_pin_sense) |
---|
| 3703 | + if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) |
---|
3455 | 3704 | msleep(100); |
---|
3456 | 3705 | |
---|
3457 | 3706 | alc_update_coef_idx(codec, 0x4a, 3 << 10, 0); |
---|
.. | .. |
---|
3464 | 3713 | hda_nid_t hp_pin = alc_get_hp_pin(spec); |
---|
3465 | 3714 | bool hp1_pin_sense, hp2_pin_sense; |
---|
3466 | 3715 | |
---|
3467 | | - if (!hp_pin) { |
---|
3468 | | - alc269_shutup(codec); |
---|
3469 | | - return; |
---|
3470 | | - } |
---|
| 3716 | + if (!hp_pin) |
---|
| 3717 | + hp_pin = 0x21; |
---|
3471 | 3718 | |
---|
| 3719 | + alc_disable_headset_jack_key(codec); |
---|
3472 | 3720 | /* 3k pull low control for Headset jack. */ |
---|
3473 | 3721 | alc_update_coef_idx(codec, 0x4a, 0, 3 << 10); |
---|
3474 | 3722 | |
---|
.. | .. |
---|
3478 | 3726 | if (hp1_pin_sense || hp2_pin_sense) |
---|
3479 | 3727 | msleep(2); |
---|
3480 | 3728 | |
---|
3481 | | - if (hp1_pin_sense) |
---|
| 3729 | + if (hp1_pin_sense || spec->ultra_low_power) |
---|
3482 | 3730 | snd_hda_codec_write(codec, hp_pin, 0, |
---|
3483 | 3731 | AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); |
---|
3484 | 3732 | if (hp2_pin_sense) |
---|
3485 | 3733 | snd_hda_codec_write(codec, 0x16, 0, |
---|
3486 | 3734 | AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); |
---|
3487 | 3735 | |
---|
3488 | | - if (hp1_pin_sense || hp2_pin_sense) |
---|
| 3736 | + if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) |
---|
3489 | 3737 | msleep(85); |
---|
3490 | 3738 | |
---|
3491 | | - if (hp1_pin_sense) |
---|
| 3739 | + if (hp1_pin_sense || spec->ultra_low_power) |
---|
3492 | 3740 | snd_hda_codec_write(codec, hp_pin, 0, |
---|
3493 | 3741 | AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); |
---|
3494 | 3742 | if (hp2_pin_sense) |
---|
3495 | 3743 | snd_hda_codec_write(codec, 0x16, 0, |
---|
3496 | 3744 | AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); |
---|
3497 | 3745 | |
---|
3498 | | - if (hp1_pin_sense || hp2_pin_sense) |
---|
| 3746 | + if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) |
---|
3499 | 3747 | msleep(100); |
---|
3500 | 3748 | |
---|
3501 | 3749 | alc_auto_setup_eapd(codec, false); |
---|
3502 | 3750 | alc_shutup_pins(codec); |
---|
| 3751 | + if (spec->ultra_low_power) { |
---|
| 3752 | + msleep(50); |
---|
| 3753 | + alc_update_coef_idx(codec, 0x08, 0x0f << 2, 0x0c << 2); |
---|
| 3754 | + alc_update_coef_idx(codec, 0x0e, 7<<6, 0); |
---|
| 3755 | + alc_update_coef_idx(codec, 0x33, 1<<11, 1<<11); |
---|
| 3756 | + alc_update_coef_idx(codec, 0x4a, 3<<4, 2<<4); |
---|
| 3757 | + msleep(30); |
---|
| 3758 | + } |
---|
| 3759 | + |
---|
| 3760 | + alc_update_coef_idx(codec, 0x4a, 3 << 10, 0); |
---|
| 3761 | + alc_enable_headset_jack_key(codec); |
---|
3503 | 3762 | } |
---|
3504 | 3763 | |
---|
3505 | 3764 | static void alc_default_init(struct hda_codec *codec) |
---|
.. | .. |
---|
3694 | 3953 | } |
---|
3695 | 3954 | |
---|
3696 | 3955 | #ifdef HALT_REALTEK_ALC5505 |
---|
3697 | | -#define alc5505_dsp_suspend(codec) /* NOP */ |
---|
3698 | | -#define alc5505_dsp_resume(codec) /* NOP */ |
---|
| 3956 | +#define alc5505_dsp_suspend(codec) do { } while (0) /* NOP */ |
---|
| 3957 | +#define alc5505_dsp_resume(codec) do { } while (0) /* NOP */ |
---|
3699 | 3958 | #else |
---|
3700 | 3959 | #define alc5505_dsp_suspend(codec) alc5505_dsp_halt(codec) |
---|
3701 | 3960 | #define alc5505_dsp_resume(codec) alc5505_dsp_back_from_halt(codec) |
---|
.. | .. |
---|
3731 | 3990 | msleep(200); |
---|
3732 | 3991 | } |
---|
3733 | 3992 | |
---|
3734 | | - regcache_sync(codec->core.regmap); |
---|
| 3993 | + snd_hda_regmap_sync(codec); |
---|
3735 | 3994 | hda_call_check_power_status(codec, 0x01); |
---|
3736 | 3995 | |
---|
3737 | 3996 | /* on some machine, the BIOS will clear the codec gpio data when enter |
---|
.. | .. |
---|
3804 | 4063 | snd_hda_sequence_write(codec, verbs); |
---|
3805 | 4064 | } |
---|
3806 | 4065 | |
---|
| 4066 | +/* Fix the speaker amp after resume, etc */ |
---|
| 4067 | +static void alc269vb_fixup_aspire_e1_coef(struct hda_codec *codec, |
---|
| 4068 | + const struct hda_fixup *fix, |
---|
| 4069 | + int action) |
---|
| 4070 | +{ |
---|
| 4071 | + if (action == HDA_FIXUP_ACT_INIT) |
---|
| 4072 | + alc_update_coef_idx(codec, 0x0d, 0x6000, 0x6000); |
---|
| 4073 | +} |
---|
| 4074 | + |
---|
3807 | 4075 | static void alc269_fixup_pcm_44k(struct hda_codec *codec, |
---|
3808 | 4076 | const struct hda_fixup *fix, int action) |
---|
3809 | 4077 | { |
---|
.. | .. |
---|
3865 | 4133 | vref); |
---|
3866 | 4134 | } |
---|
3867 | 4135 | |
---|
| 4136 | +/* |
---|
| 4137 | + * Magic sequence to make Huawei Matebook X right speaker working (bko#197801) |
---|
| 4138 | + */ |
---|
| 4139 | +struct hda_alc298_mbxinit { |
---|
| 4140 | + unsigned char value_0x23; |
---|
| 4141 | + unsigned char value_0x25; |
---|
| 4142 | +}; |
---|
| 4143 | + |
---|
| 4144 | +static void alc298_huawei_mbx_stereo_seq(struct hda_codec *codec, |
---|
| 4145 | + const struct hda_alc298_mbxinit *initval, |
---|
| 4146 | + bool first) |
---|
| 4147 | +{ |
---|
| 4148 | + snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x0); |
---|
| 4149 | + alc_write_coef_idx(codec, 0x26, 0xb000); |
---|
| 4150 | + |
---|
| 4151 | + if (first) |
---|
| 4152 | + snd_hda_codec_write(codec, 0x21, 0, AC_VERB_GET_PIN_SENSE, 0x0); |
---|
| 4153 | + |
---|
| 4154 | + snd_hda_codec_write(codec, 0x6, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x80); |
---|
| 4155 | + alc_write_coef_idx(codec, 0x26, 0xf000); |
---|
| 4156 | + alc_write_coef_idx(codec, 0x23, initval->value_0x23); |
---|
| 4157 | + |
---|
| 4158 | + if (initval->value_0x23 != 0x1e) |
---|
| 4159 | + alc_write_coef_idx(codec, 0x25, initval->value_0x25); |
---|
| 4160 | + |
---|
| 4161 | + snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 0x26); |
---|
| 4162 | + snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0xb010); |
---|
| 4163 | +} |
---|
| 4164 | + |
---|
| 4165 | +static void alc298_fixup_huawei_mbx_stereo(struct hda_codec *codec, |
---|
| 4166 | + const struct hda_fixup *fix, |
---|
| 4167 | + int action) |
---|
| 4168 | +{ |
---|
| 4169 | + /* Initialization magic */ |
---|
| 4170 | + static const struct hda_alc298_mbxinit dac_init[] = { |
---|
| 4171 | + {0x0c, 0x00}, {0x0d, 0x00}, {0x0e, 0x00}, {0x0f, 0x00}, |
---|
| 4172 | + {0x10, 0x00}, {0x1a, 0x40}, {0x1b, 0x82}, {0x1c, 0x00}, |
---|
| 4173 | + {0x1d, 0x00}, {0x1e, 0x00}, {0x1f, 0x00}, |
---|
| 4174 | + {0x20, 0xc2}, {0x21, 0xc8}, {0x22, 0x26}, {0x23, 0x24}, |
---|
| 4175 | + {0x27, 0xff}, {0x28, 0xff}, {0x29, 0xff}, {0x2a, 0x8f}, |
---|
| 4176 | + {0x2b, 0x02}, {0x2c, 0x48}, {0x2d, 0x34}, {0x2e, 0x00}, |
---|
| 4177 | + {0x2f, 0x00}, |
---|
| 4178 | + {0x30, 0x00}, {0x31, 0x00}, {0x32, 0x00}, {0x33, 0x00}, |
---|
| 4179 | + {0x34, 0x00}, {0x35, 0x01}, {0x36, 0x93}, {0x37, 0x0c}, |
---|
| 4180 | + {0x38, 0x00}, {0x39, 0x00}, {0x3a, 0xf8}, {0x38, 0x80}, |
---|
| 4181 | + {} |
---|
| 4182 | + }; |
---|
| 4183 | + const struct hda_alc298_mbxinit *seq; |
---|
| 4184 | + |
---|
| 4185 | + if (action != HDA_FIXUP_ACT_INIT) |
---|
| 4186 | + return; |
---|
| 4187 | + |
---|
| 4188 | + /* Start */ |
---|
| 4189 | + snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x00); |
---|
| 4190 | + snd_hda_codec_write(codec, 0x06, 0, AC_VERB_SET_DIGI_CONVERT_3, 0x80); |
---|
| 4191 | + alc_write_coef_idx(codec, 0x26, 0xf000); |
---|
| 4192 | + alc_write_coef_idx(codec, 0x22, 0x31); |
---|
| 4193 | + alc_write_coef_idx(codec, 0x23, 0x0b); |
---|
| 4194 | + alc_write_coef_idx(codec, 0x25, 0x00); |
---|
| 4195 | + snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_COEF_INDEX, 0x26); |
---|
| 4196 | + snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, 0xb010); |
---|
| 4197 | + |
---|
| 4198 | + for (seq = dac_init; seq->value_0x23; seq++) |
---|
| 4199 | + alc298_huawei_mbx_stereo_seq(codec, seq, seq == dac_init); |
---|
| 4200 | +} |
---|
| 4201 | + |
---|
3868 | 4202 | static void alc269_fixup_x101_headset_mic(struct hda_codec *codec, |
---|
3869 | 4203 | const struct hda_fixup *fix, int action) |
---|
3870 | 4204 | { |
---|
.. | .. |
---|
3875 | 4209 | } |
---|
3876 | 4210 | } |
---|
3877 | 4211 | |
---|
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) |
---|
| 4212 | +static void alc_update_vref_led(struct hda_codec *codec, hda_nid_t pin, |
---|
| 4213 | + bool polarity, bool on) |
---|
3881 | 4214 | { |
---|
3882 | | - struct hda_codec *codec = private_data; |
---|
3883 | | - struct alc_spec *spec = codec->spec; |
---|
3884 | 4215 | unsigned int pinval; |
---|
3885 | 4216 | |
---|
3886 | | - if (spec->mute_led_polarity) |
---|
3887 | | - enabled = !enabled; |
---|
3888 | | - pinval = snd_hda_codec_get_pin_target(codec, spec->mute_led_nid); |
---|
| 4217 | + if (!pin) |
---|
| 4218 | + return; |
---|
| 4219 | + if (polarity) |
---|
| 4220 | + on = !on; |
---|
| 4221 | + pinval = snd_hda_codec_get_pin_target(codec, pin); |
---|
3889 | 4222 | 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 | | - } |
---|
| 4223 | + pinval |= on ? AC_PINCTL_VREF_80 : AC_PINCTL_VREF_HIZ; |
---|
| 4224 | + /* temporarily power up/down for setting VREF */ |
---|
| 4225 | + snd_hda_power_up_pm(codec); |
---|
| 4226 | + snd_hda_set_pin_ctl_cache(codec, pin, pinval); |
---|
| 4227 | + snd_hda_power_down_pm(codec); |
---|
| 4228 | +} |
---|
| 4229 | + |
---|
| 4230 | +/* update mute-LED according to the speaker mute state via mic VREF pin */ |
---|
| 4231 | +static int vref_mute_led_set(struct led_classdev *led_cdev, |
---|
| 4232 | + enum led_brightness brightness) |
---|
| 4233 | +{ |
---|
| 4234 | + struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); |
---|
| 4235 | + struct alc_spec *spec = codec->spec; |
---|
| 4236 | + |
---|
| 4237 | + alc_update_vref_led(codec, spec->mute_led_nid, |
---|
| 4238 | + spec->mute_led_polarity, brightness); |
---|
| 4239 | + return 0; |
---|
3897 | 4240 | } |
---|
3898 | 4241 | |
---|
3899 | 4242 | /* Make sure the led works even in runtime suspend */ |
---|
.. | .. |
---|
3931 | 4274 | break; |
---|
3932 | 4275 | spec->mute_led_polarity = pol; |
---|
3933 | 4276 | 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; |
---|
| 4277 | + snd_hda_gen_add_mute_led_cdev(codec, vref_mute_led_set); |
---|
3936 | 4278 | codec->power_filter = led_power_filter; |
---|
3937 | 4279 | codec_dbg(codec, |
---|
3938 | 4280 | "Detected mute LED for %x:%d\n", spec->mute_led_nid, |
---|
.. | .. |
---|
3950 | 4292 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
3951 | 4293 | spec->mute_led_polarity = 0; |
---|
3952 | 4294 | spec->mute_led_nid = pin; |
---|
3953 | | - spec->gen.vmaster_mute.hook = alc269_fixup_mic_mute_hook; |
---|
3954 | | - spec->gen.vmaster_mute_enum = 1; |
---|
| 4295 | + snd_hda_gen_add_mute_led_cdev(codec, vref_mute_led_set); |
---|
3955 | 4296 | codec->power_filter = led_power_filter; |
---|
3956 | 4297 | } |
---|
3957 | 4298 | } |
---|
.. | .. |
---|
3984 | 4325 | } |
---|
3985 | 4326 | |
---|
3986 | 4327 | /* turn on/off mute LED via GPIO per vmaster hook */ |
---|
3987 | | -static void alc_fixup_gpio_mute_hook(void *private_data, int enabled) |
---|
| 4328 | +static int gpio_mute_led_set(struct led_classdev *led_cdev, |
---|
| 4329 | + enum led_brightness brightness) |
---|
3988 | 4330 | { |
---|
3989 | | - struct hda_codec *codec = private_data; |
---|
| 4331 | + struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); |
---|
3990 | 4332 | struct alc_spec *spec = codec->spec; |
---|
3991 | 4333 | |
---|
3992 | 4334 | alc_update_gpio_led(codec, spec->gpio_mute_led_mask, |
---|
3993 | | - spec->mute_led_polarity, enabled); |
---|
| 4335 | + spec->mute_led_polarity, !brightness); |
---|
| 4336 | + return 0; |
---|
3994 | 4337 | } |
---|
3995 | 4338 | |
---|
3996 | 4339 | /* turn on/off mic-mute LED via GPIO per capture hook */ |
---|
3997 | | -static void alc_gpio_micmute_update(struct hda_codec *codec) |
---|
| 4340 | +static int micmute_led_set(struct led_classdev *led_cdev, |
---|
| 4341 | + enum led_brightness brightness) |
---|
3998 | 4342 | { |
---|
| 4343 | + struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); |
---|
3999 | 4344 | struct alc_spec *spec = codec->spec; |
---|
4000 | 4345 | |
---|
4001 | 4346 | alc_update_gpio_led(codec, spec->gpio_mic_led_mask, |
---|
4002 | | - spec->micmute_led_polarity, |
---|
4003 | | - spec->gen.micmute_led.led_value); |
---|
| 4347 | + spec->micmute_led_polarity, !brightness); |
---|
| 4348 | + return 0; |
---|
4004 | 4349 | } |
---|
4005 | 4350 | |
---|
4006 | 4351 | /* setup mute and mic-mute GPIO bits, add hooks appropriately */ |
---|
.. | .. |
---|
4017 | 4362 | return; |
---|
4018 | 4363 | if (mute_mask) { |
---|
4019 | 4364 | spec->gpio_mute_led_mask = mute_mask; |
---|
4020 | | - spec->gen.vmaster_mute.hook = alc_fixup_gpio_mute_hook; |
---|
| 4365 | + snd_hda_gen_add_mute_led_cdev(codec, gpio_mute_led_set); |
---|
4021 | 4366 | } |
---|
4022 | 4367 | if (micmute_mask) { |
---|
4023 | 4368 | spec->gpio_mic_led_mask = micmute_mask; |
---|
4024 | | - snd_hda_gen_add_micmute_led(codec, alc_gpio_micmute_update); |
---|
| 4369 | + snd_hda_gen_add_micmute_led_cdev(codec, micmute_led_set); |
---|
4025 | 4370 | } |
---|
| 4371 | +} |
---|
| 4372 | + |
---|
| 4373 | +static void alc236_fixup_hp_gpio_led(struct hda_codec *codec, |
---|
| 4374 | + const struct hda_fixup *fix, int action) |
---|
| 4375 | +{ |
---|
| 4376 | + alc_fixup_hp_gpio_led(codec, action, 0x02, 0x01); |
---|
4026 | 4377 | } |
---|
4027 | 4378 | |
---|
4028 | 4379 | static void alc269_fixup_hp_gpio_led(struct hda_codec *codec, |
---|
.. | .. |
---|
4034 | 4385 | static void alc285_fixup_hp_gpio_led(struct hda_codec *codec, |
---|
4035 | 4386 | const struct hda_fixup *fix, int action) |
---|
4036 | 4387 | { |
---|
4037 | | - struct alc_spec *spec = codec->spec; |
---|
4038 | | - |
---|
4039 | | - spec->micmute_led_polarity = 1; |
---|
4040 | | - |
---|
4041 | 4388 | alc_fixup_hp_gpio_led(codec, action, 0x04, 0x01); |
---|
4042 | 4389 | } |
---|
4043 | 4390 | |
---|
.. | .. |
---|
4047 | 4394 | alc_fixup_hp_gpio_led(codec, action, 0x02, 0x20); |
---|
4048 | 4395 | } |
---|
4049 | 4396 | |
---|
4050 | | -/* turn on/off mic-mute LED per capture hook */ |
---|
4051 | | -static void alc_cap_micmute_update(struct hda_codec *codec) |
---|
| 4397 | +static void alc287_fixup_hp_gpio_led(struct hda_codec *codec, |
---|
| 4398 | + const struct hda_fixup *fix, int action) |
---|
| 4399 | +{ |
---|
| 4400 | + alc_fixup_hp_gpio_led(codec, action, 0x10, 0); |
---|
| 4401 | +} |
---|
| 4402 | + |
---|
| 4403 | +static void alc245_fixup_hp_gpio_led(struct hda_codec *codec, |
---|
| 4404 | + const struct hda_fixup *fix, int action) |
---|
4052 | 4405 | { |
---|
4053 | 4406 | struct alc_spec *spec = codec->spec; |
---|
4054 | | - unsigned int pinval; |
---|
4055 | 4407 | |
---|
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); |
---|
| 4408 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) |
---|
| 4409 | + spec->micmute_led_polarity = 1; |
---|
| 4410 | + alc_fixup_hp_gpio_led(codec, action, 0, 0x04); |
---|
| 4411 | +} |
---|
| 4412 | + |
---|
| 4413 | +/* turn on/off mic-mute LED per capture hook via VREF change */ |
---|
| 4414 | +static int vref_micmute_led_set(struct led_classdev *led_cdev, |
---|
| 4415 | + enum led_brightness brightness) |
---|
| 4416 | +{ |
---|
| 4417 | + struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); |
---|
| 4418 | + struct alc_spec *spec = codec->spec; |
---|
| 4419 | + |
---|
| 4420 | + alc_update_vref_led(codec, spec->cap_mute_led_nid, |
---|
| 4421 | + spec->micmute_led_polarity, brightness); |
---|
| 4422 | + return 0; |
---|
4065 | 4423 | } |
---|
4066 | 4424 | |
---|
4067 | 4425 | static void alc269_fixup_hp_gpio_mic1_led(struct hda_codec *codec, |
---|
.. | .. |
---|
4077 | 4435 | spec->gpio_mask |= 0x10; |
---|
4078 | 4436 | spec->gpio_dir |= 0x10; |
---|
4079 | 4437 | spec->cap_mute_led_nid = 0x18; |
---|
4080 | | - snd_hda_gen_add_micmute_led(codec, alc_cap_micmute_update); |
---|
| 4438 | + snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set); |
---|
4081 | 4439 | codec->power_filter = led_power_filter; |
---|
4082 | 4440 | } |
---|
4083 | 4441 | } |
---|
.. | .. |
---|
4090 | 4448 | alc_fixup_hp_gpio_led(codec, action, 0x08, 0); |
---|
4091 | 4449 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
4092 | 4450 | spec->cap_mute_led_nid = 0x18; |
---|
4093 | | - snd_hda_gen_add_micmute_led(codec, alc_cap_micmute_update); |
---|
| 4451 | + snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set); |
---|
4094 | 4452 | codec->power_filter = led_power_filter; |
---|
| 4453 | + } |
---|
| 4454 | +} |
---|
| 4455 | + |
---|
| 4456 | +/* HP Spectre x360 14 model needs a unique workaround for enabling the amp; |
---|
| 4457 | + * it needs to toggle the GPIO0 once on and off at each time (bko#210633) |
---|
| 4458 | + */ |
---|
| 4459 | +static void alc245_fixup_hp_x360_amp(struct hda_codec *codec, |
---|
| 4460 | + const struct hda_fixup *fix, int action) |
---|
| 4461 | +{ |
---|
| 4462 | + struct alc_spec *spec = codec->spec; |
---|
| 4463 | + |
---|
| 4464 | + switch (action) { |
---|
| 4465 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 4466 | + spec->gpio_mask |= 0x01; |
---|
| 4467 | + spec->gpio_dir |= 0x01; |
---|
| 4468 | + break; |
---|
| 4469 | + case HDA_FIXUP_ACT_INIT: |
---|
| 4470 | + /* need to toggle GPIO to enable the amp */ |
---|
| 4471 | + alc_update_gpio_data(codec, 0x01, true); |
---|
| 4472 | + msleep(100); |
---|
| 4473 | + alc_update_gpio_data(codec, 0x01, false); |
---|
| 4474 | + break; |
---|
| 4475 | + } |
---|
| 4476 | +} |
---|
| 4477 | + |
---|
| 4478 | +/* toggle GPIO2 at each time stream is started; we use PREPARE state instead */ |
---|
| 4479 | +static void alc274_hp_envy_pcm_hook(struct hda_pcm_stream *hinfo, |
---|
| 4480 | + struct hda_codec *codec, |
---|
| 4481 | + struct snd_pcm_substream *substream, |
---|
| 4482 | + int action) |
---|
| 4483 | +{ |
---|
| 4484 | + switch (action) { |
---|
| 4485 | + case HDA_GEN_PCM_ACT_PREPARE: |
---|
| 4486 | + alc_update_gpio_data(codec, 0x04, true); |
---|
| 4487 | + break; |
---|
| 4488 | + case HDA_GEN_PCM_ACT_CLEANUP: |
---|
| 4489 | + alc_update_gpio_data(codec, 0x04, false); |
---|
| 4490 | + break; |
---|
| 4491 | + } |
---|
| 4492 | +} |
---|
| 4493 | + |
---|
| 4494 | +static void alc274_fixup_hp_envy_gpio(struct hda_codec *codec, |
---|
| 4495 | + const struct hda_fixup *fix, |
---|
| 4496 | + int action) |
---|
| 4497 | +{ |
---|
| 4498 | + struct alc_spec *spec = codec->spec; |
---|
| 4499 | + |
---|
| 4500 | + if (action == HDA_FIXUP_ACT_PROBE) { |
---|
| 4501 | + spec->gpio_mask |= 0x04; |
---|
| 4502 | + spec->gpio_dir |= 0x04; |
---|
| 4503 | + spec->gen.pcm_playback_hook = alc274_hp_envy_pcm_hook; |
---|
| 4504 | + } |
---|
| 4505 | +} |
---|
| 4506 | + |
---|
| 4507 | +static void alc_update_coef_led(struct hda_codec *codec, |
---|
| 4508 | + struct alc_coef_led *led, |
---|
| 4509 | + bool polarity, bool on) |
---|
| 4510 | +{ |
---|
| 4511 | + if (polarity) |
---|
| 4512 | + on = !on; |
---|
| 4513 | + /* temporarily power up/down for setting COEF bit */ |
---|
| 4514 | + alc_update_coef_idx(codec, led->idx, led->mask, |
---|
| 4515 | + on ? led->on : led->off); |
---|
| 4516 | +} |
---|
| 4517 | + |
---|
| 4518 | +/* update mute-LED according to the speaker mute state via COEF bit */ |
---|
| 4519 | +static int coef_mute_led_set(struct led_classdev *led_cdev, |
---|
| 4520 | + enum led_brightness brightness) |
---|
| 4521 | +{ |
---|
| 4522 | + struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); |
---|
| 4523 | + struct alc_spec *spec = codec->spec; |
---|
| 4524 | + |
---|
| 4525 | + alc_update_coef_led(codec, &spec->mute_led_coef, |
---|
| 4526 | + spec->mute_led_polarity, brightness); |
---|
| 4527 | + return 0; |
---|
| 4528 | +} |
---|
| 4529 | + |
---|
| 4530 | +static void alc285_fixup_hp_mute_led_coefbit(struct hda_codec *codec, |
---|
| 4531 | + const struct hda_fixup *fix, |
---|
| 4532 | + int action) |
---|
| 4533 | +{ |
---|
| 4534 | + struct alc_spec *spec = codec->spec; |
---|
| 4535 | + |
---|
| 4536 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
| 4537 | + spec->mute_led_polarity = 0; |
---|
| 4538 | + spec->mute_led_coef.idx = 0x0b; |
---|
| 4539 | + spec->mute_led_coef.mask = 1 << 3; |
---|
| 4540 | + spec->mute_led_coef.on = 1 << 3; |
---|
| 4541 | + spec->mute_led_coef.off = 0; |
---|
| 4542 | + snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set); |
---|
| 4543 | + } |
---|
| 4544 | +} |
---|
| 4545 | + |
---|
| 4546 | +static void alc236_fixup_hp_mute_led_coefbit(struct hda_codec *codec, |
---|
| 4547 | + const struct hda_fixup *fix, |
---|
| 4548 | + int action) |
---|
| 4549 | +{ |
---|
| 4550 | + struct alc_spec *spec = codec->spec; |
---|
| 4551 | + |
---|
| 4552 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
| 4553 | + spec->mute_led_polarity = 0; |
---|
| 4554 | + spec->mute_led_coef.idx = 0x34; |
---|
| 4555 | + spec->mute_led_coef.mask = 1 << 5; |
---|
| 4556 | + spec->mute_led_coef.on = 0; |
---|
| 4557 | + spec->mute_led_coef.off = 1 << 5; |
---|
| 4558 | + snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set); |
---|
| 4559 | + } |
---|
| 4560 | +} |
---|
| 4561 | + |
---|
| 4562 | +static void alc236_fixup_hp_mute_led_coefbit2(struct hda_codec *codec, |
---|
| 4563 | + const struct hda_fixup *fix, int action) |
---|
| 4564 | +{ |
---|
| 4565 | + struct alc_spec *spec = codec->spec; |
---|
| 4566 | + |
---|
| 4567 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
| 4568 | + spec->mute_led_polarity = 0; |
---|
| 4569 | + spec->mute_led_coef.idx = 0x07; |
---|
| 4570 | + spec->mute_led_coef.mask = 1; |
---|
| 4571 | + spec->mute_led_coef.on = 1; |
---|
| 4572 | + spec->mute_led_coef.off = 0; |
---|
| 4573 | + snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set); |
---|
| 4574 | + } |
---|
| 4575 | +} |
---|
| 4576 | + |
---|
| 4577 | +/* turn on/off mic-mute LED per capture hook by coef bit */ |
---|
| 4578 | +static int coef_micmute_led_set(struct led_classdev *led_cdev, |
---|
| 4579 | + enum led_brightness brightness) |
---|
| 4580 | +{ |
---|
| 4581 | + struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent); |
---|
| 4582 | + struct alc_spec *spec = codec->spec; |
---|
| 4583 | + |
---|
| 4584 | + alc_update_coef_led(codec, &spec->mic_led_coef, |
---|
| 4585 | + spec->micmute_led_polarity, brightness); |
---|
| 4586 | + return 0; |
---|
| 4587 | +} |
---|
| 4588 | + |
---|
| 4589 | +static void alc285_fixup_hp_coef_micmute_led(struct hda_codec *codec, |
---|
| 4590 | + const struct hda_fixup *fix, int action) |
---|
| 4591 | +{ |
---|
| 4592 | + struct alc_spec *spec = codec->spec; |
---|
| 4593 | + |
---|
| 4594 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
| 4595 | + spec->mic_led_coef.idx = 0x19; |
---|
| 4596 | + spec->mic_led_coef.mask = 1 << 13; |
---|
| 4597 | + spec->mic_led_coef.on = 1 << 13; |
---|
| 4598 | + spec->mic_led_coef.off = 0; |
---|
| 4599 | + snd_hda_gen_add_micmute_led_cdev(codec, coef_micmute_led_set); |
---|
| 4600 | + } |
---|
| 4601 | +} |
---|
| 4602 | + |
---|
| 4603 | +static void alc285_fixup_hp_gpio_micmute_led(struct hda_codec *codec, |
---|
| 4604 | + const struct hda_fixup *fix, int action) |
---|
| 4605 | +{ |
---|
| 4606 | + struct alc_spec *spec = codec->spec; |
---|
| 4607 | + |
---|
| 4608 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) |
---|
| 4609 | + spec->micmute_led_polarity = 1; |
---|
| 4610 | + alc_fixup_hp_gpio_led(codec, action, 0, 0x04); |
---|
| 4611 | +} |
---|
| 4612 | + |
---|
| 4613 | +static void alc236_fixup_hp_coef_micmute_led(struct hda_codec *codec, |
---|
| 4614 | + const struct hda_fixup *fix, int action) |
---|
| 4615 | +{ |
---|
| 4616 | + struct alc_spec *spec = codec->spec; |
---|
| 4617 | + |
---|
| 4618 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
| 4619 | + spec->mic_led_coef.idx = 0x35; |
---|
| 4620 | + spec->mic_led_coef.mask = 3 << 2; |
---|
| 4621 | + spec->mic_led_coef.on = 2 << 2; |
---|
| 4622 | + spec->mic_led_coef.off = 1 << 2; |
---|
| 4623 | + snd_hda_gen_add_micmute_led_cdev(codec, coef_micmute_led_set); |
---|
| 4624 | + } |
---|
| 4625 | +} |
---|
| 4626 | + |
---|
| 4627 | +static void alc285_fixup_hp_mute_led(struct hda_codec *codec, |
---|
| 4628 | + const struct hda_fixup *fix, int action) |
---|
| 4629 | +{ |
---|
| 4630 | + alc285_fixup_hp_mute_led_coefbit(codec, fix, action); |
---|
| 4631 | + alc285_fixup_hp_coef_micmute_led(codec, fix, action); |
---|
| 4632 | +} |
---|
| 4633 | + |
---|
| 4634 | +static void alc285_fixup_hp_spectre_x360_mute_led(struct hda_codec *codec, |
---|
| 4635 | + const struct hda_fixup *fix, int action) |
---|
| 4636 | +{ |
---|
| 4637 | + alc285_fixup_hp_mute_led_coefbit(codec, fix, action); |
---|
| 4638 | + alc285_fixup_hp_gpio_micmute_led(codec, fix, action); |
---|
| 4639 | +} |
---|
| 4640 | + |
---|
| 4641 | +static void alc236_fixup_hp_mute_led(struct hda_codec *codec, |
---|
| 4642 | + const struct hda_fixup *fix, int action) |
---|
| 4643 | +{ |
---|
| 4644 | + alc236_fixup_hp_mute_led_coefbit(codec, fix, action); |
---|
| 4645 | + alc236_fixup_hp_coef_micmute_led(codec, fix, action); |
---|
| 4646 | +} |
---|
| 4647 | + |
---|
| 4648 | +static void alc236_fixup_hp_micmute_led_vref(struct hda_codec *codec, |
---|
| 4649 | + const struct hda_fixup *fix, int action) |
---|
| 4650 | +{ |
---|
| 4651 | + struct alc_spec *spec = codec->spec; |
---|
| 4652 | + |
---|
| 4653 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
| 4654 | + spec->cap_mute_led_nid = 0x1a; |
---|
| 4655 | + snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set); |
---|
| 4656 | + codec->power_filter = led_power_filter; |
---|
| 4657 | + } |
---|
| 4658 | +} |
---|
| 4659 | + |
---|
| 4660 | +static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec *codec, |
---|
| 4661 | + const struct hda_fixup *fix, int action) |
---|
| 4662 | +{ |
---|
| 4663 | + alc236_fixup_hp_mute_led_coefbit(codec, fix, action); |
---|
| 4664 | + alc236_fixup_hp_micmute_led_vref(codec, fix, action); |
---|
| 4665 | +} |
---|
| 4666 | + |
---|
| 4667 | +static inline void alc298_samsung_write_coef_pack(struct hda_codec *codec, |
---|
| 4668 | + const unsigned short coefs[2]) |
---|
| 4669 | +{ |
---|
| 4670 | + alc_write_coef_idx(codec, 0x23, coefs[0]); |
---|
| 4671 | + alc_write_coef_idx(codec, 0x25, coefs[1]); |
---|
| 4672 | + alc_write_coef_idx(codec, 0x26, 0xb011); |
---|
| 4673 | +} |
---|
| 4674 | + |
---|
| 4675 | +struct alc298_samsung_amp_desc { |
---|
| 4676 | + unsigned char nid; |
---|
| 4677 | + unsigned short init_seq[2][2]; |
---|
| 4678 | +}; |
---|
| 4679 | + |
---|
| 4680 | +static void alc298_fixup_samsung_amp(struct hda_codec *codec, |
---|
| 4681 | + const struct hda_fixup *fix, int action) |
---|
| 4682 | +{ |
---|
| 4683 | + int i, j; |
---|
| 4684 | + static const unsigned short init_seq[][2] = { |
---|
| 4685 | + { 0x19, 0x00 }, { 0x20, 0xc0 }, { 0x22, 0x44 }, { 0x23, 0x08 }, |
---|
| 4686 | + { 0x24, 0x85 }, { 0x25, 0x41 }, { 0x35, 0x40 }, { 0x36, 0x01 }, |
---|
| 4687 | + { 0x38, 0x81 }, { 0x3a, 0x03 }, { 0x3b, 0x81 }, { 0x40, 0x3e }, |
---|
| 4688 | + { 0x41, 0x07 }, { 0x400, 0x1 } |
---|
| 4689 | + }; |
---|
| 4690 | + static const struct alc298_samsung_amp_desc amps[] = { |
---|
| 4691 | + { 0x3a, { { 0x18, 0x1 }, { 0x26, 0x0 } } }, |
---|
| 4692 | + { 0x39, { { 0x18, 0x2 }, { 0x26, 0x1 } } } |
---|
| 4693 | + }; |
---|
| 4694 | + |
---|
| 4695 | + if (action != HDA_FIXUP_ACT_INIT) |
---|
| 4696 | + return; |
---|
| 4697 | + |
---|
| 4698 | + for (i = 0; i < ARRAY_SIZE(amps); i++) { |
---|
| 4699 | + alc_write_coef_idx(codec, 0x22, amps[i].nid); |
---|
| 4700 | + |
---|
| 4701 | + for (j = 0; j < ARRAY_SIZE(amps[i].init_seq); j++) |
---|
| 4702 | + alc298_samsung_write_coef_pack(codec, amps[i].init_seq[j]); |
---|
| 4703 | + |
---|
| 4704 | + for (j = 0; j < ARRAY_SIZE(init_seq); j++) |
---|
| 4705 | + alc298_samsung_write_coef_pack(codec, init_seq[j]); |
---|
4095 | 4706 | } |
---|
4096 | 4707 | } |
---|
4097 | 4708 | |
---|
.. | .. |
---|
4184 | 4795 | { |
---|
4185 | 4796 | struct alc_spec *spec = codec->spec; |
---|
4186 | 4797 | |
---|
4187 | | - spec->micmute_led_polarity = 1; |
---|
4188 | 4798 | alc_fixup_hp_gpio_led(codec, action, 0, 0x04); |
---|
4189 | 4799 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
4190 | 4800 | spec->init_amp = ALC_INIT_DEFAULT; |
---|
.. | .. |
---|
4218 | 4828 | alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x1a); |
---|
4219 | 4829 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
4220 | 4830 | spec->cap_mute_led_nid = 0x18; |
---|
4221 | | - snd_hda_gen_add_micmute_led(codec, alc_cap_micmute_update); |
---|
| 4831 | + snd_hda_gen_add_micmute_led_cdev(codec, vref_micmute_led_set); |
---|
4222 | 4832 | } |
---|
4223 | 4833 | } |
---|
4224 | 4834 | |
---|
4225 | | -static struct coef_fw alc225_pre_hsmode[] = { |
---|
| 4835 | +static const struct coef_fw alc225_pre_hsmode[] = { |
---|
4226 | 4836 | UPDATE_COEF(0x4a, 1<<8, 0), |
---|
4227 | 4837 | UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), |
---|
4228 | 4838 | UPDATE_COEF(0x63, 3<<14, 3<<14), |
---|
.. | .. |
---|
4235 | 4845 | |
---|
4236 | 4846 | static void alc_headset_mode_unplugged(struct hda_codec *codec) |
---|
4237 | 4847 | { |
---|
4238 | | - static struct coef_fw coef0255[] = { |
---|
| 4848 | + struct alc_spec *spec = codec->spec; |
---|
| 4849 | + static const struct coef_fw coef0255[] = { |
---|
4239 | 4850 | WRITE_COEF(0x1b, 0x0c0b), /* LDO and MISC control */ |
---|
4240 | 4851 | WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */ |
---|
4241 | 4852 | UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/ |
---|
.. | .. |
---|
4243 | 4854 | WRITE_COEFEX(0x57, 0x03, 0x8aa6), /* Direct Drive HP Amp control */ |
---|
4244 | 4855 | {} |
---|
4245 | 4856 | }; |
---|
4246 | | - static struct coef_fw coef0256[] = { |
---|
| 4857 | + static const struct coef_fw coef0256[] = { |
---|
4247 | 4858 | WRITE_COEF(0x1b, 0x0c4b), /* LDO and MISC control */ |
---|
4248 | 4859 | WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */ |
---|
4249 | 4860 | WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */ |
---|
.. | .. |
---|
4251 | 4862 | UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/ |
---|
4252 | 4863 | {} |
---|
4253 | 4864 | }; |
---|
4254 | | - static struct coef_fw coef0233[] = { |
---|
| 4865 | + static const struct coef_fw coef0233[] = { |
---|
4255 | 4866 | WRITE_COEF(0x1b, 0x0c0b), |
---|
4256 | 4867 | WRITE_COEF(0x45, 0xc429), |
---|
4257 | 4868 | UPDATE_COEF(0x35, 0x4000, 0), |
---|
.. | .. |
---|
4261 | 4872 | WRITE_COEF(0x32, 0x42a3), |
---|
4262 | 4873 | {} |
---|
4263 | 4874 | }; |
---|
4264 | | - static struct coef_fw coef0288[] = { |
---|
| 4875 | + static const struct coef_fw coef0288[] = { |
---|
4265 | 4876 | UPDATE_COEF(0x4f, 0xfcc0, 0xc400), |
---|
4266 | 4877 | UPDATE_COEF(0x50, 0x2000, 0x2000), |
---|
4267 | 4878 | UPDATE_COEF(0x56, 0x0006, 0x0006), |
---|
.. | .. |
---|
4269 | 4880 | UPDATE_COEF(0x67, 0x2000, 0), |
---|
4270 | 4881 | {} |
---|
4271 | 4882 | }; |
---|
4272 | | - static struct coef_fw coef0298[] = { |
---|
| 4883 | + static const struct coef_fw coef0298[] = { |
---|
4273 | 4884 | UPDATE_COEF(0x19, 0x1300, 0x0300), |
---|
4274 | 4885 | {} |
---|
4275 | 4886 | }; |
---|
4276 | | - static struct coef_fw coef0292[] = { |
---|
| 4887 | + static const struct coef_fw coef0292[] = { |
---|
4277 | 4888 | WRITE_COEF(0x76, 0x000e), |
---|
4278 | 4889 | WRITE_COEF(0x6c, 0x2400), |
---|
4279 | 4890 | WRITE_COEF(0x18, 0x7308), |
---|
4280 | 4891 | WRITE_COEF(0x6b, 0xc429), |
---|
4281 | 4892 | {} |
---|
4282 | 4893 | }; |
---|
4283 | | - static struct coef_fw coef0293[] = { |
---|
| 4894 | + static const struct coef_fw coef0293[] = { |
---|
4284 | 4895 | UPDATE_COEF(0x10, 7<<8, 6<<8), /* SET Line1 JD to 0 */ |
---|
4285 | 4896 | UPDATE_COEFEX(0x57, 0x05, 1<<15|1<<13, 0x0), /* SET charge pump by verb */ |
---|
4286 | 4897 | UPDATE_COEFEX(0x57, 0x03, 1<<10, 1<<10), /* SET EN_OSW to 1 */ |
---|
.. | .. |
---|
4289 | 4900 | UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */ |
---|
4290 | 4901 | {} |
---|
4291 | 4902 | }; |
---|
4292 | | - static struct coef_fw coef0668[] = { |
---|
| 4903 | + static const struct coef_fw coef0668[] = { |
---|
4293 | 4904 | WRITE_COEF(0x15, 0x0d40), |
---|
4294 | 4905 | WRITE_COEF(0xb7, 0x802b), |
---|
4295 | 4906 | {} |
---|
4296 | 4907 | }; |
---|
4297 | | - static struct coef_fw coef0225[] = { |
---|
| 4908 | + static const struct coef_fw coef0225[] = { |
---|
4298 | 4909 | UPDATE_COEF(0x63, 3<<14, 0), |
---|
4299 | 4910 | {} |
---|
4300 | 4911 | }; |
---|
4301 | | - static struct coef_fw coef0274[] = { |
---|
| 4912 | + static const struct coef_fw coef0274[] = { |
---|
4302 | 4913 | UPDATE_COEF(0x4a, 0x0100, 0), |
---|
4303 | 4914 | UPDATE_COEFEX(0x57, 0x05, 0x4000, 0), |
---|
4304 | 4915 | UPDATE_COEF(0x6b, 0xf000, 0x5000), |
---|
.. | .. |
---|
4309 | 4920 | {} |
---|
4310 | 4921 | }; |
---|
4311 | 4922 | |
---|
| 4923 | + if (spec->no_internal_mic_pin) { |
---|
| 4924 | + alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12); |
---|
| 4925 | + return; |
---|
| 4926 | + } |
---|
| 4927 | + |
---|
4312 | 4928 | switch (codec->core.vendor_id) { |
---|
4313 | 4929 | case 0x10ec0255: |
---|
4314 | 4930 | alc_process_coef_fw(codec, coef0255); |
---|
4315 | 4931 | break; |
---|
| 4932 | + case 0x10ec0230: |
---|
4316 | 4933 | case 0x10ec0236: |
---|
4317 | 4934 | case 0x10ec0256: |
---|
| 4935 | + case 0x19e58326: |
---|
4318 | 4936 | alc_process_coef_fw(codec, coef0256); |
---|
4319 | 4937 | break; |
---|
4320 | 4938 | case 0x10ec0234: |
---|
.. | .. |
---|
4363 | 4981 | static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin, |
---|
4364 | 4982 | hda_nid_t mic_pin) |
---|
4365 | 4983 | { |
---|
4366 | | - static struct coef_fw coef0255[] = { |
---|
| 4984 | + static const struct coef_fw coef0255[] = { |
---|
4367 | 4985 | WRITE_COEFEX(0x57, 0x03, 0x8aa6), |
---|
4368 | 4986 | WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */ |
---|
4369 | 4987 | {} |
---|
4370 | 4988 | }; |
---|
4371 | | - static struct coef_fw coef0256[] = { |
---|
| 4989 | + static const struct coef_fw coef0256[] = { |
---|
4372 | 4990 | UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14), /* Direct Drive HP Amp control(Set to verb control)*/ |
---|
4373 | 4991 | WRITE_COEFEX(0x57, 0x03, 0x09a3), |
---|
4374 | 4992 | WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */ |
---|
4375 | 4993 | {} |
---|
4376 | 4994 | }; |
---|
4377 | | - static struct coef_fw coef0233[] = { |
---|
| 4995 | + static const struct coef_fw coef0233[] = { |
---|
4378 | 4996 | UPDATE_COEF(0x35, 0, 1<<14), |
---|
4379 | 4997 | WRITE_COEF(0x06, 0x2100), |
---|
4380 | 4998 | WRITE_COEF(0x1a, 0x0021), |
---|
4381 | 4999 | WRITE_COEF(0x26, 0x008c), |
---|
4382 | 5000 | {} |
---|
4383 | 5001 | }; |
---|
4384 | | - static struct coef_fw coef0288[] = { |
---|
| 5002 | + static const struct coef_fw coef0288[] = { |
---|
4385 | 5003 | UPDATE_COEF(0x4f, 0x00c0, 0), |
---|
4386 | 5004 | UPDATE_COEF(0x50, 0x2000, 0), |
---|
4387 | 5005 | UPDATE_COEF(0x56, 0x0006, 0), |
---|
.. | .. |
---|
4390 | 5008 | UPDATE_COEF(0x67, 0x2000, 0x2000), |
---|
4391 | 5009 | {} |
---|
4392 | 5010 | }; |
---|
4393 | | - static struct coef_fw coef0292[] = { |
---|
| 5011 | + static const struct coef_fw coef0292[] = { |
---|
4394 | 5012 | WRITE_COEF(0x19, 0xa208), |
---|
4395 | 5013 | WRITE_COEF(0x2e, 0xacf0), |
---|
4396 | 5014 | {} |
---|
4397 | 5015 | }; |
---|
4398 | | - static struct coef_fw coef0293[] = { |
---|
| 5016 | + static const struct coef_fw coef0293[] = { |
---|
4399 | 5017 | UPDATE_COEFEX(0x57, 0x05, 0, 1<<15|1<<13), /* SET charge pump by verb */ |
---|
4400 | 5018 | UPDATE_COEFEX(0x57, 0x03, 1<<10, 0), /* SET EN_OSW to 0 */ |
---|
4401 | 5019 | UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */ |
---|
4402 | 5020 | {} |
---|
4403 | 5021 | }; |
---|
4404 | | - static struct coef_fw coef0688[] = { |
---|
| 5022 | + static const struct coef_fw coef0688[] = { |
---|
4405 | 5023 | WRITE_COEF(0xb7, 0x802b), |
---|
4406 | 5024 | WRITE_COEF(0xb5, 0x1040), |
---|
4407 | 5025 | UPDATE_COEF(0xc3, 0, 1<<12), |
---|
4408 | 5026 | {} |
---|
4409 | 5027 | }; |
---|
4410 | | - static struct coef_fw coef0225[] = { |
---|
| 5028 | + static const struct coef_fw coef0225[] = { |
---|
4411 | 5029 | UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14), |
---|
4412 | 5030 | UPDATE_COEF(0x4a, 3<<4, 2<<4), |
---|
4413 | 5031 | UPDATE_COEF(0x63, 3<<14, 0), |
---|
4414 | 5032 | {} |
---|
4415 | 5033 | }; |
---|
4416 | | - static struct coef_fw coef0274[] = { |
---|
| 5034 | + static const struct coef_fw coef0274[] = { |
---|
4417 | 5035 | UPDATE_COEFEX(0x57, 0x05, 0x4000, 0x4000), |
---|
4418 | 5036 | UPDATE_COEF(0x4a, 0x0010, 0), |
---|
4419 | 5037 | UPDATE_COEF(0x6b, 0xf000, 0), |
---|
.. | .. |
---|
4427 | 5045 | alc_process_coef_fw(codec, coef0255); |
---|
4428 | 5046 | snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); |
---|
4429 | 5047 | break; |
---|
| 5048 | + case 0x10ec0230: |
---|
4430 | 5049 | case 0x10ec0236: |
---|
4431 | 5050 | case 0x10ec0256: |
---|
| 5051 | + case 0x19e58326: |
---|
4432 | 5052 | alc_write_coef_idx(codec, 0x45, 0xc489); |
---|
4433 | 5053 | snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); |
---|
4434 | 5054 | alc_process_coef_fw(codec, coef0256); |
---|
.. | .. |
---|
4469 | 5089 | break; |
---|
4470 | 5090 | case 0x10ec0867: |
---|
4471 | 5091 | alc_update_coefex_idx(codec, 0x57, 0x5, 0, 1<<14); |
---|
4472 | | - /* fallthru */ |
---|
| 5092 | + fallthrough; |
---|
4473 | 5093 | case 0x10ec0221: |
---|
4474 | 5094 | case 0x10ec0662: |
---|
4475 | 5095 | snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); |
---|
.. | .. |
---|
4499 | 5119 | |
---|
4500 | 5120 | static void alc_headset_mode_default(struct hda_codec *codec) |
---|
4501 | 5121 | { |
---|
4502 | | - static struct coef_fw coef0225[] = { |
---|
| 5122 | + static const struct coef_fw coef0225[] = { |
---|
4503 | 5123 | UPDATE_COEF(0x45, 0x3f<<10, 0x30<<10), |
---|
4504 | 5124 | UPDATE_COEF(0x45, 0x3f<<10, 0x31<<10), |
---|
4505 | 5125 | UPDATE_COEF(0x49, 3<<8, 0<<8), |
---|
.. | .. |
---|
4508 | 5128 | UPDATE_COEF(0x67, 0xf000, 0x3000), |
---|
4509 | 5129 | {} |
---|
4510 | 5130 | }; |
---|
4511 | | - static struct coef_fw coef0255[] = { |
---|
| 5131 | + static const struct coef_fw coef0255[] = { |
---|
4512 | 5132 | WRITE_COEF(0x45, 0xc089), |
---|
4513 | 5133 | WRITE_COEF(0x45, 0xc489), |
---|
4514 | 5134 | WRITE_COEFEX(0x57, 0x03, 0x8ea6), |
---|
4515 | 5135 | WRITE_COEF(0x49, 0x0049), |
---|
4516 | 5136 | {} |
---|
4517 | 5137 | }; |
---|
4518 | | - static struct coef_fw coef0256[] = { |
---|
| 5138 | + static const struct coef_fw coef0256[] = { |
---|
4519 | 5139 | WRITE_COEF(0x45, 0xc489), |
---|
4520 | 5140 | WRITE_COEFEX(0x57, 0x03, 0x0da3), |
---|
4521 | 5141 | WRITE_COEF(0x49, 0x0049), |
---|
.. | .. |
---|
4523 | 5143 | WRITE_COEF(0x06, 0x6100), |
---|
4524 | 5144 | {} |
---|
4525 | 5145 | }; |
---|
4526 | | - static struct coef_fw coef0233[] = { |
---|
| 5146 | + static const struct coef_fw coef0233[] = { |
---|
4527 | 5147 | WRITE_COEF(0x06, 0x2100), |
---|
4528 | 5148 | WRITE_COEF(0x32, 0x4ea3), |
---|
4529 | 5149 | {} |
---|
4530 | 5150 | }; |
---|
4531 | | - static struct coef_fw coef0288[] = { |
---|
| 5151 | + static const struct coef_fw coef0288[] = { |
---|
4532 | 5152 | UPDATE_COEF(0x4f, 0xfcc0, 0xc400), /* Set to TRS type */ |
---|
4533 | 5153 | UPDATE_COEF(0x50, 0x2000, 0x2000), |
---|
4534 | 5154 | UPDATE_COEF(0x56, 0x0006, 0x0006), |
---|
.. | .. |
---|
4536 | 5156 | UPDATE_COEF(0x67, 0x2000, 0), |
---|
4537 | 5157 | {} |
---|
4538 | 5158 | }; |
---|
4539 | | - static struct coef_fw coef0292[] = { |
---|
| 5159 | + static const struct coef_fw coef0292[] = { |
---|
4540 | 5160 | WRITE_COEF(0x76, 0x000e), |
---|
4541 | 5161 | WRITE_COEF(0x6c, 0x2400), |
---|
4542 | 5162 | WRITE_COEF(0x6b, 0xc429), |
---|
4543 | 5163 | WRITE_COEF(0x18, 0x7308), |
---|
4544 | 5164 | {} |
---|
4545 | 5165 | }; |
---|
4546 | | - static struct coef_fw coef0293[] = { |
---|
| 5166 | + static const struct coef_fw coef0293[] = { |
---|
4547 | 5167 | UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */ |
---|
4548 | 5168 | WRITE_COEF(0x45, 0xC429), /* Set to TRS type */ |
---|
4549 | 5169 | UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */ |
---|
4550 | 5170 | {} |
---|
4551 | 5171 | }; |
---|
4552 | | - static struct coef_fw coef0688[] = { |
---|
| 5172 | + static const struct coef_fw coef0688[] = { |
---|
4553 | 5173 | WRITE_COEF(0x11, 0x0041), |
---|
4554 | 5174 | WRITE_COEF(0x15, 0x0d40), |
---|
4555 | 5175 | WRITE_COEF(0xb7, 0x802b), |
---|
4556 | 5176 | {} |
---|
4557 | 5177 | }; |
---|
4558 | | - static struct coef_fw coef0274[] = { |
---|
| 5178 | + static const struct coef_fw coef0274[] = { |
---|
4559 | 5179 | WRITE_COEF(0x45, 0x4289), |
---|
4560 | 5180 | UPDATE_COEF(0x4a, 0x0010, 0x0010), |
---|
4561 | 5181 | UPDATE_COEF(0x6b, 0x0f00, 0), |
---|
.. | .. |
---|
4576 | 5196 | case 0x10ec0255: |
---|
4577 | 5197 | alc_process_coef_fw(codec, coef0255); |
---|
4578 | 5198 | break; |
---|
| 5199 | + case 0x10ec0230: |
---|
4579 | 5200 | case 0x10ec0236: |
---|
4580 | 5201 | case 0x10ec0256: |
---|
| 5202 | + case 0x19e58326: |
---|
4581 | 5203 | alc_write_coef_idx(codec, 0x1b, 0x0e4b); |
---|
4582 | 5204 | alc_write_coef_idx(codec, 0x45, 0xc089); |
---|
4583 | 5205 | msleep(50); |
---|
.. | .. |
---|
4618 | 5240 | { |
---|
4619 | 5241 | int val; |
---|
4620 | 5242 | |
---|
4621 | | - static struct coef_fw coef0255[] = { |
---|
| 5243 | + static const struct coef_fw coef0255[] = { |
---|
4622 | 5244 | WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */ |
---|
4623 | 5245 | WRITE_COEF(0x1b, 0x0c2b), |
---|
4624 | 5246 | WRITE_COEFEX(0x57, 0x03, 0x8ea6), |
---|
4625 | 5247 | {} |
---|
4626 | 5248 | }; |
---|
4627 | | - static struct coef_fw coef0256[] = { |
---|
| 5249 | + static const struct coef_fw coef0256[] = { |
---|
4628 | 5250 | WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */ |
---|
4629 | 5251 | WRITE_COEF(0x1b, 0x0e6b), |
---|
4630 | 5252 | {} |
---|
4631 | 5253 | }; |
---|
4632 | | - static struct coef_fw coef0233[] = { |
---|
| 5254 | + static const struct coef_fw coef0233[] = { |
---|
4633 | 5255 | WRITE_COEF(0x45, 0xd429), |
---|
4634 | 5256 | WRITE_COEF(0x1b, 0x0c2b), |
---|
4635 | 5257 | WRITE_COEF(0x32, 0x4ea3), |
---|
4636 | 5258 | {} |
---|
4637 | 5259 | }; |
---|
4638 | | - static struct coef_fw coef0288[] = { |
---|
| 5260 | + static const struct coef_fw coef0288[] = { |
---|
4639 | 5261 | UPDATE_COEF(0x50, 0x2000, 0x2000), |
---|
4640 | 5262 | UPDATE_COEF(0x56, 0x0006, 0x0006), |
---|
4641 | 5263 | UPDATE_COEF(0x66, 0x0008, 0), |
---|
4642 | 5264 | UPDATE_COEF(0x67, 0x2000, 0), |
---|
4643 | 5265 | {} |
---|
4644 | 5266 | }; |
---|
4645 | | - static struct coef_fw coef0292[] = { |
---|
| 5267 | + static const struct coef_fw coef0292[] = { |
---|
4646 | 5268 | WRITE_COEF(0x6b, 0xd429), |
---|
4647 | 5269 | WRITE_COEF(0x76, 0x0008), |
---|
4648 | 5270 | WRITE_COEF(0x18, 0x7388), |
---|
4649 | 5271 | {} |
---|
4650 | 5272 | }; |
---|
4651 | | - static struct coef_fw coef0293[] = { |
---|
| 5273 | + static const struct coef_fw coef0293[] = { |
---|
4652 | 5274 | WRITE_COEF(0x45, 0xd429), /* Set to ctia type */ |
---|
4653 | 5275 | UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */ |
---|
4654 | 5276 | {} |
---|
4655 | 5277 | }; |
---|
4656 | | - static struct coef_fw coef0688[] = { |
---|
| 5278 | + static const struct coef_fw coef0688[] = { |
---|
4657 | 5279 | WRITE_COEF(0x11, 0x0001), |
---|
4658 | 5280 | WRITE_COEF(0x15, 0x0d60), |
---|
4659 | 5281 | WRITE_COEF(0xc3, 0x0000), |
---|
4660 | 5282 | {} |
---|
4661 | 5283 | }; |
---|
4662 | | - static struct coef_fw coef0225_1[] = { |
---|
| 5284 | + static const struct coef_fw coef0225_1[] = { |
---|
4663 | 5285 | UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10), |
---|
4664 | 5286 | UPDATE_COEF(0x63, 3<<14, 2<<14), |
---|
4665 | 5287 | {} |
---|
4666 | 5288 | }; |
---|
4667 | | - static struct coef_fw coef0225_2[] = { |
---|
| 5289 | + static const struct coef_fw coef0225_2[] = { |
---|
4668 | 5290 | UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10), |
---|
4669 | 5291 | UPDATE_COEF(0x63, 3<<14, 1<<14), |
---|
4670 | 5292 | {} |
---|
.. | .. |
---|
4674 | 5296 | case 0x10ec0255: |
---|
4675 | 5297 | alc_process_coef_fw(codec, coef0255); |
---|
4676 | 5298 | break; |
---|
| 5299 | + case 0x10ec0230: |
---|
4677 | 5300 | case 0x10ec0236: |
---|
4678 | 5301 | case 0x10ec0256: |
---|
| 5302 | + case 0x19e58326: |
---|
4679 | 5303 | alc_process_coef_fw(codec, coef0256); |
---|
4680 | 5304 | break; |
---|
4681 | 5305 | case 0x10ec0234: |
---|
.. | .. |
---|
4736 | 5360 | /* Nokia type */ |
---|
4737 | 5361 | static void alc_headset_mode_omtp(struct hda_codec *codec) |
---|
4738 | 5362 | { |
---|
4739 | | - static struct coef_fw coef0255[] = { |
---|
| 5363 | + static const struct coef_fw coef0255[] = { |
---|
4740 | 5364 | WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */ |
---|
4741 | 5365 | WRITE_COEF(0x1b, 0x0c2b), |
---|
4742 | 5366 | WRITE_COEFEX(0x57, 0x03, 0x8ea6), |
---|
4743 | 5367 | {} |
---|
4744 | 5368 | }; |
---|
4745 | | - static struct coef_fw coef0256[] = { |
---|
| 5369 | + static const struct coef_fw coef0256[] = { |
---|
4746 | 5370 | WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */ |
---|
4747 | 5371 | WRITE_COEF(0x1b, 0x0e6b), |
---|
4748 | 5372 | {} |
---|
4749 | 5373 | }; |
---|
4750 | | - static struct coef_fw coef0233[] = { |
---|
| 5374 | + static const struct coef_fw coef0233[] = { |
---|
4751 | 5375 | WRITE_COEF(0x45, 0xe429), |
---|
4752 | 5376 | WRITE_COEF(0x1b, 0x0c2b), |
---|
4753 | 5377 | WRITE_COEF(0x32, 0x4ea3), |
---|
4754 | 5378 | {} |
---|
4755 | 5379 | }; |
---|
4756 | | - static struct coef_fw coef0288[] = { |
---|
| 5380 | + static const struct coef_fw coef0288[] = { |
---|
4757 | 5381 | UPDATE_COEF(0x50, 0x2000, 0x2000), |
---|
4758 | 5382 | UPDATE_COEF(0x56, 0x0006, 0x0006), |
---|
4759 | 5383 | UPDATE_COEF(0x66, 0x0008, 0), |
---|
4760 | 5384 | UPDATE_COEF(0x67, 0x2000, 0), |
---|
4761 | 5385 | {} |
---|
4762 | 5386 | }; |
---|
4763 | | - static struct coef_fw coef0292[] = { |
---|
| 5387 | + static const struct coef_fw coef0292[] = { |
---|
4764 | 5388 | WRITE_COEF(0x6b, 0xe429), |
---|
4765 | 5389 | WRITE_COEF(0x76, 0x0008), |
---|
4766 | 5390 | WRITE_COEF(0x18, 0x7388), |
---|
4767 | 5391 | {} |
---|
4768 | 5392 | }; |
---|
4769 | | - static struct coef_fw coef0293[] = { |
---|
| 5393 | + static const struct coef_fw coef0293[] = { |
---|
4770 | 5394 | WRITE_COEF(0x45, 0xe429), /* Set to omtp type */ |
---|
4771 | 5395 | UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */ |
---|
4772 | 5396 | {} |
---|
4773 | 5397 | }; |
---|
4774 | | - static struct coef_fw coef0688[] = { |
---|
| 5398 | + static const struct coef_fw coef0688[] = { |
---|
4775 | 5399 | WRITE_COEF(0x11, 0x0001), |
---|
4776 | 5400 | WRITE_COEF(0x15, 0x0d50), |
---|
4777 | 5401 | WRITE_COEF(0xc3, 0x0000), |
---|
4778 | 5402 | {} |
---|
4779 | 5403 | }; |
---|
4780 | | - static struct coef_fw coef0225[] = { |
---|
| 5404 | + static const struct coef_fw coef0225[] = { |
---|
4781 | 5405 | UPDATE_COEF(0x45, 0x3f<<10, 0x39<<10), |
---|
4782 | 5406 | UPDATE_COEF(0x63, 3<<14, 2<<14), |
---|
4783 | 5407 | {} |
---|
.. | .. |
---|
4787 | 5411 | case 0x10ec0255: |
---|
4788 | 5412 | alc_process_coef_fw(codec, coef0255); |
---|
4789 | 5413 | break; |
---|
| 5414 | + case 0x10ec0230: |
---|
4790 | 5415 | case 0x10ec0236: |
---|
4791 | 5416 | case 0x10ec0256: |
---|
| 5417 | + case 0x19e58326: |
---|
4792 | 5418 | alc_process_coef_fw(codec, coef0256); |
---|
4793 | 5419 | break; |
---|
4794 | 5420 | case 0x10ec0234: |
---|
.. | .. |
---|
4837 | 5463 | int val; |
---|
4838 | 5464 | bool is_ctia = false; |
---|
4839 | 5465 | struct alc_spec *spec = codec->spec; |
---|
4840 | | - static struct coef_fw coef0255[] = { |
---|
| 5466 | + static const struct coef_fw coef0255[] = { |
---|
4841 | 5467 | WRITE_COEF(0x45, 0xd089), /* combo jack auto switch control(Check type)*/ |
---|
4842 | 5468 | WRITE_COEF(0x49, 0x0149), /* combo jack auto switch control(Vref |
---|
4843 | 5469 | conteol) */ |
---|
4844 | 5470 | {} |
---|
4845 | 5471 | }; |
---|
4846 | | - static struct coef_fw coef0288[] = { |
---|
| 5472 | + static const struct coef_fw coef0288[] = { |
---|
4847 | 5473 | UPDATE_COEF(0x4f, 0xfcc0, 0xd400), /* Check Type */ |
---|
4848 | 5474 | {} |
---|
4849 | 5475 | }; |
---|
4850 | | - static struct coef_fw coef0298[] = { |
---|
| 5476 | + static const struct coef_fw coef0298[] = { |
---|
4851 | 5477 | UPDATE_COEF(0x50, 0x2000, 0x2000), |
---|
4852 | 5478 | UPDATE_COEF(0x56, 0x0006, 0x0006), |
---|
4853 | 5479 | UPDATE_COEF(0x66, 0x0008, 0), |
---|
.. | .. |
---|
4855 | 5481 | UPDATE_COEF(0x19, 0x1300, 0x1300), |
---|
4856 | 5482 | {} |
---|
4857 | 5483 | }; |
---|
4858 | | - static struct coef_fw coef0293[] = { |
---|
| 5484 | + static const struct coef_fw coef0293[] = { |
---|
4859 | 5485 | UPDATE_COEF(0x4a, 0x000f, 0x0008), /* Combo Jack auto detect */ |
---|
4860 | 5486 | WRITE_COEF(0x45, 0xD429), /* Set to ctia type */ |
---|
4861 | 5487 | {} |
---|
4862 | 5488 | }; |
---|
4863 | | - static struct coef_fw coef0688[] = { |
---|
| 5489 | + static const struct coef_fw coef0688[] = { |
---|
4864 | 5490 | WRITE_COEF(0x11, 0x0001), |
---|
4865 | 5491 | WRITE_COEF(0xb7, 0x802b), |
---|
4866 | 5492 | WRITE_COEF(0x15, 0x0d60), |
---|
4867 | 5493 | WRITE_COEF(0xc3, 0x0c00), |
---|
4868 | 5494 | {} |
---|
4869 | 5495 | }; |
---|
4870 | | - static struct coef_fw coef0274[] = { |
---|
| 5496 | + static const struct coef_fw coef0274[] = { |
---|
4871 | 5497 | UPDATE_COEF(0x4a, 0x0010, 0), |
---|
4872 | 5498 | UPDATE_COEF(0x4a, 0x8000, 0), |
---|
4873 | 5499 | WRITE_COEF(0x45, 0xd289), |
---|
4874 | 5500 | UPDATE_COEF(0x49, 0x0300, 0x0300), |
---|
4875 | 5501 | {} |
---|
4876 | 5502 | }; |
---|
| 5503 | + |
---|
| 5504 | + if (spec->no_internal_mic_pin) { |
---|
| 5505 | + alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12); |
---|
| 5506 | + return; |
---|
| 5507 | + } |
---|
4877 | 5508 | |
---|
4878 | 5509 | switch (codec->core.vendor_id) { |
---|
4879 | 5510 | case 0x10ec0255: |
---|
.. | .. |
---|
4882 | 5513 | val = alc_read_coef_idx(codec, 0x46); |
---|
4883 | 5514 | is_ctia = (val & 0x0070) == 0x0070; |
---|
4884 | 5515 | break; |
---|
| 5516 | + case 0x10ec0230: |
---|
4885 | 5517 | case 0x10ec0236: |
---|
4886 | 5518 | case 0x10ec0256: |
---|
| 5519 | + case 0x19e58326: |
---|
4887 | 5520 | alc_write_coef_idx(codec, 0x1b, 0x0e4b); |
---|
4888 | 5521 | alc_write_coef_idx(codec, 0x06, 0x6104); |
---|
4889 | 5522 | alc_write_coefex_idx(codec, 0x57, 0x3, 0x09a3); |
---|
.. | .. |
---|
5051 | 5684 | switch (new_headset_mode) { |
---|
5052 | 5685 | case ALC_HEADSET_MODE_UNPLUGGED: |
---|
5053 | 5686 | alc_headset_mode_unplugged(codec); |
---|
| 5687 | + spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN; |
---|
| 5688 | + spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN; |
---|
5054 | 5689 | spec->gen.hp_jack_present = false; |
---|
5055 | 5690 | break; |
---|
5056 | 5691 | case ALC_HEADSET_MODE_HEADSET: |
---|
.. | .. |
---|
5093 | 5728 | static void alc_update_headset_jack_cb(struct hda_codec *codec, |
---|
5094 | 5729 | struct hda_jack_callback *jack) |
---|
5095 | 5730 | { |
---|
5096 | | - struct alc_spec *spec = codec->spec; |
---|
5097 | | - spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN; |
---|
5098 | 5731 | snd_hda_gen_hp_automute(codec, jack); |
---|
5099 | 5732 | alc_update_headset_mode(codec); |
---|
5100 | 5733 | } |
---|
.. | .. |
---|
5132 | 5765 | alc_probe_headset_mode(codec); |
---|
5133 | 5766 | break; |
---|
5134 | 5767 | case HDA_FIXUP_ACT_INIT: |
---|
5135 | | - spec->current_headset_mode = 0; |
---|
| 5768 | + if (is_s3_resume(codec) || is_s4_resume(codec)) { |
---|
| 5769 | + spec->current_headset_mode = ALC_HEADSET_MODE_UNKNOWN; |
---|
| 5770 | + spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN; |
---|
| 5771 | + } |
---|
5136 | 5772 | alc_update_headset_mode(codec); |
---|
5137 | 5773 | break; |
---|
5138 | 5774 | } |
---|
.. | .. |
---|
5152 | 5788 | static void alc255_set_default_jack_type(struct hda_codec *codec) |
---|
5153 | 5789 | { |
---|
5154 | 5790 | /* Set to iphone type */ |
---|
5155 | | - static struct coef_fw alc255fw[] = { |
---|
| 5791 | + static const struct coef_fw alc255fw[] = { |
---|
5156 | 5792 | WRITE_COEF(0x1b, 0x880b), |
---|
5157 | 5793 | WRITE_COEF(0x45, 0xd089), |
---|
5158 | 5794 | WRITE_COEF(0x1b, 0x080b), |
---|
.. | .. |
---|
5160 | 5796 | WRITE_COEF(0x1b, 0x0c0b), |
---|
5161 | 5797 | {} |
---|
5162 | 5798 | }; |
---|
5163 | | - static struct coef_fw alc256fw[] = { |
---|
| 5799 | + static const struct coef_fw alc256fw[] = { |
---|
5164 | 5800 | WRITE_COEF(0x1b, 0x884b), |
---|
5165 | 5801 | WRITE_COEF(0x45, 0xd089), |
---|
5166 | 5802 | WRITE_COEF(0x1b, 0x084b), |
---|
.. | .. |
---|
5172 | 5808 | case 0x10ec0255: |
---|
5173 | 5809 | alc_process_coef_fw(codec, alc255fw); |
---|
5174 | 5810 | break; |
---|
| 5811 | + case 0x10ec0230: |
---|
5175 | 5812 | case 0x10ec0236: |
---|
5176 | 5813 | case 0x10ec0256: |
---|
| 5814 | + case 0x19e58326: |
---|
5177 | 5815 | alc_process_coef_fw(codec, alc256fw); |
---|
5178 | 5816 | break; |
---|
5179 | 5817 | } |
---|
.. | .. |
---|
5301 | 5939 | * the speaker output becomes too low by some reason on Thinkpads with |
---|
5302 | 5940 | * ALC298 codec |
---|
5303 | 5941 | */ |
---|
5304 | | - static hda_nid_t preferred_pairs[] = { |
---|
| 5942 | + static const hda_nid_t preferred_pairs[] = { |
---|
5305 | 5943 | 0x14, 0x03, 0x17, 0x02, 0x21, 0x02, |
---|
5306 | 5944 | 0 |
---|
| 5945 | + }; |
---|
| 5946 | + struct alc_spec *spec = codec->spec; |
---|
| 5947 | + |
---|
| 5948 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) |
---|
| 5949 | + spec->gen.preferred_dacs = preferred_pairs; |
---|
| 5950 | +} |
---|
| 5951 | + |
---|
| 5952 | +static void alc295_fixup_asus_dacs(struct hda_codec *codec, |
---|
| 5953 | + const struct hda_fixup *fix, int action) |
---|
| 5954 | +{ |
---|
| 5955 | + static const hda_nid_t preferred_pairs[] = { |
---|
| 5956 | + 0x17, 0x02, 0x21, 0x03, 0 |
---|
5307 | 5957 | }; |
---|
5308 | 5958 | struct alc_spec *spec = codec->spec; |
---|
5309 | 5959 | |
---|
.. | .. |
---|
5552 | 6202 | /* DAC node 0x03 is giving mono output. We therefore want to |
---|
5553 | 6203 | make sure 0x14 (front speaker) and 0x15 (headphones) use the |
---|
5554 | 6204 | 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); |
---|
| 6205 | + static const hda_nid_t conn1[] = { 0x0c }; |
---|
| 6206 | + snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn1), conn1); |
---|
| 6207 | + snd_hda_override_conn_list(codec, 0x15, ARRAY_SIZE(conn1), conn1); |
---|
5558 | 6208 | } |
---|
5559 | 6209 | } |
---|
5560 | 6210 | |
---|
.. | .. |
---|
5569 | 6219 | Pin Complex), since Node 0x02 has Amp-out caps, we can adjust |
---|
5570 | 6220 | speaker's volume now. */ |
---|
5571 | 6221 | |
---|
5572 | | - hda_nid_t conn1[1] = { 0x0c }; |
---|
5573 | | - snd_hda_override_conn_list(codec, 0x17, 1, conn1); |
---|
| 6222 | + static const hda_nid_t conn1[] = { 0x0c }; |
---|
| 6223 | + snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn1), conn1); |
---|
5574 | 6224 | } |
---|
5575 | 6225 | } |
---|
5576 | 6226 | |
---|
.. | .. |
---|
5579 | 6229 | const struct hda_fixup *fix, int action) |
---|
5580 | 6230 | { |
---|
5581 | 6231 | 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); |
---|
| 6232 | + static const hda_nid_t conn[] = { 0x02, 0x03 }; |
---|
| 6233 | + snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); |
---|
5584 | 6234 | } |
---|
5585 | 6235 | } |
---|
5586 | 6236 | |
---|
.. | .. |
---|
5589 | 6239 | const struct hda_fixup *fix, int action) |
---|
5590 | 6240 | { |
---|
5591 | 6241 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
5592 | | - hda_nid_t conn[1] = { 0x02 }; |
---|
5593 | | - snd_hda_override_conn_list(codec, 0x17, 1, conn); |
---|
| 6242 | + static const hda_nid_t conn[] = { 0x02 }; |
---|
| 6243 | + snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); |
---|
5594 | 6244 | } |
---|
5595 | 6245 | } |
---|
5596 | 6246 | |
---|
.. | .. |
---|
5640 | 6290 | } |
---|
5641 | 6291 | } |
---|
5642 | 6292 | |
---|
| 6293 | +/* Quirk for Thinkpad X1 7th and 8th Gen |
---|
| 6294 | + * The following fixed routing needed |
---|
| 6295 | + * DAC1 (NID 0x02) -> Speaker (NID 0x14); some eq applied secretly |
---|
| 6296 | + * DAC2 (NID 0x03) -> Bass (NID 0x17) & Headphone (NID 0x21); sharing a DAC |
---|
| 6297 | + * DAC3 (NID 0x06) -> Unused, due to the lack of volume amp |
---|
| 6298 | + */ |
---|
| 6299 | +static void alc285_fixup_thinkpad_x1_gen7(struct hda_codec *codec, |
---|
| 6300 | + const struct hda_fixup *fix, int action) |
---|
| 6301 | +{ |
---|
| 6302 | + static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */ |
---|
| 6303 | + static const hda_nid_t preferred_pairs[] = { |
---|
| 6304 | + 0x14, 0x02, 0x17, 0x03, 0x21, 0x03, 0 |
---|
| 6305 | + }; |
---|
| 6306 | + struct alc_spec *spec = codec->spec; |
---|
| 6307 | + |
---|
| 6308 | + switch (action) { |
---|
| 6309 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 6310 | + snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); |
---|
| 6311 | + spec->gen.preferred_dacs = preferred_pairs; |
---|
| 6312 | + break; |
---|
| 6313 | + case HDA_FIXUP_ACT_BUILD: |
---|
| 6314 | + /* The generic parser creates somewhat unintuitive volume ctls |
---|
| 6315 | + * with the fixed routing above, and the shared DAC2 may be |
---|
| 6316 | + * confusing for PA. |
---|
| 6317 | + * Rename those to unique names so that PA doesn't touch them |
---|
| 6318 | + * and use only Master volume. |
---|
| 6319 | + */ |
---|
| 6320 | + rename_ctl(codec, "Front Playback Volume", "DAC1 Playback Volume"); |
---|
| 6321 | + rename_ctl(codec, "Bass Speaker Playback Volume", "DAC2 Playback Volume"); |
---|
| 6322 | + break; |
---|
| 6323 | + } |
---|
| 6324 | +} |
---|
| 6325 | + |
---|
5643 | 6326 | static void alc233_alc662_fixup_lenovo_dual_codecs(struct hda_codec *codec, |
---|
5644 | 6327 | const struct hda_fixup *fix, |
---|
5645 | 6328 | int action) |
---|
.. | .. |
---|
5678 | 6361 | const struct hda_fixup *fix, int action) |
---|
5679 | 6362 | { |
---|
5680 | 6363 | struct alc_spec *spec = codec->spec; |
---|
5681 | | - static hda_nid_t preferred_pairs[] = { |
---|
| 6364 | + static const hda_nid_t preferred_pairs[] = { |
---|
5682 | 6365 | 0x21, 0x03, 0x1b, 0x03, 0x16, 0x02, |
---|
5683 | 6366 | 0 |
---|
5684 | 6367 | }; |
---|
.. | .. |
---|
5691 | 6374 | codec->power_save_node = 0; |
---|
5692 | 6375 | } |
---|
5693 | 6376 | |
---|
| 6377 | +/* avoid DAC 0x06 for bass speaker 0x17; it has no volume control */ |
---|
| 6378 | +static void alc289_fixup_asus_ga401(struct hda_codec *codec, |
---|
| 6379 | + const struct hda_fixup *fix, int action) |
---|
| 6380 | +{ |
---|
| 6381 | + static const hda_nid_t preferred_pairs[] = { |
---|
| 6382 | + 0x14, 0x02, 0x17, 0x02, 0x21, 0x03, 0 |
---|
| 6383 | + }; |
---|
| 6384 | + struct alc_spec *spec = codec->spec; |
---|
| 6385 | + |
---|
| 6386 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
| 6387 | + spec->gen.preferred_dacs = preferred_pairs; |
---|
| 6388 | + spec->gen.obey_preferred_dacs = 1; |
---|
| 6389 | + } |
---|
| 6390 | +} |
---|
| 6391 | + |
---|
5694 | 6392 | /* The DAC of NID 0x3 will introduce click/pop noise on headphones, so invalidate it */ |
---|
5695 | 6393 | static void alc285_fixup_invalidate_dacs(struct hda_codec *codec, |
---|
5696 | 6394 | const struct hda_fixup *fix, int action) |
---|
.. | .. |
---|
5701 | 6399 | snd_hda_override_wcaps(codec, 0x03, 0); |
---|
5702 | 6400 | } |
---|
5703 | 6401 | |
---|
| 6402 | +static void alc_combo_jack_hp_jd_restart(struct hda_codec *codec) |
---|
| 6403 | +{ |
---|
| 6404 | + switch (codec->core.vendor_id) { |
---|
| 6405 | + case 0x10ec0274: |
---|
| 6406 | + case 0x10ec0294: |
---|
| 6407 | + case 0x10ec0225: |
---|
| 6408 | + case 0x10ec0295: |
---|
| 6409 | + case 0x10ec0299: |
---|
| 6410 | + alc_update_coef_idx(codec, 0x4a, 0x8000, 1 << 15); /* Reset HP JD */ |
---|
| 6411 | + alc_update_coef_idx(codec, 0x4a, 0x8000, 0 << 15); |
---|
| 6412 | + break; |
---|
| 6413 | + case 0x10ec0230: |
---|
| 6414 | + case 0x10ec0235: |
---|
| 6415 | + case 0x10ec0236: |
---|
| 6416 | + case 0x10ec0255: |
---|
| 6417 | + case 0x10ec0256: |
---|
| 6418 | + case 0x19e58326: |
---|
| 6419 | + alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */ |
---|
| 6420 | + alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15); |
---|
| 6421 | + break; |
---|
| 6422 | + } |
---|
| 6423 | +} |
---|
| 6424 | + |
---|
| 6425 | +static void alc295_fixup_chromebook(struct hda_codec *codec, |
---|
| 6426 | + const struct hda_fixup *fix, int action) |
---|
| 6427 | +{ |
---|
| 6428 | + struct alc_spec *spec = codec->spec; |
---|
| 6429 | + |
---|
| 6430 | + switch (action) { |
---|
| 6431 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 6432 | + spec->ultra_low_power = true; |
---|
| 6433 | + break; |
---|
| 6434 | + case HDA_FIXUP_ACT_INIT: |
---|
| 6435 | + alc_combo_jack_hp_jd_restart(codec); |
---|
| 6436 | + break; |
---|
| 6437 | + } |
---|
| 6438 | +} |
---|
| 6439 | + |
---|
5704 | 6440 | static void alc_fixup_disable_mic_vref(struct hda_codec *codec, |
---|
5705 | 6441 | const struct hda_fixup *fix, int action) |
---|
5706 | 6442 | { |
---|
5707 | 6443 | if (action == HDA_FIXUP_ACT_PRE_PROBE) |
---|
5708 | 6444 | snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ); |
---|
| 6445 | +} |
---|
| 6446 | + |
---|
| 6447 | + |
---|
| 6448 | +static void alc294_gx502_toggle_output(struct hda_codec *codec, |
---|
| 6449 | + struct hda_jack_callback *cb) |
---|
| 6450 | +{ |
---|
| 6451 | + /* The Windows driver sets the codec up in a very different way where |
---|
| 6452 | + * it appears to leave 0x10 = 0x8a20 set. For Linux we need to toggle it |
---|
| 6453 | + */ |
---|
| 6454 | + if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT) |
---|
| 6455 | + alc_write_coef_idx(codec, 0x10, 0x8a20); |
---|
| 6456 | + else |
---|
| 6457 | + alc_write_coef_idx(codec, 0x10, 0x0a20); |
---|
| 6458 | +} |
---|
| 6459 | + |
---|
| 6460 | +static void alc294_fixup_gx502_hp(struct hda_codec *codec, |
---|
| 6461 | + const struct hda_fixup *fix, int action) |
---|
| 6462 | +{ |
---|
| 6463 | + /* Pin 0x21: headphones/headset mic */ |
---|
| 6464 | + if (!is_jack_detectable(codec, 0x21)) |
---|
| 6465 | + return; |
---|
| 6466 | + |
---|
| 6467 | + switch (action) { |
---|
| 6468 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 6469 | + snd_hda_jack_detect_enable_callback(codec, 0x21, |
---|
| 6470 | + alc294_gx502_toggle_output); |
---|
| 6471 | + break; |
---|
| 6472 | + case HDA_FIXUP_ACT_INIT: |
---|
| 6473 | + /* Make sure to start in a correct state, i.e. if |
---|
| 6474 | + * headphones have been plugged in before powering up the system |
---|
| 6475 | + */ |
---|
| 6476 | + alc294_gx502_toggle_output(codec, NULL); |
---|
| 6477 | + break; |
---|
| 6478 | + } |
---|
| 6479 | +} |
---|
| 6480 | + |
---|
| 6481 | +static void alc294_gu502_toggle_output(struct hda_codec *codec, |
---|
| 6482 | + struct hda_jack_callback *cb) |
---|
| 6483 | +{ |
---|
| 6484 | + /* Windows sets 0x10 to 0x8420 for Node 0x20 which is |
---|
| 6485 | + * responsible from changes between speakers and headphones |
---|
| 6486 | + */ |
---|
| 6487 | + if (snd_hda_jack_detect_state(codec, 0x21) == HDA_JACK_PRESENT) |
---|
| 6488 | + alc_write_coef_idx(codec, 0x10, 0x8420); |
---|
| 6489 | + else |
---|
| 6490 | + alc_write_coef_idx(codec, 0x10, 0x0a20); |
---|
| 6491 | +} |
---|
| 6492 | + |
---|
| 6493 | +static void alc294_fixup_gu502_hp(struct hda_codec *codec, |
---|
| 6494 | + const struct hda_fixup *fix, int action) |
---|
| 6495 | +{ |
---|
| 6496 | + if (!is_jack_detectable(codec, 0x21)) |
---|
| 6497 | + return; |
---|
| 6498 | + |
---|
| 6499 | + switch (action) { |
---|
| 6500 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 6501 | + snd_hda_jack_detect_enable_callback(codec, 0x21, |
---|
| 6502 | + alc294_gu502_toggle_output); |
---|
| 6503 | + break; |
---|
| 6504 | + case HDA_FIXUP_ACT_INIT: |
---|
| 6505 | + alc294_gu502_toggle_output(codec, NULL); |
---|
| 6506 | + break; |
---|
| 6507 | + } |
---|
| 6508 | +} |
---|
| 6509 | + |
---|
| 6510 | +static void alc285_fixup_hp_gpio_amp_init(struct hda_codec *codec, |
---|
| 6511 | + const struct hda_fixup *fix, int action) |
---|
| 6512 | +{ |
---|
| 6513 | + if (action != HDA_FIXUP_ACT_INIT) |
---|
| 6514 | + return; |
---|
| 6515 | + |
---|
| 6516 | + msleep(100); |
---|
| 6517 | + alc_write_coef_idx(codec, 0x65, 0x0); |
---|
| 6518 | +} |
---|
| 6519 | + |
---|
| 6520 | +static void alc274_fixup_hp_headset_mic(struct hda_codec *codec, |
---|
| 6521 | + const struct hda_fixup *fix, int action) |
---|
| 6522 | +{ |
---|
| 6523 | + switch (action) { |
---|
| 6524 | + case HDA_FIXUP_ACT_INIT: |
---|
| 6525 | + alc_combo_jack_hp_jd_restart(codec); |
---|
| 6526 | + break; |
---|
| 6527 | + } |
---|
| 6528 | +} |
---|
| 6529 | + |
---|
| 6530 | +static void alc_fixup_no_int_mic(struct hda_codec *codec, |
---|
| 6531 | + const struct hda_fixup *fix, int action) |
---|
| 6532 | +{ |
---|
| 6533 | + struct alc_spec *spec = codec->spec; |
---|
| 6534 | + |
---|
| 6535 | + switch (action) { |
---|
| 6536 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 6537 | + /* Mic RING SLEEVE swap for combo jack */ |
---|
| 6538 | + alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12); |
---|
| 6539 | + spec->no_internal_mic_pin = true; |
---|
| 6540 | + break; |
---|
| 6541 | + case HDA_FIXUP_ACT_INIT: |
---|
| 6542 | + alc_combo_jack_hp_jd_restart(codec); |
---|
| 6543 | + break; |
---|
| 6544 | + } |
---|
| 6545 | +} |
---|
| 6546 | + |
---|
| 6547 | +/* GPIO1 = amplifier on/off |
---|
| 6548 | + * GPIO3 = mic mute LED |
---|
| 6549 | + */ |
---|
| 6550 | +static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec, |
---|
| 6551 | + const struct hda_fixup *fix, int action) |
---|
| 6552 | +{ |
---|
| 6553 | + static const hda_nid_t conn[] = { 0x02 }; |
---|
| 6554 | + |
---|
| 6555 | + struct alc_spec *spec = codec->spec; |
---|
| 6556 | + static const struct hda_pintbl pincfgs[] = { |
---|
| 6557 | + { 0x14, 0x90170110 }, /* front/high speakers */ |
---|
| 6558 | + { 0x17, 0x90170130 }, /* back/bass speakers */ |
---|
| 6559 | + { } |
---|
| 6560 | + }; |
---|
| 6561 | + |
---|
| 6562 | + //enable micmute led |
---|
| 6563 | + alc_fixup_hp_gpio_led(codec, action, 0x00, 0x04); |
---|
| 6564 | + |
---|
| 6565 | + switch (action) { |
---|
| 6566 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 6567 | + spec->micmute_led_polarity = 1; |
---|
| 6568 | + /* needed for amp of back speakers */ |
---|
| 6569 | + spec->gpio_mask |= 0x01; |
---|
| 6570 | + spec->gpio_dir |= 0x01; |
---|
| 6571 | + snd_hda_apply_pincfgs(codec, pincfgs); |
---|
| 6572 | + /* share DAC to have unified volume control */ |
---|
| 6573 | + snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn); |
---|
| 6574 | + snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); |
---|
| 6575 | + break; |
---|
| 6576 | + case HDA_FIXUP_ACT_INIT: |
---|
| 6577 | + /* need to toggle GPIO to enable the amp of back speakers */ |
---|
| 6578 | + alc_update_gpio_data(codec, 0x01, true); |
---|
| 6579 | + msleep(100); |
---|
| 6580 | + alc_update_gpio_data(codec, 0x01, false); |
---|
| 6581 | + break; |
---|
| 6582 | + } |
---|
| 6583 | +} |
---|
| 6584 | + |
---|
| 6585 | +static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec, |
---|
| 6586 | + const struct hda_fixup *fix, int action) |
---|
| 6587 | +{ |
---|
| 6588 | + static const hda_nid_t conn[] = { 0x02 }; |
---|
| 6589 | + static const struct hda_pintbl pincfgs[] = { |
---|
| 6590 | + { 0x14, 0x90170110 }, /* rear speaker */ |
---|
| 6591 | + { } |
---|
| 6592 | + }; |
---|
| 6593 | + |
---|
| 6594 | + switch (action) { |
---|
| 6595 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 6596 | + snd_hda_apply_pincfgs(codec, pincfgs); |
---|
| 6597 | + /* force front speaker to DAC1 */ |
---|
| 6598 | + snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); |
---|
| 6599 | + break; |
---|
| 6600 | + } |
---|
5709 | 6601 | } |
---|
5710 | 6602 | |
---|
5711 | 6603 | /* for hda_fixup_thinkpad_acpi() */ |
---|
.. | .. |
---|
5718 | 6610 | hda_fixup_thinkpad_acpi(codec, fix, action); |
---|
5719 | 6611 | } |
---|
5720 | 6612 | |
---|
5721 | | -/* for dell wmi mic mute led */ |
---|
5722 | | -#include "dell_wmi_helper.c" |
---|
| 6613 | +/* Fixup for Lenovo Legion 15IMHg05 speaker output on headset removal. */ |
---|
| 6614 | +static void alc287_fixup_legion_15imhg05_speakers(struct hda_codec *codec, |
---|
| 6615 | + const struct hda_fixup *fix, |
---|
| 6616 | + int action) |
---|
| 6617 | +{ |
---|
| 6618 | + struct alc_spec *spec = codec->spec; |
---|
| 6619 | + |
---|
| 6620 | + switch (action) { |
---|
| 6621 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 6622 | + spec->gen.suppress_auto_mute = 1; |
---|
| 6623 | + break; |
---|
| 6624 | + } |
---|
| 6625 | +} |
---|
5723 | 6626 | |
---|
5724 | 6627 | /* for alc295_fixup_hp_top_speakers */ |
---|
5725 | 6628 | #include "hp_x360_helper.c" |
---|
| 6629 | + |
---|
| 6630 | +/* for alc285_fixup_ideapad_s740_coef() */ |
---|
| 6631 | +#include "ideapad_s740_helper.c" |
---|
| 6632 | + |
---|
| 6633 | +static const struct coef_fw alc256_fixup_set_coef_defaults_coefs[] = { |
---|
| 6634 | + WRITE_COEF(0x10, 0x0020), WRITE_COEF(0x24, 0x0000), |
---|
| 6635 | + WRITE_COEF(0x26, 0x0000), WRITE_COEF(0x29, 0x3000), |
---|
| 6636 | + WRITE_COEF(0x37, 0xfe05), WRITE_COEF(0x45, 0x5089), |
---|
| 6637 | + {} |
---|
| 6638 | +}; |
---|
| 6639 | + |
---|
| 6640 | +static void alc256_fixup_set_coef_defaults(struct hda_codec *codec, |
---|
| 6641 | + const struct hda_fixup *fix, |
---|
| 6642 | + int action) |
---|
| 6643 | +{ |
---|
| 6644 | + /* |
---|
| 6645 | + * A certain other OS sets these coeffs to different values. On at least |
---|
| 6646 | + * one TongFang barebone these settings might survive even a cold |
---|
| 6647 | + * reboot. So to restore a clean slate the values are explicitly reset |
---|
| 6648 | + * to default here. Without this, the external microphone is always in a |
---|
| 6649 | + * plugged-in state, while the internal microphone is always in an |
---|
| 6650 | + * unplugged state, breaking the ability to use the internal microphone. |
---|
| 6651 | + */ |
---|
| 6652 | + alc_process_coef_fw(codec, alc256_fixup_set_coef_defaults_coefs); |
---|
| 6653 | +} |
---|
| 6654 | + |
---|
| 6655 | +static const struct coef_fw alc233_fixup_no_audio_jack_coefs[] = { |
---|
| 6656 | + WRITE_COEF(0x1a, 0x9003), WRITE_COEF(0x1b, 0x0e2b), WRITE_COEF(0x37, 0xfe06), |
---|
| 6657 | + WRITE_COEF(0x38, 0x4981), WRITE_COEF(0x45, 0xd489), WRITE_COEF(0x46, 0x0074), |
---|
| 6658 | + WRITE_COEF(0x49, 0x0149), |
---|
| 6659 | + {} |
---|
| 6660 | +}; |
---|
| 6661 | + |
---|
| 6662 | +static void alc233_fixup_no_audio_jack(struct hda_codec *codec, |
---|
| 6663 | + const struct hda_fixup *fix, |
---|
| 6664 | + int action) |
---|
| 6665 | +{ |
---|
| 6666 | + /* |
---|
| 6667 | + * The audio jack input and output is not detected on the ASRock NUC Box |
---|
| 6668 | + * 1100 series when cold booting without this fix. Warm rebooting from a |
---|
| 6669 | + * certain other OS makes the audio functional, as COEF settings are |
---|
| 6670 | + * preserved in this case. This fix sets these altered COEF values as |
---|
| 6671 | + * the default. |
---|
| 6672 | + */ |
---|
| 6673 | + alc_process_coef_fw(codec, alc233_fixup_no_audio_jack_coefs); |
---|
| 6674 | +} |
---|
| 6675 | + |
---|
| 6676 | +static void alc256_fixup_mic_no_presence_and_resume(struct hda_codec *codec, |
---|
| 6677 | + const struct hda_fixup *fix, |
---|
| 6678 | + int action) |
---|
| 6679 | +{ |
---|
| 6680 | + /* |
---|
| 6681 | + * The Clevo NJ51CU comes either with the ALC293 or the ALC256 codec, |
---|
| 6682 | + * but uses the 0x8686 subproduct id in both cases. The ALC256 codec |
---|
| 6683 | + * needs an additional quirk for sound working after suspend and resume. |
---|
| 6684 | + */ |
---|
| 6685 | + if (codec->core.vendor_id == 0x10ec0256) { |
---|
| 6686 | + alc_update_coef_idx(codec, 0x10, 1<<9, 0); |
---|
| 6687 | + snd_hda_codec_set_pincfg(codec, 0x19, 0x04a11120); |
---|
| 6688 | + } else { |
---|
| 6689 | + snd_hda_codec_set_pincfg(codec, 0x1a, 0x04a1113c); |
---|
| 6690 | + } |
---|
| 6691 | +} |
---|
| 6692 | + |
---|
| 6693 | +static void alc295_fixup_dell_inspiron_top_speakers(struct hda_codec *codec, |
---|
| 6694 | + const struct hda_fixup *fix, int action) |
---|
| 6695 | +{ |
---|
| 6696 | + static const struct hda_pintbl pincfgs[] = { |
---|
| 6697 | + { 0x14, 0x90170151 }, |
---|
| 6698 | + { 0x17, 0x90170150 }, |
---|
| 6699 | + { } |
---|
| 6700 | + }; |
---|
| 6701 | + static const hda_nid_t conn[] = { 0x02, 0x03 }; |
---|
| 6702 | + static const hda_nid_t preferred_pairs[] = { |
---|
| 6703 | + 0x14, 0x02, |
---|
| 6704 | + 0x17, 0x03, |
---|
| 6705 | + 0x21, 0x02, |
---|
| 6706 | + 0 |
---|
| 6707 | + }; |
---|
| 6708 | + struct alc_spec *spec = codec->spec; |
---|
| 6709 | + |
---|
| 6710 | + alc_fixup_no_shutup(codec, fix, action); |
---|
| 6711 | + |
---|
| 6712 | + switch (action) { |
---|
| 6713 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 6714 | + snd_hda_apply_pincfgs(codec, pincfgs); |
---|
| 6715 | + snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); |
---|
| 6716 | + spec->gen.preferred_dacs = preferred_pairs; |
---|
| 6717 | + break; |
---|
| 6718 | + } |
---|
| 6719 | +} |
---|
5726 | 6720 | |
---|
5727 | 6721 | enum { |
---|
5728 | 6722 | ALC269_FIXUP_GPIO2, |
---|
.. | .. |
---|
5778 | 6772 | ALC269_FIXUP_LIMIT_INT_MIC_BOOST, |
---|
5779 | 6773 | ALC269VB_FIXUP_ASUS_ZENBOOK, |
---|
5780 | 6774 | ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A, |
---|
| 6775 | + ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE, |
---|
5781 | 6776 | ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED, |
---|
5782 | 6777 | ALC269VB_FIXUP_ORDISSIMO_EVE2, |
---|
5783 | 6778 | ALC283_FIXUP_CHROME_BOOK, |
---|
.. | .. |
---|
5800 | 6795 | ALC292_FIXUP_TPT440_DOCK, |
---|
5801 | 6796 | ALC292_FIXUP_TPT440, |
---|
5802 | 6797 | ALC283_FIXUP_HEADSET_MIC, |
---|
5803 | | - ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED, |
---|
| 6798 | + ALC255_FIXUP_MIC_MUTE_LED, |
---|
5804 | 6799 | ALC282_FIXUP_ASPIRE_V5_PINS, |
---|
| 6800 | + ALC269VB_FIXUP_ASPIRE_E1_COEF, |
---|
5805 | 6801 | ALC280_FIXUP_HP_GPIO4, |
---|
5806 | 6802 | ALC286_FIXUP_HP_GPIO_LED, |
---|
5807 | 6803 | ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, |
---|
5808 | 6804 | ALC280_FIXUP_HP_DOCK_PINS, |
---|
5809 | 6805 | ALC269_FIXUP_HP_DOCK_GPIO_MIC1_LED, |
---|
5810 | 6806 | ALC280_FIXUP_HP_9480M, |
---|
| 6807 | + ALC245_FIXUP_HP_X360_AMP, |
---|
| 6808 | + ALC285_FIXUP_HP_SPECTRE_X360_EB1, |
---|
5811 | 6809 | ALC288_FIXUP_DELL_HEADSET_MODE, |
---|
5812 | 6810 | ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
5813 | 6811 | ALC288_FIXUP_DELL_XPS_13, |
---|
5814 | 6812 | ALC288_FIXUP_DISABLE_AAMIX, |
---|
| 6813 | + ALC292_FIXUP_DELL_E7X_AAMIX, |
---|
5815 | 6814 | ALC292_FIXUP_DELL_E7X, |
---|
5816 | 6815 | ALC292_FIXUP_DISABLE_AAMIX, |
---|
5817 | 6816 | ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK, |
---|
| 6817 | + ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE, |
---|
5818 | 6818 | ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
5819 | 6819 | ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE, |
---|
5820 | 6820 | ALC275_FIXUP_DELL_XPS, |
---|
.. | .. |
---|
5832 | 6832 | ALC298_FIXUP_LENOVO_SPK_VOLUME, |
---|
5833 | 6833 | ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER, |
---|
5834 | 6834 | ALC269_FIXUP_ATIV_BOOK_8, |
---|
| 6835 | + ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE, |
---|
5835 | 6836 | ALC221_FIXUP_HP_MIC_NO_PRESENCE, |
---|
5836 | 6837 | ALC256_FIXUP_ASUS_HEADSET_MODE, |
---|
5837 | 6838 | ALC256_FIXUP_ASUS_MIC, |
---|
.. | .. |
---|
5850 | 6851 | ALC298_FIXUP_TPT470_DOCK, |
---|
5851 | 6852 | ALC255_FIXUP_DUMMY_LINEOUT_VERB, |
---|
5852 | 6853 | ALC255_FIXUP_DELL_HEADSET_MIC, |
---|
5853 | | - ALC256_FIXUP_HUAWEI_MBXP_PINS, |
---|
| 6854 | + ALC256_FIXUP_HUAWEI_MACH_WX9_PINS, |
---|
| 6855 | + ALC298_FIXUP_HUAWEI_MBX_STEREO, |
---|
5854 | 6856 | ALC295_FIXUP_HP_X360, |
---|
5855 | 6857 | ALC221_FIXUP_HP_HEADSET_MIC, |
---|
5856 | 6858 | ALC285_FIXUP_LENOVO_HEADPHONE_NOISE, |
---|
.. | .. |
---|
5862 | 6864 | ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE, |
---|
5863 | 6865 | ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE, |
---|
5864 | 6866 | ALC255_FIXUP_ACER_HEADSET_MIC, |
---|
| 6867 | + ALC295_FIXUP_CHROME_BOOK, |
---|
| 6868 | + ALC225_FIXUP_HEADSET_JACK, |
---|
5865 | 6869 | ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE, |
---|
5866 | 6870 | ALC225_FIXUP_WYSE_AUTO_MUTE, |
---|
5867 | 6871 | ALC225_FIXUP_WYSE_DISABLE_MIC_VREF, |
---|
.. | .. |
---|
5874 | 6878 | ALC289_FIXUP_DUAL_SPK, |
---|
5875 | 6879 | ALC294_FIXUP_SPK2_TO_DAC1, |
---|
5876 | 6880 | ALC294_FIXUP_ASUS_DUAL_SPK, |
---|
| 6881 | + ALC285_FIXUP_THINKPAD_X1_GEN7, |
---|
| 6882 | + ALC285_FIXUP_THINKPAD_HEADSET_JACK, |
---|
5877 | 6883 | ALC294_FIXUP_ASUS_HPE, |
---|
| 6884 | + ALC294_FIXUP_ASUS_COEF_1B, |
---|
| 6885 | + ALC294_FIXUP_ASUS_GX502_HP, |
---|
| 6886 | + ALC294_FIXUP_ASUS_GX502_PINS, |
---|
| 6887 | + ALC294_FIXUP_ASUS_GX502_VERBS, |
---|
| 6888 | + ALC294_FIXUP_ASUS_GU502_HP, |
---|
| 6889 | + ALC294_FIXUP_ASUS_GU502_PINS, |
---|
| 6890 | + ALC294_FIXUP_ASUS_GU502_VERBS, |
---|
| 6891 | + ALC294_FIXUP_ASUS_G513_PINS, |
---|
| 6892 | + ALC285_FIXUP_ASUS_G533Z_PINS, |
---|
5878 | 6893 | ALC285_FIXUP_HP_GPIO_LED, |
---|
| 6894 | + ALC285_FIXUP_HP_MUTE_LED, |
---|
| 6895 | + ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED, |
---|
| 6896 | + ALC236_FIXUP_HP_MUTE_LED_COEFBIT2, |
---|
| 6897 | + ALC236_FIXUP_HP_GPIO_LED, |
---|
| 6898 | + ALC236_FIXUP_HP_MUTE_LED, |
---|
| 6899 | + ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF, |
---|
| 6900 | + ALC298_FIXUP_SAMSUNG_AMP, |
---|
| 6901 | + ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, |
---|
| 6902 | + ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, |
---|
| 6903 | + ALC295_FIXUP_ASUS_MIC_NO_PRESENCE, |
---|
| 6904 | + ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS, |
---|
| 6905 | + ALC269VC_FIXUP_ACER_HEADSET_MIC, |
---|
| 6906 | + ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE, |
---|
| 6907 | + ALC289_FIXUP_ASUS_GA401, |
---|
| 6908 | + ALC289_FIXUP_ASUS_GA502, |
---|
| 6909 | + ALC256_FIXUP_ACER_MIC_NO_PRESENCE, |
---|
| 6910 | + ALC285_FIXUP_HP_GPIO_AMP_INIT, |
---|
| 6911 | + ALC269_FIXUP_CZC_B20, |
---|
| 6912 | + ALC269_FIXUP_CZC_TMI, |
---|
| 6913 | + ALC269_FIXUP_CZC_L101, |
---|
| 6914 | + ALC269_FIXUP_LEMOTE_A1802, |
---|
| 6915 | + ALC269_FIXUP_LEMOTE_A190X, |
---|
| 6916 | + ALC256_FIXUP_INTEL_NUC8_RUGGED, |
---|
| 6917 | + ALC233_FIXUP_INTEL_NUC8_DMIC, |
---|
| 6918 | + ALC233_FIXUP_INTEL_NUC8_BOOST, |
---|
| 6919 | + ALC256_FIXUP_INTEL_NUC10, |
---|
| 6920 | + ALC255_FIXUP_XIAOMI_HEADSET_MIC, |
---|
| 6921 | + ALC274_FIXUP_HP_MIC, |
---|
| 6922 | + ALC274_FIXUP_HP_HEADSET_MIC, |
---|
| 6923 | + ALC274_FIXUP_HP_ENVY_GPIO, |
---|
| 6924 | + ALC256_FIXUP_ASUS_HPE, |
---|
| 6925 | + ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK, |
---|
| 6926 | + ALC287_FIXUP_HP_GPIO_LED, |
---|
| 6927 | + ALC256_FIXUP_HP_HEADSET_MIC, |
---|
| 6928 | + ALC245_FIXUP_HP_GPIO_LED, |
---|
| 6929 | + ALC236_FIXUP_DELL_AIO_HEADSET_MIC, |
---|
| 6930 | + ALC282_FIXUP_ACER_DISABLE_LINEOUT, |
---|
| 6931 | + ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST, |
---|
| 6932 | + ALC256_FIXUP_ACER_HEADSET_MIC, |
---|
| 6933 | + ALC285_FIXUP_IDEAPAD_S740_COEF, |
---|
| 6934 | + ALC295_FIXUP_ASUS_DACS, |
---|
| 6935 | + ALC295_FIXUP_HP_OMEN, |
---|
| 6936 | + ALC285_FIXUP_HP_SPECTRE_X360, |
---|
| 6937 | + ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, |
---|
| 6938 | + ALC623_FIXUP_LENOVO_THINKSTATION_P340, |
---|
| 6939 | + ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, |
---|
| 6940 | + ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST, |
---|
| 6941 | + ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS, |
---|
| 6942 | + ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE, |
---|
| 6943 | + ALC287_FIXUP_YOGA7_14ITL_SPEAKERS, |
---|
| 6944 | + ALC298_FIXUP_LENOVO_C940_DUET7, |
---|
| 6945 | + ALC287_FIXUP_13S_GEN2_SPEAKERS, |
---|
| 6946 | + ALC256_FIXUP_SET_COEF_DEFAULTS, |
---|
| 6947 | + ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE, |
---|
| 6948 | + ALC233_FIXUP_NO_AUDIO_JACK, |
---|
| 6949 | + ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME, |
---|
| 6950 | + ALC285_FIXUP_LEGION_Y9000X_SPEAKERS, |
---|
| 6951 | + ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE, |
---|
| 6952 | + ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED, |
---|
| 6953 | + ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS, |
---|
| 6954 | + ALC236_FIXUP_DELL_DUAL_CODECS, |
---|
5879 | 6955 | }; |
---|
| 6956 | + |
---|
| 6957 | +/* A special fixup for Lenovo C940 and Yoga Duet 7; |
---|
| 6958 | + * both have the very same PCI SSID, and we need to apply different fixups |
---|
| 6959 | + * depending on the codec ID |
---|
| 6960 | + */ |
---|
| 6961 | +static void alc298_fixup_lenovo_c940_duet7(struct hda_codec *codec, |
---|
| 6962 | + const struct hda_fixup *fix, |
---|
| 6963 | + int action) |
---|
| 6964 | +{ |
---|
| 6965 | + int id; |
---|
| 6966 | + |
---|
| 6967 | + if (codec->core.vendor_id == 0x10ec0298) |
---|
| 6968 | + id = ALC298_FIXUP_LENOVO_SPK_VOLUME; /* C940 */ |
---|
| 6969 | + else |
---|
| 6970 | + id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* Duet 7 */ |
---|
| 6971 | + __snd_hda_apply_fixup(codec, id, action, 0); |
---|
| 6972 | +} |
---|
5880 | 6973 | |
---|
5881 | 6974 | static const struct hda_fixup alc269_fixups[] = { |
---|
5882 | 6975 | [ALC269_FIXUP_GPIO2] = { |
---|
.. | .. |
---|
6133 | 7226 | .type = HDA_FIXUP_FUNC, |
---|
6134 | 7227 | .v.func = alc_fixup_headset_mode, |
---|
6135 | 7228 | .chained = true, |
---|
6136 | | - .chain_id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED |
---|
| 7229 | + .chain_id = ALC255_FIXUP_MIC_MUTE_LED |
---|
6137 | 7230 | }, |
---|
6138 | 7231 | [ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC] = { |
---|
6139 | 7232 | .type = HDA_FIXUP_FUNC, |
---|
.. | .. |
---|
6157 | 7250 | .chained = true, |
---|
6158 | 7251 | .chain_id = ALC269_FIXUP_HEADSET_MIC |
---|
6159 | 7252 | }, |
---|
6160 | | - [ALC256_FIXUP_HUAWEI_MBXP_PINS] = { |
---|
| 7253 | + [ALC256_FIXUP_HUAWEI_MACH_WX9_PINS] = { |
---|
6161 | 7254 | .type = HDA_FIXUP_PINS, |
---|
6162 | 7255 | .v.pins = (const struct hda_pintbl[]) { |
---|
6163 | 7256 | {0x12, 0x90a60130}, |
---|
.. | .. |
---|
6172 | 7265 | {0x21, 0x04211020}, |
---|
6173 | 7266 | { } |
---|
6174 | 7267 | }, |
---|
| 7268 | + .chained = true, |
---|
| 7269 | + .chain_id = ALC255_FIXUP_MIC_MUTE_LED |
---|
| 7270 | + }, |
---|
| 7271 | + [ALC298_FIXUP_HUAWEI_MBX_STEREO] = { |
---|
| 7272 | + .type = HDA_FIXUP_FUNC, |
---|
| 7273 | + .v.func = alc298_fixup_huawei_mbx_stereo, |
---|
| 7274 | + .chained = true, |
---|
| 7275 | + .chain_id = ALC255_FIXUP_MIC_MUTE_LED |
---|
6175 | 7276 | }, |
---|
6176 | 7277 | [ALC269_FIXUP_ASUS_X101_FUNC] = { |
---|
6177 | 7278 | .type = HDA_FIXUP_FUNC, |
---|
.. | .. |
---|
6254 | 7355 | }, |
---|
6255 | 7356 | .chained = true, |
---|
6256 | 7357 | .chain_id = ALC269VB_FIXUP_ASUS_ZENBOOK, |
---|
| 7358 | + }, |
---|
| 7359 | + [ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE] = { |
---|
| 7360 | + .type = HDA_FIXUP_PINS, |
---|
| 7361 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 7362 | + { 0x18, 0x01a110f0 }, /* use as headset mic */ |
---|
| 7363 | + { } |
---|
| 7364 | + }, |
---|
| 7365 | + .chained = true, |
---|
| 7366 | + .chain_id = ALC269_FIXUP_HEADSET_MIC |
---|
6257 | 7367 | }, |
---|
6258 | 7368 | [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = { |
---|
6259 | 7369 | .type = HDA_FIXUP_FUNC, |
---|
.. | .. |
---|
6375 | 7485 | .type = HDA_FIXUP_FUNC, |
---|
6376 | 7486 | .v.func = alc_fixup_headset_mode_alc255, |
---|
6377 | 7487 | .chained = true, |
---|
6378 | | - .chain_id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED |
---|
| 7488 | + .chain_id = ALC255_FIXUP_MIC_MUTE_LED |
---|
6379 | 7489 | }, |
---|
6380 | 7490 | [ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC] = { |
---|
6381 | 7491 | .type = HDA_FIXUP_FUNC, |
---|
.. | .. |
---|
6410 | 7520 | { }, |
---|
6411 | 7521 | }, |
---|
6412 | 7522 | }, |
---|
6413 | | - [ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED] = { |
---|
| 7523 | + [ALC255_FIXUP_MIC_MUTE_LED] = { |
---|
6414 | 7524 | .type = HDA_FIXUP_FUNC, |
---|
6415 | | - .v.func = alc_fixup_dell_wmi, |
---|
| 7525 | + .v.func = alc_fixup_micmute_led, |
---|
6416 | 7526 | }, |
---|
6417 | 7527 | [ALC282_FIXUP_ASPIRE_V5_PINS] = { |
---|
6418 | 7528 | .type = HDA_FIXUP_PINS, |
---|
.. | .. |
---|
6429 | 7539 | { 0x21, 0x0321101f }, |
---|
6430 | 7540 | { }, |
---|
6431 | 7541 | }, |
---|
| 7542 | + }, |
---|
| 7543 | + [ALC269VB_FIXUP_ASPIRE_E1_COEF] = { |
---|
| 7544 | + .type = HDA_FIXUP_FUNC, |
---|
| 7545 | + .v.func = alc269vb_fixup_aspire_e1_coef, |
---|
6432 | 7546 | }, |
---|
6433 | 7547 | [ALC280_FIXUP_HP_GPIO4] = { |
---|
6434 | 7548 | .type = HDA_FIXUP_FUNC, |
---|
.. | .. |
---|
6467 | 7581 | .type = HDA_FIXUP_FUNC, |
---|
6468 | 7582 | .v.func = alc280_fixup_hp_9480m, |
---|
6469 | 7583 | }, |
---|
| 7584 | + [ALC245_FIXUP_HP_X360_AMP] = { |
---|
| 7585 | + .type = HDA_FIXUP_FUNC, |
---|
| 7586 | + .v.func = alc245_fixup_hp_x360_amp, |
---|
| 7587 | + .chained = true, |
---|
| 7588 | + .chain_id = ALC245_FIXUP_HP_GPIO_LED |
---|
| 7589 | + }, |
---|
6470 | 7590 | [ALC288_FIXUP_DELL_HEADSET_MODE] = { |
---|
6471 | 7591 | .type = HDA_FIXUP_FUNC, |
---|
6472 | 7592 | .v.func = alc_fixup_headset_mode_dell_alc288, |
---|
6473 | 7593 | .chained = true, |
---|
6474 | | - .chain_id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED |
---|
| 7594 | + .chain_id = ALC255_FIXUP_MIC_MUTE_LED |
---|
6475 | 7595 | }, |
---|
6476 | 7596 | [ALC288_FIXUP_DELL1_MIC_NO_PRESENCE] = { |
---|
6477 | 7597 | .type = HDA_FIXUP_PINS, |
---|
.. | .. |
---|
6507 | 7627 | .chained = true, |
---|
6508 | 7628 | .chain_id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE |
---|
6509 | 7629 | }, |
---|
6510 | | - [ALC292_FIXUP_DELL_E7X] = { |
---|
| 7630 | + [ALC292_FIXUP_DELL_E7X_AAMIX] = { |
---|
6511 | 7631 | .type = HDA_FIXUP_FUNC, |
---|
6512 | 7632 | .v.func = alc_fixup_dell_xps13, |
---|
6513 | 7633 | .chained = true, |
---|
6514 | 7634 | .chain_id = ALC292_FIXUP_DISABLE_AAMIX |
---|
| 7635 | + }, |
---|
| 7636 | + [ALC292_FIXUP_DELL_E7X] = { |
---|
| 7637 | + .type = HDA_FIXUP_FUNC, |
---|
| 7638 | + .v.func = alc_fixup_micmute_led, |
---|
| 7639 | + /* micmute fixup must be applied at last */ |
---|
| 7640 | + .chained_before = true, |
---|
| 7641 | + .chain_id = ALC292_FIXUP_DELL_E7X_AAMIX, |
---|
| 7642 | + }, |
---|
| 7643 | + [ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE] = { |
---|
| 7644 | + .type = HDA_FIXUP_PINS, |
---|
| 7645 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 7646 | + { 0x18, 0x01a1913c }, /* headset mic w/o jack detect */ |
---|
| 7647 | + { } |
---|
| 7648 | + }, |
---|
| 7649 | + .chained_before = true, |
---|
| 7650 | + .chain_id = ALC269_FIXUP_HEADSET_MODE, |
---|
6515 | 7651 | }, |
---|
6516 | 7652 | [ALC298_FIXUP_DELL1_MIC_NO_PRESENCE] = { |
---|
6517 | 7653 | .type = HDA_FIXUP_PINS, |
---|
.. | .. |
---|
6552 | 7688 | [ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY] = { |
---|
6553 | 7689 | .type = HDA_FIXUP_FUNC, |
---|
6554 | 7690 | .v.func = alc233_fixup_lenovo_line2_mic_hotkey, |
---|
| 7691 | + }, |
---|
| 7692 | + [ALC233_FIXUP_INTEL_NUC8_DMIC] = { |
---|
| 7693 | + .type = HDA_FIXUP_FUNC, |
---|
| 7694 | + .v.func = alc_fixup_inv_dmic, |
---|
| 7695 | + .chained = true, |
---|
| 7696 | + .chain_id = ALC233_FIXUP_INTEL_NUC8_BOOST, |
---|
| 7697 | + }, |
---|
| 7698 | + [ALC233_FIXUP_INTEL_NUC8_BOOST] = { |
---|
| 7699 | + .type = HDA_FIXUP_FUNC, |
---|
| 7700 | + .v.func = alc269_fixup_limit_int_mic_boost |
---|
6555 | 7701 | }, |
---|
6556 | 7702 | [ALC255_FIXUP_DELL_SPK_NOISE] = { |
---|
6557 | 7703 | .type = HDA_FIXUP_FUNC, |
---|
.. | .. |
---|
6629 | 7775 | .v.func = alc_fixup_auto_mute_via_amp, |
---|
6630 | 7776 | .chained = true, |
---|
6631 | 7777 | .chain_id = ALC269_FIXUP_NO_SHUTUP |
---|
| 7778 | + }, |
---|
| 7779 | + [ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE] = { |
---|
| 7780 | + .type = HDA_FIXUP_PINS, |
---|
| 7781 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 7782 | + { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ |
---|
| 7783 | + { 0x1a, 0x01813030 }, /* use as headphone mic, without its own jack detect */ |
---|
| 7784 | + { } |
---|
| 7785 | + }, |
---|
| 7786 | + .chained = true, |
---|
| 7787 | + .chain_id = ALC269_FIXUP_HEADSET_MODE |
---|
6632 | 7788 | }, |
---|
6633 | 7789 | [ALC221_FIXUP_HP_MIC_NO_PRESENCE] = { |
---|
6634 | 7790 | .type = HDA_FIXUP_PINS, |
---|
.. | .. |
---|
6851 | 8007 | .chained = true, |
---|
6852 | 8008 | .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC |
---|
6853 | 8009 | }, |
---|
| 8010 | + [ALC295_FIXUP_CHROME_BOOK] = { |
---|
| 8011 | + .type = HDA_FIXUP_FUNC, |
---|
| 8012 | + .v.func = alc295_fixup_chromebook, |
---|
| 8013 | + .chained = true, |
---|
| 8014 | + .chain_id = ALC225_FIXUP_HEADSET_JACK |
---|
| 8015 | + }, |
---|
| 8016 | + [ALC225_FIXUP_HEADSET_JACK] = { |
---|
| 8017 | + .type = HDA_FIXUP_FUNC, |
---|
| 8018 | + .v.func = alc_fixup_headset_jack, |
---|
| 8019 | + }, |
---|
6854 | 8020 | [ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = { |
---|
6855 | 8021 | .type = HDA_FIXUP_PINS, |
---|
6856 | 8022 | .v.pins = (const struct hda_pintbl[]) { |
---|
.. | .. |
---|
6976 | 8142 | .chained = true, |
---|
6977 | 8143 | .chain_id = ALC294_FIXUP_SPK2_TO_DAC1 |
---|
6978 | 8144 | }, |
---|
| 8145 | + [ALC285_FIXUP_THINKPAD_X1_GEN7] = { |
---|
| 8146 | + .type = HDA_FIXUP_FUNC, |
---|
| 8147 | + .v.func = alc285_fixup_thinkpad_x1_gen7, |
---|
| 8148 | + .chained = true, |
---|
| 8149 | + .chain_id = ALC269_FIXUP_THINKPAD_ACPI |
---|
| 8150 | + }, |
---|
| 8151 | + [ALC285_FIXUP_THINKPAD_HEADSET_JACK] = { |
---|
| 8152 | + .type = HDA_FIXUP_FUNC, |
---|
| 8153 | + .v.func = alc_fixup_headset_jack, |
---|
| 8154 | + .chained = true, |
---|
| 8155 | + .chain_id = ALC285_FIXUP_THINKPAD_X1_GEN7 |
---|
| 8156 | + }, |
---|
6979 | 8157 | [ALC294_FIXUP_ASUS_HPE] = { |
---|
6980 | 8158 | .type = HDA_FIXUP_VERBS, |
---|
6981 | 8159 | .v.verbs = (const struct hda_verb[]) { |
---|
.. | .. |
---|
6987 | 8165 | .chained = true, |
---|
6988 | 8166 | .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC |
---|
6989 | 8167 | }, |
---|
| 8168 | + [ALC294_FIXUP_ASUS_GX502_PINS] = { |
---|
| 8169 | + .type = HDA_FIXUP_PINS, |
---|
| 8170 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8171 | + { 0x19, 0x03a11050 }, /* front HP mic */ |
---|
| 8172 | + { 0x1a, 0x01a11830 }, /* rear external mic */ |
---|
| 8173 | + { 0x21, 0x03211020 }, /* front HP out */ |
---|
| 8174 | + { } |
---|
| 8175 | + }, |
---|
| 8176 | + .chained = true, |
---|
| 8177 | + .chain_id = ALC294_FIXUP_ASUS_GX502_VERBS |
---|
| 8178 | + }, |
---|
| 8179 | + [ALC294_FIXUP_ASUS_GX502_VERBS] = { |
---|
| 8180 | + .type = HDA_FIXUP_VERBS, |
---|
| 8181 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8182 | + /* set 0x15 to HP-OUT ctrl */ |
---|
| 8183 | + { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 }, |
---|
| 8184 | + /* unmute the 0x15 amp */ |
---|
| 8185 | + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 }, |
---|
| 8186 | + { } |
---|
| 8187 | + }, |
---|
| 8188 | + .chained = true, |
---|
| 8189 | + .chain_id = ALC294_FIXUP_ASUS_GX502_HP |
---|
| 8190 | + }, |
---|
| 8191 | + [ALC294_FIXUP_ASUS_GX502_HP] = { |
---|
| 8192 | + .type = HDA_FIXUP_FUNC, |
---|
| 8193 | + .v.func = alc294_fixup_gx502_hp, |
---|
| 8194 | + }, |
---|
| 8195 | + [ALC294_FIXUP_ASUS_GU502_PINS] = { |
---|
| 8196 | + .type = HDA_FIXUP_PINS, |
---|
| 8197 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8198 | + { 0x19, 0x01a11050 }, /* rear HP mic */ |
---|
| 8199 | + { 0x1a, 0x01a11830 }, /* rear external mic */ |
---|
| 8200 | + { 0x21, 0x012110f0 }, /* rear HP out */ |
---|
| 8201 | + { } |
---|
| 8202 | + }, |
---|
| 8203 | + .chained = true, |
---|
| 8204 | + .chain_id = ALC294_FIXUP_ASUS_GU502_VERBS |
---|
| 8205 | + }, |
---|
| 8206 | + [ALC294_FIXUP_ASUS_GU502_VERBS] = { |
---|
| 8207 | + .type = HDA_FIXUP_VERBS, |
---|
| 8208 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8209 | + /* set 0x15 to HP-OUT ctrl */ |
---|
| 8210 | + { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 }, |
---|
| 8211 | + /* unmute the 0x15 amp */ |
---|
| 8212 | + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000 }, |
---|
| 8213 | + /* set 0x1b to HP-OUT */ |
---|
| 8214 | + { 0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, |
---|
| 8215 | + { } |
---|
| 8216 | + }, |
---|
| 8217 | + .chained = true, |
---|
| 8218 | + .chain_id = ALC294_FIXUP_ASUS_GU502_HP |
---|
| 8219 | + }, |
---|
| 8220 | + [ALC294_FIXUP_ASUS_GU502_HP] = { |
---|
| 8221 | + .type = HDA_FIXUP_FUNC, |
---|
| 8222 | + .v.func = alc294_fixup_gu502_hp, |
---|
| 8223 | + }, |
---|
| 8224 | + [ALC294_FIXUP_ASUS_G513_PINS] = { |
---|
| 8225 | + .type = HDA_FIXUP_PINS, |
---|
| 8226 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8227 | + { 0x19, 0x03a11050 }, /* front HP mic */ |
---|
| 8228 | + { 0x1a, 0x03a11c30 }, /* rear external mic */ |
---|
| 8229 | + { 0x21, 0x03211420 }, /* front HP out */ |
---|
| 8230 | + { } |
---|
| 8231 | + }, |
---|
| 8232 | + }, |
---|
| 8233 | + [ALC285_FIXUP_ASUS_G533Z_PINS] = { |
---|
| 8234 | + .type = HDA_FIXUP_PINS, |
---|
| 8235 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8236 | + { 0x14, 0x90170152 }, /* Speaker Surround Playback Switch */ |
---|
| 8237 | + { 0x19, 0x03a19020 }, /* Mic Boost Volume */ |
---|
| 8238 | + { 0x1a, 0x03a11c30 }, /* Mic Boost Volume */ |
---|
| 8239 | + { 0x1e, 0x90170151 }, /* Rear jack, IN OUT EAPD Detect */ |
---|
| 8240 | + { 0x21, 0x03211420 }, |
---|
| 8241 | + { } |
---|
| 8242 | + }, |
---|
| 8243 | + }, |
---|
| 8244 | + [ALC294_FIXUP_ASUS_COEF_1B] = { |
---|
| 8245 | + .type = HDA_FIXUP_VERBS, |
---|
| 8246 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8247 | + /* Set bit 10 to correct noisy output after reboot from |
---|
| 8248 | + * Windows 10 (due to pop noise reduction?) |
---|
| 8249 | + */ |
---|
| 8250 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x1b }, |
---|
| 8251 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x4e4b }, |
---|
| 8252 | + { } |
---|
| 8253 | + }, |
---|
| 8254 | + .chained = true, |
---|
| 8255 | + .chain_id = ALC289_FIXUP_ASUS_GA401, |
---|
| 8256 | + }, |
---|
6990 | 8257 | [ALC285_FIXUP_HP_GPIO_LED] = { |
---|
6991 | 8258 | .type = HDA_FIXUP_FUNC, |
---|
6992 | 8259 | .v.func = alc285_fixup_hp_gpio_led, |
---|
| 8260 | + }, |
---|
| 8261 | + [ALC285_FIXUP_HP_MUTE_LED] = { |
---|
| 8262 | + .type = HDA_FIXUP_FUNC, |
---|
| 8263 | + .v.func = alc285_fixup_hp_mute_led, |
---|
| 8264 | + }, |
---|
| 8265 | + [ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED] = { |
---|
| 8266 | + .type = HDA_FIXUP_FUNC, |
---|
| 8267 | + .v.func = alc285_fixup_hp_spectre_x360_mute_led, |
---|
| 8268 | + }, |
---|
| 8269 | + [ALC236_FIXUP_HP_MUTE_LED_COEFBIT2] = { |
---|
| 8270 | + .type = HDA_FIXUP_FUNC, |
---|
| 8271 | + .v.func = alc236_fixup_hp_mute_led_coefbit2, |
---|
| 8272 | + }, |
---|
| 8273 | + [ALC236_FIXUP_HP_GPIO_LED] = { |
---|
| 8274 | + .type = HDA_FIXUP_FUNC, |
---|
| 8275 | + .v.func = alc236_fixup_hp_gpio_led, |
---|
| 8276 | + }, |
---|
| 8277 | + [ALC236_FIXUP_HP_MUTE_LED] = { |
---|
| 8278 | + .type = HDA_FIXUP_FUNC, |
---|
| 8279 | + .v.func = alc236_fixup_hp_mute_led, |
---|
| 8280 | + }, |
---|
| 8281 | + [ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF] = { |
---|
| 8282 | + .type = HDA_FIXUP_FUNC, |
---|
| 8283 | + .v.func = alc236_fixup_hp_mute_led_micmute_vref, |
---|
| 8284 | + }, |
---|
| 8285 | + [ALC298_FIXUP_SAMSUNG_AMP] = { |
---|
| 8286 | + .type = HDA_FIXUP_FUNC, |
---|
| 8287 | + .v.func = alc298_fixup_samsung_amp, |
---|
| 8288 | + .chained = true, |
---|
| 8289 | + .chain_id = ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET |
---|
| 8290 | + }, |
---|
| 8291 | + [ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = { |
---|
| 8292 | + .type = HDA_FIXUP_VERBS, |
---|
| 8293 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8294 | + { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc5 }, |
---|
| 8295 | + { } |
---|
| 8296 | + }, |
---|
| 8297 | + }, |
---|
| 8298 | + [ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = { |
---|
| 8299 | + .type = HDA_FIXUP_VERBS, |
---|
| 8300 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8301 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x08}, |
---|
| 8302 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x2fcf}, |
---|
| 8303 | + { } |
---|
| 8304 | + }, |
---|
| 8305 | + }, |
---|
| 8306 | + [ALC295_FIXUP_ASUS_MIC_NO_PRESENCE] = { |
---|
| 8307 | + .type = HDA_FIXUP_PINS, |
---|
| 8308 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8309 | + { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ |
---|
| 8310 | + { } |
---|
| 8311 | + }, |
---|
| 8312 | + .chained = true, |
---|
| 8313 | + .chain_id = ALC269_FIXUP_HEADSET_MODE |
---|
| 8314 | + }, |
---|
| 8315 | + [ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS] = { |
---|
| 8316 | + .type = HDA_FIXUP_PINS, |
---|
| 8317 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8318 | + { 0x14, 0x90100120 }, /* use as internal speaker */ |
---|
| 8319 | + { 0x18, 0x02a111f0 }, /* use as headset mic, without its own jack detect */ |
---|
| 8320 | + { 0x1a, 0x01011020 }, /* use as line out */ |
---|
| 8321 | + { }, |
---|
| 8322 | + }, |
---|
| 8323 | + .chained = true, |
---|
| 8324 | + .chain_id = ALC269_FIXUP_HEADSET_MIC |
---|
| 8325 | + }, |
---|
| 8326 | + [ALC269VC_FIXUP_ACER_HEADSET_MIC] = { |
---|
| 8327 | + .type = HDA_FIXUP_PINS, |
---|
| 8328 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8329 | + { 0x18, 0x02a11030 }, /* use as headset mic */ |
---|
| 8330 | + { } |
---|
| 8331 | + }, |
---|
| 8332 | + .chained = true, |
---|
| 8333 | + .chain_id = ALC269_FIXUP_HEADSET_MIC |
---|
| 8334 | + }, |
---|
| 8335 | + [ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE] = { |
---|
| 8336 | + .type = HDA_FIXUP_PINS, |
---|
| 8337 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8338 | + { 0x18, 0x01a11130 }, /* use as headset mic, without its own jack detect */ |
---|
| 8339 | + { } |
---|
| 8340 | + }, |
---|
| 8341 | + .chained = true, |
---|
| 8342 | + .chain_id = ALC269_FIXUP_HEADSET_MIC |
---|
| 8343 | + }, |
---|
| 8344 | + [ALC289_FIXUP_ASUS_GA401] = { |
---|
| 8345 | + .type = HDA_FIXUP_FUNC, |
---|
| 8346 | + .v.func = alc289_fixup_asus_ga401, |
---|
| 8347 | + .chained = true, |
---|
| 8348 | + .chain_id = ALC289_FIXUP_ASUS_GA502, |
---|
| 8349 | + }, |
---|
| 8350 | + [ALC289_FIXUP_ASUS_GA502] = { |
---|
| 8351 | + .type = HDA_FIXUP_PINS, |
---|
| 8352 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8353 | + { 0x19, 0x03a11020 }, /* headset mic with jack detect */ |
---|
| 8354 | + { } |
---|
| 8355 | + }, |
---|
| 8356 | + }, |
---|
| 8357 | + [ALC256_FIXUP_ACER_MIC_NO_PRESENCE] = { |
---|
| 8358 | + .type = HDA_FIXUP_PINS, |
---|
| 8359 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8360 | + { 0x19, 0x02a11120 }, /* use as headset mic, without its own jack detect */ |
---|
| 8361 | + { } |
---|
| 8362 | + }, |
---|
| 8363 | + .chained = true, |
---|
| 8364 | + .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE |
---|
| 8365 | + }, |
---|
| 8366 | + [ALC285_FIXUP_HP_GPIO_AMP_INIT] = { |
---|
| 8367 | + .type = HDA_FIXUP_FUNC, |
---|
| 8368 | + .v.func = alc285_fixup_hp_gpio_amp_init, |
---|
| 8369 | + .chained = true, |
---|
| 8370 | + .chain_id = ALC285_FIXUP_HP_GPIO_LED |
---|
| 8371 | + }, |
---|
| 8372 | + [ALC269_FIXUP_CZC_B20] = { |
---|
| 8373 | + .type = HDA_FIXUP_PINS, |
---|
| 8374 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8375 | + { 0x12, 0x411111f0 }, |
---|
| 8376 | + { 0x14, 0x90170110 }, /* speaker */ |
---|
| 8377 | + { 0x15, 0x032f1020 }, /* HP out */ |
---|
| 8378 | + { 0x17, 0x411111f0 }, |
---|
| 8379 | + { 0x18, 0x03ab1040 }, /* mic */ |
---|
| 8380 | + { 0x19, 0xb7a7013f }, |
---|
| 8381 | + { 0x1a, 0x0181305f }, |
---|
| 8382 | + { 0x1b, 0x411111f0 }, |
---|
| 8383 | + { 0x1d, 0x411111f0 }, |
---|
| 8384 | + { 0x1e, 0x411111f0 }, |
---|
| 8385 | + { } |
---|
| 8386 | + }, |
---|
| 8387 | + .chain_id = ALC269_FIXUP_DMIC, |
---|
| 8388 | + }, |
---|
| 8389 | + [ALC269_FIXUP_CZC_TMI] = { |
---|
| 8390 | + .type = HDA_FIXUP_PINS, |
---|
| 8391 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8392 | + { 0x12, 0x4000c000 }, |
---|
| 8393 | + { 0x14, 0x90170110 }, /* speaker */ |
---|
| 8394 | + { 0x15, 0x0421401f }, /* HP out */ |
---|
| 8395 | + { 0x17, 0x411111f0 }, |
---|
| 8396 | + { 0x18, 0x04a19020 }, /* mic */ |
---|
| 8397 | + { 0x19, 0x411111f0 }, |
---|
| 8398 | + { 0x1a, 0x411111f0 }, |
---|
| 8399 | + { 0x1b, 0x411111f0 }, |
---|
| 8400 | + { 0x1d, 0x40448505 }, |
---|
| 8401 | + { 0x1e, 0x411111f0 }, |
---|
| 8402 | + { 0x20, 0x8000ffff }, |
---|
| 8403 | + { } |
---|
| 8404 | + }, |
---|
| 8405 | + .chain_id = ALC269_FIXUP_DMIC, |
---|
| 8406 | + }, |
---|
| 8407 | + [ALC269_FIXUP_CZC_L101] = { |
---|
| 8408 | + .type = HDA_FIXUP_PINS, |
---|
| 8409 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8410 | + { 0x12, 0x40000000 }, |
---|
| 8411 | + { 0x14, 0x01014010 }, /* speaker */ |
---|
| 8412 | + { 0x15, 0x411111f0 }, /* HP out */ |
---|
| 8413 | + { 0x16, 0x411111f0 }, |
---|
| 8414 | + { 0x18, 0x01a19020 }, /* mic */ |
---|
| 8415 | + { 0x19, 0x02a19021 }, |
---|
| 8416 | + { 0x1a, 0x0181302f }, |
---|
| 8417 | + { 0x1b, 0x0221401f }, |
---|
| 8418 | + { 0x1c, 0x411111f0 }, |
---|
| 8419 | + { 0x1d, 0x4044c601 }, |
---|
| 8420 | + { 0x1e, 0x411111f0 }, |
---|
| 8421 | + { } |
---|
| 8422 | + }, |
---|
| 8423 | + .chain_id = ALC269_FIXUP_DMIC, |
---|
| 8424 | + }, |
---|
| 8425 | + [ALC269_FIXUP_LEMOTE_A1802] = { |
---|
| 8426 | + .type = HDA_FIXUP_PINS, |
---|
| 8427 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8428 | + { 0x12, 0x40000000 }, |
---|
| 8429 | + { 0x14, 0x90170110 }, /* speaker */ |
---|
| 8430 | + { 0x17, 0x411111f0 }, |
---|
| 8431 | + { 0x18, 0x03a19040 }, /* mic1 */ |
---|
| 8432 | + { 0x19, 0x90a70130 }, /* mic2 */ |
---|
| 8433 | + { 0x1a, 0x411111f0 }, |
---|
| 8434 | + { 0x1b, 0x411111f0 }, |
---|
| 8435 | + { 0x1d, 0x40489d2d }, |
---|
| 8436 | + { 0x1e, 0x411111f0 }, |
---|
| 8437 | + { 0x20, 0x0003ffff }, |
---|
| 8438 | + { 0x21, 0x03214020 }, |
---|
| 8439 | + { } |
---|
| 8440 | + }, |
---|
| 8441 | + .chain_id = ALC269_FIXUP_DMIC, |
---|
| 8442 | + }, |
---|
| 8443 | + [ALC269_FIXUP_LEMOTE_A190X] = { |
---|
| 8444 | + .type = HDA_FIXUP_PINS, |
---|
| 8445 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8446 | + { 0x14, 0x99130110 }, /* speaker */ |
---|
| 8447 | + { 0x15, 0x0121401f }, /* HP out */ |
---|
| 8448 | + { 0x18, 0x01a19c20 }, /* rear mic */ |
---|
| 8449 | + { 0x19, 0x99a3092f }, /* front mic */ |
---|
| 8450 | + { 0x1b, 0x0201401f }, /* front lineout */ |
---|
| 8451 | + { } |
---|
| 8452 | + }, |
---|
| 8453 | + .chain_id = ALC269_FIXUP_DMIC, |
---|
| 8454 | + }, |
---|
| 8455 | + [ALC256_FIXUP_INTEL_NUC8_RUGGED] = { |
---|
| 8456 | + .type = HDA_FIXUP_PINS, |
---|
| 8457 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8458 | + { 0x1b, 0x01a1913c }, /* use as headset mic, without its own jack detect */ |
---|
| 8459 | + { } |
---|
| 8460 | + }, |
---|
| 8461 | + .chained = true, |
---|
| 8462 | + .chain_id = ALC269_FIXUP_HEADSET_MODE |
---|
| 8463 | + }, |
---|
| 8464 | + [ALC256_FIXUP_INTEL_NUC10] = { |
---|
| 8465 | + .type = HDA_FIXUP_PINS, |
---|
| 8466 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8467 | + { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ |
---|
| 8468 | + { } |
---|
| 8469 | + }, |
---|
| 8470 | + .chained = true, |
---|
| 8471 | + .chain_id = ALC269_FIXUP_HEADSET_MODE |
---|
| 8472 | + }, |
---|
| 8473 | + [ALC255_FIXUP_XIAOMI_HEADSET_MIC] = { |
---|
| 8474 | + .type = HDA_FIXUP_VERBS, |
---|
| 8475 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8476 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 }, |
---|
| 8477 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 }, |
---|
| 8478 | + { } |
---|
| 8479 | + }, |
---|
| 8480 | + .chained = true, |
---|
| 8481 | + .chain_id = ALC289_FIXUP_ASUS_GA502 |
---|
| 8482 | + }, |
---|
| 8483 | + [ALC274_FIXUP_HP_MIC] = { |
---|
| 8484 | + .type = HDA_FIXUP_VERBS, |
---|
| 8485 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8486 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 }, |
---|
| 8487 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 }, |
---|
| 8488 | + { } |
---|
| 8489 | + }, |
---|
| 8490 | + }, |
---|
| 8491 | + [ALC274_FIXUP_HP_HEADSET_MIC] = { |
---|
| 8492 | + .type = HDA_FIXUP_FUNC, |
---|
| 8493 | + .v.func = alc274_fixup_hp_headset_mic, |
---|
| 8494 | + .chained = true, |
---|
| 8495 | + .chain_id = ALC274_FIXUP_HP_MIC |
---|
| 8496 | + }, |
---|
| 8497 | + [ALC274_FIXUP_HP_ENVY_GPIO] = { |
---|
| 8498 | + .type = HDA_FIXUP_FUNC, |
---|
| 8499 | + .v.func = alc274_fixup_hp_envy_gpio, |
---|
| 8500 | + }, |
---|
| 8501 | + [ALC256_FIXUP_ASUS_HPE] = { |
---|
| 8502 | + .type = HDA_FIXUP_VERBS, |
---|
| 8503 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8504 | + /* Set EAPD high */ |
---|
| 8505 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x0f }, |
---|
| 8506 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x7778 }, |
---|
| 8507 | + { } |
---|
| 8508 | + }, |
---|
| 8509 | + .chained = true, |
---|
| 8510 | + .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC |
---|
| 8511 | + }, |
---|
| 8512 | + [ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK] = { |
---|
| 8513 | + .type = HDA_FIXUP_FUNC, |
---|
| 8514 | + .v.func = alc_fixup_headset_jack, |
---|
| 8515 | + .chained = true, |
---|
| 8516 | + .chain_id = ALC269_FIXUP_THINKPAD_ACPI |
---|
| 8517 | + }, |
---|
| 8518 | + [ALC287_FIXUP_HP_GPIO_LED] = { |
---|
| 8519 | + .type = HDA_FIXUP_FUNC, |
---|
| 8520 | + .v.func = alc287_fixup_hp_gpio_led, |
---|
| 8521 | + }, |
---|
| 8522 | + [ALC256_FIXUP_HP_HEADSET_MIC] = { |
---|
| 8523 | + .type = HDA_FIXUP_FUNC, |
---|
| 8524 | + .v.func = alc274_fixup_hp_headset_mic, |
---|
| 8525 | + }, |
---|
| 8526 | + [ALC236_FIXUP_DELL_AIO_HEADSET_MIC] = { |
---|
| 8527 | + .type = HDA_FIXUP_FUNC, |
---|
| 8528 | + .v.func = alc_fixup_no_int_mic, |
---|
| 8529 | + .chained = true, |
---|
| 8530 | + .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE |
---|
| 8531 | + }, |
---|
| 8532 | + [ALC282_FIXUP_ACER_DISABLE_LINEOUT] = { |
---|
| 8533 | + .type = HDA_FIXUP_PINS, |
---|
| 8534 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8535 | + { 0x1b, 0x411111f0 }, |
---|
| 8536 | + { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */ |
---|
| 8537 | + { }, |
---|
| 8538 | + }, |
---|
| 8539 | + .chained = true, |
---|
| 8540 | + .chain_id = ALC269_FIXUP_HEADSET_MODE |
---|
| 8541 | + }, |
---|
| 8542 | + [ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST] = { |
---|
| 8543 | + .type = HDA_FIXUP_FUNC, |
---|
| 8544 | + .v.func = alc269_fixup_limit_int_mic_boost, |
---|
| 8545 | + .chained = true, |
---|
| 8546 | + .chain_id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE, |
---|
| 8547 | + }, |
---|
| 8548 | + [ALC256_FIXUP_ACER_HEADSET_MIC] = { |
---|
| 8549 | + .type = HDA_FIXUP_PINS, |
---|
| 8550 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8551 | + { 0x19, 0x02a1113c }, /* use as headset mic, without its own jack detect */ |
---|
| 8552 | + { 0x1a, 0x90a1092f }, /* use as internal mic */ |
---|
| 8553 | + { } |
---|
| 8554 | + }, |
---|
| 8555 | + .chained = true, |
---|
| 8556 | + .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC |
---|
| 8557 | + }, |
---|
| 8558 | + [ALC285_FIXUP_IDEAPAD_S740_COEF] = { |
---|
| 8559 | + .type = HDA_FIXUP_FUNC, |
---|
| 8560 | + .v.func = alc285_fixup_ideapad_s740_coef, |
---|
| 8561 | + .chained = true, |
---|
| 8562 | + .chain_id = ALC269_FIXUP_THINKPAD_ACPI, |
---|
| 8563 | + }, |
---|
| 8564 | + [ALC295_FIXUP_ASUS_DACS] = { |
---|
| 8565 | + .type = HDA_FIXUP_FUNC, |
---|
| 8566 | + .v.func = alc295_fixup_asus_dacs, |
---|
| 8567 | + }, |
---|
| 8568 | + [ALC295_FIXUP_HP_OMEN] = { |
---|
| 8569 | + .type = HDA_FIXUP_PINS, |
---|
| 8570 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8571 | + { 0x12, 0xb7a60130 }, |
---|
| 8572 | + { 0x13, 0x40000000 }, |
---|
| 8573 | + { 0x14, 0x411111f0 }, |
---|
| 8574 | + { 0x16, 0x411111f0 }, |
---|
| 8575 | + { 0x17, 0x90170110 }, |
---|
| 8576 | + { 0x18, 0x411111f0 }, |
---|
| 8577 | + { 0x19, 0x02a11030 }, |
---|
| 8578 | + { 0x1a, 0x411111f0 }, |
---|
| 8579 | + { 0x1b, 0x04a19030 }, |
---|
| 8580 | + { 0x1d, 0x40600001 }, |
---|
| 8581 | + { 0x1e, 0x411111f0 }, |
---|
| 8582 | + { 0x21, 0x03211020 }, |
---|
| 8583 | + {} |
---|
| 8584 | + }, |
---|
| 8585 | + .chained = true, |
---|
| 8586 | + .chain_id = ALC269_FIXUP_HP_LINE1_MIC1_LED, |
---|
| 8587 | + }, |
---|
| 8588 | + [ALC285_FIXUP_HP_SPECTRE_X360] = { |
---|
| 8589 | + .type = HDA_FIXUP_FUNC, |
---|
| 8590 | + .v.func = alc285_fixup_hp_spectre_x360, |
---|
| 8591 | + }, |
---|
| 8592 | + [ALC285_FIXUP_HP_SPECTRE_X360_EB1] = { |
---|
| 8593 | + .type = HDA_FIXUP_FUNC, |
---|
| 8594 | + .v.func = alc285_fixup_hp_spectre_x360_eb1 |
---|
| 8595 | + }, |
---|
| 8596 | + [ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP] = { |
---|
| 8597 | + .type = HDA_FIXUP_FUNC, |
---|
| 8598 | + .v.func = alc285_fixup_ideapad_s740_coef, |
---|
| 8599 | + .chained = true, |
---|
| 8600 | + .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK, |
---|
| 8601 | + }, |
---|
| 8602 | + [ALC623_FIXUP_LENOVO_THINKSTATION_P340] = { |
---|
| 8603 | + .type = HDA_FIXUP_FUNC, |
---|
| 8604 | + .v.func = alc_fixup_no_shutup, |
---|
| 8605 | + .chained = true, |
---|
| 8606 | + .chain_id = ALC283_FIXUP_HEADSET_MIC, |
---|
| 8607 | + }, |
---|
| 8608 | + [ALC255_FIXUP_ACER_HEADPHONE_AND_MIC] = { |
---|
| 8609 | + .type = HDA_FIXUP_PINS, |
---|
| 8610 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8611 | + { 0x21, 0x03211030 }, /* Change the Headphone location to Left */ |
---|
| 8612 | + { } |
---|
| 8613 | + }, |
---|
| 8614 | + .chained = true, |
---|
| 8615 | + .chain_id = ALC255_FIXUP_XIAOMI_HEADSET_MIC |
---|
| 8616 | + }, |
---|
| 8617 | + [ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST] = { |
---|
| 8618 | + .type = HDA_FIXUP_FUNC, |
---|
| 8619 | + .v.func = alc269_fixup_limit_int_mic_boost, |
---|
| 8620 | + .chained = true, |
---|
| 8621 | + .chain_id = ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF, |
---|
| 8622 | + }, |
---|
| 8623 | + [ALC285_FIXUP_LEGION_Y9000X_SPEAKERS] = { |
---|
| 8624 | + .type = HDA_FIXUP_FUNC, |
---|
| 8625 | + .v.func = alc285_fixup_ideapad_s740_coef, |
---|
| 8626 | + .chained = true, |
---|
| 8627 | + .chain_id = ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE, |
---|
| 8628 | + }, |
---|
| 8629 | + [ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE] = { |
---|
| 8630 | + .type = HDA_FIXUP_FUNC, |
---|
| 8631 | + .v.func = alc287_fixup_legion_15imhg05_speakers, |
---|
| 8632 | + .chained = true, |
---|
| 8633 | + .chain_id = ALC269_FIXUP_THINKPAD_ACPI, |
---|
| 8634 | + }, |
---|
| 8635 | + [ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS] = { |
---|
| 8636 | + .type = HDA_FIXUP_VERBS, |
---|
| 8637 | + //.v.verbs = legion_15imhg05_coefs, |
---|
| 8638 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8639 | + // set left speaker Legion 7i. |
---|
| 8640 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, |
---|
| 8641 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x41 }, |
---|
| 8642 | + |
---|
| 8643 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, |
---|
| 8644 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, |
---|
| 8645 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8646 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x1a }, |
---|
| 8647 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, |
---|
| 8648 | + |
---|
| 8649 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, |
---|
| 8650 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, |
---|
| 8651 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8652 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8653 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, |
---|
| 8654 | + |
---|
| 8655 | + // set right speaker Legion 7i. |
---|
| 8656 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, |
---|
| 8657 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x42 }, |
---|
| 8658 | + |
---|
| 8659 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, |
---|
| 8660 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, |
---|
| 8661 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8662 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x2a }, |
---|
| 8663 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, |
---|
| 8664 | + |
---|
| 8665 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, |
---|
| 8666 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, |
---|
| 8667 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8668 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8669 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, |
---|
| 8670 | + {} |
---|
| 8671 | + }, |
---|
| 8672 | + .chained = true, |
---|
| 8673 | + .chain_id = ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE, |
---|
| 8674 | + }, |
---|
| 8675 | + [ALC287_FIXUP_LEGION_15IMHG05_AUTOMUTE] = { |
---|
| 8676 | + .type = HDA_FIXUP_FUNC, |
---|
| 8677 | + .v.func = alc287_fixup_legion_15imhg05_speakers, |
---|
| 8678 | + .chained = true, |
---|
| 8679 | + .chain_id = ALC269_FIXUP_HEADSET_MODE, |
---|
| 8680 | + }, |
---|
| 8681 | + [ALC287_FIXUP_YOGA7_14ITL_SPEAKERS] = { |
---|
| 8682 | + .type = HDA_FIXUP_VERBS, |
---|
| 8683 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8684 | + // set left speaker Yoga 7i. |
---|
| 8685 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, |
---|
| 8686 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x41 }, |
---|
| 8687 | + |
---|
| 8688 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, |
---|
| 8689 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, |
---|
| 8690 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8691 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x1a }, |
---|
| 8692 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, |
---|
| 8693 | + |
---|
| 8694 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, |
---|
| 8695 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, |
---|
| 8696 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8697 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8698 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, |
---|
| 8699 | + |
---|
| 8700 | + // set right speaker Yoga 7i. |
---|
| 8701 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, |
---|
| 8702 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x46 }, |
---|
| 8703 | + |
---|
| 8704 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, |
---|
| 8705 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, |
---|
| 8706 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8707 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x2a }, |
---|
| 8708 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, |
---|
| 8709 | + |
---|
| 8710 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, |
---|
| 8711 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, |
---|
| 8712 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8713 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8714 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, |
---|
| 8715 | + {} |
---|
| 8716 | + }, |
---|
| 8717 | + .chained = true, |
---|
| 8718 | + .chain_id = ALC269_FIXUP_HEADSET_MODE, |
---|
| 8719 | + }, |
---|
| 8720 | + [ALC298_FIXUP_LENOVO_C940_DUET7] = { |
---|
| 8721 | + .type = HDA_FIXUP_FUNC, |
---|
| 8722 | + .v.func = alc298_fixup_lenovo_c940_duet7, |
---|
| 8723 | + }, |
---|
| 8724 | + [ALC287_FIXUP_13S_GEN2_SPEAKERS] = { |
---|
| 8725 | + .type = HDA_FIXUP_VERBS, |
---|
| 8726 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8727 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, |
---|
| 8728 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x41 }, |
---|
| 8729 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, |
---|
| 8730 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, |
---|
| 8731 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8732 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8733 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, |
---|
| 8734 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, |
---|
| 8735 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x42 }, |
---|
| 8736 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, |
---|
| 8737 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, |
---|
| 8738 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8739 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, |
---|
| 8740 | + { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, |
---|
| 8741 | + {} |
---|
| 8742 | + }, |
---|
| 8743 | + .chained = true, |
---|
| 8744 | + .chain_id = ALC269_FIXUP_HEADSET_MODE, |
---|
| 8745 | + }, |
---|
| 8746 | + [ALC256_FIXUP_SET_COEF_DEFAULTS] = { |
---|
| 8747 | + .type = HDA_FIXUP_FUNC, |
---|
| 8748 | + .v.func = alc256_fixup_set_coef_defaults, |
---|
| 8749 | + }, |
---|
| 8750 | + [ALC245_FIXUP_HP_GPIO_LED] = { |
---|
| 8751 | + .type = HDA_FIXUP_FUNC, |
---|
| 8752 | + .v.func = alc245_fixup_hp_gpio_led, |
---|
| 8753 | + }, |
---|
| 8754 | + [ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = { |
---|
| 8755 | + .type = HDA_FIXUP_PINS, |
---|
| 8756 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 8757 | + { 0x19, 0x03a11120 }, /* use as headset mic, without its own jack detect */ |
---|
| 8758 | + { } |
---|
| 8759 | + }, |
---|
| 8760 | + .chained = true, |
---|
| 8761 | + .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, |
---|
| 8762 | + }, |
---|
| 8763 | + [ALC233_FIXUP_NO_AUDIO_JACK] = { |
---|
| 8764 | + .type = HDA_FIXUP_FUNC, |
---|
| 8765 | + .v.func = alc233_fixup_no_audio_jack, |
---|
| 8766 | + }, |
---|
| 8767 | + [ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME] = { |
---|
| 8768 | + .type = HDA_FIXUP_FUNC, |
---|
| 8769 | + .v.func = alc256_fixup_mic_no_presence_and_resume, |
---|
| 8770 | + .chained = true, |
---|
| 8771 | + .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC |
---|
| 8772 | + }, |
---|
| 8773 | + [ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED] = { |
---|
| 8774 | + .type = HDA_FIXUP_VERBS, |
---|
| 8775 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 8776 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x19 }, |
---|
| 8777 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x8e11 }, |
---|
| 8778 | + { } |
---|
| 8779 | + }, |
---|
| 8780 | + .chained = true, |
---|
| 8781 | + .chain_id = ALC285_FIXUP_HP_MUTE_LED, |
---|
| 8782 | + }, |
---|
| 8783 | + [ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS] = { |
---|
| 8784 | + .type = HDA_FIXUP_FUNC, |
---|
| 8785 | + .v.func = alc295_fixup_dell_inspiron_top_speakers, |
---|
| 8786 | + .chained = true, |
---|
| 8787 | + .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, |
---|
| 8788 | + }, |
---|
| 8789 | + [ALC236_FIXUP_DELL_DUAL_CODECS] = { |
---|
| 8790 | + .type = HDA_FIXUP_PINS, |
---|
| 8791 | + .v.func = alc1220_fixup_gb_dual_codecs, |
---|
| 8792 | + .chained = true, |
---|
| 8793 | + .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
6993 | 8794 | }, |
---|
6994 | 8795 | }; |
---|
6995 | 8796 | |
---|
.. | .. |
---|
6999 | 8800 | SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC), |
---|
7000 | 8801 | SND_PCI_QUIRK(0x1025, 0x047c, "Acer AC700", ALC269_FIXUP_ACER_AC700), |
---|
7001 | 8802 | 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 | 8803 | SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK), |
---|
7004 | 8804 | SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK), |
---|
7005 | 8805 | SND_PCI_QUIRK(0x1025, 0x0762, "Acer Aspire E1-472", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572), |
---|
7006 | 8806 | SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572), |
---|
7007 | 8807 | SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS), |
---|
| 8808 | + SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC), |
---|
| 8809 | + SND_PCI_QUIRK(0x1025, 0x0840, "Acer Aspire E1", ALC269VB_FIXUP_ASPIRE_E1_COEF), |
---|
| 8810 | + SND_PCI_QUIRK(0x1025, 0x101c, "Acer Veriton N2510G", ALC269_FIXUP_LIFEBOOK), |
---|
7008 | 8811 | SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE), |
---|
| 8812 | + SND_PCI_QUIRK(0x1025, 0x1065, "Acer Aspire C20-820", ALC269VC_FIXUP_ACER_HEADSET_MIC), |
---|
7009 | 8813 | SND_PCI_QUIRK(0x1025, 0x106d, "Acer Cloudbook 14", ALC283_FIXUP_CHROME_BOOK), |
---|
| 8814 | + SND_PCI_QUIRK(0x1025, 0x1094, "Acer Aspire E5-575T", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST), |
---|
7010 | 8815 | SND_PCI_QUIRK(0x1025, 0x1099, "Acer Aspire E5-523G", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), |
---|
7011 | 8816 | SND_PCI_QUIRK(0x1025, 0x110e, "Acer Aspire ES1-432", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), |
---|
| 8817 | + SND_PCI_QUIRK(0x1025, 0x1166, "Acer Veriton N4640G", ALC269_FIXUP_LIFEBOOK), |
---|
| 8818 | + SND_PCI_QUIRK(0x1025, 0x1167, "Acer Veriton N6640G", ALC269_FIXUP_LIFEBOOK), |
---|
7012 | 8819 | SND_PCI_QUIRK(0x1025, 0x1246, "Acer Predator Helios 500", ALC299_FIXUP_PREDATOR_SPK), |
---|
| 8820 | + SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS), |
---|
| 8821 | + SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE), |
---|
| 8822 | + SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC), |
---|
7013 | 8823 | SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), |
---|
7014 | 8824 | SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), |
---|
7015 | 8825 | SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), |
---|
| 8826 | + SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC), |
---|
| 8827 | + SND_PCI_QUIRK(0x1025, 0x129d, "Acer SWIFT SF313-51", ALC256_FIXUP_ACER_MIC_NO_PRESENCE), |
---|
| 8828 | + SND_PCI_QUIRK(0x1025, 0x1300, "Acer SWIFT SF314-56", ALC256_FIXUP_ACER_MIC_NO_PRESENCE), |
---|
7016 | 8829 | SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), |
---|
7017 | 8830 | SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC), |
---|
7018 | 8831 | SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC), |
---|
| 8832 | + SND_PCI_QUIRK(0x1025, 0x141f, "Acer Spin SP513-54N", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), |
---|
| 8833 | + SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), |
---|
| 8834 | + SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE), |
---|
| 8835 | + SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC), |
---|
| 8836 | + SND_PCI_QUIRK(0x1025, 0x1534, "Acer Predator PH315-54", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), |
---|
7019 | 8837 | SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), |
---|
| 8838 | + SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X), |
---|
7020 | 8839 | SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS), |
---|
7021 | 8840 | SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X), |
---|
7022 | 8841 | SND_PCI_QUIRK(0x1028, 0x05be, "Dell Latitude E6540", ALC292_FIXUP_DELL_E7X), |
---|
.. | .. |
---|
7064 | 8883 | SND_PCI_QUIRK(0x1028, 0x097e, "Dell Precision", ALC289_FIXUP_DUAL_SPK), |
---|
7065 | 8884 | SND_PCI_QUIRK(0x1028, 0x098d, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE), |
---|
7066 | 8885 | SND_PCI_QUIRK(0x1028, 0x09bf, "Dell Precision", ALC233_FIXUP_ASUS_MIC_NO_PRESENCE), |
---|
| 8886 | + SND_PCI_QUIRK(0x1028, 0x0a2e, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC), |
---|
| 8887 | + SND_PCI_QUIRK(0x1028, 0x0a30, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC), |
---|
| 8888 | + SND_PCI_QUIRK(0x1028, 0x0a58, "Dell", ALC255_FIXUP_DELL_HEADSET_MIC), |
---|
| 8889 | + SND_PCI_QUIRK(0x1028, 0x0a61, "Dell XPS 15 9510", ALC289_FIXUP_DUAL_SPK), |
---|
| 8890 | + SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK), |
---|
| 8891 | + SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE), |
---|
| 8892 | + SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE), |
---|
| 8893 | + SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK), |
---|
| 8894 | + SND_PCI_QUIRK(0x1028, 0x0b1a, "Dell Precision 5570", ALC289_FIXUP_DUAL_SPK), |
---|
| 8895 | + SND_PCI_QUIRK(0x1028, 0x0b37, "Dell Inspiron 16 Plus 7620 2-in-1", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS), |
---|
| 8896 | + SND_PCI_QUIRK(0x1028, 0x0b71, "Dell Inspiron 16 Plus 7620", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS), |
---|
| 8897 | + SND_PCI_QUIRK(0x1028, 0x0c03, "Dell Precision 5340", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE), |
---|
| 8898 | + SND_PCI_QUIRK(0x1028, 0x0c19, "Dell Precision 3340", ALC236_FIXUP_DELL_DUAL_CODECS), |
---|
| 8899 | + SND_PCI_QUIRK(0x1028, 0x0c1a, "Dell Precision 3340", ALC236_FIXUP_DELL_DUAL_CODECS), |
---|
| 8900 | + SND_PCI_QUIRK(0x1028, 0x0c1b, "Dell Precision 3440", ALC236_FIXUP_DELL_DUAL_CODECS), |
---|
| 8901 | + SND_PCI_QUIRK(0x1028, 0x0c1c, "Dell Precision 3540", ALC236_FIXUP_DELL_DUAL_CODECS), |
---|
| 8902 | + SND_PCI_QUIRK(0x1028, 0x0c1d, "Dell Precision 3440", ALC236_FIXUP_DELL_DUAL_CODECS), |
---|
| 8903 | + SND_PCI_QUIRK(0x1028, 0x0c1e, "Dell Precision 3540", ALC236_FIXUP_DELL_DUAL_CODECS), |
---|
7067 | 8904 | SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), |
---|
7068 | 8905 | SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), |
---|
7069 | 8906 | SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), |
---|
.. | .. |
---|
7123 | 8960 | SND_PCI_QUIRK(0x103c, 0x2335, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
---|
7124 | 8961 | SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
---|
7125 | 8962 | SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
---|
| 8963 | + SND_PCI_QUIRK(0x103c, 0x2b5e, "HP 288 Pro G2 MT", ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE), |
---|
7126 | 8964 | SND_PCI_QUIRK(0x103c, 0x802e, "HP Z240 SFF", ALC221_FIXUP_HP_MIC_NO_PRESENCE), |
---|
7127 | 8965 | SND_PCI_QUIRK(0x103c, 0x802f, "HP Z240", ALC221_FIXUP_HP_MIC_NO_PRESENCE), |
---|
7128 | | - SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3), |
---|
| 8966 | + SND_PCI_QUIRK(0x103c, 0x8077, "HP", ALC256_FIXUP_HP_HEADSET_MIC), |
---|
| 8967 | + SND_PCI_QUIRK(0x103c, 0x8158, "HP", ALC256_FIXUP_HP_HEADSET_MIC), |
---|
| 8968 | + SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC295_FIXUP_HP_X360), |
---|
7129 | 8969 | SND_PCI_QUIRK(0x103c, 0x8256, "HP", ALC221_FIXUP_HP_FRONT_MIC), |
---|
7130 | 8970 | SND_PCI_QUIRK(0x103c, 0x827e, "HP x360", ALC295_FIXUP_HP_X360), |
---|
7131 | 8971 | SND_PCI_QUIRK(0x103c, 0x827f, "HP x360", ALC269_FIXUP_HP_MUTE_LED_MIC3), |
---|
.. | .. |
---|
7134 | 8974 | SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3), |
---|
7135 | 8975 | SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3), |
---|
7136 | 8976 | SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3), |
---|
| 8977 | + SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN), |
---|
7137 | 8978 | 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), |
---|
| 8979 | + SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360), |
---|
| 8980 | + SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT), |
---|
| 8981 | + SND_PCI_QUIRK(0x103c, 0x861f, "HP Elite Dragonfly G1", ALC285_FIXUP_HP_GPIO_AMP_INIT), |
---|
| 8982 | + SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED), |
---|
| 8983 | + SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO), |
---|
| 8984 | + SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), |
---|
| 8985 | + SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), |
---|
| 8986 | + SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED), |
---|
| 8987 | + SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), |
---|
| 8988 | + SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), |
---|
| 8989 | + SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED), |
---|
| 8990 | + SND_PCI_QUIRK(0x103c, 0x8728, "HP EliteBook 840 G7", ALC285_FIXUP_HP_GPIO_LED), |
---|
| 8991 | + SND_PCI_QUIRK(0x103c, 0x8729, "HP", ALC285_FIXUP_HP_GPIO_LED), |
---|
| 8992 | + SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), |
---|
| 8993 | + SND_PCI_QUIRK(0x103c, 0x8735, "HP ProBook 435 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), |
---|
| 8994 | + SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT), |
---|
| 8995 | + SND_PCI_QUIRK(0x103c, 0x8760, "HP", ALC285_FIXUP_HP_MUTE_LED), |
---|
| 8996 | + SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED), |
---|
| 8997 | + SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED), |
---|
| 8998 | + SND_PCI_QUIRK(0x103c, 0x8780, "HP ZBook Fury 17 G7 Mobile Workstation", |
---|
| 8999 | + ALC285_FIXUP_HP_GPIO_AMP_INIT), |
---|
| 9000 | + SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation", |
---|
| 9001 | + ALC285_FIXUP_HP_GPIO_AMP_INIT), |
---|
| 9002 | + SND_PCI_QUIRK(0x103c, 0x8786, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED), |
---|
| 9003 | + SND_PCI_QUIRK(0x103c, 0x8787, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED), |
---|
| 9004 | + SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED), |
---|
| 9005 | + SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED), |
---|
| 9006 | + SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), |
---|
| 9007 | + SND_PCI_QUIRK(0x103c, 0x87e7, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), |
---|
| 9008 | + SND_PCI_QUIRK(0x103c, 0x87f1, "HP ProBook 630 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), |
---|
| 9009 | + SND_PCI_QUIRK(0x103c, 0x87f2, "HP ProBook 640 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), |
---|
| 9010 | + SND_PCI_QUIRK(0x103c, 0x87f4, "HP", ALC287_FIXUP_HP_GPIO_LED), |
---|
| 9011 | + SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED), |
---|
| 9012 | + SND_PCI_QUIRK(0x103c, 0x87f6, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP), |
---|
| 9013 | + SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP), |
---|
| 9014 | + SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), |
---|
| 9015 | + SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), |
---|
| 9016 | + SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), |
---|
| 9017 | + SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), |
---|
| 9018 | + SND_PCI_QUIRK(0x103c, 0x881d, "HP 250 G8 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), |
---|
| 9019 | + SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), |
---|
| 9020 | + SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), |
---|
| 9021 | + SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), |
---|
| 9022 | + SND_PCI_QUIRK(0x103c, 0x884c, "HP EliteBook 840 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), |
---|
| 9023 | + SND_PCI_QUIRK(0x103c, 0x8862, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST), |
---|
| 9024 | + SND_PCI_QUIRK(0x103c, 0x8863, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST), |
---|
| 9025 | + SND_PCI_QUIRK(0x103c, 0x886d, "HP ZBook Fury 17.3 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), |
---|
| 9026 | + SND_PCI_QUIRK(0x103c, 0x8870, "HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), |
---|
| 9027 | + SND_PCI_QUIRK(0x103c, 0x8873, "HP ZBook Studio 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), |
---|
| 9028 | + SND_PCI_QUIRK(0x103c, 0x887a, "HP Laptop 15s-eq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), |
---|
| 9029 | + SND_PCI_QUIRK(0x103c, 0x888d, "HP ZBook Power 15.6 inch G8 Mobile Workstation PC", ALC236_FIXUP_HP_GPIO_LED), |
---|
| 9030 | + SND_PCI_QUIRK(0x103c, 0x8895, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED), |
---|
| 9031 | + SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED), |
---|
| 9032 | + SND_PCI_QUIRK(0x103c, 0x89aa, "HP EliteBook 630 G9", ALC236_FIXUP_HP_GPIO_LED), |
---|
7139 | 9033 | SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), |
---|
7140 | 9034 | SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), |
---|
7141 | 9035 | SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
---|
.. | .. |
---|
7144 | 9038 | SND_PCI_QUIRK(0x1043, 0x10d0, "ASUS X540LA/X540LJ", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), |
---|
7145 | 9039 | SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
---|
7146 | 9040 | SND_PCI_QUIRK(0x1043, 0x11c0, "ASUS X556UR", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), |
---|
| 9041 | + SND_PCI_QUIRK(0x1043, 0x125e, "ASUS Q524UQK", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), |
---|
7147 | 9042 | SND_PCI_QUIRK(0x1043, 0x1271, "ASUS X430UN", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), |
---|
7148 | 9043 | SND_PCI_QUIRK(0x1043, 0x1290, "ASUS X441SA", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE), |
---|
7149 | 9044 | 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 | 9045 | SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC), |
---|
| 9046 | + SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC), |
---|
| 9047 | + SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE), |
---|
7152 | 9048 | SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC), |
---|
7153 | 9049 | SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK), |
---|
7154 | 9050 | SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A), |
---|
| 9051 | + SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK), |
---|
| 9052 | + SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401), |
---|
7155 | 9053 | SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), |
---|
| 9054 | + SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS), |
---|
7156 | 9055 | SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK), |
---|
| 9056 | + SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS), |
---|
7157 | 9057 | SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC), |
---|
| 9058 | + SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC), |
---|
| 9059 | + SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE), |
---|
| 9060 | + SND_PCI_QUIRK(0x1043, 0x1970, "ASUS UX550VE", ALC289_FIXUP_ASUS_GA401), |
---|
| 9061 | + SND_PCI_QUIRK(0x1043, 0x1982, "ASUS B1400CEPE", ALC256_FIXUP_ASUS_HPE), |
---|
7158 | 9062 | SND_PCI_QUIRK(0x1043, 0x19ce, "ASUS B9450FA", ALC294_FIXUP_ASUS_HPE), |
---|
| 9063 | + SND_PCI_QUIRK(0x1043, 0x19e1, "ASUS UX581LV", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE), |
---|
7159 | 9064 | SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), |
---|
7160 | 9065 | SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC), |
---|
| 9066 | + SND_PCI_QUIRK(0x1043, 0x1b11, "ASUS UX431DA", ALC294_FIXUP_ASUS_COEF_1B), |
---|
7161 | 9067 | SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC), |
---|
7162 | 9068 | SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), |
---|
7163 | 9069 | 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), |
---|
| 9070 | + SND_PCI_QUIRK(0x1043, 0x1c62, "ASUS GU603", ALC289_FIXUP_ASUS_GA401), |
---|
| 9071 | + SND_PCI_QUIRK(0x1043, 0x1c92, "ASUS ROG Strix G15", ALC285_FIXUP_ASUS_G533Z_PINS), |
---|
7165 | 9072 | SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC), |
---|
| 9073 | + SND_PCI_QUIRK(0x1043, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401), |
---|
| 9074 | + SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE), |
---|
| 9075 | + SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502), |
---|
| 9076 | + SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15", ALC294_FIXUP_ASUS_GU502_PINS), |
---|
| 9077 | + SND_PCI_QUIRK(0x1043, 0x1e5e, "ASUS ROG Strix G513", ALC294_FIXUP_ASUS_G513_PINS), |
---|
| 9078 | + SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401), |
---|
| 9079 | + SND_PCI_QUIRK(0x1043, 0x1c52, "ASUS Zephyrus G15 2022", ALC289_FIXUP_ASUS_GA401), |
---|
| 9080 | + SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401), |
---|
| 9081 | + SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16", ALC289_FIXUP_ASUS_GA401), |
---|
7166 | 9082 | SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2), |
---|
7167 | 9083 | SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC), |
---|
7168 | 9084 | SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC), |
---|
.. | .. |
---|
7178 | 9094 | SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK), |
---|
7179 | 9095 | SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT), |
---|
7180 | 9096 | 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 | 9097 | SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC), |
---|
| 9098 | + SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN), |
---|
7183 | 9099 | SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC), |
---|
7184 | 9100 | SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE), |
---|
| 9101 | + SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE), |
---|
| 9102 | + SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), |
---|
| 9103 | + SND_PCI_QUIRK(0x10ec, 0x124c, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), |
---|
| 9104 | + SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), |
---|
| 9105 | + SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), |
---|
7185 | 9106 | SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE), |
---|
7186 | 9107 | SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC), |
---|
| 9108 | + SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_AMP), |
---|
| 9109 | + SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_AMP), |
---|
| 9110 | + SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_AMP), |
---|
| 9111 | + SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_AMP), |
---|
| 9112 | + SND_PCI_QUIRK(0x144d, 0xc1a3, "Samsung Galaxy Book Pro (NP935XDB-KC1SE)", ALC298_FIXUP_SAMSUNG_AMP), |
---|
| 9113 | + SND_PCI_QUIRK(0x144d, 0xc1a6, "Samsung Galaxy Book Pro 360 (NP930QBD)", ALC298_FIXUP_SAMSUNG_AMP), |
---|
7187 | 9114 | SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8), |
---|
| 9115 | + SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_AMP), |
---|
| 9116 | + SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_AMP), |
---|
| 9117 | + SND_PCI_QUIRK(0x144d, 0xc832, "Samsung Galaxy Book Flex Alpha (NP730QCJ)", ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), |
---|
| 9118 | + SND_PCI_QUIRK(0x144d, 0xca03, "Samsung Galaxy Book2 Pro 360 (NP930QED)", ALC298_FIXUP_SAMSUNG_AMP), |
---|
| 9119 | + SND_PCI_QUIRK(0x144d, 0xc868, "Samsung Galaxy Book2 Pro (NP930XED)", ALC298_FIXUP_SAMSUNG_AMP), |
---|
7188 | 9120 | SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC), |
---|
7189 | 9121 | SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC), |
---|
7190 | 9122 | SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC), |
---|
.. | .. |
---|
7198 | 9130 | SND_PCI_QUIRK(0x1558, 0x4018, "Clevo NV40M[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7199 | 9131 | SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7200 | 9132 | SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9133 | + SND_PCI_QUIRK(0x1558, 0x4041, "Clevo NV4[15]PZ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7201 | 9134 | SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7202 | 9135 | SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7203 | 9136 | SND_PCI_QUIRK(0x1558, 0x40d1, "Clevo NL41DU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9137 | + SND_PCI_QUIRK(0x1558, 0x5015, "Clevo NH5[58]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9138 | + SND_PCI_QUIRK(0x1558, 0x5017, "Clevo NH7[79]H[HJK]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7204 | 9139 | SND_PCI_QUIRK(0x1558, 0x50a3, "Clevo NJ51GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7205 | 9140 | SND_PCI_QUIRK(0x1558, 0x50b3, "Clevo NK50S[BEZ]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7206 | 9141 | SND_PCI_QUIRK(0x1558, 0x50b6, "Clevo NK50S5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7207 | 9142 | SND_PCI_QUIRK(0x1558, 0x50b8, "Clevo NK50SZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7208 | 9143 | SND_PCI_QUIRK(0x1558, 0x50d5, "Clevo NP50D5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9144 | + SND_PCI_QUIRK(0x1558, 0x50e1, "Clevo NH5[58]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9145 | + SND_PCI_QUIRK(0x1558, 0x50e2, "Clevo NH7[79]HPQ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7209 | 9146 | SND_PCI_QUIRK(0x1558, 0x50f0, "Clevo NH50A[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7210 | 9147 | SND_PCI_QUIRK(0x1558, 0x50f2, "Clevo NH50E[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7211 | 9148 | SND_PCI_QUIRK(0x1558, 0x50f3, "Clevo NH58DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
.. | .. |
---|
7220 | 9157 | SND_PCI_QUIRK(0x1558, 0x70f3, "Clevo NH77DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7221 | 9158 | SND_PCI_QUIRK(0x1558, 0x70f4, "Clevo NH77EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7222 | 9159 | SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9160 | + SND_PCI_QUIRK(0x1558, 0x7716, "Clevo NS50PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9161 | + SND_PCI_QUIRK(0x1558, 0x7717, "Clevo NS70PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9162 | + SND_PCI_QUIRK(0x1558, 0x7718, "Clevo L140PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9163 | + SND_PCI_QUIRK(0x1558, 0x7724, "Clevo L140AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7223 | 9164 | SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7224 | 9165 | SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7225 | 9166 | SND_PCI_QUIRK(0x1558, 0x8521, "Clevo NH77D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
.. | .. |
---|
7231 | 9172 | SND_PCI_QUIRK(0x1558, 0x8561, "System76 Gazelle (gaze14)", ALC269_FIXUP_HEADSET_MIC), |
---|
7232 | 9173 | SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[5|7][0-9]RZ[Q]", ALC269_FIXUP_DMIC), |
---|
7233 | 9174 | SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9175 | + SND_PCI_QUIRK(0x1558, 0x866d, "Clevo NP5[05]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9176 | + SND_PCI_QUIRK(0x1558, 0x867c, "Clevo NP7[01]PNP", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
| 9177 | + SND_PCI_QUIRK(0x1558, 0x867d, "Clevo NP7[01]PN[HJK]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7234 | 9178 | 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), |
---|
| 9179 | + SND_PCI_QUIRK(0x1558, 0x8686, "Clevo NH50[CZ]U", ALC256_FIXUP_MIC_NO_PRESENCE_AND_RESUME), |
---|
7236 | 9180 | SND_PCI_QUIRK(0x1558, 0x8a20, "Clevo NH55DCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7237 | 9181 | SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7238 | 9182 | SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
.. | .. |
---|
7249 | 9193 | SND_PCI_QUIRK(0x1558, 0xc019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7250 | 9194 | SND_PCI_QUIRK(0x1558, 0xc022, "Clevo NH77[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
---|
7251 | 9195 | SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS), |
---|
7252 | | - SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), |
---|
| 9196 | + SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340), |
---|
7253 | 9197 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE), |
---|
7254 | 9198 | SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE), |
---|
7255 | 9199 | SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE), |
---|
.. | .. |
---|
7283 | 9227 | SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), |
---|
7284 | 9228 | SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), |
---|
7285 | 9229 | 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), |
---|
| 9230 | + SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_THINKPAD_HEADSET_JACK), |
---|
| 9231 | + SND_PCI_QUIRK(0x17aa, 0x22be, "Thinkpad X1 Carbon 8th", ALC285_FIXUP_THINKPAD_HEADSET_JACK), |
---|
| 9232 | + SND_PCI_QUIRK(0x17aa, 0x22c1, "Thinkpad P1 Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK), |
---|
| 9233 | + SND_PCI_QUIRK(0x17aa, 0x22c2, "Thinkpad X1 Extreme Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK), |
---|
7288 | 9234 | SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), |
---|
7289 | 9235 | SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), |
---|
7290 | 9236 | SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), |
---|
.. | .. |
---|
7295 | 9241 | SND_PCI_QUIRK(0x17aa, 0x3151, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), |
---|
7296 | 9242 | SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), |
---|
7297 | 9243 | SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), |
---|
7298 | | - SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940", ALC298_FIXUP_LENOVO_SPK_VOLUME), |
---|
| 9244 | + SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340), |
---|
| 9245 | + SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), |
---|
| 9246 | + SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS), |
---|
| 9247 | + SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7), |
---|
| 9248 | + SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS), |
---|
| 9249 | + SND_PCI_QUIRK(0x17aa, 0x3820, "Yoga Duet 7 13ITL6", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), |
---|
| 9250 | + SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS), |
---|
| 9251 | + SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF), |
---|
| 9252 | + SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), |
---|
| 9253 | + SND_PCI_QUIRK(0x17aa, 0x383d, "Legion Y9000X 2019", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS), |
---|
| 9254 | + SND_PCI_QUIRK(0x17aa, 0x3843, "Yoga 9i", ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP), |
---|
| 9255 | + SND_PCI_QUIRK(0x17aa, 0x384a, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), |
---|
| 9256 | + SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), |
---|
| 9257 | + SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), |
---|
7299 | 9258 | SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI), |
---|
7300 | 9259 | SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC), |
---|
7301 | 9260 | SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI), |
---|
.. | .. |
---|
7315 | 9274 | SND_PCI_QUIRK(0x17aa, 0x505d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), |
---|
7316 | 9275 | SND_PCI_QUIRK(0x17aa, 0x505f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), |
---|
7317 | 9276 | SND_PCI_QUIRK(0x17aa, 0x5062, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), |
---|
| 9277 | + SND_PCI_QUIRK(0x17aa, 0x508b, "Thinkpad X12 Gen 1", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS), |
---|
7318 | 9278 | SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
---|
7319 | 9279 | SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), |
---|
7320 | 9280 | SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), |
---|
7321 | 9281 | SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), |
---|
7322 | | - SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MBXP", ALC256_FIXUP_HUAWEI_MBXP_PINS), |
---|
| 9282 | + SND_PCI_QUIRK(0x17aa, 0x9e56, "Lenovo ZhaoYang CF4620Z", ALC286_FIXUP_SONY_MIC_NO_PRESENCE), |
---|
| 9283 | + SND_PCI_QUIRK(0x1849, 0x1233, "ASRock NUC Box 1100", ALC233_FIXUP_NO_AUDIO_JACK), |
---|
| 9284 | + SND_PCI_QUIRK(0x1849, 0xa233, "Positivo Master C6300", ALC269_FIXUP_HEADSET_MIC), |
---|
| 9285 | + SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS), |
---|
| 9286 | + SND_PCI_QUIRK(0x19e5, 0x320f, "Huawei WRT-WX9 ", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), |
---|
| 9287 | + SND_PCI_QUIRK(0x1b35, 0x1235, "CZC B20", ALC269_FIXUP_CZC_B20), |
---|
| 9288 | + SND_PCI_QUIRK(0x1b35, 0x1236, "CZC TMI", ALC269_FIXUP_CZC_TMI), |
---|
| 9289 | + SND_PCI_QUIRK(0x1b35, 0x1237, "CZC L101", ALC269_FIXUP_CZC_L101), |
---|
7323 | 9290 | SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */ |
---|
| 9291 | + SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802), |
---|
| 9292 | + SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X), |
---|
| 9293 | + SND_PCI_QUIRK(0x1c6c, 0x1251, "Positivo N14KP6-TG", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE), |
---|
| 9294 | + SND_PCI_QUIRK(0x1d05, 0x1132, "TongFang PHxTxX1", ALC256_FIXUP_SET_COEF_DEFAULTS), |
---|
| 9295 | + SND_PCI_QUIRK(0x1d05, 0x1096, "TongFang GMxMRxx", ALC269_FIXUP_NO_SHUTUP), |
---|
| 9296 | + SND_PCI_QUIRK(0x1d05, 0x1100, "TongFang GKxNRxx", ALC269_FIXUP_NO_SHUTUP), |
---|
| 9297 | + SND_PCI_QUIRK(0x1d05, 0x1111, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP), |
---|
| 9298 | + SND_PCI_QUIRK(0x1d05, 0x1119, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP), |
---|
| 9299 | + SND_PCI_QUIRK(0x1d05, 0x1129, "TongFang GMxZGxx", ALC269_FIXUP_NO_SHUTUP), |
---|
| 9300 | + SND_PCI_QUIRK(0x1d05, 0x1147, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP), |
---|
| 9301 | + SND_PCI_QUIRK(0x1d05, 0x115c, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP), |
---|
| 9302 | + SND_PCI_QUIRK(0x1d05, 0x121b, "TongFang GMxAGxx", ALC269_FIXUP_NO_SHUTUP), |
---|
| 9303 | + SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC), |
---|
| 9304 | + SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE), |
---|
7324 | 9305 | 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), |
---|
| 9306 | + SND_PCI_QUIRK(0x1d72, 0x1945, "Redmi G", ALC256_FIXUP_ASUS_HEADSET_MIC), |
---|
| 9307 | + SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC), |
---|
| 9308 | + SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC), |
---|
| 9309 | + SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED), |
---|
| 9310 | + SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10), |
---|
7326 | 9311 | |
---|
7327 | 9312 | #if 0 |
---|
7328 | 9313 | /* Below is a quirk table taken from the old code. |
---|
.. | .. |
---|
7380 | 9365 | SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED), |
---|
7381 | 9366 | SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), |
---|
7382 | 9367 | SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI), |
---|
| 9368 | + SND_PCI_QUIRK_VENDOR(0x19e5, "Huawei Matebook", ALC255_FIXUP_MIC_MUTE_LED), |
---|
7383 | 9369 | {} |
---|
7384 | 9370 | }; |
---|
7385 | 9371 | |
---|
.. | .. |
---|
7449 | 9435 | {.id = ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "alc255-dell2"}, |
---|
7450 | 9436 | {.id = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "alc293-dell1"}, |
---|
7451 | 9437 | {.id = ALC283_FIXUP_HEADSET_MIC, .name = "alc283-headset"}, |
---|
7452 | | - {.id = ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED, .name = "alc255-dell-mute"}, |
---|
| 9438 | + {.id = ALC255_FIXUP_MIC_MUTE_LED, .name = "alc255-dell-mute"}, |
---|
7453 | 9439 | {.id = ALC282_FIXUP_ASPIRE_V5_PINS, .name = "aspire-v5"}, |
---|
| 9440 | + {.id = ALC269VB_FIXUP_ASPIRE_E1_COEF, .name = "aspire-e1-coef"}, |
---|
7454 | 9441 | {.id = ALC280_FIXUP_HP_GPIO4, .name = "hp-gpio4"}, |
---|
7455 | 9442 | {.id = ALC286_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, |
---|
7456 | 9443 | {.id = ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, .name = "hp-gpio2-hotkey"}, |
---|
.. | .. |
---|
7488 | 9475 | {.id = ALC255_FIXUP_DUMMY_LINEOUT_VERB, .name = "alc255-dummy-lineout"}, |
---|
7489 | 9476 | {.id = ALC255_FIXUP_DELL_HEADSET_MIC, .name = "alc255-dell-headset"}, |
---|
7490 | 9477 | {.id = ALC295_FIXUP_HP_X360, .name = "alc295-hp-x360"}, |
---|
| 9478 | + {.id = ALC225_FIXUP_HEADSET_JACK, .name = "alc-headset-jack"}, |
---|
| 9479 | + {.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-chrome-book"}, |
---|
7491 | 9480 | {.id = ALC299_FIXUP_PREDATOR_SPK, .name = "predator-spk"}, |
---|
| 9481 | + {.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"}, |
---|
7492 | 9482 | {.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"}, |
---|
| 9483 | + {.id = ALC298_FIXUP_SAMSUNG_AMP, .name = "alc298-samsung-amp"}, |
---|
| 9484 | + {.id = ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc256-samsung-headphone"}, |
---|
| 9485 | + {.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"}, |
---|
| 9486 | + {.id = ALC274_FIXUP_HP_MIC, .name = "alc274-hp-mic-detect"}, |
---|
| 9487 | + {.id = ALC245_FIXUP_HP_X360_AMP, .name = "alc245-hp-x360-amp"}, |
---|
| 9488 | + {.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"}, |
---|
| 9489 | + {.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"}, |
---|
| 9490 | + {.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"}, |
---|
| 9491 | + {.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"}, |
---|
| 9492 | + {.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"}, |
---|
| 9493 | + {.id = ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, .name = "alc255-acer-headphone-and-mic"}, |
---|
| 9494 | + {.id = ALC285_FIXUP_HP_GPIO_AMP_INIT, .name = "alc285-hp-amp-init"}, |
---|
7493 | 9495 | {} |
---|
7494 | 9496 | }; |
---|
7495 | 9497 | #define ALC225_STANDARD_PINS \ |
---|
.. | .. |
---|
7584 | 9586 | {0x19, 0x02a11020}, |
---|
7585 | 9587 | {0x1a, 0x02a11030}, |
---|
7586 | 9588 | {0x21, 0x0221101f}), |
---|
7587 | | - SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
7588 | | - {0x12, 0x90a60140}, |
---|
| 9589 | + SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC, |
---|
| 9590 | + {0x21, 0x02211010}), |
---|
| 9591 | + SND_HDA_PIN_QUIRK(0x10ec0236, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC, |
---|
7589 | 9592 | {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}), |
---|
| 9593 | + {0x19, 0x02a11020}, |
---|
| 9594 | + {0x21, 0x02211030}), |
---|
7601 | 9595 | SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, |
---|
7602 | 9596 | {0x14, 0x90170110}, |
---|
7603 | 9597 | {0x21, 0x02211020}), |
---|
.. | .. |
---|
7680 | 9674 | SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
7681 | 9675 | {0x1b, 0x01011020}, |
---|
7682 | 9676 | {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 | 9677 | SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC, |
---|
7716 | 9678 | {0x14, 0x90170110}, |
---|
7717 | 9679 | {0x1b, 0x90a70130}, |
---|
.. | .. |
---|
7732 | 9694 | {0x1a, 0x90a70130}, |
---|
7733 | 9695 | {0x1b, 0x90170110}, |
---|
7734 | 9696 | {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}), |
---|
| 9697 | + SND_HDA_PIN_QUIRK(0x10ec0256, 0x103c, "HP", ALC256_FIXUP_HP_HEADSET_MIC, |
---|
| 9698 | + {0x14, 0x90170110}, |
---|
| 9699 | + {0x19, 0x02a11020}, |
---|
| 9700 | + {0x21, 0x0221101f}), |
---|
| 9701 | + SND_HDA_PIN_QUIRK(0x10ec0274, 0x103c, "HP", ALC274_FIXUP_HP_HEADSET_MIC, |
---|
| 9702 | + {0x17, 0x90170110}, |
---|
| 9703 | + {0x19, 0x03a11030}, |
---|
| 9704 | + {0x21, 0x03211020}), |
---|
7740 | 9705 | SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4, |
---|
7741 | 9706 | {0x12, 0x90a60130}, |
---|
7742 | 9707 | {0x14, 0x90170110}, |
---|
.. | .. |
---|
7774 | 9739 | {0x12, 0x90a60140}, |
---|
7775 | 9740 | {0x19, 0x04a11030}, |
---|
7776 | 9741 | {0x21, 0x04211020}), |
---|
| 9742 | + SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT, |
---|
| 9743 | + ALC282_STANDARD_PINS, |
---|
| 9744 | + {0x12, 0x90a609c0}, |
---|
| 9745 | + {0x18, 0x03a11830}, |
---|
| 9746 | + {0x19, 0x04a19831}, |
---|
| 9747 | + {0x1a, 0x0481303f}, |
---|
| 9748 | + {0x1b, 0x04211020}, |
---|
| 9749 | + {0x21, 0x0321101f}), |
---|
| 9750 | + SND_HDA_PIN_QUIRK(0x10ec0282, 0x1025, "Acer", ALC282_FIXUP_ACER_DISABLE_LINEOUT, |
---|
| 9751 | + ALC282_STANDARD_PINS, |
---|
| 9752 | + {0x12, 0x90a60940}, |
---|
| 9753 | + {0x18, 0x03a11830}, |
---|
| 9754 | + {0x19, 0x04a19831}, |
---|
| 9755 | + {0x1a, 0x0481303f}, |
---|
| 9756 | + {0x1b, 0x04211020}, |
---|
| 9757 | + {0x21, 0x0321101f}), |
---|
7777 | 9758 | SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
7778 | 9759 | ALC282_STANDARD_PINS, |
---|
7779 | 9760 | {0x12, 0x90a60130}, |
---|
.. | .. |
---|
7792 | 9773 | {0x14, 0x90170110}, |
---|
7793 | 9774 | {0x19, 0x04a11040}, |
---|
7794 | 9775 | {0x21, 0x04211020}), |
---|
| 9776 | + SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE, |
---|
| 9777 | + {0x14, 0x90170110}, |
---|
| 9778 | + {0x19, 0x04a11040}, |
---|
| 9779 | + {0x1d, 0x40600001}, |
---|
| 9780 | + {0x21, 0x04211020}), |
---|
| 9781 | + SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK, |
---|
| 9782 | + {0x14, 0x90170110}, |
---|
| 9783 | + {0x19, 0x04a11040}, |
---|
| 9784 | + {0x21, 0x04211020}), |
---|
| 9785 | + SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_HEADSET_JACK, |
---|
| 9786 | + {0x14, 0x90170110}, |
---|
| 9787 | + {0x17, 0x90170111}, |
---|
| 9788 | + {0x19, 0x03a11030}, |
---|
| 9789 | + {0x21, 0x03211020}), |
---|
7795 | 9790 | SND_HDA_PIN_QUIRK(0x10ec0286, 0x1025, "Acer", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE, |
---|
7796 | 9791 | {0x12, 0x90a60130}, |
---|
7797 | 9792 | {0x17, 0x90170110}, |
---|
.. | .. |
---|
7800 | 9795 | {0x12, 0x90a60120}, |
---|
7801 | 9796 | {0x14, 0x90170110}, |
---|
7802 | 9797 | {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 | 9798 | SND_HDA_PIN_QUIRK(0x10ec0290, 0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1, |
---|
7808 | 9799 | ALC290_STANDARD_PINS, |
---|
7809 | 9800 | {0x15, 0x04211040}, |
---|
.. | .. |
---|
7878 | 9869 | {0x12, 0x90a60130}, |
---|
7879 | 9870 | {0x17, 0x90170110}, |
---|
7880 | 9871 | {0x21, 0x03211020}), |
---|
| 9872 | + SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE, |
---|
| 9873 | + {0x12, 0x90a60120}, |
---|
| 9874 | + {0x17, 0x90170110}, |
---|
| 9875 | + {0x21, 0x04211030}), |
---|
| 9876 | + SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE, |
---|
| 9877 | + {0x12, 0x90a60130}, |
---|
| 9878 | + {0x17, 0x90170110}, |
---|
| 9879 | + {0x21, 0x03211020}), |
---|
| 9880 | + SND_HDA_PIN_QUIRK(0x10ec0295, 0x1043, "ASUS", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE, |
---|
| 9881 | + {0x12, 0x90a60130}, |
---|
| 9882 | + {0x17, 0x90170110}, |
---|
| 9883 | + {0x21, 0x03211020}), |
---|
7881 | 9884 | SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, |
---|
7882 | 9885 | {0x14, 0x90170110}, |
---|
7883 | 9886 | {0x21, 0x04211020}), |
---|
.. | .. |
---|
7909 | 9912 | {0x17, 0x90170110}, |
---|
7910 | 9913 | {0x1a, 0x03011020}, |
---|
7911 | 9914 | {0x21, 0x03211030}), |
---|
| 9915 | + SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE, |
---|
| 9916 | + {0x12, 0xb7a60140}, |
---|
| 9917 | + {0x17, 0x90170110}, |
---|
| 9918 | + {0x1a, 0x03a11030}, |
---|
| 9919 | + {0x21, 0x03211020}), |
---|
7912 | 9920 | SND_HDA_PIN_QUIRK(0x10ec0299, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, |
---|
7913 | 9921 | ALC225_STANDARD_PINS, |
---|
7914 | 9922 | {0x12, 0xb7a60130}, |
---|
.. | .. |
---|
7919 | 9927 | {0x18, 0x02a11030}, |
---|
7920 | 9928 | {0x19, 0x02a1103f}, |
---|
7921 | 9929 | {0x21, 0x0221101f}), |
---|
| 9930 | + {} |
---|
| 9931 | +}; |
---|
| 9932 | + |
---|
| 9933 | +/* This is the fallback pin_fixup_tbl for alc269 family, to make the tbl match |
---|
| 9934 | + * more machines, don't need to match all valid pins, just need to match |
---|
| 9935 | + * all the pins defined in the tbl. Just because of this reason, it is possible |
---|
| 9936 | + * that a single machine matches multiple tbls, so there is one limitation: |
---|
| 9937 | + * at most one tbl is allowed to define for the same vendor and same codec |
---|
| 9938 | + */ |
---|
| 9939 | +static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = { |
---|
| 9940 | + SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, |
---|
| 9941 | + {0x19, 0x40000000}, |
---|
| 9942 | + {0x1b, 0x40000000}), |
---|
| 9943 | + SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
| 9944 | + {0x19, 0x40000000}, |
---|
| 9945 | + {0x1a, 0x40000000}), |
---|
| 9946 | + SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
---|
| 9947 | + {0x19, 0x40000000}, |
---|
| 9948 | + {0x1a, 0x40000000}), |
---|
| 9949 | + SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, |
---|
| 9950 | + {0x19, 0x40000000}, |
---|
| 9951 | + {0x1a, 0x40000000}), |
---|
7922 | 9952 | {} |
---|
7923 | 9953 | }; |
---|
7924 | 9954 | |
---|
.. | .. |
---|
7976 | 10006 | spec = codec->spec; |
---|
7977 | 10007 | spec->gen.shared_mic_vref_pin = 0x18; |
---|
7978 | 10008 | codec->power_save_node = 0; |
---|
| 10009 | + spec->en_3kpull_low = true; |
---|
7979 | 10010 | |
---|
7980 | 10011 | #ifdef CONFIG_PM |
---|
7981 | 10012 | codec->patch_ops.suspend = alc269_suspend; |
---|
.. | .. |
---|
8050 | 10081 | spec->shutup = alc256_shutup; |
---|
8051 | 10082 | spec->init_hook = alc256_init; |
---|
8052 | 10083 | break; |
---|
| 10084 | + case 0x10ec0230: |
---|
8053 | 10085 | case 0x10ec0236: |
---|
8054 | 10086 | case 0x10ec0256: |
---|
| 10087 | + case 0x19e58326: |
---|
8055 | 10088 | spec->codec_variant = ALC269_TYPE_ALC256; |
---|
8056 | 10089 | spec->shutup = alc256_shutup; |
---|
8057 | 10090 | spec->init_hook = alc256_init; |
---|
8058 | 10091 | spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */ |
---|
| 10092 | + if (codec->core.vendor_id == 0x10ec0236 && |
---|
| 10093 | + codec->bus->pci->vendor != PCI_VENDOR_ID_AMD) |
---|
| 10094 | + spec->en_3kpull_low = false; |
---|
8059 | 10095 | break; |
---|
8060 | 10096 | case 0x10ec0257: |
---|
8061 | 10097 | spec->codec_variant = ALC269_TYPE_ALC257; |
---|
8062 | 10098 | spec->shutup = alc256_shutup; |
---|
8063 | 10099 | spec->init_hook = alc256_init; |
---|
8064 | 10100 | spec->gen.mixer_nid = 0; |
---|
| 10101 | + spec->en_3kpull_low = false; |
---|
8065 | 10102 | break; |
---|
8066 | 10103 | case 0x10ec0215: |
---|
8067 | 10104 | case 0x10ec0245: |
---|
.. | .. |
---|
8113 | 10150 | spec->init_hook = alc5505_dsp_init; |
---|
8114 | 10151 | } |
---|
8115 | 10152 | |
---|
| 10153 | + alc_pre_init(codec); |
---|
| 10154 | + |
---|
8116 | 10155 | snd_hda_pick_fixup(codec, alc269_fixup_models, |
---|
8117 | 10156 | alc269_fixup_tbl, alc269_fixups); |
---|
8118 | | - snd_hda_pick_pin_fixup(codec, alc269_pin_fixup_tbl, alc269_fixups); |
---|
| 10157 | + /* FIXME: both TX300 and ROG Strix G17 have the same SSID, and |
---|
| 10158 | + * the quirk breaks the latter (bko#214101). |
---|
| 10159 | + * Clear the wrong entry. |
---|
| 10160 | + */ |
---|
| 10161 | + if (codec->fixup_id == ALC282_FIXUP_ASUS_TX300 && |
---|
| 10162 | + codec->core.vendor_id == 0x10ec0294) { |
---|
| 10163 | + codec_dbg(codec, "Clear wrong fixup for ASUS ROG Strix G17\n"); |
---|
| 10164 | + codec->fixup_id = HDA_FIXUP_ID_NOT_SET; |
---|
| 10165 | + } |
---|
| 10166 | + |
---|
| 10167 | + snd_hda_pick_pin_fixup(codec, alc269_pin_fixup_tbl, alc269_fixups, true); |
---|
| 10168 | + snd_hda_pick_pin_fixup(codec, alc269_fallback_pin_fixup_tbl, alc269_fixups, false); |
---|
8119 | 10169 | snd_hda_pick_fixup(codec, NULL, alc269_fixup_vendor_tbl, |
---|
8120 | 10170 | alc269_fixups); |
---|
8121 | 10171 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); |
---|
.. | .. |
---|
8248 | 10298 | return err; |
---|
8249 | 10299 | |
---|
8250 | 10300 | spec = codec->spec; |
---|
8251 | | - spec->gen.beep_nid = 0x23; |
---|
| 10301 | + if (has_cdefine_beep(codec)) |
---|
| 10302 | + spec->gen.beep_nid = 0x23; |
---|
8252 | 10303 | |
---|
8253 | 10304 | #ifdef CONFIG_PM |
---|
8254 | 10305 | spec->power_hook = alc_power_eapd; |
---|
8255 | 10306 | #endif |
---|
| 10307 | + |
---|
| 10308 | + alc_pre_init(codec); |
---|
8256 | 10309 | |
---|
8257 | 10310 | snd_hda_pick_fixup(codec, NULL, alc861_fixup_tbl, alc861_fixups); |
---|
8258 | 10311 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); |
---|
.. | .. |
---|
8347 | 10400 | return err; |
---|
8348 | 10401 | |
---|
8349 | 10402 | spec = codec->spec; |
---|
8350 | | - spec->gen.beep_nid = 0x23; |
---|
| 10403 | + if (has_cdefine_beep(codec)) |
---|
| 10404 | + spec->gen.beep_nid = 0x23; |
---|
8351 | 10405 | |
---|
8352 | 10406 | spec->shutup = alc_eapd_shutup; |
---|
| 10407 | + |
---|
| 10408 | + alc_pre_init(codec); |
---|
8353 | 10409 | |
---|
8354 | 10410 | snd_hda_pick_fixup(codec, NULL, alc861vd_fixup_tbl, alc861vd_fixups); |
---|
8355 | 10411 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); |
---|
.. | .. |
---|
8485 | 10541 | } |
---|
8486 | 10542 | } |
---|
8487 | 10543 | |
---|
8488 | | -static struct coef_fw alc668_coefs[] = { |
---|
| 10544 | +static void alc662_aspire_ethos_mute_speakers(struct hda_codec *codec, |
---|
| 10545 | + struct hda_jack_callback *cb) |
---|
| 10546 | +{ |
---|
| 10547 | + /* surround speakers at 0x1b already get muted automatically when |
---|
| 10548 | + * headphones are plugged in, but we have to mute/unmute the remaining |
---|
| 10549 | + * channels manually: |
---|
| 10550 | + * 0x15 - front left/front right |
---|
| 10551 | + * 0x18 - front center/ LFE |
---|
| 10552 | + */ |
---|
| 10553 | + if (snd_hda_jack_detect_state(codec, 0x1b) == HDA_JACK_PRESENT) { |
---|
| 10554 | + snd_hda_set_pin_ctl_cache(codec, 0x15, 0); |
---|
| 10555 | + snd_hda_set_pin_ctl_cache(codec, 0x18, 0); |
---|
| 10556 | + } else { |
---|
| 10557 | + snd_hda_set_pin_ctl_cache(codec, 0x15, PIN_OUT); |
---|
| 10558 | + snd_hda_set_pin_ctl_cache(codec, 0x18, PIN_OUT); |
---|
| 10559 | + } |
---|
| 10560 | +} |
---|
| 10561 | + |
---|
| 10562 | +static void alc662_fixup_aspire_ethos_hp(struct hda_codec *codec, |
---|
| 10563 | + const struct hda_fixup *fix, int action) |
---|
| 10564 | +{ |
---|
| 10565 | + /* Pin 0x1b: shared headphones jack and surround speakers */ |
---|
| 10566 | + if (!is_jack_detectable(codec, 0x1b)) |
---|
| 10567 | + return; |
---|
| 10568 | + |
---|
| 10569 | + switch (action) { |
---|
| 10570 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 10571 | + snd_hda_jack_detect_enable_callback(codec, 0x1b, |
---|
| 10572 | + alc662_aspire_ethos_mute_speakers); |
---|
| 10573 | + /* subwoofer needs an extra GPIO setting to become audible */ |
---|
| 10574 | + alc_setup_gpio(codec, 0x02); |
---|
| 10575 | + break; |
---|
| 10576 | + case HDA_FIXUP_ACT_INIT: |
---|
| 10577 | + /* Make sure to start in a correct state, i.e. if |
---|
| 10578 | + * headphones have been plugged in before powering up the system |
---|
| 10579 | + */ |
---|
| 10580 | + alc662_aspire_ethos_mute_speakers(codec, NULL); |
---|
| 10581 | + break; |
---|
| 10582 | + } |
---|
| 10583 | +} |
---|
| 10584 | + |
---|
| 10585 | +static void alc671_fixup_hp_headset_mic2(struct hda_codec *codec, |
---|
| 10586 | + const struct hda_fixup *fix, int action) |
---|
| 10587 | +{ |
---|
| 10588 | + struct alc_spec *spec = codec->spec; |
---|
| 10589 | + |
---|
| 10590 | + static const struct hda_pintbl pincfgs[] = { |
---|
| 10591 | + { 0x19, 0x02a11040 }, /* use as headset mic, with its own jack detect */ |
---|
| 10592 | + { 0x1b, 0x0181304f }, |
---|
| 10593 | + { } |
---|
| 10594 | + }; |
---|
| 10595 | + |
---|
| 10596 | + switch (action) { |
---|
| 10597 | + case HDA_FIXUP_ACT_PRE_PROBE: |
---|
| 10598 | + spec->gen.mixer_nid = 0; |
---|
| 10599 | + spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; |
---|
| 10600 | + snd_hda_apply_pincfgs(codec, pincfgs); |
---|
| 10601 | + break; |
---|
| 10602 | + case HDA_FIXUP_ACT_INIT: |
---|
| 10603 | + alc_write_coef_idx(codec, 0x19, 0xa054); |
---|
| 10604 | + break; |
---|
| 10605 | + } |
---|
| 10606 | +} |
---|
| 10607 | + |
---|
| 10608 | +static void alc897_hp_automute_hook(struct hda_codec *codec, |
---|
| 10609 | + struct hda_jack_callback *jack) |
---|
| 10610 | +{ |
---|
| 10611 | + struct alc_spec *spec = codec->spec; |
---|
| 10612 | + int vref; |
---|
| 10613 | + |
---|
| 10614 | + snd_hda_gen_hp_automute(codec, jack); |
---|
| 10615 | + vref = spec->gen.hp_jack_present ? (PIN_HP | AC_PINCTL_VREF_100) : PIN_HP; |
---|
| 10616 | + snd_hda_codec_write(codec, 0x1b, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, |
---|
| 10617 | + vref); |
---|
| 10618 | +} |
---|
| 10619 | + |
---|
| 10620 | +static void alc897_fixup_lenovo_headset_mic(struct hda_codec *codec, |
---|
| 10621 | + const struct hda_fixup *fix, int action) |
---|
| 10622 | +{ |
---|
| 10623 | + struct alc_spec *spec = codec->spec; |
---|
| 10624 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
| 10625 | + spec->gen.hp_automute_hook = alc897_hp_automute_hook; |
---|
| 10626 | + } |
---|
| 10627 | +} |
---|
| 10628 | + |
---|
| 10629 | +static void alc897_fixup_lenovo_headset_mode(struct hda_codec *codec, |
---|
| 10630 | + const struct hda_fixup *fix, int action) |
---|
| 10631 | +{ |
---|
| 10632 | + struct alc_spec *spec = codec->spec; |
---|
| 10633 | + |
---|
| 10634 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
---|
| 10635 | + spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; |
---|
| 10636 | + spec->gen.hp_automute_hook = alc897_hp_automute_hook; |
---|
| 10637 | + } |
---|
| 10638 | +} |
---|
| 10639 | + |
---|
| 10640 | +static const struct coef_fw alc668_coefs[] = { |
---|
8489 | 10641 | WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0), |
---|
8490 | 10642 | WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80), |
---|
8491 | 10643 | WRITE_COEF(0x08, 0x0031), WRITE_COEF(0x0a, 0x0060), WRITE_COEF(0x0b, 0x0), |
---|
.. | .. |
---|
8519 | 10671 | ALC662_FIXUP_LED_GPIO1, |
---|
8520 | 10672 | ALC662_FIXUP_IDEAPAD, |
---|
8521 | 10673 | ALC272_FIXUP_MARIO, |
---|
| 10674 | + ALC662_FIXUP_CZC_ET26, |
---|
8522 | 10675 | ALC662_FIXUP_CZC_P10T, |
---|
8523 | 10676 | ALC662_FIXUP_SKU_IGNORE, |
---|
8524 | 10677 | ALC662_FIXUP_HP_RP5800, |
---|
.. | .. |
---|
8556 | 10709 | ALC662_FIXUP_USI_FUNC, |
---|
8557 | 10710 | ALC662_FIXUP_USI_HEADSET_MODE, |
---|
8558 | 10711 | ALC662_FIXUP_LENOVO_MULTI_CODECS, |
---|
| 10712 | + ALC669_FIXUP_ACER_ASPIRE_ETHOS, |
---|
| 10713 | + ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET, |
---|
| 10714 | + ALC671_FIXUP_HP_HEADSET_MIC2, |
---|
| 10715 | + ALC662_FIXUP_ACER_X2660G_HEADSET_MODE, |
---|
| 10716 | + ALC662_FIXUP_ACER_NITRO_HEADSET_MODE, |
---|
| 10717 | + ALC668_FIXUP_ASUS_NO_HEADSET_MIC, |
---|
| 10718 | + ALC668_FIXUP_HEADSET_MIC, |
---|
| 10719 | + ALC668_FIXUP_MIC_DET_COEF, |
---|
| 10720 | + ALC897_FIXUP_LENOVO_HEADSET_MIC, |
---|
| 10721 | + ALC897_FIXUP_HEADSET_MIC_PIN, |
---|
| 10722 | + ALC897_FIXUP_HP_HSMIC_VERB, |
---|
| 10723 | + ALC897_FIXUP_LENOVO_HEADSET_MODE, |
---|
| 10724 | + ALC897_FIXUP_HEADSET_MIC_PIN2, |
---|
| 10725 | + ALC897_FIXUP_UNIS_H3C_X500S, |
---|
8559 | 10726 | }; |
---|
8560 | 10727 | |
---|
8561 | 10728 | static const struct hda_fixup alc662_fixups[] = { |
---|
.. | .. |
---|
8582 | 10749 | [ALC272_FIXUP_MARIO] = { |
---|
8583 | 10750 | .type = HDA_FIXUP_FUNC, |
---|
8584 | 10751 | .v.func = alc272_fixup_mario, |
---|
| 10752 | + }, |
---|
| 10753 | + [ALC662_FIXUP_CZC_ET26] = { |
---|
| 10754 | + .type = HDA_FIXUP_PINS, |
---|
| 10755 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 10756 | + {0x12, 0x403cc000}, |
---|
| 10757 | + {0x14, 0x90170110}, /* speaker */ |
---|
| 10758 | + {0x15, 0x411111f0}, |
---|
| 10759 | + {0x16, 0x411111f0}, |
---|
| 10760 | + {0x18, 0x01a19030}, /* mic */ |
---|
| 10761 | + {0x19, 0x90a7013f}, /* int-mic */ |
---|
| 10762 | + {0x1a, 0x01014020}, |
---|
| 10763 | + {0x1b, 0x0121401f}, |
---|
| 10764 | + {0x1c, 0x411111f0}, |
---|
| 10765 | + {0x1d, 0x411111f0}, |
---|
| 10766 | + {0x1e, 0x40478e35}, |
---|
| 10767 | + {} |
---|
| 10768 | + }, |
---|
| 10769 | + .chained = true, |
---|
| 10770 | + .chain_id = ALC662_FIXUP_SKU_IGNORE |
---|
8585 | 10771 | }, |
---|
8586 | 10772 | [ALC662_FIXUP_CZC_P10T] = { |
---|
8587 | 10773 | .type = HDA_FIXUP_VERBS, |
---|
.. | .. |
---|
8882 | 11068 | .type = HDA_FIXUP_FUNC, |
---|
8883 | 11069 | .v.func = alc233_alc662_fixup_lenovo_dual_codecs, |
---|
8884 | 11070 | }, |
---|
| 11071 | + [ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET] = { |
---|
| 11072 | + .type = HDA_FIXUP_FUNC, |
---|
| 11073 | + .v.func = alc662_fixup_aspire_ethos_hp, |
---|
| 11074 | + }, |
---|
| 11075 | + [ALC669_FIXUP_ACER_ASPIRE_ETHOS] = { |
---|
| 11076 | + .type = HDA_FIXUP_PINS, |
---|
| 11077 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 11078 | + { 0x15, 0x92130110 }, /* front speakers */ |
---|
| 11079 | + { 0x18, 0x99130111 }, /* center/subwoofer */ |
---|
| 11080 | + { 0x1b, 0x11130012 }, /* surround plus jack for HP */ |
---|
| 11081 | + { } |
---|
| 11082 | + }, |
---|
| 11083 | + .chained = true, |
---|
| 11084 | + .chain_id = ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET |
---|
| 11085 | + }, |
---|
| 11086 | + [ALC671_FIXUP_HP_HEADSET_MIC2] = { |
---|
| 11087 | + .type = HDA_FIXUP_FUNC, |
---|
| 11088 | + .v.func = alc671_fixup_hp_headset_mic2, |
---|
| 11089 | + }, |
---|
| 11090 | + [ALC662_FIXUP_ACER_X2660G_HEADSET_MODE] = { |
---|
| 11091 | + .type = HDA_FIXUP_PINS, |
---|
| 11092 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 11093 | + { 0x1a, 0x02a1113c }, /* use as headset mic, without its own jack detect */ |
---|
| 11094 | + { } |
---|
| 11095 | + }, |
---|
| 11096 | + .chained = true, |
---|
| 11097 | + .chain_id = ALC662_FIXUP_USI_FUNC |
---|
| 11098 | + }, |
---|
| 11099 | + [ALC662_FIXUP_ACER_NITRO_HEADSET_MODE] = { |
---|
| 11100 | + .type = HDA_FIXUP_PINS, |
---|
| 11101 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 11102 | + { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */ |
---|
| 11103 | + { 0x1b, 0x0221144f }, |
---|
| 11104 | + { } |
---|
| 11105 | + }, |
---|
| 11106 | + .chained = true, |
---|
| 11107 | + .chain_id = ALC662_FIXUP_USI_FUNC |
---|
| 11108 | + }, |
---|
| 11109 | + [ALC668_FIXUP_ASUS_NO_HEADSET_MIC] = { |
---|
| 11110 | + .type = HDA_FIXUP_PINS, |
---|
| 11111 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 11112 | + { 0x1b, 0x04a1112c }, |
---|
| 11113 | + { } |
---|
| 11114 | + }, |
---|
| 11115 | + .chained = true, |
---|
| 11116 | + .chain_id = ALC668_FIXUP_HEADSET_MIC |
---|
| 11117 | + }, |
---|
| 11118 | + [ALC668_FIXUP_HEADSET_MIC] = { |
---|
| 11119 | + .type = HDA_FIXUP_FUNC, |
---|
| 11120 | + .v.func = alc269_fixup_headset_mic, |
---|
| 11121 | + .chained = true, |
---|
| 11122 | + .chain_id = ALC668_FIXUP_MIC_DET_COEF |
---|
| 11123 | + }, |
---|
| 11124 | + [ALC668_FIXUP_MIC_DET_COEF] = { |
---|
| 11125 | + .type = HDA_FIXUP_VERBS, |
---|
| 11126 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 11127 | + { 0x20, AC_VERB_SET_COEF_INDEX, 0x15 }, |
---|
| 11128 | + { 0x20, AC_VERB_SET_PROC_COEF, 0x0d60 }, |
---|
| 11129 | + {} |
---|
| 11130 | + }, |
---|
| 11131 | + }, |
---|
| 11132 | + [ALC897_FIXUP_LENOVO_HEADSET_MIC] = { |
---|
| 11133 | + .type = HDA_FIXUP_FUNC, |
---|
| 11134 | + .v.func = alc897_fixup_lenovo_headset_mic, |
---|
| 11135 | + }, |
---|
| 11136 | + [ALC897_FIXUP_HEADSET_MIC_PIN] = { |
---|
| 11137 | + .type = HDA_FIXUP_PINS, |
---|
| 11138 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 11139 | + { 0x1a, 0x03a11050 }, |
---|
| 11140 | + { } |
---|
| 11141 | + }, |
---|
| 11142 | + .chained = true, |
---|
| 11143 | + .chain_id = ALC897_FIXUP_LENOVO_HEADSET_MIC |
---|
| 11144 | + }, |
---|
| 11145 | + [ALC897_FIXUP_HP_HSMIC_VERB] = { |
---|
| 11146 | + .type = HDA_FIXUP_PINS, |
---|
| 11147 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 11148 | + { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ |
---|
| 11149 | + { } |
---|
| 11150 | + }, |
---|
| 11151 | + }, |
---|
| 11152 | + [ALC897_FIXUP_LENOVO_HEADSET_MODE] = { |
---|
| 11153 | + .type = HDA_FIXUP_FUNC, |
---|
| 11154 | + .v.func = alc897_fixup_lenovo_headset_mode, |
---|
| 11155 | + }, |
---|
| 11156 | + [ALC897_FIXUP_HEADSET_MIC_PIN2] = { |
---|
| 11157 | + .type = HDA_FIXUP_PINS, |
---|
| 11158 | + .v.pins = (const struct hda_pintbl[]) { |
---|
| 11159 | + { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */ |
---|
| 11160 | + { } |
---|
| 11161 | + }, |
---|
| 11162 | + .chained = true, |
---|
| 11163 | + .chain_id = ALC897_FIXUP_LENOVO_HEADSET_MODE |
---|
| 11164 | + }, |
---|
| 11165 | + [ALC897_FIXUP_UNIS_H3C_X500S] = { |
---|
| 11166 | + .type = HDA_FIXUP_VERBS, |
---|
| 11167 | + .v.verbs = (const struct hda_verb[]) { |
---|
| 11168 | + { 0x14, AC_VERB_SET_EAPD_BTLENABLE, 0 }, |
---|
| 11169 | + {} |
---|
| 11170 | + }, |
---|
| 11171 | + }, |
---|
8885 | 11172 | }; |
---|
8886 | 11173 | |
---|
8887 | 11174 | static const struct snd_pci_quirk alc662_fixup_tbl[] = { |
---|
.. | .. |
---|
8893 | 11180 | SND_PCI_QUIRK(0x1025, 0x0349, "eMachines eM250", ALC662_FIXUP_INV_DMIC), |
---|
8894 | 11181 | SND_PCI_QUIRK(0x1025, 0x034a, "Gateway LT27", ALC662_FIXUP_INV_DMIC), |
---|
8895 | 11182 | SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), |
---|
| 11183 | + SND_PCI_QUIRK(0x1025, 0x0566, "Acer Aspire Ethos 8951G", ALC669_FIXUP_ACER_ASPIRE_ETHOS), |
---|
| 11184 | + SND_PCI_QUIRK(0x1025, 0x123c, "Acer Nitro N50-600", ALC662_FIXUP_ACER_NITRO_HEADSET_MODE), |
---|
| 11185 | + SND_PCI_QUIRK(0x1025, 0x124e, "Acer 2660G", ALC662_FIXUP_ACER_X2660G_HEADSET_MODE), |
---|
8896 | 11186 | SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
---|
8897 | 11187 | SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
---|
8898 | 11188 | SND_PCI_QUIRK(0x1028, 0x05fe, "Dell XPS 15", ALC668_FIXUP_DELL_XPS13), |
---|
.. | .. |
---|
8904 | 11194 | SND_PCI_QUIRK(0x1028, 0x0698, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
---|
8905 | 11195 | SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
---|
8906 | 11196 | SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), |
---|
| 11197 | + SND_PCI_QUIRK(0x103c, 0x870c, "HP", ALC897_FIXUP_HP_HSMIC_VERB), |
---|
| 11198 | + SND_PCI_QUIRK(0x103c, 0x8719, "HP", ALC897_FIXUP_HP_HSMIC_VERB), |
---|
| 11199 | + SND_PCI_QUIRK(0x103c, 0x872b, "HP", ALC897_FIXUP_HP_HSMIC_VERB), |
---|
| 11200 | + SND_PCI_QUIRK(0x103c, 0x873e, "HP", ALC671_FIXUP_HP_HEADSET_MIC2), |
---|
| 11201 | + SND_PCI_QUIRK(0x103c, 0x8768, "HP Slim Desktop S01", ALC671_FIXUP_HP_HEADSET_MIC2), |
---|
| 11202 | + SND_PCI_QUIRK(0x103c, 0x877e, "HP 288 Pro G6", ALC671_FIXUP_HP_HEADSET_MIC2), |
---|
| 11203 | + SND_PCI_QUIRK(0x103c, 0x885f, "HP 288 Pro G8", ALC671_FIXUP_HP_HEADSET_MIC2), |
---|
8907 | 11204 | SND_PCI_QUIRK(0x1043, 0x1080, "Asus UX501VW", ALC668_FIXUP_HEADSET_MODE), |
---|
8908 | 11205 | SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_ASUS_Nx50), |
---|
8909 | | - SND_PCI_QUIRK(0x1043, 0x13df, "Asus N550JX", ALC662_FIXUP_BASS_1A), |
---|
8910 | 11206 | SND_PCI_QUIRK(0x1043, 0x129d, "Asus N750", ALC662_FIXUP_ASUS_Nx50), |
---|
8911 | 11207 | SND_PCI_QUIRK(0x1043, 0x12ff, "ASUS G751", ALC668_FIXUP_ASUS_G751), |
---|
| 11208 | + SND_PCI_QUIRK(0x1043, 0x13df, "Asus N550JX", ALC662_FIXUP_BASS_1A), |
---|
8912 | 11209 | SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_MODE4_CHMAP), |
---|
8913 | 11210 | SND_PCI_QUIRK(0x1043, 0x15a7, "ASUS UX51VZH", ALC662_FIXUP_BASS_16), |
---|
8914 | 11211 | SND_PCI_QUIRK(0x1043, 0x177d, "ASUS N551", ALC668_FIXUP_ASUS_Nx51), |
---|
8915 | 11212 | SND_PCI_QUIRK(0x1043, 0x17bd, "ASUS N751", ALC668_FIXUP_ASUS_Nx51), |
---|
| 11213 | + SND_PCI_QUIRK(0x1043, 0x185d, "ASUS G551JW", ALC668_FIXUP_ASUS_NO_HEADSET_MIC), |
---|
8916 | 11214 | SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71SL", ALC662_FIXUP_ASUS_MODE8), |
---|
8917 | 11215 | SND_PCI_QUIRK(0x1043, 0x1b73, "ASUS N55SF", ALC662_FIXUP_BASS_16), |
---|
8918 | 11216 | SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_BASS_MODE4_CHMAP), |
---|
.. | .. |
---|
8921 | 11219 | SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD), |
---|
8922 | 11220 | SND_PCI_QUIRK(0x14cd, 0x5003, "USI", ALC662_FIXUP_USI_HEADSET_MODE), |
---|
8923 | 11221 | SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC662_FIXUP_LENOVO_MULTI_CODECS), |
---|
| 11222 | + SND_PCI_QUIRK(0x17aa, 0x1057, "Lenovo P360", ALC897_FIXUP_HEADSET_MIC_PIN), |
---|
| 11223 | + SND_PCI_QUIRK(0x17aa, 0x1064, "Lenovo P3 Tower", ALC897_FIXUP_HEADSET_MIC_PIN), |
---|
| 11224 | + SND_PCI_QUIRK(0x17aa, 0x32ca, "Lenovo ThinkCentre M80", ALC897_FIXUP_HEADSET_MIC_PIN), |
---|
| 11225 | + SND_PCI_QUIRK(0x17aa, 0x32cb, "Lenovo ThinkCentre M70", ALC897_FIXUP_HEADSET_MIC_PIN), |
---|
| 11226 | + SND_PCI_QUIRK(0x17aa, 0x32cf, "Lenovo ThinkCentre M950", ALC897_FIXUP_HEADSET_MIC_PIN), |
---|
| 11227 | + SND_PCI_QUIRK(0x17aa, 0x32f7, "Lenovo ThinkCentre M90", ALC897_FIXUP_HEADSET_MIC_PIN), |
---|
| 11228 | + SND_PCI_QUIRK(0x17aa, 0x3321, "Lenovo ThinkCentre M70 Gen4", ALC897_FIXUP_HEADSET_MIC_PIN), |
---|
| 11229 | + SND_PCI_QUIRK(0x17aa, 0x331b, "Lenovo ThinkCentre M90 Gen4", ALC897_FIXUP_HEADSET_MIC_PIN), |
---|
| 11230 | + SND_PCI_QUIRK(0x17aa, 0x3742, "Lenovo TianYi510Pro-14IOB", ALC897_FIXUP_HEADSET_MIC_PIN2), |
---|
8924 | 11231 | SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD), |
---|
8925 | 11232 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD), |
---|
8926 | 11233 | SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO), |
---|
8927 | 11234 | SND_PCI_QUIRK(0x19da, 0xa130, "Zotac Z68", ALC662_FIXUP_ZOTAC_Z68), |
---|
8928 | 11235 | SND_PCI_QUIRK(0x1b0a, 0x01b8, "ACER Veriton", ALC662_FIXUP_ACER_VERITON), |
---|
| 11236 | + SND_PCI_QUIRK(0x1b35, 0x1234, "CZC ET26", ALC662_FIXUP_CZC_ET26), |
---|
8929 | 11237 | SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T), |
---|
| 11238 | + SND_PCI_QUIRK(0x1c6c, 0x1239, "Compaq N14JP6-V2", ALC897_FIXUP_HP_HSMIC_VERB), |
---|
8930 | 11239 | |
---|
8931 | 11240 | #if 0 |
---|
8932 | 11241 | /* Below is a quirk table taken from the old code. |
---|
.. | .. |
---|
9013 | 11322 | {.id = ALC668_FIXUP_DELL_XPS13, .name = "dell-xps13"}, |
---|
9014 | 11323 | {.id = ALC662_FIXUP_ASUS_Nx50, .name = "asus-nx50"}, |
---|
9015 | 11324 | {.id = ALC668_FIXUP_ASUS_Nx51, .name = "asus-nx51"}, |
---|
| 11325 | + {.id = ALC668_FIXUP_ASUS_G751, .name = "asus-g751"}, |
---|
9016 | 11326 | {.id = ALC891_FIXUP_HEADSET_MODE, .name = "alc891-headset"}, |
---|
9017 | 11327 | {.id = ALC891_FIXUP_DELL_MIC_NO_PRESENCE, .name = "alc891-headset-multi"}, |
---|
9018 | 11328 | {.id = ALC662_FIXUP_ACER_VERITON, .name = "acer-veriton"}, |
---|
9019 | 11329 | {.id = ALC892_FIXUP_ASROCK_MOBO, .name = "asrock-mobo"}, |
---|
9020 | 11330 | {.id = ALC662_FIXUP_USI_HEADSET_MODE, .name = "usi-headset"}, |
---|
9021 | 11331 | {.id = ALC662_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"}, |
---|
| 11332 | + {.id = ALC669_FIXUP_ACER_ASPIRE_ETHOS, .name = "aspire-ethos"}, |
---|
| 11333 | + {.id = ALC897_FIXUP_UNIS_H3C_X500S, .name = "unis-h3c-x500s"}, |
---|
9022 | 11334 | {} |
---|
9023 | 11335 | }; |
---|
9024 | 11336 | |
---|
.. | .. |
---|
9061 | 11373 | {0x12, 0x90a60130}, |
---|
9062 | 11374 | {0x14, 0x90170110}, |
---|
9063 | 11375 | {0x15, 0x0321101f}), |
---|
| 11376 | + SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2, |
---|
| 11377 | + {0x14, 0x01014010}, |
---|
| 11378 | + {0x17, 0x90170150}, |
---|
| 11379 | + {0x19, 0x02a11060}, |
---|
| 11380 | + {0x1b, 0x01813030}, |
---|
| 11381 | + {0x21, 0x02211020}), |
---|
| 11382 | + SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2, |
---|
| 11383 | + {0x14, 0x01014010}, |
---|
| 11384 | + {0x18, 0x01a19040}, |
---|
| 11385 | + {0x1b, 0x01813030}, |
---|
| 11386 | + {0x21, 0x02211020}), |
---|
| 11387 | + SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2, |
---|
| 11388 | + {0x14, 0x01014020}, |
---|
| 11389 | + {0x17, 0x90170110}, |
---|
| 11390 | + {0x18, 0x01a19050}, |
---|
| 11391 | + {0x1b, 0x01813040}, |
---|
| 11392 | + {0x21, 0x02211030}), |
---|
9064 | 11393 | {} |
---|
9065 | 11394 | }; |
---|
9066 | 11395 | |
---|
.. | .. |
---|
9090 | 11419 | break; |
---|
9091 | 11420 | } |
---|
9092 | 11421 | |
---|
| 11422 | + alc_pre_init(codec); |
---|
| 11423 | + |
---|
9093 | 11424 | snd_hda_pick_fixup(codec, alc662_fixup_models, |
---|
9094 | 11425 | alc662_fixup_tbl, alc662_fixups); |
---|
9095 | | - snd_hda_pick_pin_fixup(codec, alc662_pin_fixup_tbl, alc662_fixups); |
---|
| 11426 | + snd_hda_pick_pin_fixup(codec, alc662_pin_fixup_tbl, alc662_fixups, true); |
---|
9096 | 11427 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); |
---|
9097 | 11428 | |
---|
9098 | 11429 | alc_auto_parse_customize_define(codec); |
---|
.. | .. |
---|
9179 | 11510 | HDA_CODEC_ENTRY(0x10ec0221, "ALC221", patch_alc269), |
---|
9180 | 11511 | HDA_CODEC_ENTRY(0x10ec0222, "ALC222", patch_alc269), |
---|
9181 | 11512 | HDA_CODEC_ENTRY(0x10ec0225, "ALC225", patch_alc269), |
---|
| 11513 | + HDA_CODEC_ENTRY(0x10ec0230, "ALC236", patch_alc269), |
---|
9182 | 11514 | HDA_CODEC_ENTRY(0x10ec0231, "ALC231", patch_alc269), |
---|
9183 | 11515 | HDA_CODEC_ENTRY(0x10ec0233, "ALC233", patch_alc269), |
---|
9184 | 11516 | HDA_CODEC_ENTRY(0x10ec0234, "ALC234", patch_alc269), |
---|
.. | .. |
---|
9252 | 11584 | HDA_CODEC_ENTRY(0x10ec0b00, "ALCS1200A", patch_alc882), |
---|
9253 | 11585 | HDA_CODEC_ENTRY(0x10ec1168, "ALC1220", patch_alc882), |
---|
9254 | 11586 | HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882), |
---|
| 11587 | + HDA_CODEC_ENTRY(0x19e58326, "HW8326", patch_alc269), |
---|
9255 | 11588 | {} /* terminator */ |
---|
9256 | 11589 | }; |
---|
9257 | 11590 | MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_realtek); |
---|