Changeset 772 for GPL/trunk/alsa-kernel/pci/hda
- Timestamp:
- Apr 19, 2025, 8:08:37 PM (7 months ago)
- Location:
- GPL/trunk
- Files:
-
- 6 deleted
- 25 edited
- 1 copied
-
. (modified) (1 prop)
-
alsa-kernel/pci/hda/alc260_quirks.c (deleted)
-
alsa-kernel/pci/hda/alc262_quirks.c (deleted)
-
alsa-kernel/pci/hda/alc880_quirks.c (deleted)
-
alsa-kernel/pci/hda/alc882_quirks.c (deleted)
-
alsa-kernel/pci/hda/alc_quirks.c (deleted)
-
alsa-kernel/pci/hda/hda_auto_parser.c (modified) (7 diffs)
-
alsa-kernel/pci/hda/hda_auto_parser.h (modified) (2 diffs)
-
alsa-kernel/pci/hda/hda_beep.h (modified) (1 diff)
-
alsa-kernel/pci/hda/hda_bind.c (modified) (6 diffs)
-
alsa-kernel/pci/hda/hda_codec.c (modified) (25 diffs)
-
alsa-kernel/pci/hda/hda_component2.h (copied) (copied from GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_component2.h )
-
alsa-kernel/pci/hda/hda_controller.c (modified) (3 diffs)
-
alsa-kernel/pci/hda/hda_controller.h (modified) (1 diff)
-
alsa-kernel/pci/hda/hda_eld.c (modified) (3 diffs)
-
alsa-kernel/pci/hda/hda_generic.c (modified) (7 diffs)
-
alsa-kernel/pci/hda/hda_generic.h (modified) (3 diffs)
-
alsa-kernel/pci/hda/hda_hwdep.c (modified) (1 diff)
-
alsa-kernel/pci/hda/hda_i915.c (deleted)
-
alsa-kernel/pci/hda/hda_intel.c (modified) (42 diffs)
-
alsa-kernel/pci/hda/hda_jack.c (modified) (1 diff)
-
alsa-kernel/pci/hda/hda_jack.h (modified) (1 diff)
-
alsa-kernel/pci/hda/hda_local.h (modified) (4 diffs)
-
alsa-kernel/pci/hda/hda_sysfs.c (modified) (9 diffs)
-
alsa-kernel/pci/hda/patch_analog.c (modified) (3 diffs)
-
alsa-kernel/pci/hda/patch_ca0132.c (modified) (15 diffs)
-
alsa-kernel/pci/hda/patch_cirrus.c (modified) (5 diffs)
-
alsa-kernel/pci/hda/patch_conexant.c (modified) (27 diffs)
-
alsa-kernel/pci/hda/patch_hdmi.c (modified) (67 diffs)
-
alsa-kernel/pci/hda/patch_realtek.c (modified) (182 diffs)
-
alsa-kernel/pci/hda/patch_sigmatel.c (modified) (20 diffs)
-
alsa-kernel/pci/hda/patch_via.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-6.6-LTS (added) merged: 765,768-769 /GPL/branches/uniaud32-exp (added) merged: 735-741,743-744,748-751,753-760,762-764 /GPL/branches/uniaud32-next merged: 718-734
- Property svn:mergeinfo changed
-
GPL/trunk/alsa-kernel/pci/hda/hda_auto_parser.c
r717 r772 85 85 /* In case one has boost and the other one has not, 86 86 pick the one with boost first. */ 87 return (int)(b->has_boost_on_pin - a->has_boost_on_pin); 88 } 89 87 if (a->has_boost_on_pin != b->has_boost_on_pin) 88 return (int)(b->has_boost_on_pin - a->has_boost_on_pin); 89 90 /* Keep the original order */ 91 return a->order - b->order; 92 } 93 94 #ifdef TARGET_OS2 95 /** 96 * swap - swap values of @a and @b 97 * @a: first value 98 * @b: second value 99 */ 100 #define swap(a, b) \ 101 do { u16 __tmp = (a); (a) = (b); (b) = __tmp; } while (0) 102 #endif 90 103 /* Reorder the surround channels 91 104 * ALSA sequence is front/surr/clfe/side … … 97 110 static void reorder_outputs(unsigned int nums, hda_nid_t *pins) 98 111 { 99 hda_nid_t nid;100 101 112 switch (nums) { 102 113 case 3: 103 114 case 4: 104 nid = pins[1]; 105 pins[1] = pins[2]; 106 pins[2] = nid; 115 swap(pins[1], pins[2]); 107 116 break; 108 117 } … … 409 418 410 419 /* sort inputs in the order of AUTO_PIN_* type */ 420 for (i = 0; i < cfg->num_inputs; i++) 421 cfg->inputs[i].order = i; 411 422 sort(cfg->inputs, cfg->num_inputs, sizeof(cfg->inputs[0]), 412 423 compare_input_type, NULL); … … 965 976 EXPORT_SYMBOL_GPL(snd_hda_pick_pin_fixup); 966 977 978 /* check whether the given quirk entry matches with vendor/device pair */ 979 static bool hda_quirk_match(u16 vendor, u16 device, const struct hda_quirk *q) 980 { 981 if (q->subvendor != vendor) 982 return false; 983 return !q->subdevice || 984 (device & q->subdevice_mask) == q->subdevice; 985 } 986 987 /* look through the quirk list and return the matching entry */ 988 static const struct hda_quirk * 989 hda_quirk_lookup_id(u16 vendor, u16 device, const struct hda_quirk *list) 990 { 991 const struct hda_quirk *q; 992 993 for (q = list; q->subvendor || q->subdevice; q++) { 994 if (hda_quirk_match(vendor, device, q)) 995 return q; 996 } 997 return NULL; 998 } 999 967 1000 /** 968 1001 * snd_hda_pick_fixup - Pick up a fixup matching with PCI/codec SSID or model string … … 984 1017 void snd_hda_pick_fixup(struct hda_codec *codec, 985 1018 const struct hda_model_fixup *models, 986 const struct snd_pci_quirk *quirk,1019 const struct hda_quirk *quirk, 987 1020 const struct hda_fixup *fixlist) 988 1021 { 989 const struct snd_pci_quirk *q;1022 const struct hda_quirk *q; 990 1023 int id = HDA_FIXUP_ID_NOT_SET; 991 1024 const char *name = NULL; 992 1025 const char *type = NULL; 993 1026 unsigned int vendor, device; 1027 u16 pci_vendor, pci_device; 1028 u16 codec_vendor, codec_device; 994 1029 995 1030 if (codec->fixup_id != HDA_FIXUP_ID_NOT_SET) … … 1022 1057 return; 1023 1058 1059 if (codec->bus->pci) { 1060 pci_vendor = codec->bus->pci->subsystem_vendor; 1061 pci_device = codec->bus->pci->subsystem_device; 1062 } 1063 1064 codec_vendor = codec->core.subsystem_id >> 16; 1065 codec_device = codec->core.subsystem_id & 0xffff; 1066 1024 1067 /* match with the SSID alias given by the model string "XXXX:YYYY" */ 1025 1068 if (codec->modelname && 1026 1069 sscanf(codec->modelname, "%04x:%04x", &vendor, &device) == 2) { 1027 q = snd_pci_quirk_lookup_id(vendor, device, quirk);1070 q = hda_quirk_lookup_id(vendor, device, quirk); 1028 1071 if (q) { 1029 1072 type = "alias SSID"; … … 1032 1075 } 1033 1076 1034 /* match with the PCI SSID */ 1035 q = snd_pci_quirk_lookup(codec->bus->pci, quirk); 1036 if (q) { 1037 type = "PCI SSID"; 1038 goto found_device; 1077 /* match primarily with the PCI SSID */ 1078 for (q = quirk; q->subvendor || q->subdevice; q++) { 1079 /* if the entry is specific to codec SSID, check with it */ 1080 if (!codec->bus->pci || q->match_codec_ssid) { 1081 if (hda_quirk_match(codec_vendor, codec_device, q)) { 1082 type = "codec SSID"; 1083 goto found_device; 1084 } 1085 } else { 1086 if (hda_quirk_match(pci_vendor, pci_device, q)) { 1087 type = "PCI SSID"; 1088 goto found_device; 1089 } 1090 } 1039 1091 } 1040 1092 1041 1093 /* match with the codec SSID */ 1042 q = snd_pci_quirk_lookup_id(codec->core.subsystem_id >> 16, 1043 codec->core.subsystem_id & 0xffff, 1044 quirk); 1094 q = hda_quirk_lookup_id(codec_vendor, codec_device, quirk); 1045 1095 if (q) { 1046 1096 type = "codec SSID"; -
GPL/trunk/alsa-kernel/pci/hda/hda_auto_parser.h
r695 r772 8 8 #ifndef __SOUND_HDA_AUTO_PARSER_H 9 9 #define __SOUND_HDA_AUTO_PARSER_H 10 11 #include "hda_local.h" 10 12 11 13 /* … … 36 38 unsigned int is_headphone_mic:1; /* Mic-only in headphone jack */ 37 39 unsigned int has_boost_on_pin:1; 40 int order; 38 41 }; 39 42 -
GPL/trunk/alsa-kernel/pci/hda/hda_beep.h
r679 r772 26 26 unsigned int linear_tone:1; /* linear tone for IDT/STAC codec */ 27 27 unsigned int playing:1; 28 unsigned int keep_power_at_enable:1; /* set by driver */ 28 29 struct work_struct beep_work; /* scheduled task for beep event */ 29 30 struct mutex mutex; -
GPL/trunk/alsa-kernel/pci/hda/hda_bind.c
r717 r772 11 11 #include <linux/export.h> 12 12 #include <linux/pm.h> 13 #include <linux/pm_runtime.h>14 13 #include <sound/core.h> 15 14 #include <sound/hda_codec.h> 16 15 #include "hda_local.h" 16 #include "hda_jack.h" 17 17 18 18 #pragma disable_message (201) … … 146 146 error: 147 147 snd_hda_codec_cleanup_for_unbind(codec); 148 codec->preset = NULL; 148 149 return err; 149 150 } … … 159 160 } 160 161 161 refcount_dec(&codec->pcm_ref);162 162 snd_hda_codec_disconnect_pcms(codec); 163 wait_event(codec->remove_sleep, !refcount_read(&codec->pcm_ref)); 163 snd_hda_jack_tbl_disconnect(codec); 164 if (!refcount_dec_and_test(&codec->pcm_ref)) 165 wait_event(codec->remove_sleep, !refcount_read(&codec->pcm_ref)); 164 166 snd_power_sync_ref(codec->bus->card); 165 167 … … 167 169 codec->patch_ops.free(codec); 168 170 snd_hda_codec_cleanup_for_unbind(codec); 171 codec->preset = NULL; 169 172 module_put(dev->driver->owner); 170 173 return 0; … … 238 241 static void codec_bind_module(struct hda_codec *codec) 239 242 { 240 #ifdef MODULE243 //#ifdef MODULE 241 244 request_codec_module(codec); 242 245 if (codec_probed(codec)) 243 246 return; 244 #endif245 } 246 247 #if IS_ENABLED(CONFIG_SND_HDA_CODEC_HDMI) 247 //#endif 248 } 249 250 #if IS_ENABLED(CONFIG_SND_HDA_CODEC_HDMI) || defined(CONFIG_SND_HDA_CODEC_HDMI) 248 251 /* if all audio out widgets are digital, let's assume the codec as a HDMI/DP */ 249 252 static bool is_likely_hdmi_codec(struct hda_codec *codec) 250 253 { 251 254 hda_nid_t nid; 255 256 /* 257 * For ASoC users, if snd_hda_hdmi_codec module is denylisted and any 258 * event causes i915 enumeration to fail, ->wcaps remains uninitialized. 259 */ 260 if (!codec->wcaps) 261 return true; 252 262 253 263 for_each_hda_codec_node(nid, codec) { … … 327 337 err = codec_bind_generic(codec); 328 338 if (err < 0) { 329 codec_dbg(codec, "Unable to bind the codec \n");339 codec_dbg(codec, "Unable to bind the codec - err = %d\n",err); 330 340 return err; 331 341 } -
GPL/trunk/alsa-kernel/pci/hda/hda_codec.c
r717 r772 779 779 } 780 780 781 /** 782 * snd_hda_codec_cleanup_for_unbind - Prepare codec for removal 783 * @codec: codec device to cleanup 784 */ 781 785 void snd_hda_codec_cleanup_for_unbind(struct hda_codec *codec) 782 786 { 783 if (codec-> registered) {787 if (codec->core.registered) { 784 788 /* pm_runtime_put() is called in snd_hdac_device_exit() */ 785 789 pm_runtime_get_noresume(hda_codec_dev(codec)); 786 790 pm_runtime_disable(hda_codec_dev(codec)); 787 codec-> registered = 0;791 codec->core.registered = 0; 788 792 } 789 793 … … 804 808 snd_array_free(&codec->spdif_out); 805 809 snd_array_free(&codec->verbs); 806 codec->preset = NULL;807 810 codec->follower_dig_outs = NULL; 808 811 codec->spdif_status_reset = 0; … … 826 829 } 827 830 828 /* also called from hda_bind.c */ 831 /** 832 * snd_hda_codec_register - Finalize codec initialization 833 * @codec: codec device to register 834 * 835 * Also called from hda_bind.c 836 */ 829 837 void snd_hda_codec_register(struct hda_codec *codec) 830 838 { 831 if (codec-> registered)839 if (codec->core.registered) 832 840 return; 833 841 if (device_is_registered(hda_codec_dev(codec))) { … … 836 844 /* it was powered up in snd_hda_codec_new(), now all done */ 837 845 snd_hda_power_down(codec); 838 codec->registered = 1; 839 } 840 } 846 codec->core.registered = 1; 847 } 848 } 849 EXPORT_SYMBOL_GPL(snd_hda_codec_register); 841 850 842 851 static int snd_hda_codec_dev_register(struct snd_device *device) … … 846 855 } 847 856 848 static int snd_hda_codec_dev_free(struct snd_device *device) 849 { 850 struct hda_codec *codec = device->device_data; 851 857 /** 858 * snd_hda_codec_unregister - Unregister specified codec device 859 * @codec: codec device to unregister 860 */ 861 void snd_hda_codec_unregister(struct hda_codec *codec) 862 { 852 863 codec->in_freeing = 1; 853 864 /* … … 866 877 if (codec->core.type == HDA_DEV_LEGACY) 867 878 put_device(hda_codec_dev(codec)); 868 879 } 880 EXPORT_SYMBOL_GPL(snd_hda_codec_unregister); 881 882 static int snd_hda_codec_dev_free(struct snd_device *device) 883 { 884 snd_hda_codec_unregister(device->device_data); 869 885 return 0; 870 886 } … … 879 895 kfree(codec->modelname); 880 896 kfree(codec->wcaps); 881 882 /* 883 * In the case of ASoC HD-audio, hda_codec is device managed. 884 * It will be freed when the ASoC device is removed. 885 */ 886 if (codec->core.type == HDA_DEV_LEGACY) 887 kfree(codec); 897 kfree(codec); 888 898 } 889 899 890 900 #define DEV_NAME_LEN 31 891 901 892 static int snd_hda_codec_device_init(struct hda_bus *bus, struct snd_card *card, 893 unsigned int codec_addr, struct hda_codec **codecp) 894 { 902 /** 903 * snd_hda_codec_device_init - allocate HDA codec device 904 * @bus: codec's parent bus 905 * @codec_addr: the codec address on the parent bus 906 * @fmt: format string for the device's name 907 * 908 * Returns newly allocated codec device or ERR_PTR() on failure. 909 */ 910 struct hda_codec * 911 snd_hda_codec_device_init(struct hda_bus *bus, unsigned int codec_addr, 912 const char *fmt, ...) 913 { 914 va_list vargs; 895 915 char name[DEV_NAME_LEN]; 896 916 struct hda_codec *codec; 897 917 int err; 898 918 899 dev_dbg(card->dev, "%s: entry\n", __func__);900 901 919 if (snd_BUG_ON(!bus)) 902 return -EINVAL;920 return ERR_PTR(-EINVAL); 903 921 if (snd_BUG_ON(codec_addr > HDA_MAX_CODEC_ADDRESS)) 904 return -EINVAL;922 return ERR_PTR(-EINVAL); 905 923 906 924 codec = kzalloc(sizeof(*codec), GFP_KERNEL); 907 925 if (!codec) 908 return -ENOMEM; 909 910 sprintf(name, "hdaudioC%dD%d", card->number, codec_addr); 926 return ERR_PTR(-ENOMEM); 927 928 va_start(vargs, fmt); 929 vsprintf(name, fmt, vargs); 930 va_end(vargs); 931 911 932 err = snd_hdac_device_init(&codec->core, &bus->core, name, codec_addr); 912 933 if (err < 0) { 913 934 kfree(codec); 914 return err; 915 } 916 935 return ERR_PTR(err); 936 } 937 938 codec->bus = bus; 939 codec->depop_delay = -1; 940 codec->fixup_id = HDA_FIXUP_ID_NOT_SET; 941 codec->core.dev.release = snd_hda_codec_dev_release; 917 942 codec->core.type = HDA_DEV_LEGACY; 918 *codecp = codec; 919 920 return err; 921 } 922 923 /** 924 * snd_hda_codec_new - create a HDA codec 925 * @bus: the bus to assign 926 * @card: card for this codec 927 * @codec_addr: the codec address 928 * @codecp: the pointer to store the generated codec 929 * 930 * Returns 0 if successful, or a negative error code. 931 */ 932 int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card, 933 unsigned int codec_addr, struct hda_codec **codecp) 934 { 935 int ret; 936 937 ret = snd_hda_codec_device_init(bus, card, codec_addr, codecp); 938 if (ret < 0) 939 return ret; 940 941 return snd_hda_codec_device_new(bus, card, codec_addr, *codecp); 942 } 943 EXPORT_SYMBOL_GPL(snd_hda_codec_new); 944 945 int snd_hda_codec_device_new(struct hda_bus *bus, struct snd_card *card, 946 unsigned int codec_addr, struct hda_codec *codec) 947 { 948 char component[31]; 949 hda_nid_t fg; 950 int err; 951 static const struct snd_device_ops dev_ops = { 952 .dev_register = snd_hda_codec_dev_register, 953 .dev_free = snd_hda_codec_dev_free, 954 }; 955 956 dev_dbg(card->dev, "%s: entry\n", __func__); 957 958 if (snd_BUG_ON(!bus)) 959 return -EINVAL; 960 if (snd_BUG_ON(codec_addr > HDA_MAX_CODEC_ADDRESS)) 961 return -EINVAL; 962 963 codec->core.dev.release = snd_hda_codec_dev_release; 964 codec->core.exec_verb = codec_exec_verb; 965 966 codec->bus = bus; 967 codec->card = card; 968 codec->addr = codec_addr; 943 969 944 mutex_init(&codec->spdif_mutex); 970 945 mutex_init(&codec->control_mutex); … … 979 954 INIT_LIST_HEAD(&codec->conn_list); 980 955 INIT_LIST_HEAD(&codec->pcm_list_head); 956 INIT_DELAYED_WORK(&codec->jackpoll_work, hda_jackpoll_work); 981 957 refcount_set(&codec->pcm_ref, 1); 982 958 init_waitqueue_head(&codec->remove_sleep); 983 959 984 INIT_DELAYED_WORK(&codec->jackpoll_work, hda_jackpoll_work); 985 codec->depop_delay = -1; 986 codec->fixup_id = HDA_FIXUP_ID_NOT_SET; 960 return codec; 961 } 962 EXPORT_SYMBOL_GPL(snd_hda_codec_device_init); 963 964 /** 965 * snd_hda_codec_new - create a HDA codec 966 * @bus: the bus to assign 967 * @card: card for this codec 968 * @codec_addr: the codec address 969 * @codecp: the pointer to store the generated codec 970 * 971 * Returns 0 if successful, or a negative error code. 972 */ 973 int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card, 974 unsigned int codec_addr, struct hda_codec **codecp) 975 { 976 struct hda_codec *codec; 977 int ret; 978 979 codec = snd_hda_codec_device_init(bus, codec_addr, "hdaudioC%dD%d", 980 card->number, codec_addr); 981 if (IS_ERR(codec)) 982 return PTR_ERR(codec); 983 *codecp = codec; 984 985 ret = snd_hda_codec_device_new(bus, card, codec_addr, *codecp, true); 986 if (ret) 987 put_device(hda_codec_dev(*codecp)); 988 989 return ret; 990 } 991 EXPORT_SYMBOL_GPL(snd_hda_codec_new); 992 993 int snd_hda_codec_device_new(struct hda_bus *bus, struct snd_card *card, 994 unsigned int codec_addr, struct hda_codec *codec, 995 bool snddev_managed) 996 { 997 char component[31]; 998 hda_nid_t fg; 999 int err; 1000 static const struct snd_device_ops dev_ops = { 1001 .dev_register = snd_hda_codec_dev_register, 1002 .dev_free = snd_hda_codec_dev_free, 1003 }; 1004 1005 dev_dbg(card->dev, "%s: entry\n", __func__); 1006 1007 if (snd_BUG_ON(!bus)) 1008 return -EINVAL; 1009 if (snd_BUG_ON(codec_addr > HDA_MAX_CODEC_ADDRESS)) 1010 return -EINVAL; 1011 1012 codec->core.exec_verb = codec_exec_verb; 1013 codec->card = card; 1014 codec->addr = codec_addr; 987 1015 988 1016 #ifdef CONFIG_PM … … 994 1022 if (codec->bus->modelname) { 995 1023 codec->modelname = kstrdup(codec->bus->modelname, GFP_KERNEL); 996 if (!codec->modelname) { 997 err = -ENOMEM; 998 goto error; 999 } 1024 if (!codec->modelname) 1025 return -ENOMEM; 1000 1026 } 1001 1027 … … 1003 1029 err = read_widget_caps(codec, fg); 1004 1030 if (err < 0) 1005 goto error;1031 return err; 1006 1032 err = read_pin_defaults(codec); 1007 1033 if (err < 0) 1008 goto error;1034 return err; 1009 1035 1010 1036 /* power-up all before initialization */ … … 1020 1046 snd_component_add(card, component); 1021 1047 1022 err = snd_device_new(card, SNDRV_DEV_CODEC, codec, &dev_ops); 1023 if (err < 0) 1024 goto error; 1025 1048 if (snddev_managed) { 1049 /* ASoC features component management instead */ 1050 err = snd_device_new(card, SNDRV_DEV_CODEC, codec, &dev_ops); 1051 if (err < 0) 1052 return err; 1053 } 1054 1055 #ifdef CONFIG_PM 1026 1056 /* PM runtime needs to be enabled later after binding codec */ 1027 pm_runtime_forbid(&codec->core.dev); 1028 1029 return 0; 1030 1031 error: 1032 put_device(hda_codec_dev(codec)); 1033 return err; 1057 if (codec->core.dev.power.runtime_auto) 1058 pm_runtime_forbid(&codec->core.dev); 1059 else 1060 /* Keep the usage_count consistent across subsequent probing */ 1061 pm_runtime_get_noresume(&codec->core.dev); 1062 #endif 1063 1064 return 0; 1034 1065 } 1035 1066 EXPORT_SYMBOL_GPL(snd_hda_codec_device_new); … … 1751 1782 struct hda_nid_item *items = codec->mixers.list; 1752 1783 1753 down_write(&codec->card->controls_rwsem);1754 1784 for (i = 0; i < codec->mixers.used; i++) 1755 1785 snd_ctl_remove(codec->card, items[i].kctl); 1756 up_write(&codec->card->controls_rwsem);1757 1786 snd_array_free(&codec->mixers); 1758 1787 snd_array_free(&codec->nids); … … 2445 2474 /* suppose a single SPDIF device */ 2446 2475 for (dig_mix = dig_mixes; dig_mix->name; dig_mix++) { 2476 struct snd_ctl_elem_id id; 2477 2447 2478 kctl = find_mixer_ctl(codec, dig_mix->name, 0, 0); 2448 2479 if (!kctl) 2449 2480 break; 2450 kctl->id.index = spdif_index; 2481 id = kctl->id; 2482 id.index = spdif_index; 2483 err = snd_ctl_rename_id(codec->card, &kctl->id, &id); 2484 if (err < 0) 2485 return err; 2451 2486 } 2452 2487 bus->primary_dig_out_type = HDA_PCM_TYPE_HDMI; … … 2872 2907 if (codec->patch_ops.suspend) 2873 2908 codec->patch_ops.suspend(codec); 2874 hda_cleanup_all_streams(codec); 2909 if (!codec->no_stream_clean_at_suspend) 2910 hda_cleanup_all_streams(codec); 2875 2911 state = hda_set_power_state(codec, AC_PWRST_D3); 2876 2912 update_power_acct(codec, true); … … 2920 2956 2921 2957 cancel_delayed_work_sync(&codec->jackpoll_work); 2958 2922 2959 state = hda_call_codec_suspend(codec); 2923 2960 if (codec->link_down_at_suspend || … … 2926 2963 snd_hdac_codec_link_down(&codec->core); 2927 2964 snd_hda_codec_display_power(codec, false); 2965 2966 if (codec->bus->jackpoll_in_suspend /*&& 2967 (dev->power.power_state.event != PM_EVENT_SUSPEND)*/) 2968 schedule_delayed_work(&codec->jackpoll_work, 2969 codec->jackpoll_interval); 2928 2970 return 0; 2929 2971 } … … 2949 2991 static int hda_codec_pm_prepare(struct device *dev) 2950 2992 { 2993 struct hda_codec *codec = dev_to_hda_codec(dev); 2994 2995 cancel_delayed_work_sync(&codec->jackpoll_work); 2951 2996 dev->power.power_state = PMSG_SUSPEND; 2952 2997 return pm_runtime_suspended(dev); … … 2982 3027 static int hda_codec_pm_freeze(struct device *dev) 2983 3028 { 3029 struct hda_codec *codec = dev_to_hda_codec(dev); 3030 3031 cancel_delayed_work_sync(&codec->jackpoll_work); 2984 3032 dev->power.power_state = PMSG_FREEZE; 2985 3033 return pm_runtime_force_suspend(dev); … … 3021 3069 3022 3070 /* Skip the shutdown if codec is not registered */ 3023 if (!codec-> registered)3071 if (!codec->core.registered) 3024 3072 return; 3025 3073 3074 cancel_delayed_work_sync(&codec->jackpoll_work); 3026 3075 list_for_each_entry(cpcm, &codec->pcm_list_head, list, struct hda_pcm) 3027 3076 snd_pcm_suspend_all(cpcm->pcm); … … 3137 3186 info->formats ? NULL : &info->formats, 3138 3187 info->maxbps ? NULL : &info->maxbps); 3139 if (err < 0) 3140 return err; 3188 if (err < 0){ 3189 codec_warn(codec,"exiting here\n"); 3190 return err;} 3141 3191 } 3142 3192 if (info->ops.open == NULL) … … 3364 3414 if (!kctl) 3365 3415 return -ENOMEM; 3366 if (addr > 0) 3416 /* Do not use the id.device field for MIXER elements. 3417 * This field is for real device numbers (like PCM) but codecs 3418 * are hidden components from the user space view (unrelated 3419 * to the mixer element identification). 3420 */ 3421 if (addr > 0 && codec->ctl_dev_id) 3367 3422 kctl->id.device = addr; 3368 3423 if (idx > 0) … … 3375 3430 * primary codec), then try another control index 3376 3431 */ 3377 if (!addr && codec->core.addr) 3432 if (!addr && codec->core.addr) { 3378 3433 addr = codec->core.addr; 3379 else if (!idx && !knew->index) { 3434 if (!codec->ctl_dev_id) 3435 idx += 10 * addr; 3436 } else if (!idx && !knew->index) { 3380 3437 idx = find_empty_mixer_ctl_idx(codec, 3381 3438 knew->name, 0); … … 3391 3448 3392 3449 #ifdef CONFIG_PM 3393 static void codec_set_power_save(struct hda_codec *codec, int delay) 3450 /** 3451 * snd_hda_codec_set_power_save - Configure codec's runtime PM 3452 * @codec: codec device to configure 3453 * @delay: autosuspend delay 3454 */ 3455 void snd_hda_codec_set_power_save(struct hda_codec *codec, int delay) 3394 3456 { 3395 3457 struct device *dev = hda_codec_dev(codec); … … 3409 3471 } 3410 3472 } 3473 EXPORT_SYMBOL_GPL(snd_hda_codec_set_power_save); 3411 3474 3412 3475 /** … … 3422 3485 3423 3486 list_for_each_codec(c, bus) 3424 codec_set_power_save(c, delay);3487 snd_hda_codec_set_power_save(c, delay); 3425 3488 } 3426 3489 EXPORT_SYMBOL_GPL(snd_hda_set_power_save); -
GPL/trunk/alsa-kernel/pci/hda/hda_controller.c
r717 r772 268 268 if (start) { 269 269 azx_dev->insufficient = 1; 270 snd_hdac_stream_start(azx_stream(azx_dev) , true);270 snd_hdac_stream_start(azx_stream(azx_dev)); 271 271 } else { 272 272 snd_hdac_stream_stop(azx_stream(azx_dev)); … … 1058 1058 { 1059 1059 struct hdac_bus *bus = azx_bus(chip); 1060 struct hdac_stream *s; 1061 1062 list_for_each_entry(s, &bus->stream_list, list, struct hdac_stream) 1063 snd_hdac_stream_stop(s); 1060 1061 snd_hdac_stop_streams(bus); 1064 1062 } 1065 1063 EXPORT_SYMBOL_GPL(azx_stop_all_streams); … … 1263 1261 codec->jackpoll_interval = chip->jackpoll_interval; 1264 1262 codec->beep_mode = chip->beep_mode; 1263 codec->ctl_dev_id = chip->ctl_dev_id; 1265 1264 codecs++; 1266 1265 } -
GPL/trunk/alsa-kernel/pci/hda/hda_controller.h
r717 r772 125 125 int codec_probe_mask; /* copied from probe_mask option */ 126 126 unsigned int beep_mode; 127 bool ctl_dev_id; 127 128 128 129 #ifdef CONFIG_SND_HDA_PATCH_LOADER -
GPL/trunk/alsa-kernel/pci/hda/hda_eld.c
r709 r772 252 252 #ifndef TARGET_OS2 //FIXME Error! E1029: Expression must be 'pointer to ...' 253 253 e->aud_synch_delay = GRAB_BITS(buf, 6, 0, 8) * 2; 254 #else 255 int delay = GRAB_BITS(buf, 6, 0, 8); 256 e->aud_synch_delay = delay *2; 254 257 #endif 255 258 e->spk_alloc = GRAB_BITS(buf, 7, 0, 7); … … 448 451 449 452 void snd_hdmi_print_eld_info(struct hdmi_eld *eld, 450 struct snd_info_buffer *buffer) 453 struct snd_info_buffer *buffer, 454 hda_nid_t pin_nid, int dev_id, hda_nid_t cvt_nid) 451 455 { 452 456 struct parsed_hdmi_eld *e = &eld->info; … … 507 511 snd_iprintf(buffer, "monitor_present\t\t%d\n", eld->monitor_present); 508 512 snd_iprintf(buffer, "eld_valid\t\t%d\n", eld->eld_valid); 513 snd_iprintf(buffer, "codec_pin_nid\t\t0x%x\n", pin_nid); 514 snd_iprintf(buffer, "codec_dev_id\t\t0x%x\n", dev_id); 515 snd_iprintf(buffer, "codec_cvt_nid\t\t0x%x\n", cvt_nid); 509 516 if (!eld->eld_valid) 510 517 return; -
GPL/trunk/alsa-kernel/pci/hda/hda_generic.c
r717 r772 1002 1002 { 1003 1003 char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; 1004 snprintf(name, sizeof(name), "%s %s %s", pfx, dir, sfx); 1004 int len; 1005 1006 len = snprintf(name, sizeof(name), "%s %s %s", pfx, dir, sfx); 1007 if (snd_BUG_ON(len >= sizeof(name))) 1008 return -EINVAL; 1005 1009 if (!add_control(spec, type, name, cidx, val)) 1006 1010 return -ENOMEM; … … 1159 1163 } 1160 1164 1161 static const char * const channel_name[ 4] = {1162 "Front", "Surround", "CLFE", "Side" 1165 static const char * const channel_name[] = { 1166 "Front", "Surround", "CLFE", "Side", "Back", 1163 1167 }; 1164 1168 … … 1186 1190 /* multi-io channels */ 1187 1191 if (ch >= cfg->line_outs) 1188 return channel_name[ch];1192 goto fixed_name; 1189 1193 1190 1194 switch (cfg->line_out_type) { … … 1238 1242 return "Line Out"; 1239 1243 1244 fixed_name: 1240 1245 if (ch >= ARRAY_SIZE(channel_name)) { 1241 1246 snd_BUG(); … … 1382 1387 hda_nid_t pin = pins[i]; 1383 1388 1384 if (!spec-> obey_preferred_dacs) {1389 if (!spec->preferred_dacs) { 1385 1390 path = snd_hda_get_path_from_idx(codec, path_idx[i]); 1386 1391 if (path) { … … 1394 1399 if (is_dac_already_used(codec, dacs[i])) 1395 1400 badness += bad->shared_primary; 1396 } else if (spec-> obey_preferred_dacs) {1401 } else if (spec->preferred_dacs) { 1397 1402 badness += BAD_NO_PRIMARY_DAC; 1398 1403 } … … 4963 4968 EXPORT_SYMBOL_GPL(snd_hda_gen_stream_pm); 4964 4969 4970 /* forcibly mute the speaker output without caching; return true if updated */ 4971 static bool force_mute_output_path(struct hda_codec *codec, hda_nid_t nid) 4972 { 4973 if (!nid) 4974 return false; 4975 if (!nid_has_mute(codec, nid, HDA_OUTPUT)) 4976 return false; /* no mute, skip */ 4977 if (snd_hda_codec_amp_read(codec, nid, 0, HDA_OUTPUT, 0) & 4978 snd_hda_codec_amp_read(codec, nid, 1, HDA_OUTPUT, 0) & 4979 HDA_AMP_MUTE) 4980 return false; /* both channels already muted, skip */ 4981 4982 /* direct amp update without caching */ 4983 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, 4984 AC_AMP_SET_OUTPUT | AC_AMP_SET_LEFT | 4985 AC_AMP_SET_RIGHT | HDA_AMP_MUTE); 4986 return true; 4987 } 4988 4989 /** 4990 * snd_hda_gen_shutup_speakers - Forcibly mute the speaker outputs 4991 * @codec: the HDA codec 4992 * 4993 * Forcibly mute the speaker outputs, to be called at suspend or shutdown. 4994 * 4995 * The mute state done by this function isn't cached, hence the original state 4996 * will be restored at resume. 4997 * 4998 * Return true if the mute state has been changed. 4999 */ 5000 bool snd_hda_gen_shutup_speakers(struct hda_codec *codec) 5001 { 5002 struct hda_gen_spec *spec = codec->spec; 5003 const int *paths; 5004 const struct nid_path *path; 5005 int i, p, num_paths; 5006 bool updated = false; 5007 5008 /* if already powered off, do nothing */ 5009 if (!snd_hdac_is_power_on(&codec->core)) 5010 return false; 5011 5012 if (spec->autocfg.line_out_type == AUTO_PIN_SPEAKER_OUT) { 5013 paths = spec->out_paths; 5014 num_paths = spec->autocfg.line_outs; 5015 } else { 5016 paths = spec->speaker_paths; 5017 num_paths = spec->autocfg.speaker_outs; 5018 } 5019 5020 for (i = 0; i < num_paths; i++) { 5021 path = snd_hda_get_path_from_idx(codec, paths[i]); 5022 if (!path) 5023 continue; 5024 for (p = 0; p < path->depth; p++) 5025 if (force_mute_output_path(codec, path->path[p])) 5026 updated = true; 5027 } 5028 5029 return updated; 5030 } 5031 EXPORT_SYMBOL_GPL(snd_hda_gen_shutup_speakers); 5032 4965 5033 /** 4966 5034 * snd_hda_gen_parse_auto_config - Parse the given BIOS configuration and -
GPL/trunk/alsa-kernel/pci/hda/hda_generic.h
r717 r772 10 10 11 11 #include <linux/leds.h> 12 #include "hda_auto_parser.h" 13 14 struct hda_jack_callback; 12 15 13 16 /* table entry for multi-io paths */ … … 184 187 185 188 /* for pin sensing */ 186 /* current status; set in hda_gene ic.c */189 /* current status; set in hda_generic.c */ 187 190 unsigned int hp_jack_present:1; 188 191 unsigned int line_jack_present:1; … … 353 356 int (*callback)(struct led_classdev *, 354 357 enum led_brightness)); 358 bool snd_hda_gen_shutup_speakers(struct hda_codec *codec); 355 359 356 360 #endif /* __SOUND_HDA_GENERIC_H */ -
GPL/trunk/alsa-kernel/pci/hda/hda_hwdep.c
r679 r772 115 115 116 116 /* for sysfs */ 117 hwdep->dev .groups = snd_hda_dev_attr_groups;118 dev_set_drvdata( &hwdep->dev, codec);117 hwdep->dev->groups = snd_hda_dev_attr_groups; 118 dev_set_drvdata(hwdep->dev, codec); 119 119 120 120 return 0; -
GPL/trunk/alsa-kernel/pci/hda/hda_intel.c
r717 r772 56 56 #include <linux/vgaarb.h> 57 57 #include <linux/vga_switcheroo.h> 58 #include <linux/apple-gmux.h> 58 59 #include <linux/firmware.h> 59 60 #include <sound/hda_codec.h> … … 97 98 #define INTEL_SCH_HDA_DEVC_NOSNOOP (0x1<<11) 98 99 99 /* Define VIA HD Audio Device ID*/100 #define VIA_HDAC_DEVICE_ID 0x3288101 102 100 /* max number of SDs */ 103 101 /* ICH, ATI and VIA have 4 playback and 4 capture */ … … 112 110 #define ATIHDMI_NUM_CAPTURE 0 113 111 #define ATIHDMI_NUM_PLAYBACK 8 114 115 /* TERA has 4 playback and 3 capture */116 #define TERA_NUM_CAPTURE 3117 #define TERA_NUM_PLAYBACK 4118 112 119 113 … … 143 137 #endif 144 138 static bool dmic_detect = 1; 139 #ifndef TARGET_OS2 140 static bool ctl_dev_id = IS_ENABLED(CONFIG_SND_HDA_CTL_DEV_ID) ? 1 : 0; 141 #else 142 static bool ctl_dev_id = 0; 143 #endif 145 144 146 145 module_param_array(index, int, NULL, 0444); … … 181 180 "(0=off, 1=on) (default=1); " 182 181 "deprecated, use snd-intel-dspcfg.dsp_driver option instead"); 182 module_param(ctl_dev_id, bool, 0444); 183 MODULE_PARM_DESC(ctl_dev_id, "Use control device identifier (based on codec address)."); 183 184 184 185 #ifdef CONFIG_PM … … 249 250 AZX_DRIVER_ATIHDMI, 250 251 AZX_DRIVER_ATIHDMI_NS, 252 AZX_DRIVER_GFHDMI, 251 253 AZX_DRIVER_VIA, 252 254 AZX_DRIVER_SIS, … … 258 260 AZX_DRIVER_CMEDIA, 259 261 AZX_DRIVER_ZHAOXIN, 262 AZX_DRIVER_LOONGSON, 260 263 AZX_DRIVER_GENERIC, 261 264 AZX_NUM_DRIVERS, /* keep this as last entry */ … … 350 353 #endif 351 354 352 #define CONTROLLER_IN_GPU(pci) (((pci)->device == 0x0a0c) || \353 ((pci)->device == 0x0c0c) || \354 ((pci)->device == 0x0d0c) || \355 ((pci)->device == 0x160c) || \356 ((pci)->device == 0x490d) || \357 ((pci)->device == 0x4f90) || \358 ((pci)->device == 0x4f91) || \359 ((pci)->device == 0x4f92))360 361 #define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)362 363 355 static const char * const driver_short_names[] = { 364 356 [AZX_DRIVER_ICH] = "HDA Intel", … … 370 362 [AZX_DRIVER_ATIHDMI] = "HDA ATI HDMI", 371 363 [AZX_DRIVER_ATIHDMI_NS] = "HDA ATI HDMI", 364 [AZX_DRIVER_GFHDMI] = "HDA GF HDMI", 372 365 [AZX_DRIVER_VIA] = "HDA VIA VT82xx", 373 366 [AZX_DRIVER_SIS] = "HDA SIS966", … … 379 372 [AZX_DRIVER_CMEDIA] = "HDA C-Media", 380 373 [AZX_DRIVER_ZHAOXIN] = "HDA Zhaoxin", 374 [AZX_DRIVER_LOONGSON] = "HDA Loongson", 381 375 [AZX_DRIVER_GENERIC] = "HD-Audio Generic", 382 376 }; … … 460 454 } 461 455 456 #ifndef TARGET_OS2 462 457 /* 463 458 * In BXT-P A0, HD-Audio DMA requests is later than expected, … … 475 470 azx_writel(chip, VS_EM4L, val); 476 471 } 472 #endif 477 473 478 474 /* … … 511 507 512 508 /* 513 * the codecs are sharing the first link setting by default514 * If other links are enabled for stream, they need similar fix509 * Changes to LCTL.SCF are only needed for the first multi-link dealing 510 * with external codecs 515 511 */ 516 512 val = readl(bus->mlcap + AZX_ML_BASE + AZX_REG_ML_LCTL); 517 val &= ~AZX_ML CTL_SPA;518 val |= state << AZX_ML CTL_SPA_SHIFT;513 val &= ~AZX_ML_LCTL_SPA; 514 val |= state << AZX_ML_LCTL_SPA_SHIFT; 519 515 writel(val, bus->mlcap + AZX_ML_BASE + AZX_REG_ML_LCTL); 520 516 /* wait for CPA */ … … 522 518 while (timeout) { 523 519 if (((readl(bus->mlcap + AZX_ML_BASE + AZX_REG_ML_LCTL)) & 524 AZX_ML CTL_CPA) == (state << AZX_MLCTL_CPA_SHIFT))520 AZX_ML_LCTL_CPA) == (state << AZX_ML_LCTL_CPA_SHIFT)) 525 521 return 0; 526 522 timeout--; … … 539 535 /* 0. check lctl register value is correct or not */ 540 536 val = readl(bus->mlcap + AZX_ML_BASE + AZX_REG_ML_LCTL); 541 /* if SCF is already set, let's use it*/542 if ((val & ML_LCTL_SCF_MASK) != 0)537 /* only perform additional configurations if the SCF is initially based on 6MHz */ 538 if ((val & AZX_ML_LCTL_SCF) != 0) 543 539 return; 544 540 … … 547 543 * Any deviation may result in undefined behavior. 548 544 */ 549 if (((val & AZX_ML CTL_SPA) >> AZX_MLCTL_SPA_SHIFT) !=550 ((val & AZX_ML CTL_CPA) >> AZX_MLCTL_CPA_SHIFT))545 if (((val & AZX_ML_LCTL_SPA) >> AZX_ML_LCTL_SPA_SHIFT) != 546 ((val & AZX_ML_LCTL_CPA) >> AZX_ML_LCTL_CPA_SHIFT)) 551 547 return; 552 548 … … 557 553 goto set_spa; 558 554 559 /* 2. update SCF to select a properly audio clock*/560 val &= ~ ML_LCTL_SCF_MASK;555 /* 2. update SCF to select an audio clock different from 6MHz */ 556 val &= ~AZX_ML_LCTL_SCF; 561 557 val |= intel_get_lctl_scf(chip); 562 558 writel(val, bus->mlcap + AZX_ML_BASE + AZX_REG_ML_LCTL); … … 589 585 snd_hdac_set_codec_wakeup(bus, false); 590 586 587 #ifndef TARGET_OS2 591 588 /* reduce dma latency to avoid noise */ 592 if ( IS_BXT(pci))589 if (HDA_CONTROLLER_IS_APL(pci)) 593 590 bxt_reduce_dma_latency(chip); 594 591 #endif 595 592 if (bus->mlcap != NULL) 596 593 intel_init_lctl(chip); … … 671 668 unsigned int pos; 672 669 snd_pcm_uframes_t hwptr, target; 670 671 /* 672 * The value of the WALLCLK register is always 0 673 * on the Loongson controller, so we return directly. 674 */ 675 if (chip->driver_type == AZX_DRIVER_LOONGSON) 676 return 1; 673 677 674 678 wallclk = azx_readl(chip, WALLCLK) - azx_dev->core.start_wallclk; … … 1382 1386 return; 1383 1387 1384 if (azx_has_pm_runtime(chip) && chip->running) 1388 if (azx_has_pm_runtime(chip) && chip->running) { 1385 1389 pm_runtime_get_noresume(&pci->dev); 1390 pm_runtime_forbid(&pci->dev); 1391 pm_runtime_dont_use_autosuspend(&pci->dev); 1392 } 1393 1386 1394 chip->running = 0; 1387 1395 … … 1500 1508 */ 1501 1509 if (((p->class >> 16) == PCI_BASE_CLASS_DISPLAY) && 1502 atpx_present())1510 (atpx_present() || apple_gmux_detect(NULL, NULL))) 1503 1511 return p; 1504 1512 pci_dev_put(p); … … 1768 1776 if (chip->pci->vendor == PCI_VENDOR_ID_INTEL) { 1769 1777 switch (chip->pci->device) { 1770 case 0x0f04: /* Baytrail */1771 case 0x2284: /* Braswell */1778 case PCI_DEVICE_ID_INTEL_HDA_BYT: 1779 case PCI_DEVICE_ID_INTEL_HDA_BSW: 1772 1780 return 32; 1781 case PCI_DEVICE_ID_INTEL_HDA_APL: 1782 return 64; 1773 1783 } 1774 1784 } 1775 1785 1776 1786 switch (chip->driver_type) { 1787 /* 1788 * increase the bdl size for Glenfly Gpus for hardware 1789 * limitation on hdac interrupt interval 1790 */ 1791 case AZX_DRIVER_GFHDMI: 1792 return 128; 1777 1793 case AZX_DRIVER_ICH: 1778 1794 case AZX_DRIVER_PCH: … … 1802 1818 *rchip = NULL; 1803 1819 1804 err = pci _enable_device(pci);1820 err = pcim_enable_device(pci); 1805 1821 if (err < 0) 1806 1822 return err; 1807 1823 1808 #ifndef TARGET_OS21809 1824 hda = devm_kzalloc(&pci->dev, sizeof(*hda), GFP_KERNEL); 1810 #else1811 hda = kzalloc(sizeof(*hda), GFP_KERNEL);1812 #endif1813 1825 if (!hda) 1814 1826 return -ENOMEM; … … 1851 1863 /* use the non-cached pages in non-snoop mode */ 1852 1864 if (!azx_snoop(chip)) 1853 azx_bus(chip)->dma_type = SNDRV_DMA_TYPE_DEV_WC ;1865 azx_bus(chip)->dma_type = SNDRV_DMA_TYPE_DEV_WC_SG; 1854 1866 1855 1867 if (chip->driver_type == AZX_DRIVER_NVIDIA) { … … 1894 1906 } 1895 1907 #endif 1896 1897 #ifndef TARGET_OS2 1908 /* 1909 * Fix response write request not synced to memory when handle 1910 * hdac interrupt on Glenfly Gpus 1911 */ 1912 if (chip->driver_type == AZX_DRIVER_GFHDMI) 1913 bus->polling_mode = 1; 1914 1915 if (chip->driver_type == AZX_DRIVER_LOONGSON) { 1916 bus->polling_mode = 1; 1917 bus->not_use_interrupts = 1; 1918 bus->access_sdnctl_in_dword = 1; 1919 } 1920 1898 1921 err = pcim_iomap_regions(pci, 1 << 0, "ICH HD audio"); 1899 #else1900 err = pci_request_regions(pci, "ICH HD audio");1901 #endif1902 1922 if (err < 0) 1903 1923 return err; 1904 1924 1905 1925 bus->addr = pci_resource_start(pci, 0); 1906 #ifndef TARGET_OS21907 1926 bus->remap_addr = pcim_iomap_table(pci)[0]; 1908 #else1909 bus->remap_addr = pci_ioremap_bar(pci, 0);1910 #endif1911 1927 if (chip->driver_type == AZX_DRIVER_SKL) 1912 1928 snd_hdac_bus_parse_capabilities(bus); … … 1982 1998 if (dma_set_mask_and_coherent(&pci->dev, DMA_BIT_MASK(dma_bits))) 1983 1999 dma_set_mask_and_coherent(&pci->dev, DMA_BIT_MASK(32)); 2000 dma_set_max_seg_size(&pci->dev, UINT_MAX); 1984 2001 1985 2002 /* read number of streams from GCAP register instead of using … … 2001 2018 chip->capture_streams = ATIHDMI_NUM_CAPTURE; 2002 2019 break; 2020 case AZX_DRIVER_GFHDMI: 2003 2021 case AZX_DRIVER_GENERIC: 2004 2022 default: … … 2106 2124 }; 2107 2125 2126 static DECLARE_BITMAP(probed_devs, SNDRV_CARDS); 2127 2108 2128 static int azx_probe(struct pci_dev *pci, 2109 2129 const struct pci_device_id *pci_id) 2110 2130 { 2131 #ifdef TARGET_OS2 2111 2132 static int dev; 2133 #endif 2112 2134 struct snd_card *card; 2113 2135 struct hda_intel *hda; 2114 2136 struct azx *chip; 2115 2137 bool schedule_probe; 2138 #ifndef TARGET_OS2 2139 int dev; 2140 #endif 2116 2141 int err; 2117 2142 … … 2121 2146 } 2122 2147 2123 if (dev >= SNDRV_CARDS) 2124 return -ENODEV; 2148 #ifndef TARGET_OS2 2149 dev = find_first_zero_bit(probed_devs, SNDRV_CARDS); 2150 #endif 2151 if (dev >= SNDRV_CARDS){ 2152 return -ENODEV;} 2125 2153 if (!enable[dev]) { 2154 #ifdef TARGET_OS2 2126 2155 dev++; 2156 #else 2157 set_bit(dev, probed_devs); 2158 #endif 2127 2159 return -ENOENT; 2128 2160 } … … 2183 2215 #endif /* CONFIG_SND_HDA_PATCH_LOADER */ 2184 2216 2185 #if ndef CONFIG_SND_HDA_I9152186 if ( CONTROLLER_IN_GPU(pci))2217 #if !defined(CONFIG_SND_HDA_I915) && !defined(TARGET_OS2) 2218 if (HDA_CONTROLLER_IN_GPU(pci)) 2187 2219 dev_err(card->dev, "Haswell/Broadwell HDMI/DP must build in CONFIG_SND_HDA_I915\n"); 2188 2220 #endif … … 2199 2231 #endif 2200 2232 2201 dev++;2233 set_bit(dev, probed_devs); 2202 2234 if (chip->disabled) 2203 2235 complete_all(&hda->probe_wait); … … 2240 2272 /* https://bugzilla.kernel.org/show_bug.cgi?id=198611 */ 2241 2273 SND_PCI_QUIRK(0x17aa, 0x2227, "Lenovo X1 Carbon 3rd Gen", 0), 2274 SND_PCI_QUIRK(0x17aa, 0x316e, "Lenovo ThinkCentre M70q", 0), 2242 2275 /* https://bugzilla.redhat.com/show_bug.cgi?id=1689623 */ 2243 2276 SND_PCI_QUIRK(0x17aa, 0x367b, "Lenovo IdeaCentre B550", 0), … … 2246 2279 /* https://bugs.launchpad.net/bugs/1821663 */ 2247 2280 SND_PCI_QUIRK(0x1631, 0xe017, "Packard Bell NEC IMEDIA 5204", 0), 2281 /* KONTRON SinglePC may cause a stall at runtime resume */ 2282 SND_PCI_QUIRK(0x1734, 0x1232, "KONTRON SinglePC", 0), 2283 /* Dell ALC3271 */ 2284 SND_PCI_QUIRK(0x1028, 0x0962, "Dell ALC3271", 0), 2248 2285 {0} 2249 2286 }; … … 2300 2337 * codecs can be on the same link. 2301 2338 */ 2302 if ( CONTROLLER_IN_GPU(pci)) {2339 if (HDA_CONTROLLER_IN_GPU(pci)) { 2303 2340 dev_err(chip->card->dev, 2304 2341 "HSW/BDW HD-audio HDMI/DP requires binding with gfx driver\n"); … … 2311 2348 2312 2349 /* HSW/BDW controllers need this power */ 2313 if ( CONTROLLER_IN_GPU(pci))2350 if (HDA_CONTROLLER_IN_GPU(pci)) 2314 2351 hda->need_i915_power = true; 2315 2352 } … … 2329 2366 chip->beep_mode = beep_mode[dev]; 2330 2367 #endif 2368 2369 chip->ctl_dev_id = ctl_dev_id; 2331 2370 2332 2371 /* create codec instances */ … … 2422 2461 device_lock(&pci->dev); 2423 2462 2463 clear_bit(chip->dev_index, probed_devs); 2464 pci_set_drvdata(pci, NULL); 2424 2465 snd_card_free(card); 2425 2466 } … … 2441 2482 static const struct pci_device_id azx_ids[] = { 2442 2483 /* CPT */ 2443 { PCI_DEVICE(0x8086, 0x1c20), 2444 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM }, 2484 { PCI_DEVICE_DATA(INTEL, HDA_CPT, AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM) }, 2445 2485 /* PBG */ 2446 { PCI_DEVICE(0x8086, 0x1d20), 2447 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM }, 2486 { PCI_DEVICE_DATA(INTEL, HDA_PBG, AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM) }, 2448 2487 /* Panther Point */ 2449 { PCI_DEVICE(0x8086, 0x1e20), 2450 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM }, 2488 { PCI_DEVICE_DATA(INTEL, HDA_PPT, AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM) }, 2451 2489 /* Lynx Point */ 2452 { PCI_DEVICE(0x8086, 0x8c20), 2453 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, 2490 { PCI_DEVICE_DATA(INTEL, HDA_LPT, AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH) }, 2454 2491 /* 9 Series */ 2455 { PCI_DEVICE(0x8086, 0x8ca0), 2456 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, 2492 { PCI_DEVICE_DATA(INTEL, HDA_9_SERIES, AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH) }, 2457 2493 /* Wellsburg */ 2458 { PCI_DEVICE(0x8086, 0x8d20), 2459 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, 2460 { PCI_DEVICE(0x8086, 0x8d21), 2461 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, 2494 { PCI_DEVICE_DATA(INTEL, HDA_WBG_0, AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH) }, 2495 { PCI_DEVICE_DATA(INTEL, HDA_WBG_1, AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH) }, 2462 2496 /* Lewisburg */ 2463 { PCI_DEVICE(0x8086, 0xa1f0), 2464 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE }, 2465 { PCI_DEVICE(0x8086, 0xa270), 2466 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE }, 2497 { PCI_DEVICE_DATA(INTEL, HDA_LBG_0, AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE) }, 2498 { PCI_DEVICE_DATA(INTEL, HDA_LBG_1, AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE) }, 2467 2499 /* Lynx Point-LP */ 2468 { PCI_DEVICE(0x8086, 0x9c20), 2469 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, 2500 { PCI_DEVICE_DATA(INTEL, HDA_LPT_LP_0, AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH) }, 2470 2501 /* Lynx Point-LP */ 2471 { PCI_DEVICE(0x8086, 0x9c21), 2472 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, 2502 { PCI_DEVICE_DATA(INTEL, HDA_LPT_LP_1, AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH) }, 2473 2503 /* Wildcat Point-LP */ 2474 { PCI_DEVICE(0x8086, 0x9ca0), 2475 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, 2476 /* Sunrise Point */ 2477 { PCI_DEVICE(0x8086, 0xa170), 2478 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE }, 2479 /* Sunrise Point-LP */ 2480 { PCI_DEVICE(0x8086, 0x9d70), 2481 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE }, 2504 { PCI_DEVICE_DATA(INTEL, HDA_WPT_LP, AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH) }, 2505 /* Skylake (Sunrise Point) */ 2506 { PCI_DEVICE_DATA(INTEL, HDA_SKL, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2507 /* Skylake-LP (Sunrise Point-LP) */ 2508 { PCI_DEVICE_DATA(INTEL, HDA_SKL_LP, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2482 2509 /* Kabylake */ 2483 { PCI_DEVICE(0x8086, 0xa171), 2484 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE }, 2510 { PCI_DEVICE_DATA(INTEL, HDA_KBL, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2485 2511 /* Kabylake-LP */ 2486 { PCI_DEVICE(0x8086, 0x9d71), 2487 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE }, 2512 { PCI_DEVICE_DATA(INTEL, HDA_KBL_LP, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2488 2513 /* Kabylake-H */ 2489 { PCI_DEVICE(0x8086, 0xa2f0), 2490 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE }, 2514 { PCI_DEVICE_DATA(INTEL, HDA_KBL_H, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2491 2515 /* Coffelake */ 2492 { PCI_DEVICE(0x8086, 0xa348), 2493 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2516 { PCI_DEVICE_DATA(INTEL, HDA_CNL_H, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2494 2517 /* Cannonlake */ 2495 { PCI_DEVICE(0x8086, 0x9dc8), 2496 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2518 { PCI_DEVICE_DATA(INTEL, HDA_CNL_LP, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2497 2519 /* CometLake-LP */ 2498 { PCI_DEVICE(0x8086, 0x02C8), 2499 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2520 { PCI_DEVICE_DATA(INTEL, HDA_CML_LP, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2500 2521 /* CometLake-H */ 2501 { PCI_DEVICE(0x8086, 0x06C8), 2502 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2503 { PCI_DEVICE(0x8086, 0xf1c8), 2504 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2522 { PCI_DEVICE_DATA(INTEL, HDA_CML_H, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2523 { PCI_DEVICE_DATA(INTEL, HDA_RKL_S, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2505 2524 /* CometLake-S */ 2506 { PCI_DEVICE(0x8086, 0xa3f0), 2507 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2525 { PCI_DEVICE_DATA(INTEL, HDA_CML_S, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2508 2526 /* CometLake-R */ 2509 { PCI_DEVICE(0x8086, 0xf0c8), 2510 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2527 { PCI_DEVICE_DATA(INTEL, HDA_CML_R, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2511 2528 /* Icelake */ 2512 { PCI_DEVICE(0x8086, 0x34c8), 2513 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2529 { PCI_DEVICE_DATA(INTEL, HDA_ICL_LP, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2514 2530 /* Icelake-H */ 2515 { PCI_DEVICE(0x8086, 0x3dc8), 2516 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2531 { PCI_DEVICE_DATA(INTEL, HDA_ICL_H, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2517 2532 /* Jasperlake */ 2518 { PCI_DEVICE(0x8086, 0x38c8), 2519 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2520 { PCI_DEVICE(0x8086, 0x4dc8), 2521 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2533 { PCI_DEVICE_DATA(INTEL, HDA_ICL_N, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2534 { PCI_DEVICE_DATA(INTEL, HDA_JSL_N, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2522 2535 /* Tigerlake */ 2523 { PCI_DEVICE(0x8086, 0xa0c8), 2524 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2536 { PCI_DEVICE_DATA(INTEL, HDA_TGL_LP, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2525 2537 /* Tigerlake-H */ 2526 { PCI_DEVICE(0x8086, 0x43c8), 2527 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2538 { PCI_DEVICE_DATA(INTEL, HDA_TGL_H, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2528 2539 /* DG1 */ 2529 { PCI_DEVICE(0x8086, 0x490d), 2530 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2540 { PCI_DEVICE_DATA(INTEL, HDA_DG1, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2531 2541 /* DG2 */ 2532 { PCI_DEVICE(0x8086, 0x4f90), 2533 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2534 { PCI_DEVICE(0x8086, 0x4f91), 2535 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2536 { PCI_DEVICE(0x8086, 0x4f92), 2537 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2542 { PCI_DEVICE_DATA(INTEL, HDA_DG2_0, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2543 { PCI_DEVICE_DATA(INTEL, HDA_DG2_1, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2544 { PCI_DEVICE_DATA(INTEL, HDA_DG2_2, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2538 2545 /* Alderlake-S */ 2539 { PCI_DEVICE(0x8086, 0x7ad0), 2540 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2546 { PCI_DEVICE_DATA(INTEL, HDA_ADL_S, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2541 2547 /* Alderlake-P */ 2542 { PCI_DEVICE(0x8086, 0x51c8), 2543 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2548 { PCI_DEVICE_DATA(INTEL, HDA_ADL_P, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2549 { PCI_DEVICE_DATA(INTEL, HDA_ADL_PS, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2550 { PCI_DEVICE_DATA(INTEL, HDA_ADL_PX, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2544 2551 /* Alderlake-M */ 2545 { PCI_DEVICE(0x8086, 0x51cc), 2546 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2552 { PCI_DEVICE_DATA(INTEL, HDA_ADL_M, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2553 /* Alderlake-N */ 2554 { PCI_DEVICE_DATA(INTEL, HDA_ADL_N, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2547 2555 /* Elkhart Lake */ 2548 { PCI_DEVICE(0x8086, 0x4b55), 2549 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2550 { PCI_DEVICE(0x8086, 0x4b58), 2551 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE}, 2552 /* Broxton-P(Apollolake) */ 2553 { PCI_DEVICE(0x8086, 0x5a98), 2554 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON }, 2555 /* Broxton-T */ 2556 { PCI_DEVICE(0x8086, 0x1a98), 2557 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON }, 2556 { PCI_DEVICE_DATA(INTEL, HDA_EHL_0, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2557 { PCI_DEVICE_DATA(INTEL, HDA_EHL_3, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2558 /* Raptor Lake */ 2559 { PCI_DEVICE_DATA(INTEL, HDA_RPL_S, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2560 { PCI_DEVICE_DATA(INTEL, HDA_RPL_P_0, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2561 { PCI_DEVICE_DATA(INTEL, HDA_RPL_P_1, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2562 { PCI_DEVICE_DATA(INTEL, HDA_RPL_M, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2563 { PCI_DEVICE_DATA(INTEL, HDA_RPL_PX, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2564 { PCI_DEVICE_DATA(INTEL, HDA_MTL, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2565 /* Lunarlake-P */ 2566 { PCI_DEVICE_DATA(INTEL, HDA_LNL_P, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2567 /* Arrow Lake-S */ 2568 { PCI_DEVICE_DATA(INTEL, HDA_ARL_S, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2569 /* Arrow Lake */ 2570 { PCI_DEVICE_DATA(INTEL, HDA_ARL, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2571 /* Apollolake (Broxton-P) */ 2572 { PCI_DEVICE_DATA(INTEL, HDA_APL, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON) }, 2558 2573 /* Gemini-Lake */ 2559 { PCI_DEVICE(0x8086, 0x3198), 2560 .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON }, 2574 { PCI_DEVICE_DATA(INTEL, HDA_GML, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON) }, 2561 2575 /* Haswell */ 2562 { PCI_DEVICE(0x8086, 0x0a0c), 2563 .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL }, 2564 { PCI_DEVICE(0x8086, 0x0c0c), 2565 .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL }, 2566 { PCI_DEVICE(0x8086, 0x0d0c), 2567 .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL }, 2576 { PCI_DEVICE_DATA(INTEL, HDA_HSW_0, AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL) }, 2577 { PCI_DEVICE_DATA(INTEL, HDA_HSW_2, AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL) }, 2578 { PCI_DEVICE_DATA(INTEL, HDA_HSW_3, AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL) }, 2568 2579 /* Broadwell */ 2569 { PCI_DEVICE(0x8086, 0x160c), 2570 .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_BROADWELL }, 2580 { PCI_DEVICE_DATA(INTEL, HDA_BDW, AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_BROADWELL) }, 2571 2581 /* 5 Series/3400 */ 2572 { PCI_DEVICE (0x8086, 0x3b56),2573 .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM},2582 { PCI_DEVICE_DATA(INTEL, HDA_5_3400_SERIES_0, AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM) }, 2583 { PCI_DEVICE_DATA(INTEL, HDA_5_3400_SERIES_1, AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM) }, 2574 2584 /* Poulsbo */ 2575 { PCI_DEVICE (0x8086, 0x811b),2576 .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_BASE},2585 { PCI_DEVICE_DATA(INTEL, HDA_POULSBO, AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_BASE | 2586 AZX_DCAPS_POSFIX_LPIB) }, 2577 2587 /* Oaktrail */ 2578 { PCI_DEVICE(0x8086, 0x080a), 2579 .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_BASE }, 2588 { PCI_DEVICE_DATA(INTEL, HDA_OAKTRAIL, AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_BASE) }, 2580 2589 /* BayTrail */ 2581 { PCI_DEVICE(0x8086, 0x0f04), 2582 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BAYTRAIL }, 2590 { PCI_DEVICE_DATA(INTEL, HDA_BYT, AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BAYTRAIL) }, 2583 2591 /* Braswell */ 2584 { PCI_DEVICE(0x8086, 0x2284), 2585 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BRASWELL }, 2592 { PCI_DEVICE_DATA(INTEL, HDA_BSW, AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BRASWELL) }, 2586 2593 /* ICH6 */ 2587 { PCI_DEVICE(0x8086, 0x2668), 2588 .driver_data = AZX_DRIVER_ICH | AZX_DCAPS_INTEL_ICH }, 2594 { PCI_DEVICE_DATA(INTEL, HDA_ICH6, AZX_DRIVER_ICH | AZX_DCAPS_INTEL_ICH) }, 2589 2595 /* ICH7 */ 2590 { PCI_DEVICE(0x8086, 0x27d8), 2591 .driver_data = AZX_DRIVER_ICH | AZX_DCAPS_INTEL_ICH }, 2596 { PCI_DEVICE_DATA(INTEL, HDA_ICH7, AZX_DRIVER_ICH | AZX_DCAPS_INTEL_ICH) }, 2592 2597 /* ESB2 */ 2593 { PCI_DEVICE(0x8086, 0x269a), 2594 .driver_data = AZX_DRIVER_ICH | AZX_DCAPS_INTEL_ICH }, 2598 { PCI_DEVICE_DATA(INTEL, HDA_ESB2, AZX_DRIVER_ICH | AZX_DCAPS_INTEL_ICH) }, 2595 2599 /* ICH8 */ 2596 { PCI_DEVICE(0x8086, 0x284b), 2597 .driver_data = AZX_DRIVER_ICH | AZX_DCAPS_INTEL_ICH }, 2600 { PCI_DEVICE_DATA(INTEL, HDA_ICH8, AZX_DRIVER_ICH | AZX_DCAPS_INTEL_ICH) }, 2598 2601 /* ICH9 */ 2599 { PCI_DEVICE(0x8086, 0x293e), 2600 .driver_data = AZX_DRIVER_ICH | AZX_DCAPS_INTEL_ICH }, 2602 { PCI_DEVICE_DATA(INTEL, HDA_ICH9_0, AZX_DRIVER_ICH | AZX_DCAPS_INTEL_ICH) }, 2601 2603 /* ICH9 */ 2602 { PCI_DEVICE(0x8086, 0x293f), 2603 .driver_data = AZX_DRIVER_ICH | AZX_DCAPS_INTEL_ICH }, 2604 { PCI_DEVICE_DATA(INTEL, HDA_ICH9_1, AZX_DRIVER_ICH | AZX_DCAPS_INTEL_ICH) }, 2604 2605 /* ICH10 */ 2605 { PCI_DEVICE(0x8086, 0x3a3e), 2606 .driver_data = AZX_DRIVER_ICH | AZX_DCAPS_INTEL_ICH }, 2606 { PCI_DEVICE_DATA(INTEL, HDA_ICH10_0, AZX_DRIVER_ICH | AZX_DCAPS_INTEL_ICH) }, 2607 2607 /* ICH10 */ 2608 { PCI_DEVICE(0x8086, 0x3a6e), 2609 .driver_data = AZX_DRIVER_ICH | AZX_DCAPS_INTEL_ICH }, 2608 { PCI_DEVICE_DATA(INTEL, HDA_ICH10_1, AZX_DRIVER_ICH | AZX_DCAPS_INTEL_ICH) }, 2610 2609 /* Generic Intel */ 2611 2610 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_ANY_ID), … … 2614 2613 .driver_data = AZX_DRIVER_ICH | AZX_DCAPS_NO_ALIGN_BUFSIZE }, 2615 2614 /* ATI SB 450/600/700/800/900 */ 2616 { PCI_ DEVICE(0x1002, 0x437b),2615 { PCI_VDEVICE(ATI, 0x437b), 2617 2616 .driver_data = AZX_DRIVER_ATI | AZX_DCAPS_PRESET_ATI_SB }, 2618 { PCI_ DEVICE(0x1002, 0x4383),2617 { PCI_VDEVICE(ATI, 0x4383), 2619 2618 .driver_data = AZX_DRIVER_ATI | AZX_DCAPS_PRESET_ATI_SB }, 2620 2619 /* AMD Hudson */ 2621 { PCI_ DEVICE(0x1022, 0x780d),2620 { PCI_VDEVICE(AMD, 0x780d), 2622 2621 .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB }, 2623 2622 /* AMD, X370 & co */ 2624 { PCI_ DEVICE(0x1022, 0x1457),2623 { PCI_VDEVICE(AMD, 0x1457), 2625 2624 .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_AMD_SB }, 2626 2625 /* AMD, X570 & co */ 2627 { PCI_ DEVICE(0x1022, 0x1487),2626 { PCI_VDEVICE(AMD, 0x1487), 2628 2627 .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_AMD_SB }, 2629 2628 /* AMD Stoney */ 2630 { PCI_ DEVICE(0x1022, 0x157a),2629 { PCI_VDEVICE(AMD, 0x157a), 2631 2630 .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB | 2632 2631 AZX_DCAPS_PM_RUNTIME }, 2633 2632 /* AMD Raven */ 2634 { PCI_ DEVICE(0x1022, 0x15e3),2633 { PCI_VDEVICE(AMD, 0x15e3), 2635 2634 .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_AMD_SB }, 2636 2635 /* ATI HDMI */ 2637 { PCI_ DEVICE(0x1002, 0x0002),2636 { PCI_VDEVICE(ATI, 0x0002), 2638 2637 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | 2639 2638 AZX_DCAPS_PM_RUNTIME }, 2640 { PCI_ DEVICE(0x1002, 0x1308),2639 { PCI_VDEVICE(ATI, 0x1308), 2641 2640 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, 2642 { PCI_ DEVICE(0x1002, 0x157a),2641 { PCI_VDEVICE(ATI, 0x157a), 2643 2642 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, 2644 { PCI_ DEVICE(0x1002, 0x15b3),2643 { PCI_VDEVICE(ATI, 0x15b3), 2645 2644 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, 2646 { PCI_ DEVICE(0x1002, 0x793b),2645 { PCI_VDEVICE(ATI, 0x793b), 2647 2646 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2648 { PCI_ DEVICE(0x1002, 0x7919),2647 { PCI_VDEVICE(ATI, 0x7919), 2649 2648 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2650 { PCI_ DEVICE(0x1002, 0x960f),2649 { PCI_VDEVICE(ATI, 0x960f), 2651 2650 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2652 { PCI_ DEVICE(0x1002, 0x970f),2651 { PCI_VDEVICE(ATI, 0x970f), 2653 2652 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2654 { PCI_ DEVICE(0x1002, 0x9840),2653 { PCI_VDEVICE(ATI, 0x9840), 2655 2654 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, 2656 { PCI_ DEVICE(0x1002, 0xaa00),2655 { PCI_VDEVICE(ATI, 0xaa00), 2657 2656 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2658 { PCI_ DEVICE(0x1002, 0xaa08),2657 { PCI_VDEVICE(ATI, 0xaa08), 2659 2658 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2660 { PCI_ DEVICE(0x1002, 0xaa10),2659 { PCI_VDEVICE(ATI, 0xaa10), 2661 2660 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2662 { PCI_ DEVICE(0x1002, 0xaa18),2661 { PCI_VDEVICE(ATI, 0xaa18), 2663 2662 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2664 { PCI_ DEVICE(0x1002, 0xaa20),2663 { PCI_VDEVICE(ATI, 0xaa20), 2665 2664 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2666 { PCI_ DEVICE(0x1002, 0xaa28),2665 { PCI_VDEVICE(ATI, 0xaa28), 2667 2666 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2668 { PCI_ DEVICE(0x1002, 0xaa30),2667 { PCI_VDEVICE(ATI, 0xaa30), 2669 2668 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2670 { PCI_ DEVICE(0x1002, 0xaa38),2669 { PCI_VDEVICE(ATI, 0xaa38), 2671 2670 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2672 { PCI_ DEVICE(0x1002, 0xaa40),2671 { PCI_VDEVICE(ATI, 0xaa40), 2673 2672 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2674 { PCI_ DEVICE(0x1002, 0xaa48),2673 { PCI_VDEVICE(ATI, 0xaa48), 2675 2674 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2676 { PCI_ DEVICE(0x1002, 0xaa50),2675 { PCI_VDEVICE(ATI, 0xaa50), 2677 2676 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2678 { PCI_ DEVICE(0x1002, 0xaa58),2677 { PCI_VDEVICE(ATI, 0xaa58), 2679 2678 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2680 { PCI_ DEVICE(0x1002, 0xaa60),2679 { PCI_VDEVICE(ATI, 0xaa60), 2681 2680 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2682 { PCI_ DEVICE(0x1002, 0xaa68),2681 { PCI_VDEVICE(ATI, 0xaa68), 2683 2682 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2684 { PCI_ DEVICE(0x1002, 0xaa80),2683 { PCI_VDEVICE(ATI, 0xaa80), 2685 2684 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2686 { PCI_ DEVICE(0x1002, 0xaa88),2685 { PCI_VDEVICE(ATI, 0xaa88), 2687 2686 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2688 { PCI_ DEVICE(0x1002, 0xaa90),2687 { PCI_VDEVICE(ATI, 0xaa90), 2689 2688 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2690 { PCI_ DEVICE(0x1002, 0xaa98),2689 { PCI_VDEVICE(ATI, 0xaa98), 2691 2690 .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI }, 2692 { PCI_ DEVICE(0x1002, 0x9902),2691 { PCI_VDEVICE(ATI, 0x9902), 2693 2692 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, 2694 { PCI_ DEVICE(0x1002, 0xaaa0),2693 { PCI_VDEVICE(ATI, 0xaaa0), 2695 2694 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, 2696 { PCI_ DEVICE(0x1002, 0xaaa8),2695 { PCI_VDEVICE(ATI, 0xaaa8), 2697 2696 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, 2698 { PCI_ DEVICE(0x1002, 0xaab0),2697 { PCI_VDEVICE(ATI, 0xaab0), 2699 2698 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, 2700 { PCI_ DEVICE(0x1002, 0xaac0),2699 { PCI_VDEVICE(ATI, 0xaac0), 2701 2700 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | 2702 2701 AZX_DCAPS_PM_RUNTIME }, 2703 { PCI_ DEVICE(0x1002, 0xaac8),2702 { PCI_VDEVICE(ATI, 0xaac8), 2704 2703 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | 2705 2704 AZX_DCAPS_PM_RUNTIME }, 2706 { PCI_ DEVICE(0x1002, 0xaad8),2705 { PCI_VDEVICE(ATI, 0xaad8), 2707 2706 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | 2708 2707 AZX_DCAPS_PM_RUNTIME }, 2709 { PCI_ DEVICE(0x1002, 0xaae0),2708 { PCI_VDEVICE(ATI, 0xaae0), 2710 2709 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | 2711 2710 AZX_DCAPS_PM_RUNTIME }, 2712 { PCI_ DEVICE(0x1002, 0xaae8),2711 { PCI_VDEVICE(ATI, 0xaae8), 2713 2712 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | 2714 2713 AZX_DCAPS_PM_RUNTIME }, 2715 { PCI_ DEVICE(0x1002, 0xaaf0),2714 { PCI_VDEVICE(ATI, 0xaaf0), 2716 2715 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | 2717 2716 AZX_DCAPS_PM_RUNTIME }, 2718 { PCI_ DEVICE(0x1002, 0xaaf8),2717 { PCI_VDEVICE(ATI, 0xaaf8), 2719 2718 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | 2720 2719 AZX_DCAPS_PM_RUNTIME }, 2721 { PCI_ DEVICE(0x1002, 0xab00),2720 { PCI_VDEVICE(ATI, 0xab00), 2722 2721 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | 2723 2722 AZX_DCAPS_PM_RUNTIME }, 2724 { PCI_ DEVICE(0x1002, 0xab08),2723 { PCI_VDEVICE(ATI, 0xab08), 2725 2724 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | 2726 2725 AZX_DCAPS_PM_RUNTIME }, 2727 { PCI_ DEVICE(0x1002, 0xab10),2726 { PCI_VDEVICE(ATI, 0xab10), 2728 2727 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | 2729 2728 AZX_DCAPS_PM_RUNTIME }, 2730 { PCI_ DEVICE(0x1002, 0xab18),2729 { PCI_VDEVICE(ATI, 0xab18), 2731 2730 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | 2732 2731 AZX_DCAPS_PM_RUNTIME }, 2733 { PCI_ DEVICE(0x1002, 0xab20),2732 { PCI_VDEVICE(ATI, 0xab20), 2734 2733 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | 2735 2734 AZX_DCAPS_PM_RUNTIME }, 2736 { PCI_ DEVICE(0x1002, 0xab28),2735 { PCI_VDEVICE(ATI, 0xab28), 2737 2736 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | 2738 2737 AZX_DCAPS_PM_RUNTIME }, 2739 { PCI_ DEVICE(0x1002, 0xab38),2738 { PCI_VDEVICE(ATI, 0xab30), 2740 2739 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | 2741 2740 AZX_DCAPS_PM_RUNTIME }, 2741 { PCI_VDEVICE(ATI, 0xab38), 2742 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | 2743 AZX_DCAPS_PM_RUNTIME }, 2744 /* GLENFLY */ 2745 { PCI_DEVICE(PCI_VENDOR_ID_GLENFLY, PCI_ANY_ID), 2746 .class = PCI_CLASS_MULTIMEDIA_HD_AUDIO << 8, 2747 .class_mask = 0xffffff, 2748 .driver_data = AZX_DRIVER_GFHDMI | AZX_DCAPS_POSFIX_LPIB | 2749 AZX_DCAPS_NO_MSI | AZX_DCAPS_NO_64BIT }, 2742 2750 /* VIA VT8251/VT8237A */ 2743 { PCI_ DEVICE(0x1106, 0x3288), .driver_data = AZX_DRIVER_VIA },2751 { PCI_VDEVICE(VIA, 0x3288), .driver_data = AZX_DRIVER_VIA }, 2744 2752 /* VIA GFX VT7122/VX900 */ 2745 { PCI_ DEVICE(0x1106, 0x9170), .driver_data = AZX_DRIVER_GENERIC },2753 { PCI_VDEVICE(VIA, 0x9170), .driver_data = AZX_DRIVER_GENERIC }, 2746 2754 /* VIA GFX VT6122/VX11 */ 2747 { PCI_ DEVICE(0x1106, 0x9140), .driver_data = AZX_DRIVER_GENERIC },2755 { PCI_VDEVICE(VIA, 0x9140), .driver_data = AZX_DRIVER_GENERIC }, 2748 2756 /* SIS966 */ 2749 { PCI_ DEVICE(0x1039, 0x7502), .driver_data = AZX_DRIVER_SIS },2757 { PCI_VDEVICE(SI, 0x7502), .driver_data = AZX_DRIVER_SIS }, 2750 2758 /* ULI M5461 */ 2751 { PCI_ DEVICE(0x10b9, 0x5461), .driver_data = AZX_DRIVER_ULI },2759 { PCI_VDEVICE(AL, 0x5461), .driver_data = AZX_DRIVER_ULI }, 2752 2760 /* NVIDIA MCP */ 2753 2761 { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID), … … 2762 2770 /* Creative X-Fi (CA0110-IBG) */ 2763 2771 /* CTHDA chips */ 2764 { PCI_ DEVICE(0x1102, 0x0010),2772 { PCI_VDEVICE(CREATIVE, 0x0010), 2765 2773 .driver_data = AZX_DRIVER_CTHDA | AZX_DCAPS_PRESET_CTHDA }, 2766 { PCI_ DEVICE(0x1102, 0x0012),2774 { PCI_VDEVICE(CREATIVE, 0x0012), 2767 2775 .driver_data = AZX_DRIVER_CTHDA | AZX_DCAPS_PRESET_CTHDA }, 2768 2776 #if !IS_ENABLED(CONFIG_SND_CTXFI) … … 2778 2786 #else 2779 2787 /* this entry seems still valid -- i.e. without emu20kx chip */ 2780 { PCI_ DEVICE(0x1102, 0x0009),2788 { PCI_VDEVICE(CREATIVE, 0x0009), 2781 2789 .driver_data = AZX_DRIVER_CTX | AZX_DCAPS_CTX_WORKAROUND | 2782 2790 AZX_DCAPS_NO_64BIT | AZX_DCAPS_POSFIX_LPIB }, 2783 2791 #endif 2784 2792 /* CM8888 */ 2785 { PCI_ DEVICE(0x13f6, 0x5011),2793 { PCI_VDEVICE(CMEDIA, 0x5011), 2786 2794 .driver_data = AZX_DRIVER_CMEDIA | 2787 2795 AZX_DCAPS_NO_MSI | AZX_DCAPS_POSFIX_LPIB | AZX_DCAPS_SNOOP_OFF }, 2788 2796 /* Vortex86MX */ 2789 { PCI_ DEVICE(0x17f3, 0x3010), .driver_data = AZX_DRIVER_GENERIC },2797 { PCI_VDEVICE(RDC, 0x3010), .driver_data = AZX_DRIVER_GENERIC }, 2790 2798 /* VMware HDAudio */ 2791 { PCI_ DEVICE(0x15ad, 0x1977), .driver_data = AZX_DRIVER_GENERIC },2799 { PCI_VDEVICE(VMWARE, 0x1977), .driver_data = AZX_DRIVER_GENERIC }, 2792 2800 /* AMD/ATI Generic, PCI class code and Vendor ID for HD Audio */ 2793 2801 { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_ANY_ID), … … 2800 2808 .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_HDMI }, 2801 2809 /* Zhaoxin */ 2802 { PCI_DEVICE(0x1d17, 0x3288), .driver_data = AZX_DRIVER_ZHAOXIN }, 2810 { PCI_VDEVICE(ZHAOXIN, 0x3288), .driver_data = AZX_DRIVER_ZHAOXIN }, 2811 /* Loongson HDAudio*/ 2812 { PCI_VDEVICE(LOONGSON, PCI_DEVICE_ID_LOONGSON_HDA), 2813 .driver_data = AZX_DRIVER_LOONGSON }, 2814 { PCI_VDEVICE(LOONGSON, PCI_DEVICE_ID_LOONGSON_HDMI), 2815 .driver_data = AZX_DRIVER_LOONGSON }, 2803 2816 { 0, } 2804 2817 }; -
GPL/trunk/alsa-kernel/pci/hda/hda_jack.c
r695 r772 157 157 158 158 return jack; 159 } 160 161 void snd_hda_jack_tbl_disconnect(struct hda_codec *codec) 162 { 163 struct hda_jack_tbl *jack = codec->jacktbl.list; 164 int i; 165 166 for (i = 0; i < codec->jacktbl.used; i++, jack++) { 167 if (!codec->bus->shutdown && jack->jack) 168 snd_device_disconnect(codec->card, jack->jack); 169 } 159 170 } 160 171 -
GPL/trunk/alsa-kernel/pci/hda/hda_jack.h
r695 r772 70 70 unsigned char tag, int dev_id); 71 71 72 void snd_hda_jack_tbl_disconnect(struct hda_codec *codec); 72 73 void snd_hda_jack_tbl_clear(struct hda_codec *codec); 73 74 -
GPL/trunk/alsa-kernel/pci/hda/hda_local.h
r717 r772 136 136 __snd_hda_add_vmaster(codec, name, tlv, followers, suffix, true, access, NULL) 137 137 int snd_hda_codec_reset(struct hda_codec *codec); 138 void snd_hda_codec_register(struct hda_codec *codec);139 void snd_hda_codec_cleanup_for_unbind(struct hda_codec *codec);140 138 void snd_hda_codec_disconnect_pcms(struct hda_codec *codec); 141 139 … … 299 297 }; 300 298 299 /* 300 * extended form of snd_pci_quirk: 301 * for PCI SSID matching, use SND_PCI_QUIRK() like before; 302 * for codec SSID matching, use the new HDA_CODEC_QUIRK() instead 303 */ 304 struct hda_quirk { 305 unsigned short subvendor; /* PCI subvendor ID */ 306 unsigned short subdevice; /* PCI subdevice ID */ 307 unsigned short subdevice_mask; /* bitmask to match */ 308 bool match_codec_ssid; /* match only with codec SSID */ 309 int value; /* value */ 310 #ifdef CONFIG_SND_DEBUG_VERBOSE 311 const char *name; /* name of the device (optional) */ 312 #endif 313 }; 314 315 #ifdef CONFIG_SND_DEBUG_VERBOSE 316 #define HDA_CODEC_QUIRK(vend, dev, xname, val) \ 317 { _SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname),\ 318 .match_codec_ssid = true } 319 #else 320 #define HDA_CODEC_QUIRK(vend, dev, xname, val) \ 321 { _SND_PCI_QUIRK_ID(vend, dev), .value = (val), \ 322 .match_codec_ssid = true } 323 #endif 324 301 325 struct snd_hda_pin_quirk { 302 326 unsigned int codec; /* Codec vendor/device ID */ … … 368 392 void snd_hda_pick_fixup(struct hda_codec *codec, 369 393 const struct hda_model_fixup *models, 370 const struct snd_pci_quirk *quirk,394 const struct hda_quirk *quirk, 371 395 const struct hda_fixup *fixlist); 372 396 void snd_hda_pick_pin_fixup(struct hda_codec *codec, … … 729 753 #ifdef CONFIG_SND_PROC_FS 730 754 void snd_hdmi_print_eld_info(struct hdmi_eld *eld, 731 struct snd_info_buffer *buffer); 755 struct snd_info_buffer *buffer, 756 hda_nid_t pin_nid, int dev_id, hda_nid_t cvt_nid); 732 757 void snd_hdmi_write_eld_info(struct hdmi_eld *eld, 733 758 struct snd_info_buffer *buffer); -
GPL/trunk/alsa-kernel/pci/hda/hda_sysfs.c
r679 r772 21 21 #include <sound/minors.h> 22 22 23 extern int sysfs_emit(char *buf, const char *fmt, ...); 24 extern int sysfs_emit_at(char *buf, int at, const char *fmt, ...); 25 23 26 /* hint string pair */ 24 27 struct hda_hint { … … 34 37 struct hda_codec *codec = dev_get_drvdata(dev); 35 38 snd_hda_update_power_acct(codec); 36 return s printf(buf, "%u\n", jiffies_to_msecs(codec->power_on_acct));39 return sysfs_emit(buf, "%u\n", jiffies_to_msecs(codec->power_on_acct)); 37 40 } 38 41 … … 43 46 struct hda_codec *codec = dev_get_drvdata(dev); 44 47 snd_hda_update_power_acct(codec); 45 return s printf(buf, "%u\n", jiffies_to_msecs(codec->power_off_acct));48 return sysfs_emit(buf, "%u\n", jiffies_to_msecs(codec->power_off_acct)); 46 49 } 47 50 … … 56 59 { \ 57 60 struct hda_codec *codec = dev_get_drvdata(dev); \ 58 return s printf(buf, "0x%x\n", codec->field); \61 return sysfs_emit(buf, "0x%x\n", codec->field); \ 59 62 } 60 63 … … 65 68 { \ 66 69 struct hda_codec *codec = dev_get_drvdata(dev); \ 67 return s printf(buf, "%s\n", \68 codec->field ? codec->field : ""); \70 return sysfs_emit(buf, "%s\n", \ 71 codec->field ? codec->field : ""); \ 69 72 } 70 73 … … 86 89 mutex_lock(&codec->user_mutex); 87 90 snd_array_for_each(list, i, pin) { 88 len += s printf(buf +len, "0x%02x 0x%08x\n",89 pin->nid, pin->cfg);91 len += sysfs_emit_at(buf, len, "0x%02x 0x%08x\n", 92 pin->nid, pin->cfg); 90 93 } 91 94 mutex_unlock(&codec->user_mutex); … … 223 226 mutex_lock(&codec->user_mutex); 224 227 snd_array_for_each(&codec->init_verbs, i, v) { 225 len += scnprintf(buf + len, PAGE_SIZE - len, 226 "0x%02x 0x%03x 0x%04x\n", 227 v->nid, v->verb, v->param); 228 len += sysfs_emit_at(buf, len, "0x%02x 0x%03x 0x%04x\n", 229 v->nid, v->verb, v->param); 228 230 } 229 231 mutex_unlock(&codec->user_mutex); … … 273 275 mutex_lock(&codec->user_mutex); 274 276 snd_array_for_each(&codec->hints, i, hint) { 275 len += s cnprintf(buf + len, PAGE_SIZE - len,276 "%s = %s\n",hint->key, hint->val);277 len += sysfs_emit_at(buf, len, "%s = %s\n", 278 hint->key, hint->val); 277 279 } 278 280 mutex_unlock(&codec->user_mutex); … … 376 378 return pin_configs_show(codec, &codec->user_pins, buf); 377 379 } 378 379 #define MAX_PIN_CONFIGS 32380 380 381 381 static int parse_user_pin_configs(struct hda_codec *codec, const char *buf) -
GPL/trunk/alsa-kernel/pci/hda/patch_analog.c
r717 r772 436 436 }; 437 437 438 static const struct snd_pci_quirk ad1986a_fixup_tbl[] = {438 static const struct hda_quirk ad1986a_fixup_tbl[] = { 439 439 SND_PCI_QUIRK(0x103c, 0x30af, "HP B2800", AD1986A_FIXUP_LAPTOP_IMIC), 440 440 SND_PCI_QUIRK(0x1043, 0x1153, "ASUS M9V", AD1986A_FIXUP_LAPTOP_IMIC), … … 679 679 }; 680 680 681 static const struct snd_pci_quirk ad1981_fixup_tbl[] = {681 static const struct hda_quirk ad1981_fixup_tbl[] = { 682 682 SND_PCI_QUIRK_VENDOR(0x1014, "Lenovo", AD1981_FIXUP_AMP_OVERRIDE), 683 683 SND_PCI_QUIRK_VENDOR(0x103c, "HP", AD1981_FIXUP_HP_EAPD), … … 1172 1172 }; 1173 1173 1174 static const struct snd_pci_quirk ad1884_fixup_tbl[] = {1174 static const struct hda_quirk ad1884_fixup_tbl[] = { 1175 1175 SND_PCI_QUIRK(0x103c, 0x2a82, "HP Touchsmart", AD1884_FIXUP_HP_TOUCHSMART), 1176 1176 SND_PCI_QUIRK_VENDOR(0x103c, "HP", AD1884_FIXUP_HP_EAPD), -
GPL/trunk/alsa-kernel/pci/hda/patch_ca0132.c
r717 r772 1140 1140 struct hda_codec *codec; 1141 1141 struct delayed_work unsol_hp_work; 1142 int quirk;1143 1142 1144 1143 #ifdef ENABLE_TUNING_CONTROLS … … 1172 1171 */ 1173 1172 enum { 1174 QUIRK_NONE,1175 1173 QUIRK_ALIENWARE, 1176 1174 QUIRK_ALIENWARE_M17XR4, … … 1182 1180 QUIRK_AE5, 1183 1181 QUIRK_AE7, 1182 QUIRK_NONE = HDA_FIXUP_ID_NOT_SET, 1184 1183 }; 1185 1184 1186 1185 #ifdef CONFIG_PCI 1187 #define ca0132_quirk(spec) ((spec)-> quirk)1186 #define ca0132_quirk(spec) ((spec)->codec->fixup_id) 1188 1187 #define ca0132_use_pci_mmio(spec) ((spec)->use_pci_mmio) 1189 1188 #define ca0132_use_alt_functions(spec) ((spec)->use_alt_functions) … … 1299 1298 }; 1300 1299 1301 static const struct snd_pci_quirk ca0132_quirks[] = {1300 static const struct hda_quirk ca0132_quirks[] = { 1302 1301 SND_PCI_QUIRK(0x1028, 0x057b, "Alienware M17x R4", QUIRK_ALIENWARE_M17XR4), 1303 1302 SND_PCI_QUIRK(0x1028, 0x0685, "Alienware 15 2015", QUIRK_ALIENWARE), … … 1312 1311 SND_PCI_QUIRK(0x1458, 0xA036, "Gigabyte GA-Z170X-Gaming 7", QUIRK_R3DI), 1313 1312 SND_PCI_QUIRK(0x3842, 0x1038, "EVGA X99 Classified", QUIRK_R3DI), 1313 SND_PCI_QUIRK(0x3842, 0x104b, "EVGA X299 Dark", QUIRK_R3DI), 1314 SND_PCI_QUIRK(0x3842, 0x1055, "EVGA Z390 DARK", QUIRK_R3DI), 1314 1315 SND_PCI_QUIRK(0x1102, 0x0013, "Recon3D", QUIRK_R3D), 1315 1316 SND_PCI_QUIRK(0x1102, 0x0018, "Recon3D", QUIRK_R3D), … … 1317 1318 SND_PCI_QUIRK(0x1102, 0x0191, "Sound Blaster AE-5 Plus", QUIRK_AE5), 1318 1319 SND_PCI_QUIRK(0x1102, 0x0081, "Sound Blaster AE-7", QUIRK_AE7), 1320 {0} 1321 }; 1322 1323 static const struct hda_model_fixup ca0132_quirk_models[] = { 1324 { .id = QUIRK_ALIENWARE, .name = "alienware" }, 1325 { .id = QUIRK_ALIENWARE_M17XR4, .name = "alienware-m17xr4" }, 1326 { .id = QUIRK_SBZ, .name = "sbz" }, 1327 { .id = QUIRK_ZXR, .name = "zxr" }, 1328 { .id = QUIRK_ZXR_DBPRO, .name = "zxr-dbpro" }, 1329 { .id = QUIRK_R3DI, .name = "r3di" }, 1330 { .id = QUIRK_R3D, .name = "r3d" }, 1331 { .id = QUIRK_AE5, .name = "ae5" }, 1332 { .id = QUIRK_AE7, .name = "ae7" }, 1319 1333 {0} 1320 1334 }; … … 2460 2474 { 2461 2475 int status = 0; 2462 unsigned int size = sizeof( dma_chan);2476 unsigned int size = sizeof(*dma_chan); 2463 2477 2464 2478 codec_dbg(codec, " dspio_alloc_dma_chan() -- begin\n"); … … 2968 2982 unsigned int *port_map) 2969 2983 { 2970 int status;2971 2984 unsigned int num_chans; 2972 2985 … … 2982 2995 num_chans = get_hdafmt_chs(fmt) + 1; 2983 2996 2984 status = dsp_allocate_ports(codec, num_chans, rate_multi, port_map); 2985 2986 return status; 2997 return dsp_allocate_ports(codec, num_chans, rate_multi, port_map); 2987 2998 } 2988 2999 … … 4242 4253 for (i = 0; i < TUNING_CTLS_COUNT; i++) 4243 4254 if (nid == ca0132_tuning_ctls[i].nid) 4244 break; 4245 4255 goto found; 4256 4257 return -EINVAL; 4258 found: 4246 4259 snd_hda_power_up(codec); 4247 4260 dspio_set_param(codec, ca0132_tuning_ctls[i].mid, 0x20, … … 6674 6687 }; 6675 6688 knew.name = namestr; 6676 knew.private_value = ((nid) | ((1)<<16) | ((type)<<18) | ((0)<<19) | ((0)<<23)) | 0;6689 knew.private_value = HDA_COMPOSE_AMP_VAL(nid, 1, 0, type) | 0; 6677 6690 #endif 6678 6691 sprintf(namestr, "FX: %s %s Volume", pfx, dirstr[dir]); … … 10061 10074 static void sbz_detect_quirk(struct hda_codec *codec) 10062 10075 { 10063 struct ca0132_spec *spec = codec->spec;10064 10065 10076 switch (codec->core.subsystem_id) { 10066 10077 case 0x11020033: 10067 spec->quirk= QUIRK_ZXR;10078 codec->fixup_id = QUIRK_ZXR; 10068 10079 break; 10069 10080 case 0x1102003f: 10070 spec->quirk= QUIRK_ZXR_DBPRO;10081 codec->fixup_id = QUIRK_ZXR_DBPRO; 10071 10082 break; 10072 10083 default: 10073 spec->quirk= QUIRK_SBZ;10084 codec->fixup_id = QUIRK_SBZ; 10074 10085 break; 10075 10086 } … … 10080 10091 struct ca0132_spec *spec; 10081 10092 int err; 10082 const struct snd_pci_quirk *quirk;10083 10093 10084 10094 codec_dbg(codec, "patch_ca0132\n"); … … 10091 10101 10092 10102 /* Detect codec quirk */ 10093 quirk = snd_pci_quirk_lookup(codec->bus->pci, ca0132_quirks); 10094 if (quirk) 10095 spec->quirk = quirk->value; 10096 else 10097 spec->quirk = QUIRK_NONE; 10103 snd_hda_pick_fixup(codec, ca0132_quirk_models, ca0132_quirks, NULL); 10098 10104 if (ca0132_quirk(spec) == QUIRK_SBZ) 10099 10105 sbz_detect_quirk(codec); … … 10172 10178 if (spec->mem_base == NULL) { 10173 10179 codec_warn(codec, "pci_iomap failed! Setting quirk to QUIRK_NONE."); 10174 spec->quirk= QUIRK_NONE;10180 codec->fixup_id = QUIRK_NONE; 10175 10181 } 10176 10182 } -
GPL/trunk/alsa-kernel/pci/hda/patch_cirrus.c
r717 r772 390 390 }; 391 391 392 static const struct snd_pci_quirk cs420x_fixup_tbl[] = {392 static const struct hda_quirk cs420x_fixup_tbl[] = { 393 393 SND_PCI_QUIRK(0x10de, 0x0ac0, "MacBookPro 5,3", CS420X_MBP53), 394 394 SND_PCI_QUIRK(0x10de, 0x0d94, "MacBookAir 3,1(2)", CS420X_MBP55), … … 400 400 /* codec SSID */ 401 401 SND_PCI_QUIRK(0x106b, 0x0600, "iMac 14,1", CS420X_IMAC27_122), 402 SND_PCI_QUIRK(0x106b, 0x0900, "iMac 12,1", CS420X_IMAC27_122), 402 403 SND_PCI_QUIRK(0x106b, 0x1c00, "MacBookPro 8,1", CS420X_MBP81), 403 404 SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122), … … 640 641 }; 641 642 642 static const struct snd_pci_quirk cs4208_fixup_tbl[] = {643 static const struct hda_quirk cs4208_fixup_tbl[] = { 643 644 SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS4208_MAC_AUTO), 644 645 {0} /* terminator */ … … 646 647 647 648 /* codec SSID matching */ 648 static const struct snd_pci_quirk cs4208_mac_fixup_tbl[] = {649 static const struct hda_quirk cs4208_mac_fixup_tbl[] = { 649 650 SND_PCI_QUIRK(0x106b, 0x5e00, "MacBookPro 11,2", CS4208_MBP11), 650 651 SND_PCI_QUIRK(0x106b, 0x6c00, "MacMini 7,1", CS4208_MACMINI), … … 824 825 }; 825 826 826 static const struct snd_pci_quirk cs421x_fixup_tbl[] = {827 static const struct hda_quirk cs421x_fixup_tbl[] = { 827 828 /* Test Intel board + CDB2410 */ 828 829 SND_PCI_QUIRK(0x8086, 0x5001, "DP45SG/CDB4210", CS421X_CDB4210), -
GPL/trunk/alsa-kernel/pci/hda/patch_conexant.c
r717 r772 47 47 unsigned int gpio_mute_led_mask; 48 48 unsigned int gpio_mic_led_mask; 49 49 bool is_cx8070_sn6140; 50 50 }; 51 51 … … 171 171 } 172 172 173 static void cx_fixup_headset_recog(struct hda_codec *codec) 174 { 175 unsigned int mic_persent; 176 177 /* fix some headset type recognize fail issue, such as EDIFIER headset */ 178 /* set micbiasd output current comparator threshold from 66% to 55%. */ 179 snd_hda_codec_write(codec, 0x1c, 0, 0x320, 0x010); 180 /* set OFF voltage for DFET from -1.2V to -0.8V, set headset micbias registor 181 * value adjustment trim from 2.2K ohms to 2.0K ohms. 182 */ 183 snd_hda_codec_write(codec, 0x1c, 0, 0x3b0, 0xe10); 184 /* fix reboot headset type recognize fail issue */ 185 mic_persent = snd_hda_codec_read(codec, 0x19, 0, AC_VERB_GET_PIN_SENSE, 0x0); 186 if (mic_persent & AC_PINSENSE_PRESENCE) 187 /* enable headset mic VREF */ 188 snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24); 189 else 190 /* disable headset mic VREF */ 191 snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20); 192 } 193 173 194 static int cx_auto_init(struct hda_codec *codec) 174 195 { … … 181 202 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_INIT); 182 203 204 if (spec->is_cx8070_sn6140) 205 cx_fixup_headset_recog(codec); 206 183 207 return 0; 184 208 } … … 197 221 cx_auto_shutdown(codec); 198 222 snd_hda_gen_free(codec); 223 } 224 225 static void cx_process_headset_plugin(struct hda_codec *codec) 226 { 227 unsigned int val; 228 unsigned int count = 0; 229 230 /* Wait headset detect done. */ 231 do { 232 val = snd_hda_codec_read(codec, 0x1c, 0, 0xca0, 0x0); 233 if (val & 0x080) { 234 codec_dbg(codec, "headset type detect done!\n"); 235 break; 236 } 237 msleep(20); 238 count++; 239 } while (count < 3); 240 val = snd_hda_codec_read(codec, 0x1c, 0, 0xcb0, 0x0); 241 if (val & 0x800) { 242 codec_dbg(codec, "headset plugin, type is CTIA\n"); 243 snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24); 244 } else if (val & 0x400) { 245 codec_dbg(codec, "headset plugin, type is OMTP\n"); 246 snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24); 247 } else { 248 codec_dbg(codec, "headphone plugin\n"); 249 } 250 } 251 252 static void cx_update_headset_mic_vref(struct hda_codec *codec, struct hda_jack_callback *event) 253 { 254 unsigned int mic_present; 255 256 /* In cx8070 and sn6140, the node 16 can only be config to headphone or disabled, 257 * the node 19 can only be config to microphone or disabled. 258 * Check hp&mic tag to process headset pulgin&plugout. 259 */ 260 mic_present = snd_hda_codec_read(codec, 0x19, 0, AC_VERB_GET_PIN_SENSE, 0x0); 261 if (!(mic_present & AC_PINSENSE_PRESENCE)) /* mic plugout */ 262 snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20); 263 else 264 cx_process_headset_plugin(codec); 199 265 } 200 266 … … 229 295 CXT_PINCFG_COMPAQ_CQ60, 230 296 CXT_FIXUP_STEREO_DMIC, 297 CXT_PINCFG_LENOVO_NOTEBOOK, 231 298 CXT_FIXUP_INC_MIC_BOOST, 232 299 CXT_FIXUP_HEADPHONE_MIC_PIN, … … 245 312 CXT_FIXUP_HP_GATE_MIC, 246 313 CXT_FIXUP_MUTE_LED_GPIO, 314 CXT_FIXUP_HP_ELITEONE_OUT_DIS, 247 315 CXT_FIXUP_HP_ZBOOK_MUTE_LED, 248 316 CXT_FIXUP_HEADSET_MIC, 249 317 CXT_FIXUP_HP_MIC_NO_PRESENCE, 318 CXT_PINCFG_SWS_JS201D, 319 CXT_PINCFG_TOP_SPEAKER, 320 CXT_FIXUP_HP_A_U, 250 321 }; 251 322 … … 258 329 struct conexant_spec *spec = codec->spec; 259 330 spec->gen.inv_dmic_split = 1; 331 } 332 333 /* fix widget control pin settings */ 334 static void cxt_fixup_update_pinctl(struct hda_codec *codec, 335 const struct hda_fixup *fix, int action) 336 { 337 if (action == HDA_FIXUP_ACT_PROBE) { 338 /* Unset OUT_EN for this Node pin, leaving only HP_EN. 339 * This is the value stored in the codec register after 340 * the correct initialization of the previous windows boot. 341 */ 342 snd_hda_set_pin_ctl_cache(codec, 0x1d, AC_PINCTL_HP_EN); 343 } 260 344 } 261 345 … … 708 792 } 709 793 794 #ifndef TARGET_OS2 795 static void cxt_setup_gpio_unmute(struct hda_codec *codec, 796 unsigned int gpio_mute_mask) 797 { 798 if (gpio_mute_mask) { 799 // set gpio data to 0. 800 snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, 0); 801 snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_MASK, gpio_mute_mask); 802 snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DIRECTION, gpio_mute_mask); 803 snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_STICKY_MASK, 0); 804 } 805 } 806 #endif 807 710 808 static void cxt_fixup_mute_led_gpio(struct hda_codec *codec, 711 809 const struct hda_fixup *fix, int action) … … 721 819 cxt_setup_mute_led(codec, 0x10, 0x20); 722 820 } 821 822 #ifndef TARGET_OS2 823 static void cxt_fixup_hp_a_u(struct hda_codec *codec, 824 const struct hda_fixup *fix, int action) 825 { 826 // Init vers in BIOS mute the spk/hp by set gpio high to avoid pop noise, 827 // so need to unmute once by clearing the gpio data when runs into the system. 828 if (action == HDA_FIXUP_ACT_INIT) 829 cxt_setup_gpio_unmute(codec, 0x2); 830 } 831 #endif 723 832 724 833 /* ThinkPad X200 & co with cxt5051 */ … … 775 884 {0} 776 885 }; 886 #endif /* TARGET_OS2 */ 887 888 #ifndef TARGET_OS2 889 /* SuoWoSi/South-holding JS201D with sn6140 */ 890 static const struct hda_pintbl cxt_pincfg_sws_js201d[] = { 891 { 0x16, 0x03211040 }, /* hp out */ 892 { 0x17, 0x91170110 }, /* SPK/Class_D */ 893 { 0x18, 0x95a70130 }, /* Internal mic */ 894 { 0x19, 0x03a11020 }, /* Headset Mic */ 895 { 0x1a, 0x40f001f0 }, /* Not used */ 896 { 0x21, 0x40f001f0 }, /* Not used */ 897 {0} 898 }; 777 899 #endif 778 900 … … 798 920 .v.pins = cxt_pincfg_lemote, 799 921 }, 800 #ifdef TARGET_OS2xxx922 #ifdef NOT_USED 801 923 [CXT_PINCFG_COMPAQ_CQ60] = { 802 924 .type = HDA_FIXUP_PINS, … … 813 935 .v.func = cxt_fixup_stereo_dmic, 814 936 }, 937 #ifdef NOT_USED 938 [CXT_PINCFG_LENOVO_NOTEBOOK] = { 939 .type = HDA_FIXUP_PINS, 940 .v.pins = (const struct hda_pintbl[]) { 941 { 0x1a, 0x05d71030 }, 942 { } 943 }, 944 .chain_id = CXT_FIXUP_STEREO_DMIC, 945 }, 946 #endif 815 947 [CXT_FIXUP_INC_MIC_BOOST] = { 816 948 .type = HDA_FIXUP_FUNC, … … 899 1031 .v.func = cxt_fixup_mute_led_eapd, 900 1032 }, 901 #ifdef TARGET_OS2xxx1033 #ifdef NOT_USED 902 1034 [CXT_FIXUP_HP_DOCK] = { 903 1035 .type = HDA_FIXUP_PINS, … … 927 1059 .v.func = cxt_fixup_mute_led_gpio, 928 1060 }, 1061 [CXT_FIXUP_HP_ELITEONE_OUT_DIS] = { 1062 .type = HDA_FIXUP_FUNC, 1063 .v.func = cxt_fixup_update_pinctl, 1064 }, 929 1065 [CXT_FIXUP_HP_ZBOOK_MUTE_LED] = { 930 1066 .type = HDA_FIXUP_FUNC, … … 935 1071 .v.func = cxt_fixup_headset_mic, 936 1072 }, 937 #ifdef TARGET_OS2xxx1073 #ifdef NOT_USED 938 1074 [CXT_FIXUP_HP_MIC_NO_PRESENCE] = { 939 1075 .type = HDA_FIXUP_PINS, … … 945 1081 .chain_id = CXT_FIXUP_HEADSET_MIC, 946 1082 }, 947 #endif 948 }; 949 950 static const struct snd_pci_quirk cxt5045_fixups[] = { 1083 [CXT_PINCFG_SWS_JS201D] = { 1084 .type = HDA_FIXUP_PINS, 1085 .v.pins = cxt_pincfg_sws_js201d, 1086 }, 1087 [CXT_PINCFG_TOP_SPEAKER] = { 1088 .type = HDA_FIXUP_PINS, 1089 .v.pins = (const struct hda_pintbl[]) { 1090 { 0x1d, 0x82170111 }, 1091 { } 1092 }, 1093 }, 1094 [CXT_FIXUP_HP_A_U] = { 1095 .type = HDA_FIXUP_FUNC, 1096 .v.func = cxt_fixup_hp_a_u, 1097 }, 1098 #endif 1099 }; 1100 1101 static const struct hda_quirk cxt5045_fixups[] = { 951 1102 SND_PCI_QUIRK(0x103c, 0x30d5, "HP 530", CXT_FIXUP_HP_530), 952 1103 SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba P105", CXT_FIXUP_TOSHIBA_P105), … … 968 1119 }; 969 1120 970 static const struct snd_pci_quirk cxt5047_fixups[] = {1121 static const struct hda_quirk cxt5047_fixups[] = { 971 1122 /* HP laptops have really bad sound over 0 dB on NID 0x10. 972 1123 */ … … 980 1131 }; 981 1132 982 static const struct snd_pci_quirk cxt5051_fixups[] = {1133 static const struct hda_quirk cxt5051_fixups[] = { 983 1134 SND_PCI_QUIRK(0x103c, 0x360b, "Compaq CQ60", CXT_PINCFG_COMPAQ_CQ60), 984 1135 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT_PINCFG_LENOVO_X200), … … 991 1142 }; 992 1143 993 static const struct snd_pci_quirk cxt5066_fixups[] = {1144 static const struct hda_quirk cxt5066_fixups[] = { 994 1145 SND_PCI_QUIRK(0x1025, 0x0543, "Acer Aspire One 522", CXT_FIXUP_STEREO_DMIC), 995 1146 SND_PCI_QUIRK(0x1025, 0x054c, "Acer Aspire 3830TG", CXT_FIXUP_ASPIRE_DMIC), … … 1002 1153 SND_PCI_QUIRK(0x103c, 0x8174, "HP Spectre x360", CXT_FIXUP_HP_SPECTRE), 1003 1154 SND_PCI_QUIRK(0x103c, 0x822e, "HP ProBook 440 G4", CXT_FIXUP_MUTE_LED_GPIO), 1155 SND_PCI_QUIRK(0x103c, 0x8231, "HP ProBook 450 G4", CXT_FIXUP_MUTE_LED_GPIO), 1004 1156 SND_PCI_QUIRK(0x103c, 0x828c, "HP EliteBook 840 G4", CXT_FIXUP_HP_DOCK), 1005 1157 SND_PCI_QUIRK(0x103c, 0x8299, "HP 800 G3 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE), … … 1011 1163 SND_PCI_QUIRK(0x103c, 0x83b3, "HP EliteBook 830 G5", CXT_FIXUP_HP_DOCK), 1012 1164 SND_PCI_QUIRK(0x103c, 0x83d3, "HP ProBook 640 G4", CXT_FIXUP_HP_DOCK), 1165 SND_PCI_QUIRK(0x103c, 0x83e5, "HP EliteOne 1000 G2", CXT_FIXUP_HP_ELITEONE_OUT_DIS), 1013 1166 SND_PCI_QUIRK(0x103c, 0x8402, "HP ProBook 645 G4", CXT_FIXUP_MUTE_LED_GPIO), 1014 1167 SND_PCI_QUIRK(0x103c, 0x8427, "HP ZBook Studio G5", CXT_FIXUP_HP_ZBOOK_MUTE_LED), … … 1019 1172 SND_PCI_QUIRK(0x103c, 0x8458, "HP Z2 G4 mini premium", CXT_FIXUP_HP_MIC_NO_PRESENCE), 1020 1173 SND_PCI_QUIRK(0x1043, 0x138d, "Asus", CXT_FIXUP_HEADPHONE_MIC_PIN), 1174 SND_PCI_QUIRK(0x14f1, 0x0252, "MBX-Z60MR100", CXT_FIXUP_HP_A_U), 1175 SND_PCI_QUIRK(0x14f1, 0x0265, "SWS JS201D", CXT_PINCFG_SWS_JS201D), 1021 1176 SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT_FIXUP_OLPC_XO), 1022 1177 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410), … … 1032 1187 SND_PCI_QUIRK(0x17aa, 0x390b, "Lenovo G50-80", CXT_FIXUP_STEREO_DMIC), 1033 1188 SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC), 1189 /* NOTE: we'd need to extend the quirk for 17aa:3977 as the same 1190 * PCI SSID is used on multiple Lenovo models 1191 */ 1034 1192 SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_FIXUP_STEREO_DMIC), 1035 1193 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo G50-70", CXT_FIXUP_STEREO_DMIC), … … 1038 1196 SND_PCI_QUIRK(0x1c06, 0x2011, "Lemote A1004", CXT_PINCFG_LEMOTE_A1004), 1039 1197 SND_PCI_QUIRK(0x1c06, 0x2012, "Lemote A1205", CXT_PINCFG_LEMOTE_A1205), 1198 HDA_CODEC_QUIRK(0x2782, 0x12c3, "Sirius Gen1", CXT_PINCFG_TOP_SPEAKER), 1199 HDA_CODEC_QUIRK(0x2782, 0x12c5, "Sirius Gen2", CXT_PINCFG_TOP_SPEAKER), 1040 1200 {0} 1041 1201 }; … … 1055 1215 { .id = CXT_FIXUP_HP_ZBOOK_MUTE_LED, .name = "hp-zbook-mute-led" }, 1056 1216 { .id = CXT_FIXUP_HP_MIC_NO_PRESENCE, .name = "hp-mic-fix" }, 1217 { .id = CXT_PINCFG_LENOVO_NOTEBOOK, .name = "lenovo-20149" }, 1218 { .id = CXT_PINCFG_SWS_JS201D, .name = "sws-js201d" }, 1219 { .id = CXT_PINCFG_TOP_SPEAKER, .name = "sirius-top-speaker" }, 1220 { .id = CXT_FIXUP_HP_A_U, .name = "HP-U-support" }, 1057 1221 {0} 1058 1222 }; … … 1089 1253 codec->spec = spec; 1090 1254 codec->patch_ops = cx_auto_patch_ops; 1255 1256 /* init cx8070/sn6140 flag and reset headset_present_flag */ 1257 switch (codec->core.vendor_id) { 1258 case 0x14f11f86: 1259 case 0x14f11f87: 1260 spec->is_cx8070_sn6140 = true; 1261 snd_hda_jack_detect_enable_callback(codec, 0x19, cx_update_headset_mic_vref); 1262 break; 1263 } 1091 1264 1092 1265 cx_auto_parse_eapd(codec); … … 1174 1347 static const struct hda_device_id snd_hda_id_conexant[] = { 1175 1348 HDA_CODEC_ENTRY(0x14f11f86, "CX8070", patch_conexant_auto), 1349 HDA_CODEC_ENTRY(0x14f11f87, "SN6140", patch_conexant_auto), 1176 1350 HDA_CODEC_ENTRY(0x14f12008, "CX8200", patch_conexant_auto), 1177 1351 HDA_CODEC_ENTRY(0x14f120d0, "CX11970", patch_conexant_auto), 1352 HDA_CODEC_ENTRY(0x14f120d1, "SN6180", patch_conexant_auto), 1178 1353 HDA_CODEC_ENTRY(0x14f15045, "CX20549 (Venice)", patch_conexant_auto), 1179 1354 HDA_CODEC_ENTRY(0x14f15047, "CX20551 (Waikiki)", patch_conexant_auto), -
GPL/trunk/alsa-kernel/pci/hda/patch_hdmi.c
r717 r772 66 66 struct hdmi_spec_per_cvt { 67 67 hda_nid_t cvt_nid; 68 int assigned; 68 bool assigned; /* the stream has been assigned */ 69 bool silent_stream; /* silent stream activated */ 69 70 unsigned int channels_min; 70 71 unsigned int channels_max; … … 93 94 struct hdmi_pcm *pcm; /* pointer to spec->pcm_rec[n] dynamically*/ 94 95 int pcm_idx; /* which pcm is attached. -1 means no pcm is attached */ 96 int prev_pcm_idx; /* previously assigned pcm index */ 95 97 int repoll_count; 96 98 bool setup; /* the stream has been set up by prepare callback */ … … 131 133 struct snd_jack *jack; 132 134 struct snd_kcontrol *eld_ctl; 135 }; 136 137 enum { 138 SILENT_STREAM_OFF = 0, 139 SILENT_STREAM_KAE, /* use standard HDA Keep-Alive */ 140 SILENT_STREAM_I915, /* Intel i915 extension */ 133 141 }; 134 142 … … 157 165 int dev_num; 158 166 struct snd_array pins; /* struct hdmi_spec_per_pin */ 159 struct hdmi_pcm pcm_rec[ 16];167 struct hdmi_pcm pcm_rec[8]; 160 168 struct mutex pcm_lock; 161 169 struct mutex bind_lock; /* for audio component binding */ … … 173 181 174 182 bool dyn_pin_out; 175 bool dyn_pcm_assign; 176 bool dyn_pcm_no_legacy; 183 bool static_pcm_mapping; 184 /* hdmi interrupt trigger control flag for Nvidia codec */ 185 bool hdmi_intr_trig_ctrl; 186 bool nv_dp_workaround; /* workaround DP audio infoframe for Nvidia */ 187 177 188 bool intel_hsw_fixup; /* apply Intel platform-specific fixups */ 178 189 /* … … 192 203 const int *port_map; 193 204 int port_num; 194 bool send_silent_stream; /* Flag to enable silent stream feature */205 int silent_stream_type; 195 206 }; 196 207 … … 234 245 struct hdmi_audio_infoframe hdmi; 235 246 struct dp_audio_infoframe dp; 247 #ifndef TARGET_OS2 248 DECLARE_FLEX_ARRAY(u8, bytes); 249 #else 236 250 u8 bytes[1]; 251 #endif 237 252 }; 238 253 … … 498 513 499 514 mutex_lock(&per_pin->lock); 500 snd_hdmi_print_eld_info(&per_pin->sink_eld, buffer); 515 snd_hdmi_print_eld_info(&per_pin->sink_eld, buffer, per_pin->pin_nid, 516 per_pin->dev_id, per_pin->cvt_nid); 501 517 mutex_unlock(&per_pin->lock); 502 518 } … … 684 700 int conn_type) 685 701 { 702 struct hdmi_spec *spec = codec->spec; 686 703 union audio_infoframe ai; 687 704 688 705 memset(&ai, 0, sizeof(ai)); 689 if (conn_type == 0) { /* HDMI */ 706 if ((conn_type == 0) || /* HDMI */ 707 /* Nvidia DisplayPort: Nvidia HW expects same layout as HDMI */ 708 (conn_type == 1 && spec->nv_dp_workaround)) { 690 709 struct hdmi_audio_infoframe *hdmi_ai = &ai.hdmi; 691 710 692 hdmi_ai->type = 0x84; 693 hdmi_ai->ver = 0x01; 694 hdmi_ai->len = 0x0a; 711 if (conn_type == 0) { /* HDMI */ 712 hdmi_ai->type = 0x84; 713 hdmi_ai->ver = 0x01; 714 hdmi_ai->len = 0x0a; 715 } else {/* Nvidia DP */ 716 hdmi_ai->type = 0x84; 717 hdmi_ai->ver = 0x1b; 718 hdmi_ai->len = 0x11 << 2; 719 } 695 720 hdmi_ai->CC02_CT47 = active_channels - 1; 696 721 hdmi_ai->CA = ca; … … 982 1007 */ 983 1008 static int hdmi_choose_cvt(struct hda_codec *codec, 984 int pin_idx, int *cvt_id) 1009 int pin_idx, int *cvt_id, 1010 bool silent) 985 1011 { 986 1012 struct hdmi_spec *spec = codec->spec; … … 997 1023 if (per_pin && per_pin->silent_stream) { 998 1024 cvt_idx = cvt_nid_to_cvt_index(codec, per_pin->cvt_nid); 1025 per_cvt = get_cvt(spec, cvt_idx); 1026 if (per_cvt->assigned && !silent) 1027 return -EBUSY; 999 1028 if (cvt_id) 1000 1029 *cvt_id = cvt_idx; … … 1007 1036 1008 1037 /* Must not already be assigned */ 1009 if (per_cvt->assigned )1038 if (per_cvt->assigned || per_cvt->silent_stream) 1010 1039 continue; 1011 1040 if (per_pin == NULL) … … 1176 1205 } 1177 1206 1178 /* called in hdmi_pcm_open when no pin is assigned to the PCM 1179 * in dyn_pcm_assign mode. 1180 */ 1207 /* called in hdmi_pcm_open when no pin is assigned to the PCM */ 1181 1208 static int hdmi_pcm_open_no_pin(struct hda_pcm_stream *hinfo, 1182 1209 struct hda_codec *codec, … … 1193 1220 return -EINVAL; 1194 1221 1195 err = hdmi_choose_cvt(codec, -1, &cvt_idx );1222 err = hdmi_choose_cvt(codec, -1, &cvt_idx, false); 1196 1223 if (err) 1197 1224 return err; 1198 1225 1199 1226 per_cvt = get_cvt(spec, cvt_idx); 1200 per_cvt->assigned = 1;1227 per_cvt->assigned = true; 1201 1228 hinfo->nid = per_cvt->cvt_nid; 1202 1229 … … 1246 1273 mutex_lock(&spec->pcm_lock); 1247 1274 pin_idx = hinfo_to_pin_index(codec, hinfo); 1248 if (!spec->dyn_pcm_assign) { 1249 if (snd_BUG_ON(pin_idx < 0)) { 1250 err = -EINVAL; 1251 goto unlock; 1252 } 1253 } else { 1254 /* no pin is assigned to the PCM 1255 * PA need pcm open successfully when probe 1256 */ 1257 if (pin_idx < 0) { 1258 err = hdmi_pcm_open_no_pin(hinfo, codec, substream); 1259 goto unlock; 1260 } 1261 } 1262 1263 err = hdmi_choose_cvt(codec, pin_idx, &cvt_idx); 1275 /* no pin is assigned to the PCM 1276 * PA need pcm open successfully when probe 1277 */ 1278 if (pin_idx < 0) { 1279 err = hdmi_pcm_open_no_pin(hinfo, codec, substream); 1280 goto unlock; 1281 } 1282 1283 err = hdmi_choose_cvt(codec, pin_idx, &cvt_idx, false); 1264 1284 if (err < 0) 1265 1285 goto unlock; … … 1267 1287 per_cvt = get_cvt(spec, cvt_idx); 1268 1288 /* Claim converter */ 1269 per_cvt->assigned = 1;1289 per_cvt->assigned = true; 1270 1290 1271 1291 set_bit(pcm_idx, &spec->pcm_in_use); … … 1301 1321 if (hinfo->channels_min > hinfo->channels_max || 1302 1322 !hinfo->rates || !hinfo->formats) { 1303 per_cvt->assigned = 0;1323 per_cvt->assigned = false; 1304 1324 hinfo->nid = 0; 1305 1325 snd_hda_spdif_ctls_unassign(codec, pcm_idx); … … 1363 1383 int i; 1364 1384 1365 /* on the new machines, try to assign the pcm slot dynamically,1366 * not use the preferred fixed map (legacy way) anymore.1367 */1368 if (spec->dyn_pcm_no_legacy)1369 goto last_try;1370 1371 /*1372 * generic_hdmi_build_pcms() may allocate extra PCMs on some1373 * platforms (with maximum of 'num_nids + dev_num - 1')1374 *1375 * The per_pin of pin_nid_idx=n and dev_id=m prefers to get pcm-n1376 * if m==0. This guarantees that dynamic pcm assignments are compatible1377 * with the legacy static per_pin-pcm assignment that existed in the1378 * days before DP-MST.1379 *1380 * Intel DP-MST prefers this legacy behavior for compatibility, too.1381 *1382 * per_pin of m!=0 prefers to get pcm=(num_nids + (m - 1)).1383 */1384 1385 if (per_pin->dev_id == 0 || spec->intel_hsw_fixup) {1386 if (!test_bit(per_pin->pin_nid_idx, &spec->pcm_bitmap))1387 return per_pin->pin_nid_idx;1388 } else {1389 i = spec->num_nids + (per_pin->dev_id - 1);1390 if (i < spec->pcm_used && !(test_bit(i, &spec->pcm_bitmap)))1391 return i;1392 }1393 1394 /* have a second try; check the area over num_nids */1395 for (i = spec->num_nids; i < spec->pcm_used; i++) {1396 if (!test_bit(i, &spec->pcm_bitmap))1397 return i;1398 }1399 1400 last_try:1401 /* the last try; check the empty slots in pins */1402 1385 for (i = 0; i < spec->pcm_used; i++) { 1403 1386 if (!test_bit(i, &spec->pcm_bitmap)) … … 1415 1398 if (per_pin->pcm) 1416 1399 return; 1400 /* try the previously used slot at first */ 1401 idx = per_pin->prev_pcm_idx; 1402 if (idx >= 0) { 1403 if (!test_bit(idx, &spec->pcm_bitmap)) 1404 goto found; 1405 per_pin->prev_pcm_idx = -1; /* no longer valid, clear it */ 1406 } 1417 1407 idx = hdmi_find_pcm_slot(spec, per_pin); 1418 1408 if (idx == -EBUSY) 1419 1409 return; 1410 found: 1420 1411 per_pin->pcm_idx = idx; 1421 1412 per_pin->pcm = get_hdmi_pcm(spec, idx); … … 1433 1424 idx = per_pin->pcm_idx; 1434 1425 per_pin->pcm_idx = -1; 1426 per_pin->prev_pcm_idx = idx; /* remember the previous index */ 1435 1427 per_pin->pcm = NULL; 1436 1428 if (idx >= 0 && idx < spec->pcm_used) … … 1461 1453 bool non_pcm; 1462 1454 1463 if (per_pin->pcm_idx >= 0 && per_pin->pcm_idx < spec->pcm_used) 1464 pcm = get_pcm_rec(spec, per_pin->pcm_idx); 1465 else 1455 if (per_pin->pcm_idx < 0 || per_pin->pcm_idx >= spec->pcm_used) 1466 1456 return; 1457 pcm = get_pcm_rec(spec, per_pin->pcm_idx); 1467 1458 if (!pcm->pcm) 1468 1459 return; … … 1548 1539 } 1549 1540 1550 if (!eld->eld_valid || eld->eld_size <= 0 ) {1541 if (!eld->eld_valid || eld->eld_size <= 0 || eld->info.sad_count <= 0) { 1551 1542 eld->eld_valid = false; 1552 1543 eld->eld_size = 0; … … 1562 1553 pcm_jack = pin_idx_to_pcm_jack(codec, per_pin); 1563 1554 1564 if ( spec->dyn_pcm_assign) {1555 if (!spec->static_pcm_mapping) { 1565 1556 if (eld->eld_valid) { 1566 1557 hdmi_attach_hda_pcm(spec, per_pin); … … 1571 1562 } 1572 1563 } 1564 1573 1565 /* if pcm_idx == -1, it means this is in monitor connection event 1574 1566 * we can get the correct pcm_idx now. … … 1684 1676 #define I915_SILENT_FMT_MASK 0xf 1685 1677 1686 static void silent_stream_enable(struct hda_codec *codec, 1687 struct hdmi_spec_per_pin *per_pin) 1688 { 1689 struct hdmi_spec *spec = codec->spec; 1690 struct hdmi_spec_per_cvt *per_cvt; 1691 int cvt_idx, pin_idx, err; 1678 static void silent_stream_enable_i915(struct hda_codec *codec, 1679 struct hdmi_spec_per_pin *per_pin) 1680 { 1692 1681 unsigned int format; 1693 1694 mutex_lock(&per_pin->lock);1695 1696 if (per_pin->setup) {1697 codec_dbg(codec, "hdmi: PCM already open, no silent stream\n");1698 goto unlock_out;1699 }1700 1701 pin_idx = pin_id_to_pin_index(codec, per_pin->pin_nid, per_pin->dev_id);1702 err = hdmi_choose_cvt(codec, pin_idx, &cvt_idx);1703 if (err) {1704 codec_err(codec, "hdmi: no free converter to enable silent mode\n");1705 goto unlock_out;1706 }1707 1708 per_cvt = get_cvt(spec, cvt_idx);1709 per_cvt->assigned = 1;1710 per_pin->cvt_nid = per_cvt->cvt_nid;1711 per_pin->silent_stream = true;1712 1713 codec_dbg(codec, "hdmi: enabling silent stream pin-NID=0x%x cvt-NID=0x%x\n",1714 per_pin->pin_nid, per_cvt->cvt_nid);1715 1716 snd_hda_set_dev_select(codec, per_pin->pin_nid, per_pin->dev_id);1717 snd_hda_codec_write_cache(codec, per_pin->pin_nid, 0,1718 AC_VERB_SET_CONNECT_SEL,1719 per_pin->mux_idx);1720 1721 /* configure unused pins to choose other converters */1722 pin_cvt_fixup(codec, per_pin, 0);1723 1682 1724 1683 snd_hdac_sync_audio_rate(&codec->core, per_pin->pin_nid, … … 1735 1694 per_pin->channels = I915_SILENT_CHANNELS; 1736 1695 hdmi_setup_audio_infoframe(codec, per_pin, per_pin->non_pcm); 1696 } 1697 1698 static void silent_stream_set_kae(struct hda_codec *codec, 1699 struct hdmi_spec_per_pin *per_pin, 1700 bool enable) 1701 { 1702 unsigned int param; 1703 1704 codec_dbg(codec, "HDMI: KAE %d cvt-NID=0x%x\n", enable, per_pin->cvt_nid); 1705 1706 param = snd_hda_codec_read(codec, per_pin->cvt_nid, 0, AC_VERB_GET_DIGI_CONVERT_1, 0); 1707 param = (param >> 16) & 0xff; 1708 1709 if (enable) 1710 param |= AC_DIG3_KAE; 1711 else 1712 param &= ~AC_DIG3_KAE; 1713 1714 snd_hda_codec_write(codec, per_pin->cvt_nid, 0, AC_VERB_SET_DIGI_CONVERT_3, param); 1715 } 1716 1717 static void silent_stream_enable(struct hda_codec *codec, 1718 struct hdmi_spec_per_pin *per_pin) 1719 { 1720 struct hdmi_spec *spec = codec->spec; 1721 struct hdmi_spec_per_cvt *per_cvt; 1722 int cvt_idx, pin_idx, err; 1723 int keep_power = 0; 1724 1725 /* 1726 * Power-up will call hdmi_present_sense, so the PM calls 1727 * have to be done without mutex held. 1728 */ 1729 1730 err = snd_hda_power_up_pm(codec); 1731 if (err < 0 && err != -EACCES) { 1732 codec_err(codec, 1733 "Failed to power up codec for silent stream enable ret=[%d]\n", err); 1734 snd_hda_power_down_pm(codec); 1735 return; 1736 } 1737 1738 mutex_lock(&per_pin->lock); 1739 1740 if (per_pin->setup) { 1741 codec_dbg(codec, "hdmi: PCM already open, no silent stream\n"); 1742 err = -EBUSY; 1743 goto unlock_out; 1744 } 1745 1746 pin_idx = pin_id_to_pin_index(codec, per_pin->pin_nid, per_pin->dev_id); 1747 err = hdmi_choose_cvt(codec, pin_idx, &cvt_idx, true); 1748 if (err) { 1749 codec_err(codec, "hdmi: no free converter to enable silent mode\n"); 1750 goto unlock_out; 1751 } 1752 1753 per_cvt = get_cvt(spec, cvt_idx); 1754 per_cvt->silent_stream = true; 1755 per_pin->cvt_nid = per_cvt->cvt_nid; 1756 per_pin->silent_stream = true; 1757 1758 codec_dbg(codec, "hdmi: enabling silent stream pin-NID=0x%x cvt-NID=0x%x\n", 1759 per_pin->pin_nid, per_cvt->cvt_nid); 1760 1761 snd_hda_set_dev_select(codec, per_pin->pin_nid, per_pin->dev_id); 1762 snd_hda_codec_write_cache(codec, per_pin->pin_nid, 0, 1763 AC_VERB_SET_CONNECT_SEL, 1764 per_pin->mux_idx); 1765 1766 /* configure unused pins to choose other converters */ 1767 pin_cvt_fixup(codec, per_pin, 0); 1768 1769 switch (spec->silent_stream_type) { 1770 case SILENT_STREAM_KAE: 1771 silent_stream_enable_i915(codec, per_pin); 1772 silent_stream_set_kae(codec, per_pin, true); 1773 break; 1774 case SILENT_STREAM_I915: 1775 silent_stream_enable_i915(codec, per_pin); 1776 keep_power = 1; 1777 break; 1778 default: 1779 break; 1780 } 1737 1781 1738 1782 unlock_out: 1739 1783 mutex_unlock(&per_pin->lock); 1784 1785 if (err || !keep_power) 1786 snd_hda_power_down_pm(codec); 1740 1787 } 1741 1788 … … 1745 1792 struct hdmi_spec *spec = codec->spec; 1746 1793 struct hdmi_spec_per_cvt *per_cvt; 1747 int cvt_idx; 1794 int cvt_idx, err; 1795 1796 err = snd_hda_power_up_pm(codec); 1797 if (err < 0 && err != -EACCES) { 1798 codec_err(codec, 1799 "Failed to power up codec for silent stream disable ret=[%d]\n", 1800 err); 1801 snd_hda_power_down_pm(codec); 1802 return; 1803 } 1748 1804 1749 1805 mutex_lock(&per_pin->lock); … … 1757 1813 if (cvt_idx >= 0 && cvt_idx < spec->num_cvts) { 1758 1814 per_cvt = get_cvt(spec, cvt_idx); 1759 per_cvt->assigned = 0; 1815 per_cvt->silent_stream = false; 1816 } 1817 1818 if (spec->silent_stream_type == SILENT_STREAM_I915) { 1819 /* release ref taken in silent_stream_enable() */ 1820 snd_hda_power_down_pm(codec); 1821 } else if (spec->silent_stream_type == SILENT_STREAM_KAE) { 1822 silent_stream_set_kae(codec, per_pin, false); 1760 1823 } 1761 1824 … … 1765 1828 unlock_out: 1766 1829 mutex_unlock(&per_pin->lock); 1830 1831 snd_hda_power_down_pm(codec); 1767 1832 } 1768 1833 … … 1786 1851 mutex_unlock(&per_pin->lock); 1787 1852 1788 /* 1789 * Power-up will call hdmi_present_sense, so the PM calls 1790 * have to be done without mutex held. 1791 */ 1792 1793 if (spec->send_silent_stream) { 1794 int pm_ret; 1795 1796 if (!monitor_prev && monitor_next) { 1797 pm_ret = snd_hda_power_up_pm(codec); 1798 if (pm_ret < 0) 1799 codec_err(codec, 1800 "Monitor plugged-in, Failed to power up codec ret=[%d]\n", 1801 pm_ret); 1853 if (spec->silent_stream_type) { 1854 if (!monitor_prev && monitor_next) 1802 1855 silent_stream_enable(codec, per_pin); 1803 } else if (monitor_prev && !monitor_next) {1856 else if (monitor_prev && !monitor_next) 1804 1857 silent_stream_disable(codec, per_pin); 1805 pm_ret = snd_hda_power_down_pm(codec);1806 if (pm_ret < 0)1807 codec_err(codec,1808 "Monitor plugged-out, Failed to power down codec ret=[%d]\n",1809 pm_ret);1810 }1811 1858 } 1812 1859 } … … 1877 1924 */ 1878 1925 dev_num = spec->dev_num; 1879 } else if ( spec->dyn_pcm_assign &&codec->dp_mst) {1926 } else if (codec->dp_mst) { 1880 1927 dev_num = snd_hda_get_num_devices(codec, pin_nid) + 1; 1881 1928 /* … … 1902 1949 return -ENOMEM; 1903 1950 1904 if (spec->dyn_pcm_assign) { 1905 per_pin->pcm = NULL; 1906 per_pin->pcm_idx = -1; 1907 } else { 1908 per_pin->pcm = get_hdmi_pcm(spec, pin_idx); 1909 per_pin->pcm_idx = pin_idx; 1910 } 1951 per_pin->pcm = NULL; 1952 per_pin->pcm_idx = -1; 1953 per_pin->prev_pcm_idx = -1; 1911 1954 per_pin->pin_nid = pin_nid; 1912 1955 per_pin->pin_nid_idx = spec->num_nids; … … 1917 1960 if (err < 0) 1918 1961 return err; 1962 if (!is_jack_detectable(codec, pin_nid)) 1963 codec_warn(codec, "HDMI: pin NID 0x%x - jack not detectable\n", pin_nid); 1919 1964 spec->num_pins++; 1920 1965 } … … 1961 2006 1962 2007 static const struct snd_pci_quirk force_connect_list[] = { 2008 SND_PCI_QUIRK(0x103c, 0x83e2, "HP EliteDesk 800 G4", 1), 2009 SND_PCI_QUIRK(0x103c, 0x83ef, "HP MP9 G4 Retail System AMS", 1), 1963 2010 SND_PCI_QUIRK(0x103c, 0x870f, "HP", 1), 1964 2011 SND_PCI_QUIRK(0x103c, 0x871a, "HP", 1), 2012 SND_PCI_QUIRK(0x103c, 0x8711, "HP", 1), 2013 SND_PCI_QUIRK(0x103c, 0x8715, "HP", 1), 2014 SND_PCI_QUIRK(0x1043, 0x86ae, "ASUS", 1), /* Z170 PRO */ 2015 SND_PCI_QUIRK(0x1043, 0x86c7, "ASUS", 1), /* Z170M PLUS */ 1965 2016 SND_PCI_QUIRK(0x1462, 0xec94, "MS-7C94", 1), 2017 SND_PCI_QUIRK(0x8086, 0x2060, "Intel NUC5CPYB", 1), 1966 2018 SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", 1), 1967 2019 {0} … … 2068 2120 mutex_lock(&spec->pcm_lock); 2069 2121 pin_idx = hinfo_to_pin_index(codec, hinfo); 2070 if (spec->dyn_pcm_assign && pin_idx < 0) { 2071 /* when dyn_pcm_assign and pcm is not bound to a pin 2072 * skip pin setup and return 0 to make audio playback 2073 * be ongoing 2122 if (pin_idx < 0) { 2123 /* when pcm is not bound to a pin skip pin setup and return 0 2124 * to make audio playback be ongoing 2074 2125 */ 2075 2126 pin_cvt_fixup(codec, NULL, cvt_nid); … … 2079 2130 } 2080 2131 2081 if (snd_BUG_ON(pin_idx < 0)) {2082 err = -EINVAL;2083 goto unlock;2084 }2085 2132 per_pin = get_pin(spec, pin_idx); 2086 2133 … … 2168 2215 } 2169 2216 per_cvt = get_cvt(spec, cvt_idx); 2170 per_cvt->assigned = 0;2217 per_cvt->assigned = false; 2171 2218 hinfo->nid = 0; 2172 2219 … … 2176 2223 clear_bit(pcm_idx, &spec->pcm_in_use); 2177 2224 pin_idx = hinfo_to_pin_index(codec, hinfo); 2178 if (spec->dyn_pcm_assign && pin_idx < 0) 2225 /* 2226 * In such a case, return 0 to match the behavior in 2227 * hdmi_pcm_open() 2228 */ 2229 if (pin_idx < 0) 2179 2230 goto unlock; 2180 2231 2181 if (snd_BUG_ON(pin_idx < 0)) {2182 err = -EINVAL;2183 goto unlock;2184 }2185 2232 per_pin = get_pin(spec, pin_idx); 2186 2233 … … 2274 2321 int idx, pcm_num; 2275 2322 2276 /* 2277 * for non-mst mode, pcm number is the same as before 2278 * for DP MST mode without extra PCM, pcm number is same 2279 * for DP MST mode with extra PCMs, pcm number is 2280 * (nid number + dev_num - 1) 2281 * dev_num is the device entry number in a pin 2282 */ 2283 2284 if (spec->dyn_pcm_no_legacy && codec->mst_no_extra_pcms) 2285 pcm_num = spec->num_cvts; 2286 else if (codec->mst_no_extra_pcms) 2287 pcm_num = spec->num_nids; 2288 else 2289 pcm_num = spec->num_nids + spec->dev_num - 1; 2290 2323 /* limit the PCM devices to the codec converters or available PINs */ 2324 pcm_num = min(spec->num_cvts, spec->num_pins); 2291 2325 codec_dbg(codec, "hdmi: pcm_num set to %d\n", pcm_num); 2292 2326 2293 2327 for (idx = 0; idx < pcm_num; idx++) { 2328 struct hdmi_spec_per_cvt *per_cvt; 2294 2329 struct hda_pcm *info; 2295 2330 struct hda_pcm_stream *pstr; … … 2307 2342 pstr->substreams = 1; 2308 2343 pstr->ops = generic_ops; 2309 /* pcm number is less than 16 */ 2310 if (spec->pcm_used >= 16) 2344 2345 per_cvt = get_cvt(spec, 0); 2346 pstr->channels_min = per_cvt->channels_min; 2347 pstr->channels_max = per_cvt->channels_max; 2348 2349 /* pcm number is less than pcm_rec array size */ 2350 if (spec->pcm_used >= ARRAY_SIZE(spec->pcm_rec)) 2311 2351 break; 2312 2352 /* other pstr fields are set in open */ … … 2327 2367 char hdmi_str[32] = "HDMI/DP"; 2328 2368 struct hdmi_spec *spec = codec->spec; 2329 struct hdmi_spec_per_pin *per_pin = get_pin(spec, pcm_idx);2330 2369 struct snd_jack *jack; 2331 2370 int pcmdev = get_pcm_rec(spec, pcm_idx)->device; … … 2334 2373 if (pcmdev > 0) 2335 2374 sprintf(hdmi_str + strlen(hdmi_str), ",pcm=%d", pcmdev); 2336 if (!spec->dyn_pcm_assign &&2337 !is_jack_detectable(codec, per_pin->pin_nid))2338 strncat(hdmi_str, " Phantom",2339 sizeof(hdmi_str) - strlen(hdmi_str) - 1);2340 2375 2341 2376 err = snd_jack_new(codec->card, hdmi_str, SND_JACK_AVOUT, &jack, … … 2370 2405 * pin will be bound when monitor is connected 2371 2406 */ 2372 if (spec->dyn_pcm_assign) 2373 err = snd_hda_create_dig_out_ctls(codec, 2407 err = snd_hda_create_dig_out_ctls(codec, 2374 2408 0, spec->cvt_nids[0], 2375 2409 HDA_PCM_TYPE_HDMI); 2376 else {2377 struct hdmi_spec_per_pin *per_pin =2378 get_pin(spec, pcm_idx);2379 err = snd_hda_create_dig_out_ctls(codec,2380 per_pin->pin_nid,2381 per_pin->mux_nids[0],2382 HDA_PCM_TYPE_HDMI);2383 }2384 2410 if (err < 0) 2385 2411 return err; … … 2399 2425 struct hdmi_eld *pin_eld = &per_pin->sink_eld; 2400 2426 2427 if (spec->static_pcm_mapping) { 2428 hdmi_attach_hda_pcm(spec, per_pin); 2429 hdmi_pcm_setup_pin(spec, per_pin); 2430 } 2431 2401 2432 pin_eld->eld_valid = false; 2402 2433 hdmi_present_sense(per_pin, 0); … … 2503 2534 if (spec->pcm_rec[pcm_idx].jack == NULL) 2504 2535 continue; 2505 if (spec->dyn_pcm_assign) 2506 snd_device_free(codec->card, 2507 spec->pcm_rec[pcm_idx].jack); 2508 else 2509 spec->pcm_rec[pcm_idx].jack = NULL; 2536 snd_device_free(codec->card, spec->pcm_rec[pcm_idx].jack); 2510 2537 } 2511 2538 … … 2696 2723 return; 2697 2724 #endif 2698 /* ditto during suspend/resume process itself */2699 if (snd_hdac_is_in_pm(&codec->core))2700 return;2701 2725 2702 2726 check_presence_and_report(codec, pin_nid, dev_id); … … 2884 2908 return; 2885 2909 #endif 2886 /* ditto during suspend/resume process itself */2887 if (snd_hdac_is_in_pm(&codec->core))2888 return;2889 2910 2890 2911 snd_hdac_i915_set_bclk(&codec->bus->core); … … 2916 2937 int format) 2917 2938 { 2939 struct hdmi_spec *spec = codec->spec; 2940 int pin_idx = pin_id_to_pin_index(codec, pin_nid, dev_id); 2941 struct hdmi_spec_per_pin *per_pin; 2942 int res; 2943 2944 if (pin_idx < 0) 2945 per_pin = NULL; 2946 else 2947 per_pin = get_pin(spec, pin_idx); 2948 2918 2949 haswell_verify_D0(codec, cvt_nid, pin_nid); 2919 return hdmi_setup_stream(codec, cvt_nid, pin_nid, dev_id, 2920 stream_tag, format); 2950 2951 if (spec->silent_stream_type == SILENT_STREAM_KAE && per_pin && per_pin->silent_stream) { 2952 silent_stream_set_kae(codec, per_pin, false); 2953 /* wait for pending transfers in codec to clear */ 2954 usleep_range(100, 200); 2955 } 2956 2957 res = hdmi_setup_stream(codec, cvt_nid, pin_nid, dev_id, 2958 stream_tag, format); 2959 2960 if (spec->silent_stream_type == SILENT_STREAM_KAE && per_pin && per_pin->silent_stream) { 2961 usleep_range(100, 200); 2962 silent_stream_set_kae(codec, per_pin, true); 2963 } 2964 2965 return res; 2921 2966 } 2922 2967 … … 2938 2983 } 2939 2984 2985 #ifdef CONFIG_PM 2986 static int i915_adlp_hdmi_suspend(struct hda_codec *codec) 2987 { 2988 struct hdmi_spec *spec = codec->spec; 2989 bool silent_streams = false; 2990 int pin_idx, res; 2991 2992 res = generic_hdmi_suspend(codec); 2993 2994 for (pin_idx = 0; pin_idx < spec->num_pins; pin_idx++) { 2995 struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx); 2996 2997 if (per_pin->silent_stream) { 2998 silent_streams = true; 2999 break; 3000 } 3001 } 3002 3003 if (silent_streams && spec->silent_stream_type == SILENT_STREAM_KAE) { 3004 /* 3005 * stream-id should remain programmed when codec goes 3006 * to runtime suspend 3007 */ 3008 codec->no_stream_clean_at_suspend = 1; 3009 3010 /* 3011 * the system might go to S3, in which case keep-alive 3012 * must be reprogrammed upon resume 3013 */ 3014 codec->forced_resume = 1; 3015 3016 codec_dbg(codec, "HDMI: KAE active at suspend\n"); 3017 } else { 3018 codec->no_stream_clean_at_suspend = 0; 3019 codec->forced_resume = 0; 3020 } 3021 3022 return res; 3023 } 3024 3025 static int i915_adlp_hdmi_resume(struct hda_codec *codec) 3026 { 3027 struct hdmi_spec *spec = codec->spec; 3028 int pin_idx, res; 3029 3030 res = generic_hdmi_resume(codec); 3031 3032 /* KAE not programmed at suspend, nothing to do here */ 3033 if (!codec->no_stream_clean_at_suspend) 3034 return res; 3035 3036 for (pin_idx = 0; pin_idx < spec->num_pins; pin_idx++) { 3037 struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx); 3038 3039 /* 3040 * If system was in suspend with monitor connected, 3041 * the codec setting may have been lost. Re-enable 3042 * keep-alive. 3043 */ 3044 if (per_pin->silent_stream) { 3045 unsigned int param; 3046 3047 param = snd_hda_codec_read(codec, per_pin->cvt_nid, 0, 3048 AC_VERB_GET_CONV, 0); 3049 if (!param) { 3050 codec_dbg(codec, "HDMI: KAE: restore stream id\n"); 3051 silent_stream_enable_i915(codec, per_pin); 3052 } 3053 3054 param = snd_hda_codec_read(codec, per_pin->cvt_nid, 0, 3055 AC_VERB_GET_DIGI_CONVERT_1, 0); 3056 if (!(param & (AC_DIG3_KAE << 16))) { 3057 codec_dbg(codec, "HDMI: KAE: restore DIG3_KAE\n"); 3058 silent_stream_set_kae(codec, per_pin, true); 3059 } 3060 } 3061 } 3062 3063 return res; 3064 } 3065 #endif 3066 2940 3067 /* precondition and allocation for Intel codecs */ 2941 3068 static int alloc_intel_hdmi(struct hda_codec *codec) … … 2991 3118 spec = codec->spec; 2992 3119 codec->dp_mst = true; 2993 spec->dyn_pcm_assign = true;2994 3120 spec->vendor_nid = vendor_nid; 2995 3121 spec->port_map = port_map; … … 3015 3141 */ 3016 3142 if (send_silent_stream) 3017 spec->s end_silent_stream = true;3143 spec->silent_stream_type = SILENT_STREAM_I915; 3018 3144 3019 3145 return parse_intel_hdmi(codec); … … 3055 3181 */ 3056 3182 static const int map[] = {0x4, 0x6, 0x8, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf}; 3057 int ret; 3058 3059 ret = intel_hsw_common_init(codec, 0x02, map, ARRAY_SIZE(map), 4, 3060 enable_silent_stream); 3061 if (!ret) { 3062 struct hdmi_spec *spec = codec->spec; 3063 3064 spec->dyn_pcm_no_legacy = true; 3065 } 3066 3067 return ret; 3183 3184 return intel_hsw_common_init(codec, 0x02, map, ARRAY_SIZE(map), 4, 3185 enable_silent_stream); 3186 } 3187 3188 static int patch_i915_adlp_hdmi(struct hda_codec *codec) 3189 { 3190 struct hdmi_spec *spec; 3191 int res; 3192 3193 res = patch_i915_tgl_hdmi(codec); 3194 if (!res) { 3195 spec = codec->spec; 3196 3197 if (spec->silent_stream_type) { 3198 spec->silent_stream_type = SILENT_STREAM_KAE; 3199 3200 #ifdef CONFIG_PM 3201 codec->patch_ops.resume = i915_adlp_hdmi_resume; 3202 codec->patch_ops.suspend = i915_adlp_hdmi_suspend; 3203 #endif 3204 } 3205 } 3206 3207 return res; 3068 3208 } 3069 3209 … … 3564 3704 spec->pcm_playback.maxbps = SUPPORTED_MAXBPS; 3565 3705 spec->pcm_playback.formats = SUPPORTED_FORMATS; 3706 spec->nv_dp_workaround = true; 3566 3707 return 0; 3567 3708 } … … 3688 3829 3689 3830 spec = codec->spec; 3690 spec->dyn_pcm_assign = true;3691 3831 3692 3832 err = hdmi_parse_codec(codec); … … 3703 3843 nvhdmi_chmap_cea_alloc_validate_get_type; 3704 3844 spec->chmap.ops.chmap_validate = nvhdmi_chmap_validate; 3845 spec->nv_dp_workaround = true; 3705 3846 3706 3847 codec->link_down_at_suspend = 1; … … 3726 3867 nvhdmi_chmap_cea_alloc_validate_get_type; 3727 3868 spec->chmap.ops.chmap_validate = nvhdmi_chmap_validate; 3869 spec->nv_dp_workaround = true; 3728 3870 3729 3871 codec->link_down_at_suspend = 1; … … 3754 3896 * 3755 3897 * Note that for the trigger bit to take effect it needs to change value 3756 * (i.e. it needs to be toggled). 3898 * (i.e. it needs to be toggled). The trigger bit is not applicable from 3899 * TEGRA234 chip onwards, as new verb id 0xf80 will be used for interrupt 3900 * trigger to hdmi. 3757 3901 */ 3902 #define NVIDIA_SET_HOST_INTR 0xf80 3758 3903 #define NVIDIA_GET_SCRATCH0 0xfa6 3759 3904 #define NVIDIA_SET_SCRATCH0_BYTE0 0xfa7 … … 3774 3919 * the format is invalidated so that the HDMI codec can be disabled. 3775 3920 */ 3776 static void tegra_hdmi_set_format(struct hda_codec *codec, unsigned int format) 3921 static void tegra_hdmi_set_format(struct hda_codec *codec, 3922 hda_nid_t cvt_nid, 3923 unsigned int format) 3777 3924 { 3778 3925 unsigned int value; 3926 unsigned int nid = NVIDIA_AFG_NID; 3927 struct hdmi_spec *spec = codec->spec; 3928 3929 /* 3930 * Tegra HDA codec design from TEGRA234 chip onwards support DP MST. 3931 * This resulted in moving scratch registers from audio function 3932 * group to converter widget context. So CVT NID should be used for 3933 * scratch register read/write for DP MST supported Tegra HDA codec. 3934 */ 3935 if (codec->dp_mst) 3936 nid = cvt_nid; 3779 3937 3780 3938 /* bits [31:30] contain the trigger and valid bits */ 3781 value = snd_hda_codec_read(codec, NVIDIA_AFG_NID, 0,3939 value = snd_hda_codec_read(codec, nid, 0, 3782 3940 NVIDIA_GET_SCRATCH0, 0); 3783 3941 value = (value >> 24) & 0xff; 3784 3942 3785 3943 /* bits [15:0] are used to store the HDA format */ 3786 snd_hda_codec_write(codec, NVIDIA_AFG_NID, 0,3944 snd_hda_codec_write(codec, nid, 0, 3787 3945 NVIDIA_SET_SCRATCH0_BYTE0, 3788 3946 (format >> 0) & 0xff); 3789 snd_hda_codec_write(codec, NVIDIA_AFG_NID, 0,3947 snd_hda_codec_write(codec, nid, 0, 3790 3948 NVIDIA_SET_SCRATCH0_BYTE1, 3791 3949 (format >> 8) & 0xff); 3792 3950 3793 3951 /* bits [16:24] are unused */ 3794 snd_hda_codec_write(codec, NVIDIA_AFG_NID, 0,3952 snd_hda_codec_write(codec, nid, 0, 3795 3953 NVIDIA_SET_SCRATCH0_BYTE2, 0); 3796 3954 … … 3804 3962 value |= NVIDIA_SCRATCH_VALID; 3805 3963 3806 /* 3807 * Whenever the trigger bit is toggled, an interrupt is raised in the 3808 * HDMI codec. The HDMI driver will use that as trigger to update its 3809 * configuration. 3810 */ 3811 value ^= NVIDIA_SCRATCH_TRIGGER; 3812 3813 snd_hda_codec_write(codec, NVIDIA_AFG_NID, 0, 3814 NVIDIA_SET_SCRATCH0_BYTE3, value); 3964 if (spec->hdmi_intr_trig_ctrl) { 3965 /* 3966 * For Tegra HDA Codec design from TEGRA234 onwards, the 3967 * Interrupt to hdmi driver is triggered by writing 3968 * non-zero values to verb 0xF80 instead of 31st bit of 3969 * scratch register. 3970 */ 3971 snd_hda_codec_write(codec, nid, 0, 3972 NVIDIA_SET_SCRATCH0_BYTE3, value); 3973 snd_hda_codec_write(codec, nid, 0, 3974 NVIDIA_SET_HOST_INTR, 0x1); 3975 } else { 3976 /* 3977 * Whenever the 31st trigger bit is toggled, an interrupt is raised 3978 * in the HDMI codec. The HDMI driver will use that as trigger 3979 * to update its configuration. 3980 */ 3981 value ^= NVIDIA_SCRATCH_TRIGGER; 3982 3983 snd_hda_codec_write(codec, nid, 0, 3984 NVIDIA_SET_SCRATCH0_BYTE3, value); 3985 } 3815 3986 } 3816 3987 … … 3829 4000 3830 4001 /* notify the HDMI codec of the format change */ 3831 tegra_hdmi_set_format(codec, format);4002 tegra_hdmi_set_format(codec, hinfo->nid, format); 3832 4003 3833 4004 return 0; … … 3839 4010 { 3840 4011 /* invalidate the format in the HDMI codec */ 3841 tegra_hdmi_set_format(codec, 0);4012 tegra_hdmi_set_format(codec, hinfo->nid, 0); 3842 4013 3843 4014 return generic_hdmi_playback_pcm_cleanup(hinfo, codec, substream); … … 3884 4055 } 3885 4056 3886 static int patch_tegra_hdmi(struct hda_codec *codec) 3887 { 3888 struct hdmi_spec *spec; 3889 int err; 3890 3891 err = patch_generic_hdmi(codec); 3892 if (err) 4057 static int tegra_hdmi_init(struct hda_codec *codec) 4058 { 4059 struct hdmi_spec *spec = codec->spec; 4060 int i, err; 4061 4062 err = hdmi_parse_codec(codec); 4063 if (err < 0) { 4064 generic_spec_free(codec); 3893 4065 return err; 3894 4066 } 4067 4068 for (i = 0; i < spec->num_cvts; i++) 4069 snd_hda_codec_write(codec, spec->cvt_nids[i], 0, 4070 AC_VERB_SET_DIGI_CONVERT_1, 4071 AC_DIG1_ENABLE); 4072 4073 generic_hdmi_init_per_pins(codec); 4074 4075 codec->depop_delay = 10; 3895 4076 codec->patch_ops.build_pcms = tegra_hdmi_build_pcms; 3896 spec = codec->spec;3897 4077 spec->chmap.ops.chmap_cea_alloc_validate_get_type = 3898 4078 nvhdmi_chmap_cea_alloc_validate_get_type; 3899 4079 spec->chmap.ops.chmap_validate = nvhdmi_chmap_validate; 3900 4080 4081 spec->chmap.ops.chmap_cea_alloc_validate_get_type = 4082 nvhdmi_chmap_cea_alloc_validate_get_type; 4083 spec->chmap.ops.chmap_validate = nvhdmi_chmap_validate; 4084 spec->nv_dp_workaround = true; 4085 3901 4086 return 0; 4087 } 4088 4089 static int patch_tegra_hdmi(struct hda_codec *codec) 4090 { 4091 int err; 4092 4093 err = alloc_generic_hdmi(codec); 4094 if (err < 0) 4095 return err; 4096 4097 return tegra_hdmi_init(codec); 4098 } 4099 4100 static int patch_tegra234_hdmi(struct hda_codec *codec) 4101 { 4102 struct hdmi_spec *spec; 4103 int err; 4104 4105 err = alloc_generic_hdmi(codec); 4106 if (err < 0) 4107 return err; 4108 4109 codec->dp_mst = true; 4110 spec = codec->spec; 4111 spec->dyn_pin_out = true; 4112 spec->hdmi_intr_trig_ctrl = true; 4113 4114 return tegra_hdmi_init(codec); 3902 4115 } 3903 4116 … … 4263 4476 spec = codec->spec; 4264 4477 4478 spec->static_pcm_mapping = true; 4479 4265 4480 spec->ops.pin_get_eld = atihdmi_pin_get_eld; 4266 4481 spec->ops.pin_setup_infoframe = atihdmi_pin_setup_infoframe; … … 4310 4525 } 4311 4526 4527 static int patch_gf_hdmi(struct hda_codec *codec) 4528 { 4529 int err; 4530 4531 err = patch_generic_hdmi(codec); 4532 if (err) 4533 return err; 4534 4535 /* 4536 * Glenfly GPUs have two codecs, stream switches from one codec to 4537 * another, need to do actual clean-ups in codec_cleanup_stream 4538 */ 4539 codec->no_sticky_stream = 1; 4540 return 0; 4541 } 4542 4312 4543 /* 4313 4544 * patch entries 4314 4545 */ 4315 4546 static const struct hda_device_id snd_hda_id_hdmi[] = { 4547 HDA_CODEC_ENTRY(0x00147a47, "Loongson HDMI", patch_generic_hdmi), 4316 4548 HDA_CODEC_ENTRY(0x1002793c, "RS600 HDMI", patch_atihdmi), 4317 4549 HDA_CODEC_ENTRY(0x10027919, "RS600 HDMI", patch_atihdmi), … … 4355 4587 HDA_CODEC_ENTRY(0x10de002f, "Tegra194 HDMI/DP2", patch_tegra_hdmi), 4356 4588 HDA_CODEC_ENTRY(0x10de0030, "Tegra194 HDMI/DP3", patch_tegra_hdmi), 4589 HDA_CODEC_ENTRY(0x10de0031, "Tegra234 HDMI/DP", patch_tegra234_hdmi), 4357 4590 HDA_CODEC_ENTRY(0x10de0040, "GPU 40 HDMI/DP", patch_nvhdmi), 4358 4591 HDA_CODEC_ENTRY(0x10de0041, "GPU 41 HDMI/DP", patch_nvhdmi), … … 4397 4630 HDA_CODEC_ENTRY(0x10de009f, "GPU 9f HDMI/DP", patch_nvhdmi), 4398 4631 HDA_CODEC_ENTRY(0x10de00a0, "GPU a0 HDMI/DP", patch_nvhdmi), 4632 HDA_CODEC_ENTRY(0x10de00a3, "GPU a3 HDMI/DP", patch_nvhdmi), 4633 HDA_CODEC_ENTRY(0x10de00a4, "GPU a4 HDMI/DP", patch_nvhdmi), 4634 HDA_CODEC_ENTRY(0x10de00a5, "GPU a5 HDMI/DP", patch_nvhdmi), 4635 HDA_CODEC_ENTRY(0x10de00a6, "GPU a6 HDMI/DP", patch_nvhdmi), 4636 HDA_CODEC_ENTRY(0x10de00a7, "GPU a7 HDMI/DP", patch_nvhdmi), 4399 4637 HDA_CODEC_ENTRY(0x10de8001, "MCP73 HDMI", patch_nvhdmi_2ch), 4400 4638 HDA_CODEC_ENTRY(0x10de8067, "MCP67/68 HDMI", patch_nvhdmi_2ch), 4639 HDA_CODEC_ENTRY(0x67663d82, "Arise 82 HDMI/DP", patch_gf_hdmi), 4640 HDA_CODEC_ENTRY(0x67663d83, "Arise 83 HDMI/DP", patch_gf_hdmi), 4641 HDA_CODEC_ENTRY(0x67663d84, "Arise 84 HDMI/DP", patch_gf_hdmi), 4642 HDA_CODEC_ENTRY(0x67663d85, "Arise 85 HDMI/DP", patch_gf_hdmi), 4643 HDA_CODEC_ENTRY(0x67663d86, "Arise 86 HDMI/DP", patch_gf_hdmi), 4644 HDA_CODEC_ENTRY(0x67663d87, "Arise 87 HDMI/DP", patch_gf_hdmi), 4401 4645 HDA_CODEC_ENTRY(0x11069f80, "VX900 HDMI/DP", patch_via_hdmi), 4402 4646 HDA_CODEC_ENTRY(0x11069f81, "VX900 HDMI/DP", patch_via_hdmi), … … 4423 4667 HDA_CODEC_ENTRY(0x80862815, "Alderlake HDMI", patch_i915_tgl_hdmi), 4424 4668 HDA_CODEC_ENTRY(0x80862816, "Rocketlake HDMI", patch_i915_tgl_hdmi), 4669 HDA_CODEC_ENTRY(0x80862818, "Raptorlake HDMI", patch_i915_tgl_hdmi), 4425 4670 HDA_CODEC_ENTRY(0x80862819, "DG2 HDMI", patch_i915_tgl_hdmi), 4426 4671 HDA_CODEC_ENTRY(0x8086281a, "Jasperlake HDMI", patch_i915_icl_hdmi), 4427 4672 HDA_CODEC_ENTRY(0x8086281b, "Elkhartlake HDMI", patch_i915_icl_hdmi), 4428 HDA_CODEC_ENTRY(0x8086281c, "Alderlake-P HDMI", patch_i915_tgl_hdmi), 4673 HDA_CODEC_ENTRY(0x8086281c, "Alderlake-P HDMI", patch_i915_adlp_hdmi), 4674 HDA_CODEC_ENTRY(0x8086281d, "Meteor Lake HDMI", patch_i915_adlp_hdmi), 4675 HDA_CODEC_ENTRY(0x8086281f, "Raptor Lake P HDMI", patch_i915_adlp_hdmi), 4676 HDA_CODEC_ENTRY(0x80862820, "Lunar Lake HDMI", patch_i915_adlp_hdmi), 4677 HDA_CODEC_ENTRY(0x80862822, "Panther Lake HDMI", patch_i915_adlp_hdmi), 4429 4678 HDA_CODEC_ENTRY(0x80862880, "CedarTrail HDMI", patch_generic_hdmi), 4430 4679 HDA_CODEC_ENTRY(0x80862882, "Valleyview2 HDMI", patch_i915_byt_hdmi), -
GPL/trunk/alsa-kernel/pci/hda/patch_realtek.c
r717 r772 19 19 #include <linux/input.h> 20 20 #include <linux/leds.h> 21 #include <linux/ctype.h> 21 22 #include <sound/core.h> 22 23 #include <sound/jack.h> … … 26 27 #include "hda_jack.h" 27 28 #include "hda_generic.h" 29 #ifndef TARGET_OS2 30 #include "hda_component.h" 31 #else 32 #include "hda_component2.h" 33 #endif 28 34 29 35 #ifdef TARGET_OS2 … … 126 132 unsigned int has_hs_key:1; 127 133 unsigned int no_internal_mic_pin:1; 134 unsigned int en_3kpull_low:1; 128 135 129 136 /* for PLL fix */ … … 133 140 struct input_dev *kb_dev; 134 141 u8 alc_mute_keycode_map[1]; 142 143 /* component binding */ 144 struct component_match *match; 145 struct hda_component comps[HDA_MAX_COMPONENTS]; 135 146 }; 136 147 … … 439 450 fallthrough; 440 451 case 0x10ec0215: 452 case 0x10ec0285: 453 case 0x10ec0289: 454 alc_update_coef_idx(codec, 0x36, 1<<13, 0); 455 fallthrough; 441 456 case 0x10ec0230: 442 457 case 0x10ec0233: … … 452 467 case 0x10ec0286: 453 468 case 0x10ec0288: 454 case 0x10ec0285:455 469 case 0x10ec0298: 456 case 0x10ec0289:457 470 case 0x10ec0300: 458 471 alc_update_coef_idx(codec, 0x10, 1<<9, 0); … … 470 483 case 0x10ec0234: 471 484 case 0x10ec0274: 485 alc_write_coef_idx(codec, 0x6e, 0x0c25); 486 fallthrough; 472 487 case 0x10ec0294: 473 488 case 0x10ec0700: … … 584 599 case 0x10ec0236: 585 600 case 0x10ec0256: 601 case 0x10ec0257: 586 602 case 0x19e58326: 587 603 case 0x10ec0283: 604 case 0x10ec0285: 588 605 case 0x10ec0286: 606 case 0x10ec0287: 589 607 case 0x10ec0288: 608 case 0x10ec0295: 590 609 case 0x10ec0298: 591 610 alc_headset_mic_no_shutup(codec); … … 834 853 break; 835 854 case 7: 836 alc_setup_gpio(codec, 0x0 3);855 alc_setup_gpio(codec, 0x04); 837 856 break; 838 857 case 5: … … 1842 1861 }; 1843 1862 1844 static const struct snd_pci_quirk alc880_fixup_tbl[] = {1863 static const struct hda_quirk alc880_fixup_tbl[] = { 1845 1864 SND_PCI_QUIRK(0x1019, 0x0f69, "Coeus G610P", ALC880_FIXUP_W810), 1846 1865 SND_PCI_QUIRK(0x1043, 0x10c3, "ASUS W5A", ALC880_FIXUP_ASUS_W5A), … … 2211 2230 }; 2212 2231 2213 static const struct snd_pci_quirk alc260_fixup_tbl[] = {2232 static const struct hda_quirk alc260_fixup_tbl[] = { 2214 2233 SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_FIXUP_GPIO1), 2215 2234 SND_PCI_QUIRK(0x1025, 0x007f, "Acer Aspire 9500", ALC260_FIXUP_COEF), … … 2340 2359 ALC887_FIXUP_ASUS_HMIC, 2341 2360 ALCS1200A_FIXUP_MIC_VREF, 2361 ALC888VD_FIXUP_MIC_100VREF, 2342 2362 }; 2343 2363 … … 2497 2517 kctl = snd_hda_find_mixer_ctl(codec, oldname); 2498 2518 if (kctl) 2499 s trcpy(kctl->id.name, newname);2519 snd_ctl_rename(codec->card, kctl, newname); 2500 2520 } 2501 2521 … … 3048 3068 .v.func = alc1220_fixup_clevo_pb51ed, 3049 3069 }, 3050 #ifdef TARGET_OS2xxx3070 #ifdef NOT_USED 3051 3071 [ALC1220_FIXUP_CLEVO_PB51ED_PINS] = { 3052 3072 .type = HDA_FIXUP_PINS, … … 3073 3093 .chain_id = ALC887_FIXUP_ASUS_AUDIO, 3074 3094 }, 3075 #ifdef TARGET_OS2xxx3095 #ifdef NOT_USED 3076 3096 [ALCS1200A_FIXUP_MIC_VREF] = { 3077 3097 .type = HDA_FIXUP_PINCTLS, … … 3085 3105 }; 3086 3106 3087 static const struct snd_pci_quirk alc882_fixup_tbl[] = {3107 static const struct hda_quirk alc882_fixup_tbl[] = { 3088 3108 SND_PCI_QUIRK(0x1025, 0x006c, "Acer Aspire 9810", ALC883_FIXUP_ACER_EAPD), 3089 3109 SND_PCI_QUIRK(0x1025, 0x0090, "Acer Aspire", ALC883_FIXUP_ACER_EAPD), … … 3152 3172 3153 3173 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD), 3174 SND_PCI_QUIRK(0x10ec, 0x12d8, "iBase Elo Touch", ALC888VD_FIXUP_MIC_100VREF), 3154 3175 SND_PCI_QUIRK(0x13fe, 0x1009, "Advantech MIT-W101", ALC886_FIXUP_EAPD), 3155 3176 SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE), … … 3169 3190 SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3), 3170 3191 SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX), 3192 SND_PCI_QUIRK(0x1558, 0x3702, "Clevo X370SN[VW]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 3171 3193 SND_PCI_QUIRK(0x1558, 0x50d3, "Clevo PC50[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 3172 3194 SND_PCI_QUIRK(0x1558, 0x65d1, "Clevo PB51[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), … … 3176 3198 SND_PCI_QUIRK(0x1558, 0x65f1, "Clevo PC50HS", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 3177 3199 SND_PCI_QUIRK(0x1558, 0x65f5, "Clevo PD50PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 3200 SND_PCI_QUIRK(0x1558, 0x66a2, "Clevo PE60RNE", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 3201 SND_PCI_QUIRK(0x1558, 0x66a6, "Clevo PE60SN[CDE]-[GS]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 3178 3202 SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 3179 3203 SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), … … 3196 3220 SND_PCI_QUIRK(0x1558, 0x97e1, "Clevo P970[ER][CDFN]", ALC1220_FIXUP_CLEVO_P950), 3197 3221 SND_PCI_QUIRK(0x1558, 0x97e2, "Clevo P970RC-M", ALC1220_FIXUP_CLEVO_P950), 3222 SND_PCI_QUIRK(0x1558, 0xd502, "Clevo PD50SNE", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 3198 3223 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD), 3199 3224 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD), … … 3494 3519 .v.func = alc_fixup_no_depop_delay, 3495 3520 }, 3521 #ifdef NOT_USED 3522 [ALC888VD_FIXUP_MIC_100VREF] = { 3523 .type = HDA_FIXUP_PINCTLS, 3524 .v.pins = (const struct hda_pintbl[]) { 3525 { 0x18, PIN_VREF100 }, /* headset mic */ 3526 {} 3527 } 3528 }, 3529 #endif 3496 3530 }; 3497 3531 3498 static const struct snd_pci_quirk alc262_fixup_tbl[] = {3532 static const struct hda_quirk alc262_fixup_tbl[] = { 3499 3533 SND_PCI_QUIRK(0x103c, 0x170b, "HP Z200", ALC262_FIXUP_HP_Z200), 3500 3534 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu Lifebook S7110", ALC262_FIXUP_FSC_S7110), … … 3678 3712 }; 3679 3713 3680 static const struct snd_pci_quirk alc268_fixup_tbl[] = {3714 static const struct hda_quirk alc268_fixup_tbl[] = { 3681 3715 SND_PCI_QUIRK(0x1025, 0x0139, "Acer TravelMate 6293", ALC268_FIXUP_SPDIF), 3682 3716 SND_PCI_QUIRK(0x1025, 0x015b, "Acer AOA 150 (ZG5)", ALC268_FIXUP_INV_DMIC), … … 3891 3925 case 0x10ec0236: 3892 3926 case 0x10ec0256: 3927 case 0x10ec0257: 3893 3928 case 0x19e58326: 3894 3929 alc_write_coef_idx(codec, 0x48, 0x0); … … 3920 3955 case 0x10ec0236: 3921 3956 case 0x10ec0256: 3957 case 0x10ec0257: 3922 3958 case 0x19e58326: 3923 3959 alc_write_coef_idx(codec, 0x48, 0xd011); … … 4204 4240 bool hp_pin_sense; 4205 4241 4206 if (!hp_pin)4207 hp_pin = 0x21;4208 4209 msleep(30);4210 4211 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);4212 4213 if (hp_pin_sense)4214 msleep(2);4215 4216 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */4217 4242 if (spec->ultra_low_power) { 4218 4243 alc_update_coef_idx(codec, 0x03, 1<<1, 1<<1); … … 4224 4249 } 4225 4250 4226 snd_hda_codec_write(codec, hp_pin, 0, 4227 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 4228 4229 if (hp_pin_sense || spec->ultra_low_power) 4230 msleep(85); 4231 4232 snd_hda_codec_write(codec, hp_pin, 0, 4251 if (!hp_pin) 4252 hp_pin = 0x21; 4253 4254 msleep(30); 4255 4256 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); 4257 4258 if (hp_pin_sense) { 4259 msleep(2); 4260 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */ 4261 4262 snd_hda_codec_write(codec, hp_pin, 0, 4233 4263 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 4234 4264 4235 if (hp_pin_sense || spec->ultra_low_power) 4236 msleep(100); 4237 4265 msleep(75); 4266 4267 snd_hda_codec_write(codec, hp_pin, 0, 4268 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); 4269 4270 msleep(75); 4271 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */ 4272 } 4238 4273 alc_update_coef_idx(codec, 0x46, 3 << 12, 0); 4239 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */4240 4274 alc_update_coefex_idx(codec, 0x53, 0x02, 0x8000, 1 << 15); /* Clear bit */ 4241 4275 alc_update_coefex_idx(codec, 0x53, 0x02, 0x8000, 0 << 15); … … 4258 4292 hp_pin = 0x21; 4259 4293 4294 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */ 4260 4295 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); 4261 4296 4262 if (hp_pin_sense) 4297 if (hp_pin_sense) { 4263 4298 msleep(2); 4264 4299 4265 snd_hda_codec_write(codec, hp_pin, 0,4300 snd_hda_codec_write(codec, hp_pin, 0, 4266 4301 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 4267 4302 4268 if (hp_pin_sense || spec->ultra_low_power) 4269 msleep(85); 4303 msleep(75); 4270 4304 4271 4305 /* 3k pull low control for Headset jack. */ … … 4274 4308 * when booting with headset plugged. So skip setting it for the codec alc257 4275 4309 */ 4276 if (codec->core.vendor_id != 0x10ec0236 && 4277 codec->core.vendor_id != 0x10ec0257) 4278 alc_update_coef_idx(codec, 0x46, 0, 3 << 12); 4279 4280 if (!spec->no_shutup_pins) 4281 snd_hda_codec_write(codec, hp_pin, 0, 4310 if (spec->en_3kpull_low) 4311 alc_update_coef_idx(codec, 0x46, 0, 3 << 12); 4312 4313 if (!spec->no_shutup_pins) 4314 snd_hda_codec_write(codec, hp_pin, 0, 4282 4315 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 4283 4316 4284 if (hp_pin_sense || spec->ultra_low_power)4285 msleep(100);4317 msleep(75); 4318 } 4286 4319 4287 4320 alc_auto_setup_eapd(codec, false); … … 4305 4338 int coef38, coef0d, coef36; 4306 4339 4340 alc_write_coefex_idx(codec, 0x58, 0x00, 0x1888); /* write default value */ 4307 4341 alc_update_coef_idx(codec, 0x4a, 1<<15, 1<<15); /* Reset HP JD */ 4308 4342 coef38 = alc_read_coef_idx(codec, 0x38); /* Amp control */ … … 4352 4386 hda_nid_t hp_pin = alc_get_hp_pin(spec); 4353 4387 bool hp1_pin_sense, hp2_pin_sense; 4388 4389 if (spec->ultra_low_power) { 4390 alc_update_coef_idx(codec, 0x08, 0x0f << 2, 3<<2); 4391 alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6); 4392 alc_update_coef_idx(codec, 0x33, 1<<11, 0); 4393 msleep(30); 4394 } 4354 4395 4355 4396 if (spec->codec_variant != ALC269_TYPE_ALC287 && … … 4375 4416 hp2_pin_sense = snd_hda_jack_detect(codec, 0x16); 4376 4417 4377 if (hp1_pin_sense || hp2_pin_sense) 4418 if (hp1_pin_sense || hp2_pin_sense) { 4378 4419 msleep(2); 4379 4380 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */ 4381 if (spec->ultra_low_power) { 4382 alc_update_coef_idx(codec, 0x08, 0x0f << 2, 3<<2); 4383 alc_update_coef_idx(codec, 0x0e, 7<<6, 7<<6); 4384 alc_update_coef_idx(codec, 0x33, 1<<11, 0); 4385 msleep(30); 4386 } 4387 4388 if (hp1_pin_sense || spec->ultra_low_power) 4389 snd_hda_codec_write(codec, hp_pin, 0, 4390 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 4391 if (hp2_pin_sense) 4392 snd_hda_codec_write(codec, 0x16, 0, 4393 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 4394 4395 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) 4396 msleep(85); 4397 4398 if (hp1_pin_sense || spec->ultra_low_power) 4399 snd_hda_codec_write(codec, hp_pin, 0, 4400 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 4401 if (hp2_pin_sense) 4402 snd_hda_codec_write(codec, 0x16, 0, 4403 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 4404 4405 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power) 4406 msleep(100); 4407 4408 alc_update_coef_idx(codec, 0x4a, 3 << 10, 0); 4409 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */ 4420 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */ 4421 4422 if (hp1_pin_sense) 4423 snd_hda_codec_write(codec, hp_pin, 0, 4424 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 4425 if (hp2_pin_sense) 4426 snd_hda_codec_write(codec, 0x16, 0, 4427 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 4428 msleep(75); 4429 4430 if (hp1_pin_sense) 4431 snd_hda_codec_write(codec, hp_pin, 0, 4432 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); 4433 if (hp2_pin_sense) 4434 snd_hda_codec_write(codec, 0x16, 0, 4435 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); 4436 4437 msleep(75); 4438 alc_update_coef_idx(codec, 0x4a, 3 << 10, 0); 4439 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */ 4440 } 4410 4441 } 4411 4442 … … 4419 4450 hp_pin = 0x21; 4420 4451 4421 alc_disable_headset_jack_key(codec);4422 /* 3k pull low control for Headset jack. */4423 alc_update_coef_idx(codec, 0x4a, 0, 3 << 10);4424 4425 4452 hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin); 4426 4453 hp2_pin_sense = snd_hda_jack_detect(codec, 0x16); 4427 4454 4428 if (hp1_pin_sense || hp2_pin_sense) 4455 if (hp1_pin_sense || hp2_pin_sense) { 4456 alc_disable_headset_jack_key(codec); 4457 /* 3k pull low control for Headset jack. */ 4458 alc_update_coef_idx(codec, 0x4a, 0, 3 << 10); 4429 4459 msleep(2); 4430 4460 4431 if (hp1_pin_sense || spec->ultra_low_power)4432 snd_hda_codec_write(codec, hp_pin, 0,4433 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);4434 if (hp2_pin_sense)4435 snd_hda_codec_write(codec, 0x16, 0,4436 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);4437 4438 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)4439 msleep(85); 4440 4441 if (hp1_pin_sense || spec->ultra_low_power)4442 snd_hda_codec_write(codec, hp_pin, 0,4443 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);4444 if (hp2_pin_sense)4445 snd_hda_codec_write(codec, 0x16, 0,4446 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 4447 4448 if (hp1_pin_sense || hp2_pin_sense || spec->ultra_low_power)4449 msleep(100);4450 4461 if (hp1_pin_sense) 4462 snd_hda_codec_write(codec, hp_pin, 0, 4463 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 4464 if (hp2_pin_sense) 4465 snd_hda_codec_write(codec, 0x16, 0, 4466 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 4467 4468 msleep(75); 4469 4470 if (hp1_pin_sense) 4471 snd_hda_codec_write(codec, hp_pin, 0, 4472 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 4473 if (hp2_pin_sense) 4474 snd_hda_codec_write(codec, 0x16, 0, 4475 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 4476 4477 msleep(75); 4478 alc_update_coef_idx(codec, 0x4a, 3 << 10, 0); 4479 alc_enable_headset_jack_key(codec); 4480 } 4451 4481 alc_auto_setup_eapd(codec, false); 4452 4482 alc_shutup_pins(codec); … … 4459 4489 msleep(30); 4460 4490 } 4461 4462 alc_update_coef_idx(codec, 0x4a, 3 << 10, 0); 4463 alc_enable_headset_jack_key(codec); 4491 } 4492 4493 static void alc222_init(struct hda_codec *codec) 4494 { 4495 struct alc_spec *spec = codec->spec; 4496 hda_nid_t hp_pin = alc_get_hp_pin(spec); 4497 bool hp1_pin_sense, hp2_pin_sense; 4498 4499 if (!hp_pin) 4500 return; 4501 4502 msleep(30); 4503 4504 hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin); 4505 hp2_pin_sense = snd_hda_jack_detect(codec, 0x14); 4506 4507 if (hp1_pin_sense || hp2_pin_sense) { 4508 msleep(2); 4509 4510 if (hp1_pin_sense) 4511 snd_hda_codec_write(codec, hp_pin, 0, 4512 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 4513 if (hp2_pin_sense) 4514 snd_hda_codec_write(codec, 0x14, 0, 4515 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 4516 msleep(75); 4517 4518 if (hp1_pin_sense) 4519 snd_hda_codec_write(codec, hp_pin, 0, 4520 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); 4521 if (hp2_pin_sense) 4522 snd_hda_codec_write(codec, 0x14, 0, 4523 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); 4524 4525 msleep(75); 4526 } 4527 } 4528 4529 static void alc222_shutup(struct hda_codec *codec) 4530 { 4531 struct alc_spec *spec = codec->spec; 4532 hda_nid_t hp_pin = alc_get_hp_pin(spec); 4533 bool hp1_pin_sense, hp2_pin_sense; 4534 4535 if (!hp_pin) 4536 hp_pin = 0x21; 4537 4538 hp1_pin_sense = snd_hda_jack_detect(codec, hp_pin); 4539 hp2_pin_sense = snd_hda_jack_detect(codec, 0x14); 4540 4541 if (hp1_pin_sense || hp2_pin_sense) { 4542 msleep(2); 4543 4544 if (hp1_pin_sense) 4545 snd_hda_codec_write(codec, hp_pin, 0, 4546 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 4547 if (hp2_pin_sense) 4548 snd_hda_codec_write(codec, 0x14, 0, 4549 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 4550 4551 msleep(75); 4552 4553 if (hp1_pin_sense) 4554 snd_hda_codec_write(codec, hp_pin, 0, 4555 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 4556 if (hp2_pin_sense) 4557 snd_hda_codec_write(codec, 0x14, 0, 4558 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 4559 4560 msleep(75); 4561 } 4562 alc_auto_setup_eapd(codec, false); 4563 alc_shutup_pins(codec); 4464 4564 } 4465 4565 … … 4477 4577 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); 4478 4578 4479 if (hp_pin_sense) 4579 if (hp_pin_sense) { 4480 4580 msleep(2); 4481 4581 4482 snd_hda_codec_write(codec, hp_pin, 0, 4483 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 4484 4485 if (hp_pin_sense) 4486 msleep(85); 4487 4488 snd_hda_codec_write(codec, hp_pin, 0, 4489 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 4490 4491 if (hp_pin_sense) 4492 msleep(100); 4582 snd_hda_codec_write(codec, hp_pin, 0, 4583 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 4584 4585 msleep(75); 4586 4587 snd_hda_codec_write(codec, hp_pin, 0, 4588 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); 4589 msleep(75); 4590 } 4493 4591 } 4494 4592 … … 4506 4604 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); 4507 4605 4508 if (hp_pin_sense) 4606 if (hp_pin_sense) { 4509 4607 msleep(2); 4510 4608 4511 snd_hda_codec_write(codec, hp_pin, 0,4512 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);4513 4514 if (hp_pin_sense)4515 msleep(85);4516 4517 if (!spec->no_shutup_pins)4518 4609 snd_hda_codec_write(codec, hp_pin, 0, 4519 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 4520 4521 if (hp_pin_sense) 4522 msleep(100); 4523 4610 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 4611 4612 msleep(75); 4613 4614 if (!spec->no_shutup_pins) 4615 snd_hda_codec_write(codec, hp_pin, 0, 4616 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 4617 4618 msleep(75); 4619 } 4524 4620 alc_auto_setup_eapd(codec, false); 4525 4621 alc_shutup_pins(codec); … … 4671 4767 if (spec->has_alc5505_dsp) 4672 4768 alc5505_dsp_suspend(codec); 4769 4673 4770 #endif 4674 4771 return alc_suspend(codec); … … 5199 5296 } 5200 5297 5201 #if def NOT_USED5298 #ifndef TARGET_OS2 5202 5299 /* toggle GPIO2 at each time stream is started; we use PREPARE state instead */ 5203 5300 static void alc274_hp_envy_pcm_hook(struct hda_pcm_stream *hinfo, … … 5289 5386 } 5290 5387 5388 static void alc236_fixup_hp_mute_led_coefbit2(struct hda_codec *codec, 5389 const struct hda_fixup *fix, int action) 5390 { 5391 struct alc_spec *spec = codec->spec; 5392 5393 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 5394 spec->mute_led_polarity = 0; 5395 spec->mute_led_coef.idx = 0x07; 5396 spec->mute_led_coef.mask = 1; 5397 spec->mute_led_coef.on = 1; 5398 spec->mute_led_coef.off = 0; 5399 #ifdef CONFIG_SND_HDA_GENERIC_LEDS 5400 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set); 5401 #endif 5402 } 5403 } 5404 5405 static void alc245_fixup_hp_mute_led_coefbit(struct hda_codec *codec, 5406 const struct hda_fixup *fix, 5407 int action) 5408 { 5409 struct alc_spec *spec = codec->spec; 5410 5411 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 5412 spec->mute_led_polarity = 0; 5413 spec->mute_led_coef.idx = 0x0b; 5414 spec->mute_led_coef.mask = 3 << 2; 5415 spec->mute_led_coef.on = 2 << 2; 5416 spec->mute_led_coef.off = 1 << 2; 5417 #ifdef CONFIG_SND_HDA_GENERIC_LEDS 5418 snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set); 5419 #endif 5420 } 5421 } 5422 5291 5423 #ifdef NOT_USED 5292 5424 /* turn on/off mic-mute LED per capture hook by coef bit */ … … 5319 5451 } 5320 5452 5453 static void alc285_fixup_hp_gpio_micmute_led(struct hda_codec *codec, 5454 const struct hda_fixup *fix, int action) 5455 { 5456 struct alc_spec *spec = codec->spec; 5457 5458 if (action == HDA_FIXUP_ACT_PRE_PROBE) 5459 spec->micmute_led_polarity = 1; 5460 alc_fixup_hp_gpio_led(codec, action, 0, 0x04); 5461 } 5462 5321 5463 static void alc236_fixup_hp_coef_micmute_led(struct hda_codec *codec, 5322 5464 const struct hda_fixup *fix, int action) … … 5342 5484 } 5343 5485 5486 static void alc285_fixup_hp_spectre_x360_mute_led(struct hda_codec *codec, 5487 const struct hda_fixup *fix, int action) 5488 { 5489 alc285_fixup_hp_mute_led_coefbit(codec, fix, action); 5490 alc285_fixup_hp_gpio_micmute_led(codec, fix, action); 5491 } 5492 5344 5493 static void alc236_fixup_hp_mute_led(struct hda_codec *codec, 5345 5494 const struct hda_fixup *fix, int action) … … 5370 5519 } 5371 5520 5372 #if IS_REACHABLE(CONFIG_INPUT) 5521 static inline void alc298_samsung_write_coef_pack(struct hda_codec *codec, 5522 const unsigned short coefs[2]) 5523 { 5524 alc_write_coef_idx(codec, 0x23, coefs[0]); 5525 alc_write_coef_idx(codec, 0x25, coefs[1]); 5526 alc_write_coef_idx(codec, 0x26, 0xb011); 5527 } 5528 5529 struct alc298_samsung_amp_desc { 5530 unsigned char nid; 5531 unsigned short init_seq[2][2]; 5532 }; 5533 5534 static void alc298_fixup_samsung_amp(struct hda_codec *codec, 5535 const struct hda_fixup *fix, int action) 5536 { 5537 int i, j; 5538 static const unsigned short init_seq[][2] = { 5539 { 0x19, 0x00 }, { 0x20, 0xc0 }, { 0x22, 0x44 }, { 0x23, 0x08 }, 5540 { 0x24, 0x85 }, { 0x25, 0x41 }, { 0x35, 0x40 }, { 0x36, 0x01 }, 5541 { 0x38, 0x81 }, { 0x3a, 0x03 }, { 0x3b, 0x81 }, { 0x40, 0x3e }, 5542 { 0x41, 0x07 }, { 0x400, 0x1 } 5543 }; 5544 static const struct alc298_samsung_amp_desc amps[] = { 5545 { 0x3a, { { 0x18, 0x1 }, { 0x26, 0x0 } } }, 5546 { 0x39, { { 0x18, 0x2 }, { 0x26, 0x1 } } } 5547 }; 5548 5549 if (action != HDA_FIXUP_ACT_INIT) 5550 return; 5551 5552 for (i = 0; i < ARRAY_SIZE(amps); i++) { 5553 alc_write_coef_idx(codec, 0x22, amps[i].nid); 5554 5555 for (j = 0; j < ARRAY_SIZE(amps[i].init_seq); j++) 5556 alc298_samsung_write_coef_pack(codec, amps[i].init_seq[j]); 5557 5558 for (j = 0; j < ARRAY_SIZE(init_seq); j++) 5559 alc298_samsung_write_coef_pack(codec, init_seq[j]); 5560 } 5561 } 5562 5563 #ifndef TARGET_OS2 5373 5564 static void gpio2_mic_hotkey_event(struct hda_codec *codec, 5374 5565 struct hda_jack_callback *event) … … 5417 5608 return 0; 5418 5609 } 5610 #endif /* TARGET_OS2 */ 5419 5611 5420 5612 /* GPIO1 = set according to SKU external amp … … 5426 5618 const struct hda_fixup *fix, int action) 5427 5619 { 5428 #if IS_ENABLED(CONFIG_INPUT) 5620 #if IS_ENABLED(CONFIG_INPUT) && !defined(TARGET_OS2) 5429 5621 struct alc_spec *spec = codec->spec; 5430 5622 … … 5462 5654 const struct hda_fixup *fix, int action) 5463 5655 { 5656 #if IS_ENABLED(CONFIG_INPUT) 5464 5657 struct alc_spec *spec = codec->spec; 5465 5658 … … 5483 5676 spec->kb_dev = NULL; 5484 5677 } 5485 } 5486 #else /* INPUT */ 5487 #define alc280_fixup_hp_gpio2_mic_hotkey NULL 5488 #define alc233_fixup_lenovo_line2_mic_hotkey NULL 5489 #endif /* INPUT */ 5678 #endif 5679 } 5490 5680 5491 5681 static void alc269_fixup_hp_line1_mic1_led(struct hda_codec *codec, … … 5501 5691 #endif 5502 5692 } 5693 } 5694 5695 static void alc233_fixup_lenovo_low_en_micmute_led(struct hda_codec *codec, 5696 const struct hda_fixup *fix, int action) 5697 { 5698 struct alc_spec *spec = codec->spec; 5699 5700 if (action == HDA_FIXUP_ACT_PRE_PROBE) 5701 spec->micmute_led_polarity = 1; 5702 alc233_fixup_lenovo_line2_mic_hotkey(codec, fix, action); 5703 } 5704 5705 static void alc_hp_mute_disable(struct hda_codec *codec, unsigned int delay) 5706 { 5707 if (delay == 0) 5708 delay = 75; 5709 snd_hda_codec_write(codec, 0x21, 0, 5710 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 5711 msleep(delay); 5712 snd_hda_codec_write(codec, 0x21, 0, 5713 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 5714 msleep(delay); 5715 } 5716 5717 static void alc_hp_enable_unmute(struct hda_codec *codec, unsigned int delay) 5718 { 5719 if (delay == 0) 5720 delay = 75; 5721 snd_hda_codec_write(codec, 0x21, 0, 5722 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); 5723 msleep(delay); 5724 snd_hda_codec_write(codec, 0x21, 0, 5725 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); 5726 msleep(delay); 5503 5727 } 5504 5728 … … 5604 5828 case 0x10ec0256: 5605 5829 case 0x19e58326: 5830 alc_hp_mute_disable(codec, 75); 5606 5831 alc_process_coef_fw(codec, coef0256); 5607 5832 break; … … 5638 5863 case 0x10ec0289: 5639 5864 case 0x10ec0299: 5865 alc_hp_mute_disable(codec, 75); 5640 5866 alc_process_coef_fw(codec, alc225_pre_hsmode); 5641 5867 alc_process_coef_fw(codec, coef0225); … … 5863 6089 alc_process_coef_fw(codec, alc225_pre_hsmode); 5864 6090 alc_process_coef_fw(codec, coef0225); 6091 alc_hp_enable_unmute(codec, 75); 5865 6092 break; 5866 6093 case 0x10ec0255: … … 5875 6102 msleep(50); 5876 6103 alc_process_coef_fw(codec, coef0256); 6104 alc_hp_enable_unmute(codec, 75); 5877 6105 break; 5878 6106 case 0x10ec0234: … … 5972 6200 case 0x19e58326: 5973 6201 alc_process_coef_fw(codec, coef0256); 6202 alc_hp_enable_unmute(codec, 75); 5974 6203 break; 5975 6204 case 0x10ec0234: … … 6020 6249 else 6021 6250 alc_process_coef_fw(codec, coef0225_1); 6251 alc_hp_enable_unmute(codec, 75); 6022 6252 break; 6023 6253 case 0x10ec0867: … … 6087 6317 case 0x19e58326: 6088 6318 alc_process_coef_fw(codec, coef0256); 6319 alc_hp_enable_unmute(codec, 75); 6089 6320 break; 6090 6321 case 0x10ec0234: … … 6124 6355 case 0x10ec0299: 6125 6356 alc_process_coef_fw(codec, coef0225); 6357 alc_hp_enable_unmute(codec, 75); 6126 6358 break; 6127 6359 } … … 6192 6424 alc_write_coefex_idx(codec, 0x57, 0x3, 0x09a3); 6193 6425 6194 snd_hda_codec_write(codec, 0x21, 0,6195 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);6196 msleep(80);6197 snd_hda_codec_write(codec, 0x21, 0,6198 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);6199 6200 6426 alc_process_coef_fw(codec, coef0255); 6201 6427 msleep(300); 6202 6428 val = alc_read_coef_idx(codec, 0x46); 6203 6429 is_ctia = (val & 0x0070) == 0x0070; 6204 6430 if (!is_ctia) { 6431 alc_write_coef_idx(codec, 0x45, 0xe089); 6432 msleep(100); 6433 val = alc_read_coef_idx(codec, 0x46); 6434 if ((val & 0x0070) == 0x0070) 6435 is_ctia = false; 6436 else 6437 is_ctia = true; 6438 } 6205 6439 alc_write_coefex_idx(codec, 0x57, 0x3, 0x0da3); 6206 6440 alc_update_coefex_idx(codec, 0x57, 0x5, 1<<14, 0); 6207 6208 snd_hda_codec_write(codec, 0x21, 0,6209 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);6210 msleep(80);6211 snd_hda_codec_write(codec, 0x21, 0,6212 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);6213 6441 break; 6214 6442 case 0x10ec0234: … … 6287 6515 case 0x10ec0289: 6288 6516 case 0x10ec0299: 6289 snd_hda_codec_write(codec, 0x21, 0,6290 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);6291 msleep(80);6292 snd_hda_codec_write(codec, 0x21, 0,6293 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);6294 6295 6517 alc_process_coef_fw(codec, alc225_pre_hsmode); 6296 6518 alc_update_coef_idx(codec, 0x67, 0xf000, 0x1000); … … 6309 6531 is_ctia = (val & 0x00f0) == 0x00f0; 6310 6532 } 6533 if (!is_ctia) { 6534 alc_update_coef_idx(codec, 0x45, 0x3f<<10, 0x38<<10); 6535 alc_update_coef_idx(codec, 0x49, 3<<8, 1<<8); 6536 msleep(100); 6537 val = alc_read_coef_idx(codec, 0x46); 6538 if ((val & 0x00f0) == 0x00f0) 6539 is_ctia = false; 6540 else 6541 is_ctia = true; 6542 } 6311 6543 alc_update_coef_idx(codec, 0x4a, 7<<6, 7<<6); 6312 6544 alc_update_coef_idx(codec, 0x4a, 3<<4, 3<<4); 6313 6545 alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000); 6314 6315 snd_hda_codec_write(codec, 0x21, 0,6316 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);6317 msleep(80);6318 snd_hda_codec_write(codec, 0x21, 0,6319 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);6320 6546 break; 6321 6547 case 0x10ec0867: … … 7088 7314 case 0x10ec0255: 7089 7315 case 0x10ec0256: 7316 case 0x10ec0257: 7090 7317 case 0x19e58326: 7091 7318 alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */ … … 7275 7502 } 7276 7503 7504 static void alc285_fixup_hp_envy_x360(struct hda_codec *codec, 7505 const struct hda_fixup *fix, 7506 int action) 7507 { 7508 static const struct coef_fw coefs[] = { 7509 WRITE_COEF(0x08, 0x6a0c), WRITE_COEF(0x0d, 0xa023), 7510 WRITE_COEF(0x10, 0x0320), WRITE_COEF(0x1a, 0x8c03), 7511 WRITE_COEF(0x25, 0x1800), WRITE_COEF(0x26, 0x003a), 7512 WRITE_COEF(0x28, 0x1dfe), WRITE_COEF(0x29, 0xb014), 7513 WRITE_COEF(0x2b, 0x1dfe), WRITE_COEF(0x37, 0xfe15), 7514 WRITE_COEF(0x38, 0x7909), WRITE_COEF(0x45, 0xd489), 7515 WRITE_COEF(0x46, 0x00f4), WRITE_COEF(0x4a, 0x21e0), 7516 WRITE_COEF(0x66, 0x03f0), WRITE_COEF(0x67, 0x1000), 7517 WRITE_COEF(0x6e, 0x1005), {0} 7518 }; 7519 7520 static const struct hda_pintbl pincfgs[] = { 7521 { 0x12, 0xb7a60130 }, /* Internal microphone*/ 7522 { 0x14, 0x90170150 }, /* B&O soundbar speakers */ 7523 { 0x17, 0x90170153 }, /* Side speakers */ 7524 { 0x19, 0x03a11040 }, /* Headset microphone */ 7525 {0} 7526 }; 7527 7528 switch (action) { 7529 case HDA_FIXUP_ACT_PRE_PROBE: 7530 snd_hda_apply_pincfgs(codec, pincfgs); 7531 7532 /* Fixes volume control problem for side speakers */ 7533 alc295_fixup_disable_dac3(codec, fix, action); 7534 7535 /* Fixes no sound from headset speaker */ 7536 snd_hda_codec_amp_stereo(codec, 0x21, HDA_OUTPUT, 0, -1, 0); 7537 7538 /* Auto-enable headset mic when plugged */ 7539 snd_hda_jack_set_gating_jack(codec, 0x19, 0x21); 7540 7541 /* Headset mic volume enhancement */ 7542 snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREF50); 7543 break; 7544 case HDA_FIXUP_ACT_INIT: 7545 alc_process_coef_fw(codec, coefs); 7546 break; 7547 case HDA_FIXUP_ACT_BUILD: 7548 rename_ctl(codec, "Bass Speaker Playback Volume", 7549 "B&O-Tuned Playback Volume"); 7550 rename_ctl(codec, "Front Playback Switch", 7551 "B&O Soundbar Playback Switch"); 7552 rename_ctl(codec, "Bass Speaker Playback Switch", 7553 "Side Speaker Playback Switch"); 7554 break; 7555 } 7556 } 7557 7277 7558 /* for hda_fixup_thinkpad_acpi() */ 7278 7559 #include "thinkpad_helper.c" … … 7297 7578 break; 7298 7579 } 7580 } 7581 7582 static int comp_bind(struct device *dev) 7583 { 7584 struct hda_codec *cdc = dev_to_hda_codec(dev); 7585 struct alc_spec *spec = cdc->spec; 7586 7587 return component_bind_all(dev, spec->comps); 7588 } 7589 7590 static void comp_unbind(struct device *dev) 7591 { 7592 struct hda_codec *cdc = dev_to_hda_codec(dev); 7593 struct alc_spec *spec = cdc->spec; 7594 7595 component_unbind_all(dev, spec->comps); 7596 } 7597 7598 static const struct component_master_ops comp_master_ops = { 7599 .bind = comp_bind, 7600 .unbind = comp_unbind, 7601 }; 7602 7603 static void comp_generic_playback_hook(struct hda_pcm_stream *hinfo, struct hda_codec *cdc, 7604 struct snd_pcm_substream *sub, int action) 7605 { 7606 struct alc_spec *spec = cdc->spec; 7607 int i; 7608 7609 for (i = 0; i < HDA_MAX_COMPONENTS; i++) { 7610 if (spec->comps[i].dev && spec->comps[i].pre_playback_hook) 7611 spec->comps[i].pre_playback_hook(spec->comps[i].dev, action); 7612 } 7613 for (i = 0; i < HDA_MAX_COMPONENTS; i++) { 7614 if (spec->comps[i].dev && spec->comps[i].playback_hook) 7615 spec->comps[i].playback_hook(spec->comps[i].dev, action); 7616 } 7617 for (i = 0; i < HDA_MAX_COMPONENTS; i++) { 7618 if (spec->comps[i].dev && spec->comps[i].post_playback_hook) 7619 spec->comps[i].post_playback_hook(spec->comps[i].dev, action); 7620 } 7621 } 7622 7623 struct scodec_dev_name { 7624 const char *bus; 7625 const char *hid; 7626 int index; 7627 }; 7628 7629 /* match the device name in a slightly relaxed manner */ 7630 static int comp_match_cs35l41_dev_name(struct device *dev, void *data) 7631 { 7632 struct scodec_dev_name *p = data; 7633 const char *d = dev_name(dev); 7634 int n = strlen(p->bus); 7635 char tmp[32]; 7636 7637 /* check the bus name */ 7638 if (strncmp(d, p->bus, n)) 7639 return 0; 7640 /* skip the bus number */ 7641 if (isdigit(d[n])) 7642 n++; 7643 /* the rest must be exact matching */ 7644 snprintf(tmp, sizeof(tmp), "-%s:00-cs35l41-hda.%d", p->hid, p->index); 7645 return !strcmp(d + n, tmp); 7646 } 7647 7648 static int comp_match_tas2781_dev_name(struct device *dev, 7649 void *data) 7650 { 7651 struct scodec_dev_name *p = data; 7652 const char *d = dev_name(dev); 7653 int n = strlen(p->bus); 7654 char tmp[32]; 7655 7656 /* check the bus name */ 7657 if (strncmp(d, p->bus, n)) 7658 return 0; 7659 /* skip the bus number */ 7660 if (isdigit(d[n])) 7661 n++; 7662 /* the rest must be exact matching */ 7663 snprintf(tmp, sizeof(tmp), "-%s:00", p->hid); 7664 7665 return !strcmp(d + n, tmp); 7666 } 7667 7668 static void cs35l41_generic_fixup(struct hda_codec *cdc, int action, const char *bus, 7669 const char *hid, int count) 7670 { 7671 struct device *dev = hda_codec_dev(cdc); 7672 struct alc_spec *spec = cdc->spec; 7673 struct scodec_dev_name *rec; 7674 int ret, i; 7675 7676 switch (action) { 7677 case HDA_FIXUP_ACT_PRE_PROBE: 7678 for (i = 0; i < count; i++) { 7679 rec = devm_kmalloc(dev, sizeof(*rec), GFP_KERNEL); 7680 if (!rec) 7681 return; 7682 rec->bus = bus; 7683 rec->hid = hid; 7684 rec->index = i; 7685 spec->comps[i].codec = cdc; 7686 component_match_add(dev, &spec->match, 7687 comp_match_cs35l41_dev_name, rec); 7688 } 7689 ret = component_master_add_with_match(dev, &comp_master_ops, spec->match); 7690 if (ret) 7691 codec_err(cdc, "Fail to register component aggregator %d\n", ret); 7692 else 7693 spec->gen.pcm_playback_hook = comp_generic_playback_hook; 7694 break; 7695 case HDA_FIXUP_ACT_FREE: 7696 component_master_del(dev, &comp_master_ops); 7697 break; 7698 } 7699 } 7700 7701 static void tas2781_generic_fixup(struct hda_codec *cdc, int action, 7702 const char *bus, const char *hid) 7703 { 7704 struct device *dev = hda_codec_dev(cdc); 7705 struct alc_spec *spec = cdc->spec; 7706 struct scodec_dev_name *rec; 7707 int ret; 7708 7709 switch (action) { 7710 case HDA_FIXUP_ACT_PRE_PROBE: 7711 rec = devm_kmalloc(dev, sizeof(*rec), GFP_KERNEL); 7712 if (!rec) 7713 return; 7714 rec->bus = bus; 7715 rec->hid = hid; 7716 rec->index = 0; 7717 spec->comps[0].codec = cdc; 7718 component_match_add(dev, &spec->match, 7719 comp_match_tas2781_dev_name, rec); 7720 ret = component_master_add_with_match(dev, &comp_master_ops, 7721 spec->match); 7722 if (ret) 7723 codec_err(cdc, 7724 "Fail to register component aggregator %d\n", 7725 ret); 7726 else 7727 spec->gen.pcm_playback_hook = 7728 comp_generic_playback_hook; 7729 break; 7730 case HDA_FIXUP_ACT_FREE: 7731 component_master_del(dev, &comp_master_ops); 7732 break; 7733 } 7734 } 7735 7736 static void cs35l41_fixup_i2c_two(struct hda_codec *cdc, const struct hda_fixup *fix, int action) 7737 { 7738 cs35l41_generic_fixup(cdc, action, "i2c", "CSC3551", 2); 7739 } 7740 7741 static void cs35l41_fixup_spi_two(struct hda_codec *codec, const struct hda_fixup *fix, int action) 7742 { 7743 cs35l41_generic_fixup(codec, action, "spi", "CSC3551", 2); 7744 } 7745 7746 static void cs35l41_fixup_spi_four(struct hda_codec *codec, const struct hda_fixup *fix, int action) 7747 { 7748 cs35l41_generic_fixup(codec, action, "spi", "CSC3551", 4); 7749 } 7750 7751 static void alc287_fixup_legion_16achg6_speakers(struct hda_codec *cdc, const struct hda_fixup *fix, 7752 int action) 7753 { 7754 cs35l41_generic_fixup(cdc, action, "i2c", "CLSA0100", 2); 7755 } 7756 7757 #ifndef TARGET_OS2 7758 static void alc287_fixup_legion_16ithg6_speakers(struct hda_codec *cdc, const struct hda_fixup *fix, 7759 int action) 7760 { 7761 cs35l41_generic_fixup(cdc, action, "i2c", "CLSA0101", 2); 7762 } 7763 #endif /* TARGET_OS2 */ 7764 7765 static void tas2781_fixup_i2c(struct hda_codec *cdc, 7766 const struct hda_fixup *fix, int action) 7767 { 7768 tas2781_generic_fixup(cdc, action, "i2c", "TIAS2781"); 7299 7769 } 7300 7770 … … 7365 7835 } 7366 7836 7837 static void alc_fixup_dell4_mic_no_presence_quiet(struct hda_codec *codec, 7838 const struct hda_fixup *fix, 7839 int action) 7840 { 7841 struct alc_spec *spec = codec->spec; 7842 struct hda_input_mux *imux = &spec->gen.input_mux; 7843 int i; 7844 7845 alc269_fixup_limit_int_mic_boost(codec, fix, action); 7846 7847 switch (action) { 7848 case HDA_FIXUP_ACT_PRE_PROBE: 7849 /** 7850 * Set the vref of pin 0x19 (Headset Mic) and pin 0x1b (Headphone Mic) 7851 * to Hi-Z to avoid pop noises at startup and when plugging and 7852 * unplugging headphones. 7853 */ 7854 snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ); 7855 snd_hda_codec_set_pin_target(codec, 0x1b, PIN_VREFHIZ); 7856 break; 7857 case HDA_FIXUP_ACT_PROBE: 7858 /** 7859 * Make the internal mic (0x12) the default input source to 7860 * prevent pop noises on cold boot. 7861 */ 7862 for (i = 0; i < imux->num_items; i++) { 7863 if (spec->gen.imux_pins[i] == 0x12) { 7864 spec->gen.cur_mux[0] = i; 7865 break; 7866 } 7867 } 7868 break; 7869 } 7870 } 7871 7872 static void alc287_fixup_yoga9_14iap7_bass_spk_pin(struct hda_codec *codec, 7873 const struct hda_fixup *fix, int action) 7874 { 7875 /* 7876 * The Pin Complex 0x17 for the bass speakers is wrongly reported as 7877 * unconnected. 7878 */ 7879 static const struct hda_pintbl pincfgs[] = { 7880 { 0x17, 0x90170121 }, 7881 {0} 7882 }; 7883 /* 7884 * Avoid DAC 0x06 and 0x08, as they have no volume controls. 7885 * DAC 0x02 and 0x03 would be fine. 7886 */ 7887 static const hda_nid_t conn[] = { 0x02, 0x03 }; 7888 /* 7889 * Prefer both speakerbar (0x14) and bass speakers (0x17) connected to DAC 0x02. 7890 * Headphones (0x21) are connected to DAC 0x03. 7891 */ 7892 static const hda_nid_t preferred_pairs[] = { 7893 0x14, 0x02, 7894 0x17, 0x02, 7895 0x21, 0x03, 7896 0 7897 }; 7898 struct alc_spec *spec = codec->spec; 7899 7900 switch (action) { 7901 case HDA_FIXUP_ACT_PRE_PROBE: 7902 snd_hda_apply_pincfgs(codec, pincfgs); 7903 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 7904 spec->gen.preferred_dacs = preferred_pairs; 7905 break; 7906 } 7907 } 7908 7909 static void alc295_fixup_dell_inspiron_top_speakers(struct hda_codec *codec, 7910 const struct hda_fixup *fix, int action) 7911 { 7912 static const struct hda_pintbl pincfgs[] = { 7913 { 0x14, 0x90170151 }, 7914 { 0x17, 0x90170150 }, 7915 {0} 7916 }; 7917 static const hda_nid_t conn[] = { 0x02, 0x03 }; 7918 static const hda_nid_t preferred_pairs[] = { 7919 0x14, 0x02, 7920 0x17, 0x03, 7921 0x21, 0x02, 7922 0 7923 }; 7924 struct alc_spec *spec = codec->spec; 7925 7926 alc_fixup_no_shutup(codec, fix, action); 7927 7928 switch (action) { 7929 case HDA_FIXUP_ACT_PRE_PROBE: 7930 snd_hda_apply_pincfgs(codec, pincfgs); 7931 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 7932 spec->gen.preferred_dacs = preferred_pairs; 7933 break; 7934 } 7935 } 7936 7937 /* Forcibly assign NID 0x03 to HP while NID 0x02 to SPK */ 7938 static void alc287_fixup_bind_dacs(struct hda_codec *codec, 7939 const struct hda_fixup *fix, int action) 7940 { 7941 struct alc_spec *spec = codec->spec; 7942 static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */ 7943 static const hda_nid_t preferred_pairs[] = { 7944 0x17, 0x02, 0x21, 0x03, 0 7945 }; 7946 7947 if (action != HDA_FIXUP_ACT_PRE_PROBE) 7948 return; 7949 7950 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 7951 spec->gen.preferred_dacs = preferred_pairs; 7952 spec->gen.auto_mute_via_amp = 1; 7953 if (spec->gen.autocfg.speaker_pins[0] != 0x14) { 7954 snd_hda_codec_write_cache(codec, 0x14, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 7955 0x0); /* Make sure 0x14 was disable */ 7956 } 7957 } 7958 /* Fix none verb table of Headset Mic pin */ 7959 static void alc_fixup_headset_mic(struct hda_codec *codec, 7960 const struct hda_fixup *fix, int action) 7961 { 7962 struct alc_spec *spec = codec->spec; 7963 static const struct hda_pintbl pincfgs[] = { 7964 { 0x19, 0x03a1103c }, 7965 {0} 7966 }; 7967 7968 switch (action) { 7969 case HDA_FIXUP_ACT_PRE_PROBE: 7970 snd_hda_apply_pincfgs(codec, pincfgs); 7971 alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12); 7972 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; 7973 break; 7974 } 7975 } 7976 7977 7367 7978 enum { 7368 7979 ALC269_FIXUP_GPIO2, … … 7372 7983 ALC269_FIXUP_SKU_IGNORE, 7373 7984 ALC269_FIXUP_ASUS_G73JW, 7985 ALC269_FIXUP_ASUS_N7601ZM_PINS, 7986 ALC269_FIXUP_ASUS_N7601ZM, 7374 7987 ALC269_FIXUP_LENOVO_EAPD, 7375 7988 ALC275_FIXUP_SONY_HWEQ, … … 7403 8016 ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT, 7404 8017 ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, 8018 ALC269_FIXUP_DELL1_LIMIT_INT_MIC_BOOST, 7405 8019 ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, 7406 8020 ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, 7407 8021 ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, 8022 ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET, 7408 8023 ALC269_FIXUP_HEADSET_MODE, 7409 8024 ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, … … 7419 8034 ALC269VB_FIXUP_ASUS_ZENBOOK, 7420 8035 ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A, 8036 ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE, 7421 8037 ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED, 7422 8038 ALC269VB_FIXUP_ORDISSIMO_EVE2, … … 7431 8047 ALC269_FIXUP_THINKPAD_ACPI, 7432 8048 ALC269_FIXUP_DMIC_THINKPAD_ACPI, 8049 ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13, 8050 ALC269VC_FIXUP_INFINIX_Y4_MAX, 8051 ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO, 7433 8052 ALC255_FIXUP_ACER_MIC_NO_PRESENCE, 7434 8053 ALC255_FIXUP_ASUS_MIC_NO_PRESENCE, 7435 8054 ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 8055 ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST, 7436 8056 ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, 7437 8057 ALC255_FIXUP_HEADSET_MODE, … … 7452 8072 ALC245_FIXUP_HP_X360_AMP, 7453 8073 ALC285_FIXUP_HP_SPECTRE_X360_EB1, 8074 ALC285_FIXUP_HP_ENVY_X360, 7454 8075 ALC288_FIXUP_DELL_HEADSET_MODE, 7455 8076 ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, … … 7466 8087 ALC293_FIXUP_LENOVO_SPK_NOISE, 7467 8088 ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY, 8089 ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED, 7468 8090 ALC255_FIXUP_DELL_SPK_NOISE, 7469 8091 ALC225_FIXUP_DISABLE_MIC_VREF, … … 7471 8093 ALC295_FIXUP_DISABLE_DAC3, 7472 8094 ALC285_FIXUP_SPEAKER2_TO_DAC1, 8095 ALC285_FIXUP_ASUS_SPEAKER2_TO_DAC1, 8096 ALC285_FIXUP_ASUS_HEADSET_MIC, 8097 ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS, 8098 ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1, 8099 ALC285_FIXUP_ASUS_I2C_HEADSET_MIC, 7473 8100 ALC280_FIXUP_HP_HEADSET_MIC, 7474 8101 ALC221_FIXUP_HP_FRONT_MIC, … … 7518 8145 ALC256_FIXUP_ASUS_HEADSET_MIC, 7519 8146 ALC256_FIXUP_ASUS_MIC_NO_PRESENCE, 8147 ALC255_FIXUP_PREDATOR_SUBWOOFER, 7520 8148 ALC299_FIXUP_PREDATOR_SPK, 7521 8149 ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, 8150 ALC289_FIXUP_DELL_SPK1, 7522 8151 ALC289_FIXUP_DELL_SPK2, 7523 8152 ALC289_FIXUP_DUAL_SPK, 8153 ALC289_FIXUP_RTK_AMP_DUAL_SPK, 7524 8154 ALC294_FIXUP_SPK2_TO_DAC1, 7525 8155 ALC294_FIXUP_ASUS_DUAL_SPK, 7526 8156 ALC285_FIXUP_THINKPAD_X1_GEN7, 7527 8157 ALC285_FIXUP_THINKPAD_HEADSET_JACK, 8158 ALC294_FIXUP_ASUS_ALLY, 8159 ALC294_FIXUP_ASUS_ALLY_PINS, 8160 ALC294_FIXUP_ASUS_ALLY_VERBS, 8161 ALC294_FIXUP_ASUS_ALLY_SPEAKER, 7528 8162 ALC294_FIXUP_ASUS_HPE, 7529 8163 ALC294_FIXUP_ASUS_COEF_1B, … … 7534 8168 ALC294_FIXUP_ASUS_GU502_PINS, 7535 8169 ALC294_FIXUP_ASUS_GU502_VERBS, 8170 ALC294_FIXUP_ASUS_G513_PINS, 8171 ALC285_FIXUP_ASUS_G533Z_PINS, 7536 8172 ALC285_FIXUP_HP_GPIO_LED, 7537 8173 ALC285_FIXUP_HP_MUTE_LED, 8174 ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED, 8175 ALC236_FIXUP_HP_MUTE_LED_COEFBIT2, 7538 8176 ALC236_FIXUP_HP_GPIO_LED, 7539 8177 ALC236_FIXUP_HP_MUTE_LED, 7540 8178 ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF, 8179 ALC236_FIXUP_LENOVO_INV_DMIC, 8180 ALC298_FIXUP_SAMSUNG_AMP, 7541 8181 ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, 7542 8182 ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, … … 7584 8224 ALC287_FIXUP_YOGA7_14ITL_SPEAKERS, 7585 8225 ALC298_FIXUP_LENOVO_C940_DUET7, 8226 ALC287_FIXUP_LENOVO_14IRP8_DUETITL, 7586 8227 ALC287_FIXUP_13S_GEN2_SPEAKERS, 7587 8228 ALC256_FIXUP_SET_COEF_DEFAULTS, … … 7591 8232 ALC285_FIXUP_LEGION_Y9000X_SPEAKERS, 7592 8233 ALC285_FIXUP_LEGION_Y9000X_AUTOMUTE, 8234 ALC287_FIXUP_LEGION_16ACHG6, 8235 ALC287_FIXUP_CS35L41_I2C_2, 8236 ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED, 8237 ALC245_FIXUP_CS35L41_SPI_2, 8238 ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED, 8239 ALC245_FIXUP_CS35L41_SPI_4, 8240 ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED, 8241 ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED, 8242 ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE, 8243 ALC287_FIXUP_LEGION_16ITHG6, 8244 ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK, 8245 ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, 8246 ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN, 8247 ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS, 8248 ALC236_FIXUP_DELL_DUAL_CODECS, 8249 ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI, 8250 ALC287_FIXUP_TAS2781_I2C, 8251 ALC245_FIXUP_HP_MUTE_LED_COEFBIT, 8252 ALC245_FIXUP_HP_X360_MUTE_LEDS, 8253 ALC287_FIXUP_THINKPAD_I2S_SPK, 8254 ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD, 8255 ALC2XX_FIXUP_HEADSET_MIC, 8256 ALC289_FIXUP_DELL_CS35L41_SPI_2, 8257 ALC294_FIXUP_CS35L41_I2C_2, 7593 8258 }; 7594 8259 … … 7780 8445 #endif 7781 8446 8447 #ifndef TARGET_OS2 8448 /* A special fixup for Lenovo Slim/Yoga Pro 9 14IRP8 and Yoga DuetITL 2021; 8449 * 14IRP8 PCI SSID will mistakenly be matched with the DuetITL codec SSID, 8450 * so we need to apply a different fixup in this case. The only DuetITL codec 8451 * SSID reported so far is the 17aa:3802 while the 14IRP8 has the 17aa:38be 8452 * and 17aa:38bf. If it weren't for the PCI SSID, the 14IRP8 models would 8453 * have matched correctly by their codecs. 8454 */ 8455 static void alc287_fixup_lenovo_14irp8_duetitl(struct hda_codec *codec, 8456 const struct hda_fixup *fix, 8457 int action) 8458 { 8459 int id; 8460 8461 if (codec->core.subsystem_id == 0x17aa3802) 8462 id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* DuetITL */ 8463 else 8464 id = ALC287_FIXUP_TAS2781_I2C; /* 14IRP8 */ 8465 __snd_hda_apply_fixup(codec, id, action, 0); 8466 } 8467 #endif /* TARGET_OS2 */ 8468 7782 8469 static const struct hda_fixup alc269_fixups[] = { 7783 8470 [ALC269_FIXUP_GPIO2] = { … … 7830 8517 #endif 7831 8518 }, 8519 #ifdef NOT_USED 8520 [ALC269_FIXUP_ASUS_N7601ZM_PINS] = { 8521 .type = HDA_FIXUP_PINS, 8522 .v.pins = (const struct hda_pintbl[]) { 8523 { 0x19, 0x03A11050 }, 8524 { 0x1a, 0x03A11C30 }, 8525 { 0x21, 0x03211420 }, 8526 { } 8527 } 8528 }, 8529 [ALC269_FIXUP_ASUS_N7601ZM] = { 8530 .type = HDA_FIXUP_VERBS, 8531 .v.verbs = (const struct hda_verb[]) { 8532 {0x20, AC_VERB_SET_COEF_INDEX, 0x62}, 8533 {0x20, AC_VERB_SET_PROC_COEF, 0xa007}, 8534 {0x20, AC_VERB_SET_COEF_INDEX, 0x10}, 8535 {0x20, AC_VERB_SET_PROC_COEF, 0x8420}, 8536 {0x20, AC_VERB_SET_COEF_INDEX, 0x0f}, 8537 {0x20, AC_VERB_SET_PROC_COEF, 0x7774}, 8538 { } 8539 }, 8540 .chained = true, 8541 .chain_id = ALC269_FIXUP_ASUS_N7601ZM_PINS, 8542 }, 8543 #endif 7832 8544 [ALC269_FIXUP_LENOVO_EAPD] = { 7833 8545 .type = HDA_FIXUP_VERBS, … … 7919 8631 .v.func = alc269_fixup_pincfg_U7x7_headset_mic, 7920 8632 }, 8633 #ifdef NOT_USED 8634 [ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13] = { 8635 .type = HDA_FIXUP_PINS, 8636 .v.pins = (const struct hda_pintbl[]) { 8637 { 0x14, 0x90170151 }, /* use as internal speaker (LFE) */ 8638 { 0x1b, 0x90170152 }, /* use as internal speaker (back) */ 8639 { } 8640 }, 8641 .chained = true, 8642 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST 8643 }, 8644 [ALC269VC_FIXUP_INFINIX_Y4_MAX] = { 8645 .type = HDA_FIXUP_PINS, 8646 .v.pins = (const struct hda_pintbl[]) { 8647 { 0x1b, 0x90170150 }, /* use as internal speaker */ 8648 { } 8649 }, 8650 .chained = true, 8651 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST 8652 }, 8653 [ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO] = { 8654 .type = HDA_FIXUP_PINS, 8655 .v.pins = (const struct hda_pintbl[]) { 8656 { 0x18, 0x03a19020 }, /* headset mic */ 8657 { 0x1b, 0x90170150 }, /* speaker */ 8658 { } 8659 }, 8660 }, 8661 #endif 7921 8662 [ALC269_FIXUP_AMIC] = { 7922 8663 .type = HDA_FIXUP_PINS, … … 8053 8794 .chain_id = ALC269_FIXUP_HEADSET_MODE 8054 8795 }, 8796 [ALC269_FIXUP_DELL1_LIMIT_INT_MIC_BOOST] = { 8797 .type = HDA_FIXUP_FUNC, 8798 .v.func = alc269_fixup_limit_int_mic_boost, 8799 .chained = true, 8800 .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE 8801 }, 8055 8802 [ALC269_FIXUP_DELL2_MIC_NO_PRESENCE] = { 8056 8803 .type = HDA_FIXUP_PINS, … … 8081 8828 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 8082 8829 }, 8083 #ifdef TARGET_OS2xxx8830 #ifdef NOT_USED 8084 8831 [ALC269_FIXUP_DELL4_MIC_NO_PRESENCE] = { 8085 8832 .type = HDA_FIXUP_PINS, … … 8103 8850 .v.func = alc_fixup_headset_mode_no_hp_mic, 8104 8851 }, 8105 #ifdef TARGET_OS2xxx8852 #ifdef NOT_USED 8106 8853 [ALC269_FIXUP_ASPIRE_HEADSET_MIC] = { 8107 8854 .type = HDA_FIXUP_PINS, … … 8250 8997 .chain_id = ALC269VB_FIXUP_ASUS_ZENBOOK, 8251 8998 }, 8999 #ifdef NOT_USED 9000 [ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE] = { 9001 .type = HDA_FIXUP_PINS, 9002 .v.pins = (const struct hda_pintbl[]) { 9003 { 0x18, 0x01a110f0 }, /* use as headset mic */ 9004 { } 9005 }, 9006 .chained = true, 9007 .chain_id = ALC269_FIXUP_HEADSET_MIC 9008 }, 9009 #endif 8252 9010 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = { 8253 9011 .type = HDA_FIXUP_FUNC, … … 8345 9103 .chain_id = ALC269_FIXUP_THINKPAD_ACPI, 8346 9104 }, 8347 #ifdef TARGET_OS2xxx9105 #ifdef NOT_USED 8348 9106 [ALC255_FIXUP_ACER_MIC_NO_PRESENCE] = { 8349 9107 .type = HDA_FIXUP_PINS, … … 8379 9137 .chain_id = ALC255_FIXUP_HEADSET_MODE 8380 9138 }, 9139 [ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST] = { 9140 .type = HDA_FIXUP_FUNC, 9141 .v.func = alc269_fixup_limit_int_mic_boost, 9142 .chained = true, 9143 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE 9144 }, 8381 9145 [ALC255_FIXUP_DELL2_MIC_NO_PRESENCE] = { 8382 9146 .type = HDA_FIXUP_PINS, … … 8402 9166 .v.func = alc_fixup_headset_mode_alc255_no_hp_mic, 8403 9167 }, 8404 #ifdef TARGET_OS2xxx9168 #ifdef NOT_USED 8405 9169 [ALC293_FIXUP_DELL1_MIC_NO_PRESENCE] = { 8406 9170 .type = HDA_FIXUP_PINS, … … 8426 9190 .chain_id = ALC292_FIXUP_TPT440_DOCK, 8427 9191 }, 8428 #ifdef TARGET_OS2xxx9192 #ifdef NOT_USED 8429 9193 [ALC283_FIXUP_HEADSET_MIC] = { 8430 9194 .type = HDA_FIXUP_PINS, … … 8439 9203 .v.func = alc_fixup_micmute_led, 8440 9204 }, 8441 #ifdef TARGET_OS2xxx9205 #ifdef NOT_USED 8442 9206 [ALC282_FIXUP_ASPIRE_V5_PINS] = { 8443 9207 .type = HDA_FIXUP_PINS, … … 8473 9237 .v.func = alc280_fixup_hp_gpio2_mic_hotkey, 8474 9238 }, 8475 #ifdef TARGET_OS2xxx9239 #ifdef NOT_USED 8476 9240 [ALC280_FIXUP_HP_DOCK_PINS] = { 8477 9241 .type = HDA_FIXUP_PINS, … … 8512 9276 .chain_id = ALC255_FIXUP_MIC_MUTE_LED 8513 9277 }, 8514 #ifdef TARGET_OS2xxx9278 #ifdef NOT_USED 8515 9279 [ALC288_FIXUP_DELL1_MIC_NO_PRESENCE] = { 8516 9280 .type = HDA_FIXUP_PINS, … … 8561 9325 .chain_id = ALC292_FIXUP_DELL_E7X_AAMIX, 8562 9326 }, 8563 #ifdef TARGET_OS2xxx9327 #ifdef NOT_USED 8564 9328 [ALC298_FIXUP_ALIENWARE_MIC_NO_PRESENCE] = { 8565 9329 .type = HDA_FIXUP_PINS, … … 8612 9376 .v.func = alc233_fixup_lenovo_line2_mic_hotkey, 8613 9377 }, 9378 [ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED] = { 9379 .type = HDA_FIXUP_FUNC, 9380 .v.func = alc233_fixup_lenovo_low_en_micmute_led, 9381 }, 8614 9382 [ALC233_FIXUP_INTEL_NUC8_DMIC] = { 8615 9383 .type = HDA_FIXUP_FUNC, … … 8634 9402 .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE 8635 9403 }, 8636 #ifdef TARGET_OS2xxx9404 #ifdef NOT_USED 8637 9405 [ALC225_FIXUP_DELL1_MIC_NO_PRESENCE] = { 8638 9406 .type = HDA_FIXUP_VERBS, … … 8653 9421 .chain_id = ALC269_FIXUP_HEADSET_MIC, 8654 9422 }, 8655 #ifdef TARGET_OS2xxx9423 #ifdef NOT_USED 8656 9424 [ALC221_FIXUP_HP_FRONT_MIC] = { 8657 9425 .type = HDA_FIXUP_PINS, … … 8688 9456 .chain_id = ALC269_FIXUP_THINKPAD_ACPI 8689 9457 }, 8690 #ifdef TARGET_OS2xxx 9458 [ALC285_FIXUP_ASUS_SPEAKER2_TO_DAC1] = { 9459 .type = HDA_FIXUP_FUNC, 9460 .v.func = alc285_fixup_speaker2_to_dac1, 9461 .chained = true, 9462 .chain_id = ALC245_FIXUP_CS35L41_SPI_2 9463 }, 9464 #ifdef NOT_USED 9465 [ALC285_FIXUP_ASUS_HEADSET_MIC] = { 9466 .type = HDA_FIXUP_PINS, 9467 .v.pins = (const struct hda_pintbl[]) { 9468 { 0x19, 0x03a11050 }, 9469 { 0x1b, 0x03a11c30 }, 9470 { } 9471 }, 9472 .chained = true, 9473 .chain_id = ALC285_FIXUP_ASUS_SPEAKER2_TO_DAC1 9474 }, 9475 [ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS] = { 9476 .type = HDA_FIXUP_PINS, 9477 .v.pins = (const struct hda_pintbl[]) { 9478 { 0x14, 0x90170120 }, 9479 { } 9480 }, 9481 .chained = true, 9482 .chain_id = ALC285_FIXUP_ASUS_HEADSET_MIC 9483 }, 9484 #endif 9485 [ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1] = { 9486 .type = HDA_FIXUP_FUNC, 9487 .v.func = alc285_fixup_speaker2_to_dac1, 9488 .chained = true, 9489 .chain_id = ALC287_FIXUP_CS35L41_I2C_2 9490 }, 9491 #ifdef NOT_USED 9492 [ALC285_FIXUP_ASUS_I2C_HEADSET_MIC] = { 9493 .type = HDA_FIXUP_PINS, 9494 .v.pins = (const struct hda_pintbl[]) { 9495 { 0x19, 0x03a11050 }, 9496 { 0x1b, 0x03a11c30 }, 9497 { } 9498 }, 9499 .chained = true, 9500 .chain_id = ALC285_FIXUP_ASUS_I2C_SPEAKER2_TO_DAC1 9501 }, 8691 9502 [ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER] = { 8692 9503 .type = HDA_FIXUP_PINS, … … 8705 9516 .chain_id = ALC269_FIXUP_NO_SHUTUP 8706 9517 }, 8707 #ifdef TARGET_OS2xxx9518 #ifdef NOT_USED 8708 9519 [ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE] = { 8709 9520 .type = HDA_FIXUP_PINS, … … 8731 9542 .v.func = alc_fixup_headset_mode, 8732 9543 }, 8733 #ifdef TARGET_OS2xxx9544 #ifdef NOT_USED 8734 9545 [ALC256_FIXUP_ASUS_MIC] = { 8735 9546 .type = HDA_FIXUP_PINS, … … 8748 9559 .v.func = alc_fixup_gpio4, 8749 9560 }, 8750 #ifdef TARGET_OS2xxx9561 #ifdef NOT_USED 8751 9562 [ALC233_FIXUP_ASUS_MIC_NO_PRESENCE] = { 8752 9563 .type = HDA_FIXUP_PINS, … … 8776 9587 .chain_id = ALC269_FIXUP_GPIO2 8777 9588 }, 8778 #ifdef TARGET_OS2xxx9589 #ifdef NOT_USED 8779 9590 [ALC233_FIXUP_ACER_HEADSET_MIC] = { 8780 9591 .type = HDA_FIXUP_VERBS, … … 8818 9629 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 8819 9630 }, 8820 #ifdef TARGET_OS2xxx9631 #ifdef NOT_USED 8821 9632 [ALC700_FIXUP_INTEL_REFERENCE] = { 8822 9633 .type = HDA_FIXUP_VERBS, … … 8841 9652 .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE 8842 9653 }, 8843 #ifdef TARGET_OS2xxx9654 #ifdef NOT_USED 8844 9655 [ALC274_FIXUP_DELL_AIO_LINEOUT_VERB] = { 8845 9656 .type = HDA_FIXUP_PINS, … … 8864 9675 .chain_id = ALC298_FIXUP_TPT470_DOCK_FIX 8865 9676 }, 8866 #ifdef TARGET_OS2xxx9677 #ifdef NOT_USED 8867 9678 [ALC255_FIXUP_DUMMY_LINEOUT_VERB] = { 8868 9679 .type = HDA_FIXUP_PINS, … … 8890 9701 .chain_id = ALC269_FIXUP_HP_MUTE_LED_MIC3 8891 9702 }, 8892 #ifdef TARGET_OS2xxx9703 #ifdef NOT_USED 8893 9704 [ALC221_FIXUP_HP_HEADSET_MIC] = { 8894 9705 .type = HDA_FIXUP_PINS, … … 8911 9722 .v.func = alc_fixup_auto_mute_via_amp, 8912 9723 }, 8913 #ifdef TARGET_OS2xxx9724 #ifdef NOT_USED 8914 9725 [ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE] = { 8915 9726 .type = HDA_FIXUP_PINS, … … 8964 9775 .v.func = alc_fixup_headset_jack, 8965 9776 }, 8966 #ifdef TARGET_OS2xxx9777 #ifdef NOT_USED 8967 9778 [ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = { 8968 9779 .type = HDA_FIXUP_PINS, … … 9018 9829 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 9019 9830 }, 9020 #ifdef TARGET_OS2xxx9831 #ifdef NOT_USED 9021 9832 [ALC286_FIXUP_ACER_AIO_HEADSET_MIC] = { 9022 9833 .type = HDA_FIXUP_VERBS, … … 9047 9858 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE 9048 9859 }, 9860 [ALC255_FIXUP_PREDATOR_SUBWOOFER] = { 9861 .type = HDA_FIXUP_PINS, 9862 .v.pins = (const struct hda_pintbl[]) { 9863 { 0x17, 0x90170151 }, /* use as internal speaker (LFE) */ 9864 { 0x1b, 0x90170152 } /* use as internal speaker (back) */ 9865 } 9866 }, 9049 9867 [ALC299_FIXUP_PREDATOR_SPK] = { 9050 9868 .type = HDA_FIXUP_PINS, … … 9064 9882 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE 9065 9883 }, 9884 [ALC289_FIXUP_DELL_SPK1] = { 9885 .type = HDA_FIXUP_PINS, 9886 .v.pins = (const struct hda_pintbl[]) { 9887 { 0x14, 0x90170140 }, 9888 { } 9889 }, 9890 .chained = true, 9891 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE 9892 }, 9066 9893 [ALC289_FIXUP_DELL_SPK2] = { 9067 9894 .type = HDA_FIXUP_PINS, … … 9079 9906 .chained = true, 9080 9907 .chain_id = ALC289_FIXUP_DELL_SPK2 9908 }, 9909 [ALC289_FIXUP_RTK_AMP_DUAL_SPK] = { 9910 .type = HDA_FIXUP_FUNC, 9911 .v.func = alc285_fixup_speaker2_to_dac1, 9912 .chained = true, 9913 .chain_id = ALC289_FIXUP_DELL_SPK1 9081 9914 }, 9082 9915 [ALC294_FIXUP_SPK2_TO_DAC1] = { … … 9093 9926 .chain_id = ALC294_FIXUP_SPK2_TO_DAC1 9094 9927 }, 9928 [ALC294_FIXUP_ASUS_ALLY] = { 9929 .type = HDA_FIXUP_FUNC, 9930 .v.func = cs35l41_fixup_i2c_two, 9931 .chained = true, 9932 .chain_id = ALC294_FIXUP_ASUS_ALLY_PINS 9933 }, 9934 #ifdef NOT_USED 9935 [ALC294_FIXUP_ASUS_ALLY_PINS] = { 9936 .type = HDA_FIXUP_PINS, 9937 .v.pins = (const struct hda_pintbl[]) { 9938 { 0x19, 0x03a11050 }, 9939 { 0x1a, 0x03a11c30 }, 9940 { 0x21, 0x03211420 }, 9941 { } 9942 }, 9943 .chained = true, 9944 .chain_id = ALC294_FIXUP_ASUS_ALLY_VERBS 9945 }, 9946 [ALC294_FIXUP_ASUS_ALLY_VERBS] = { 9947 .type = HDA_FIXUP_VERBS, 9948 .v.verbs = (const struct hda_verb[]) { 9949 { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 }, 9950 { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 }, 9951 { 0x20, AC_VERB_SET_COEF_INDEX, 0x46 }, 9952 { 0x20, AC_VERB_SET_PROC_COEF, 0x0004 }, 9953 { 0x20, AC_VERB_SET_COEF_INDEX, 0x47 }, 9954 { 0x20, AC_VERB_SET_PROC_COEF, 0xa47a }, 9955 { 0x20, AC_VERB_SET_COEF_INDEX, 0x49 }, 9956 { 0x20, AC_VERB_SET_PROC_COEF, 0x0049}, 9957 { 0x20, AC_VERB_SET_COEF_INDEX, 0x4a }, 9958 { 0x20, AC_VERB_SET_PROC_COEF, 0x201b }, 9959 { 0x20, AC_VERB_SET_COEF_INDEX, 0x6b }, 9960 { 0x20, AC_VERB_SET_PROC_COEF, 0x4278}, 9961 { } 9962 }, 9963 .chained = true, 9964 .chain_id = ALC294_FIXUP_ASUS_ALLY_SPEAKER 9965 }, 9966 #endif 9967 [ALC294_FIXUP_ASUS_ALLY_SPEAKER] = { 9968 .type = HDA_FIXUP_FUNC, 9969 .v.func = alc285_fixup_speaker2_to_dac1, 9970 }, 9095 9971 [ALC285_FIXUP_THINKPAD_X1_GEN7] = { 9096 9972 .type = HDA_FIXUP_FUNC, … … 9105 9981 .chain_id = ALC285_FIXUP_THINKPAD_X1_GEN7 9106 9982 }, 9107 #ifdef TARGET_OS2xxx9983 #ifdef NOT_USED 9108 9984 [ALC294_FIXUP_ASUS_HPE] = { 9109 9985 .type = HDA_FIXUP_VERBS, … … 9173 10049 .v.func = alc294_fixup_gu502_hp, 9174 10050 }, 10051 [ALC294_FIXUP_ASUS_G513_PINS] = { 10052 .type = HDA_FIXUP_PINS, 10053 .v.pins = (const struct hda_pintbl[]) { 10054 { 0x19, 0x03a11050 }, /* front HP mic */ 10055 { 0x1a, 0x03a11c30 }, /* rear external mic */ 10056 { 0x21, 0x03211420 }, /* front HP out */ 10057 { } 10058 }, 10059 }, 10060 [ALC285_FIXUP_ASUS_G533Z_PINS] = { 10061 .type = HDA_FIXUP_PINS, 10062 .v.pins = (const struct hda_pintbl[]) { 10063 { 0x14, 0x90170152 }, /* Speaker Surround Playback Switch */ 10064 { 0x19, 0x03a19020 }, /* Mic Boost Volume */ 10065 { 0x1a, 0x03a11c30 }, /* Mic Boost Volume */ 10066 { 0x1e, 0x90170151 }, /* Rear jack, IN OUT EAPD Detect */ 10067 { 0x21, 0x03211420 }, 10068 { } 10069 }, 10070 }, 9175 10071 [ALC294_FIXUP_ASUS_COEF_1B] = { 9176 10072 .type = HDA_FIXUP_VERBS, … … 9195 10091 .v.func = alc285_fixup_hp_mute_led, 9196 10092 }, 10093 [ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED] = { 10094 .type = HDA_FIXUP_FUNC, 10095 .v.func = alc285_fixup_hp_spectre_x360_mute_led, 10096 }, 10097 [ALC236_FIXUP_HP_MUTE_LED_COEFBIT2] = { 10098 .type = HDA_FIXUP_FUNC, 10099 .v.func = alc236_fixup_hp_mute_led_coefbit2, 10100 }, 9197 10101 [ALC236_FIXUP_HP_GPIO_LED] = { 9198 10102 .type = HDA_FIXUP_FUNC, … … 9207 10111 .v.func = alc236_fixup_hp_mute_led_micmute_vref, 9208 10112 }, 9209 #ifdef TARGET_OS2xxx 10113 [ALC236_FIXUP_LENOVO_INV_DMIC] = { 10114 .type = HDA_FIXUP_FUNC, 10115 .v.func = alc_fixup_inv_dmic, 10116 .chained = true, 10117 .chain_id = ALC283_FIXUP_INT_MIC, 10118 }, 10119 [ALC298_FIXUP_SAMSUNG_AMP] = { 10120 .type = HDA_FIXUP_FUNC, 10121 .v.func = alc298_fixup_samsung_amp, 10122 .chained = true, 10123 .chain_id = ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET 10124 }, 10125 #ifdef NOT_USED 9210 10126 [ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = { 9211 10127 .type = HDA_FIXUP_VERBS, … … 9476 10392 .v.func = alc295_fixup_asus_dacs, 9477 10393 }, 9478 #ifdef TARGET_OS2xxx10394 #ifdef NOT_USED 9479 10395 [ALC295_FIXUP_HP_OMEN] = { 9480 10396 .type = HDA_FIXUP_PINS, … … 9506 10422 .v.func = alc285_fixup_hp_spectre_x360_eb1 9507 10423 }, 10424 [ALC285_FIXUP_HP_ENVY_X360] = { 10425 .type = HDA_FIXUP_FUNC, 10426 .v.func = alc285_fixup_hp_envy_x360, 10427 .chained = true, 10428 .chain_id = ALC285_FIXUP_HP_GPIO_AMP_INIT, 10429 }, 9508 10430 [ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP] = { 9509 10431 .type = HDA_FIXUP_FUNC, … … 9518 10440 .chain_id = ALC283_FIXUP_HEADSET_MIC, 9519 10441 }, 9520 #ifdef TARGET_OS2xxx10442 #ifdef NOT_USED 9521 10443 [ALC255_FIXUP_ACER_HEADPHONE_AND_MIC] = { 9522 10444 .type = HDA_FIXUP_PINS, … … 9547 10469 .chain_id = ALC269_FIXUP_THINKPAD_ACPI, 9548 10470 }, 9549 #ifdef TARGET_OS2xxx10471 #ifdef NOT_USED 9550 10472 [ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS] = { 9551 10473 .type = HDA_FIXUP_VERBS, … … 9595 10517 .chain_id = ALC269_FIXUP_HEADSET_MODE, 9596 10518 }, 9597 #ifdef TARGET_OS2xxx10519 #ifdef NOT_USED 9598 10520 [ALC287_FIXUP_YOGA7_14ITL_SPEAKERS] = { 9599 10521 .type = HDA_FIXUP_VERBS, … … 9638 10560 .type = HDA_FIXUP_FUNC, 9639 10561 .v.func = alc298_fixup_lenovo_c940_duet7, 10562 }, 10563 [ALC287_FIXUP_LENOVO_14IRP8_DUETITL] = { 10564 .type = HDA_FIXUP_FUNC, 10565 .v.func = alc287_fixup_lenovo_14irp8_duetitl, 9640 10566 }, 9641 10567 [ALC287_FIXUP_13S_GEN2_SPEAKERS] = { … … 9666 10592 .v.func = alc256_fixup_set_coef_defaults, 9667 10593 }, 9668 #ifdef TARGET_OS2xxx10594 #ifdef NOT_USED 9669 10595 [ALC245_FIXUP_HP_GPIO_LED] = { 9670 10596 .type = HDA_FIXUP_FUNC, … … 9691 10617 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 9692 10618 }, 10619 [ALC287_FIXUP_LEGION_16ACHG6] = { 10620 .type = HDA_FIXUP_FUNC, 10621 .v.func = alc287_fixup_legion_16achg6_speakers, 10622 }, 10623 [ALC287_FIXUP_CS35L41_I2C_2] = { 10624 .type = HDA_FIXUP_FUNC, 10625 .v.func = cs35l41_fixup_i2c_two, 10626 }, 10627 [ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED] = { 10628 .type = HDA_FIXUP_FUNC, 10629 .v.func = cs35l41_fixup_i2c_two, 10630 .chained = true, 10631 .chain_id = ALC285_FIXUP_HP_MUTE_LED, 10632 }, 10633 [ALC245_FIXUP_CS35L41_SPI_2] = { 10634 .type = HDA_FIXUP_FUNC, 10635 .v.func = cs35l41_fixup_spi_two, 10636 }, 10637 [ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED] = { 10638 .type = HDA_FIXUP_FUNC, 10639 .v.func = cs35l41_fixup_spi_two, 10640 .chained = true, 10641 .chain_id = ALC285_FIXUP_HP_GPIO_LED, 10642 }, 10643 [ALC245_FIXUP_CS35L41_SPI_4] = { 10644 .type = HDA_FIXUP_FUNC, 10645 .v.func = cs35l41_fixup_spi_four, 10646 }, 10647 [ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED] = { 10648 .type = HDA_FIXUP_FUNC, 10649 .v.func = cs35l41_fixup_spi_four, 10650 .chained = true, 10651 .chain_id = ALC285_FIXUP_HP_GPIO_LED, 10652 }, 10653 #ifdef NOT_USED 10654 [ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED] = { 10655 .type = HDA_FIXUP_VERBS, 10656 .v.verbs = (const struct hda_verb[]) { 10657 { 0x20, AC_VERB_SET_COEF_INDEX, 0x19 }, 10658 { 0x20, AC_VERB_SET_PROC_COEF, 0x8e11 }, 10659 { } 10660 }, 10661 .chained = true, 10662 .chain_id = ALC285_FIXUP_HP_MUTE_LED, 10663 }, 10664 #endif 10665 [ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET] = { 10666 .type = HDA_FIXUP_FUNC, 10667 .v.func = alc_fixup_dell4_mic_no_presence_quiet, 10668 .chained = true, 10669 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, 10670 }, 10671 #ifdef NOT_USED 10672 [ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE] = { 10673 .type = HDA_FIXUP_PINS, 10674 .v.pins = (const struct hda_pintbl[]) { 10675 { 0x19, 0x02a1112c }, /* use as headset mic, without its own jack detect */ 10676 { } 10677 }, 10678 .chained = true, 10679 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 10680 }, 10681 [ALC287_FIXUP_LEGION_16ITHG6] = { 10682 .type = HDA_FIXUP_FUNC, 10683 .v.func = alc287_fixup_legion_16ithg6_speakers, 10684 }, 10685 [ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK] = { 10686 .type = HDA_FIXUP_VERBS, 10687 .v.verbs = (const struct hda_verb[]) { 10688 // enable left speaker 10689 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, 10690 { 0x20, AC_VERB_SET_PROC_COEF, 0x41 }, 10691 10692 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10693 { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, 10694 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10695 { 0x20, AC_VERB_SET_PROC_COEF, 0x1a }, 10696 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10697 10698 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10699 { 0x20, AC_VERB_SET_PROC_COEF, 0xf }, 10700 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10701 { 0x20, AC_VERB_SET_PROC_COEF, 0x42 }, 10702 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10703 10704 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10705 { 0x20, AC_VERB_SET_PROC_COEF, 0x10 }, 10706 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10707 { 0x20, AC_VERB_SET_PROC_COEF, 0x40 }, 10708 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10709 10710 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10711 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, 10712 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10713 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10714 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10715 10716 // enable right speaker 10717 { 0x20, AC_VERB_SET_COEF_INDEX, 0x24 }, 10718 { 0x20, AC_VERB_SET_PROC_COEF, 0x46 }, 10719 10720 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10721 { 0x20, AC_VERB_SET_PROC_COEF, 0xc }, 10722 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10723 { 0x20, AC_VERB_SET_PROC_COEF, 0x2a }, 10724 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10725 10726 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10727 { 0x20, AC_VERB_SET_PROC_COEF, 0xf }, 10728 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10729 { 0x20, AC_VERB_SET_PROC_COEF, 0x46 }, 10730 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10731 10732 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10733 { 0x20, AC_VERB_SET_PROC_COEF, 0x10 }, 10734 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10735 { 0x20, AC_VERB_SET_PROC_COEF, 0x44 }, 10736 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10737 10738 { 0x20, AC_VERB_SET_COEF_INDEX, 0x26 }, 10739 { 0x20, AC_VERB_SET_PROC_COEF, 0x2 }, 10740 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10741 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10742 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10743 10744 { }, 10745 }, 10746 }, 10747 #endif 10748 [ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN] = { 10749 .type = HDA_FIXUP_FUNC, 10750 .v.func = alc287_fixup_yoga9_14iap7_bass_spk_pin, 10751 .chained = true, 10752 .chain_id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK, 10753 }, 10754 [ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN] = { 10755 .type = HDA_FIXUP_FUNC, 10756 .v.func = alc287_fixup_yoga9_14iap7_bass_spk_pin, 10757 .chained = true, 10758 .chain_id = ALC287_FIXUP_CS35L41_I2C_2, 10759 }, 10760 [ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS] = { 10761 .type = HDA_FIXUP_FUNC, 10762 .v.func = alc295_fixup_dell_inspiron_top_speakers, 10763 .chained = true, 10764 .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, 10765 }, 10766 [ALC236_FIXUP_DELL_DUAL_CODECS] = { 10767 .type = HDA_FIXUP_PINS, 10768 .v.func = alc1220_fixup_gb_dual_codecs, 10769 .chained = true, 10770 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 10771 }, 10772 [ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI] = { 10773 .type = HDA_FIXUP_FUNC, 10774 .v.func = cs35l41_fixup_i2c_two, 10775 .chained = true, 10776 .chain_id = ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK, 10777 }, 10778 [ALC287_FIXUP_TAS2781_I2C] = { 10779 .type = HDA_FIXUP_FUNC, 10780 .v.func = tas2781_fixup_i2c, 10781 .chained = true, 10782 .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK, 10783 }, 10784 [ALC245_FIXUP_HP_MUTE_LED_COEFBIT] = { 10785 .type = HDA_FIXUP_FUNC, 10786 .v.func = alc245_fixup_hp_mute_led_coefbit, 10787 }, 10788 [ALC245_FIXUP_HP_X360_MUTE_LEDS] = { 10789 .type = HDA_FIXUP_FUNC, 10790 .v.func = alc245_fixup_hp_mute_led_coefbit, 10791 .chained = true, 10792 .chain_id = ALC245_FIXUP_HP_GPIO_LED 10793 }, 10794 [ALC287_FIXUP_THINKPAD_I2S_SPK] = { 10795 .type = HDA_FIXUP_FUNC, 10796 .v.func = alc287_fixup_bind_dacs, 10797 .chained = true, 10798 .chain_id = ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK, 10799 }, 10800 [ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD] = { 10801 .type = HDA_FIXUP_FUNC, 10802 .v.func = alc287_fixup_bind_dacs, 10803 .chained = true, 10804 .chain_id = ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI, 10805 }, 10806 [ALC2XX_FIXUP_HEADSET_MIC] = { 10807 .type = HDA_FIXUP_FUNC, 10808 .v.func = alc_fixup_headset_mic, 10809 }, 10810 [ALC289_FIXUP_DELL_CS35L41_SPI_2] = { 10811 .type = HDA_FIXUP_FUNC, 10812 .v.func = cs35l41_fixup_spi_two, 10813 .chained = true, 10814 .chain_id = ALC289_FIXUP_DUAL_SPK 10815 }, 10816 [ALC294_FIXUP_CS35L41_I2C_2] = { 10817 .type = HDA_FIXUP_FUNC, 10818 .v.func = cs35l41_fixup_i2c_two, 10819 }, 9693 10820 }; 9694 10821 9695 static const struct snd_pci_quirk alc269_fixup_tbl[] = {10822 static const struct hda_quirk alc269_fixup_tbl[] = { 9696 10823 SND_PCI_QUIRK(0x1025, 0x0283, "Acer TravelMate 8371", ALC269_FIXUP_INV_DMIC), 9697 10824 SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC), … … 9706 10833 SND_PCI_QUIRK(0x1025, 0x080d, "Acer Aspire V5-122P", ALC269_FIXUP_ASPIRE_HEADSET_MIC), 9707 10834 SND_PCI_QUIRK(0x1025, 0x0840, "Acer Aspire E1", ALC269VB_FIXUP_ASPIRE_E1_COEF), 10835 SND_PCI_QUIRK(0x1025, 0x100c, "Acer Aspire E5-574G", ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST), 9708 10836 SND_PCI_QUIRK(0x1025, 0x101c, "Acer Veriton N2510G", ALC269_FIXUP_LIFEBOOK), 9709 10837 SND_PCI_QUIRK(0x1025, 0x102b, "Acer Aspire C24-860", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE), … … 9715 10843 SND_PCI_QUIRK(0x1025, 0x1166, "Acer Veriton N4640G", ALC269_FIXUP_LIFEBOOK), 9716 10844 SND_PCI_QUIRK(0x1025, 0x1167, "Acer Veriton N6640G", ALC269_FIXUP_LIFEBOOK), 10845 SND_PCI_QUIRK(0x1025, 0x1177, "Acer Predator G9-593", ALC255_FIXUP_PREDATOR_SUBWOOFER), 10846 SND_PCI_QUIRK(0x1025, 0x1178, "Acer Predator G9-593", ALC255_FIXUP_PREDATOR_SUBWOOFER), 9717 10847 SND_PCI_QUIRK(0x1025, 0x1246, "Acer Predator Helios 500", ALC299_FIXUP_PREDATOR_SPK), 9718 10848 SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS), 9719 10849 SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE), 9720 10850 SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC), 10851 SND_PCI_QUIRK(0x1025, 0x126a, "Acer Swift SF114-32", ALC256_FIXUP_ACER_MIC_NO_PRESENCE), 9721 10852 SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), 9722 10853 SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), … … 9728 10859 SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC), 9729 10860 SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC), 10861 SND_PCI_QUIRK(0x1025, 0x1360, "Acer Aspire A115", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), 9730 10862 SND_PCI_QUIRK(0x1025, 0x141f, "Acer Spin SP513-54N", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), 9731 10863 SND_PCI_QUIRK(0x1025, 0x142b, "Acer Swift SF314-42", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), 9732 10864 SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE), 9733 10865 SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC), 10866 SND_PCI_QUIRK(0x1025, 0x1534, "Acer Predator PH315-54", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), 9734 10867 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), 9735 10868 SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X), … … 9783 10916 SND_PCI_QUIRK(0x1028, 0x0a2e, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC), 9784 10917 SND_PCI_QUIRK(0x1028, 0x0a30, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC), 10918 SND_PCI_QUIRK(0x1028, 0x0a38, "Dell Latitude 7520", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET), 9785 10919 SND_PCI_QUIRK(0x1028, 0x0a58, "Dell", ALC255_FIXUP_DELL_HEADSET_MIC), 9786 10920 SND_PCI_QUIRK(0x1028, 0x0a61, "Dell XPS 15 9510", ALC289_FIXUP_DUAL_SPK), … … 9789 10923 SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE), 9790 10924 SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK), 10925 SND_PCI_QUIRK(0x1028, 0x0b1a, "Dell Precision 5570", ALC289_FIXUP_DUAL_SPK), 10926 SND_PCI_QUIRK(0x1028, 0x0b37, "Dell Inspiron 16 Plus 7620 2-in-1", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS), 10927 SND_PCI_QUIRK(0x1028, 0x0b71, "Dell Inspiron 16 Plus 7620", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS), 10928 SND_PCI_QUIRK(0x1028, 0x0beb, "Dell XPS 15 9530 (2023)", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10929 SND_PCI_QUIRK(0x1028, 0x0c03, "Dell Precision 5340", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE), 10930 SND_PCI_QUIRK(0x1028, 0x0c0b, "Dell Oasis 14 RPL-P", ALC289_FIXUP_RTK_AMP_DUAL_SPK), 10931 SND_PCI_QUIRK(0x1028, 0x0c0d, "Dell Oasis", ALC289_FIXUP_RTK_AMP_DUAL_SPK), 10932 SND_PCI_QUIRK(0x1028, 0x0c0e, "Dell Oasis 16", ALC289_FIXUP_RTK_AMP_DUAL_SPK), 10933 SND_PCI_QUIRK(0x1028, 0x0c19, "Dell Precision 3340", ALC236_FIXUP_DELL_DUAL_CODECS), 10934 SND_PCI_QUIRK(0x1028, 0x0c1a, "Dell Precision 3340", ALC236_FIXUP_DELL_DUAL_CODECS), 10935 SND_PCI_QUIRK(0x1028, 0x0c1b, "Dell Precision 3440", ALC236_FIXUP_DELL_DUAL_CODECS), 10936 SND_PCI_QUIRK(0x1028, 0x0c1c, "Dell Precision 3540", ALC236_FIXUP_DELL_DUAL_CODECS), 10937 SND_PCI_QUIRK(0x1028, 0x0c1d, "Dell Precision 3440", ALC236_FIXUP_DELL_DUAL_CODECS), 10938 SND_PCI_QUIRK(0x1028, 0x0c1e, "Dell Precision 3540", ALC236_FIXUP_DELL_DUAL_CODECS), 10939 SND_PCI_QUIRK(0x1028, 0x0cbd, "Dell Oasis 13 CS MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10940 SND_PCI_QUIRK(0x1028, 0x0cbe, "Dell Oasis 13 2-IN-1 MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10941 SND_PCI_QUIRK(0x1028, 0x0cbf, "Dell Oasis 13 Low Weight MTU-L", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10942 SND_PCI_QUIRK(0x1028, 0x0cc0, "Dell Oasis 13", ALC289_FIXUP_RTK_AMP_DUAL_SPK), 10943 SND_PCI_QUIRK(0x1028, 0x0cc1, "Dell Oasis 14 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10944 SND_PCI_QUIRK(0x1028, 0x0cc2, "Dell Oasis 14 2-in-1 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10945 SND_PCI_QUIRK(0x1028, 0x0cc3, "Dell Oasis 14 Low Weight MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10946 SND_PCI_QUIRK(0x1028, 0x0cc4, "Dell Oasis 16 MTL-H/U", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10947 SND_PCI_QUIRK(0x1028, 0x0cc5, "Dell Oasis 14", ALC289_FIXUP_RTK_AMP_DUAL_SPK), 9791 10948 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 9792 10949 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), … … 9853 11010 SND_PCI_QUIRK(0x103c, 0x8077, "HP", ALC256_FIXUP_HP_HEADSET_MIC), 9854 11011 SND_PCI_QUIRK(0x103c, 0x8158, "HP", ALC256_FIXUP_HP_HEADSET_MIC), 9855 SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC2 69_FIXUP_HP_MUTE_LED_MIC3),11012 SND_PCI_QUIRK(0x103c, 0x820d, "HP Pavilion 15", ALC295_FIXUP_HP_X360), 9856 11013 SND_PCI_QUIRK(0x103c, 0x8256, "HP", ALC221_FIXUP_HP_FRONT_MIC), 9857 11014 SND_PCI_QUIRK(0x103c, 0x827e, "HP x360", ALC295_FIXUP_HP_X360), … … 9862 11019 SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3), 9863 11020 SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3), 11021 SND_PCI_QUIRK(0x103c, 0x84a6, "HP 250 G7 Notebook PC", ALC269_FIXUP_HP_LINE1_MIC1_LED), 11022 SND_PCI_QUIRK(0x103c, 0x84ae, "HP 15-db0403ng", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 9864 11023 SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN), 9865 11024 SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3), 9866 11025 SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360), 11026 SND_PCI_QUIRK(0x103c, 0x8537, "HP ProBook 440 G6", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11027 SND_PCI_QUIRK(0x103c, 0x85de, "HP Envy x360 13-ar0xxx", ALC285_FIXUP_HP_ENVY_X360), 9867 11028 SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT), 9868 11029 SND_PCI_QUIRK(0x103c, 0x861f, "HP Elite Dragonfly G1", ALC285_FIXUP_HP_GPIO_AMP_INIT), 9869 11030 SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED), 11031 SND_PCI_QUIRK(0x103c, 0x86c1, "HP Laptop 15-da3001TU", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 9870 11032 SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO), 11033 SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), 11034 SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), 11035 SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED), 9871 11036 SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), 9872 11037 SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), … … 9878 11043 SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT), 9879 11044 SND_PCI_QUIRK(0x103c, 0x8760, "HP", ALC285_FIXUP_HP_MUTE_LED), 11045 SND_PCI_QUIRK(0x103c, 0x876e, "HP ENVY x360 Convertible 13-ay0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS), 9880 11046 SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED), 9881 11047 SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED), … … 9884 11050 SND_PCI_QUIRK(0x103c, 0x8783, "HP ZBook Fury 15 G7 Mobile Workstation", 9885 11051 ALC285_FIXUP_HP_GPIO_AMP_INIT), 11052 SND_PCI_QUIRK(0x103c, 0x8786, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED), 9886 11053 SND_PCI_QUIRK(0x103c, 0x8787, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED), 9887 11054 SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED), 11055 SND_PCI_QUIRK(0x103c, 0x87b7, "HP Laptop 14-fq0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 9888 11056 SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED), 11057 SND_PCI_QUIRK(0x103c, 0x87d3, "HP Laptop 15-gw0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 11058 SND_PCI_QUIRK(0x103c, 0x87df, "HP ProBook 430 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), 9889 11059 SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), 9890 11060 SND_PCI_QUIRK(0x103c, 0x87e7, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), … … 9895 11065 SND_PCI_QUIRK(0x103c, 0x87f6, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP), 9896 11066 SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP), 11067 SND_PCI_QUIRK(0x103c, 0x87fd, "HP Laptop 14-dq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 11068 SND_PCI_QUIRK(0x103c, 0x87fe, "HP Laptop 15s-fq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 9897 11069 SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), 9898 11070 SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), 9899 11071 SND_PCI_QUIRK(0x103c, 0x8811, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), 9900 11072 SND_PCI_QUIRK(0x103c, 0x8812, "HP Spectre x360 15-eb1xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1), 11073 SND_PCI_QUIRK(0x103c, 0x881d, "HP 250 G8 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 9901 11074 SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), 9902 11075 SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), … … 9908 11081 SND_PCI_QUIRK(0x103c, 0x8870, "HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), 9909 11082 SND_PCI_QUIRK(0x103c, 0x8873, "HP ZBook Studio 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), 11083 SND_PCI_QUIRK(0x103c, 0x887a, "HP Laptop 15s-eq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 11084 SND_PCI_QUIRK(0x103c, 0x887c, "HP Laptop 14s-fq1xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 11085 SND_PCI_QUIRK(0x103c, 0x888a, "HP ENVY x360 Convertible 15-eu0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS), 9910 11086 SND_PCI_QUIRK(0x103c, 0x888d, "HP ZBook Power 15.6 inch G8 Mobile Workstation PC", ALC236_FIXUP_HP_GPIO_LED), 11087 SND_PCI_QUIRK(0x103c, 0x8895, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED), 9911 11088 SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED), 9912 11089 SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST), 9913 11090 SND_PCI_QUIRK(0x103c, 0x88d0, "HP Pavilion 15-eh1xxx (mainboard 88D0)", ALC287_FIXUP_HP_GPIO_LED), 11091 SND_PCI_QUIRK(0x103c, 0x88dd, "HP Pavilion 15z-ec200", ALC285_FIXUP_HP_MUTE_LED), 11092 SND_PCI_QUIRK(0x103c, 0x8902, "HP OMEN 16", ALC285_FIXUP_HP_MUTE_LED), 11093 SND_PCI_QUIRK(0x103c, 0x890e, "HP 255 G8 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 11094 SND_PCI_QUIRK(0x103c, 0x8919, "HP Pavilion Aero Laptop 13-be0xxx", ALC287_FIXUP_HP_GPIO_LED), 11095 SND_PCI_QUIRK(0x103c, 0x896d, "HP ZBook Firefly 16 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11096 SND_PCI_QUIRK(0x103c, 0x896e, "HP EliteBook x360 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11097 SND_PCI_QUIRK(0x103c, 0x8971, "HP EliteBook 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11098 SND_PCI_QUIRK(0x103c, 0x8972, "HP EliteBook 840 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11099 SND_PCI_QUIRK(0x103c, 0x8973, "HP EliteBook 860 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11100 SND_PCI_QUIRK(0x103c, 0x8974, "HP EliteBook 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11101 SND_PCI_QUIRK(0x103c, 0x8975, "HP EliteBook x360 840 Aero G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11102 SND_PCI_QUIRK(0x103c, 0x897d, "HP mt440 Mobile Thin Client U74", ALC236_FIXUP_HP_GPIO_LED), 11103 SND_PCI_QUIRK(0x103c, 0x8981, "HP Elite Dragonfly G3", ALC245_FIXUP_CS35L41_SPI_4), 11104 SND_PCI_QUIRK(0x103c, 0x898e, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2), 11105 SND_PCI_QUIRK(0x103c, 0x898f, "HP EliteBook 835 G9", ALC287_FIXUP_CS35L41_I2C_2), 11106 SND_PCI_QUIRK(0x103c, 0x8991, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 11107 SND_PCI_QUIRK(0x103c, 0x8992, "HP EliteBook 845 G9", ALC287_FIXUP_CS35L41_I2C_2), 11108 SND_PCI_QUIRK(0x103c, 0x8994, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 11109 SND_PCI_QUIRK(0x103c, 0x8995, "HP EliteBook 855 G9", ALC287_FIXUP_CS35L41_I2C_2), 11110 SND_PCI_QUIRK(0x103c, 0x89a4, "HP ProBook 440 G9", ALC236_FIXUP_HP_GPIO_LED), 11111 SND_PCI_QUIRK(0x103c, 0x89a6, "HP ProBook 450 G9", ALC236_FIXUP_HP_GPIO_LED), 9914 11112 SND_PCI_QUIRK(0x103c, 0x89aa, "HP EliteBook 630 G9", ALC236_FIXUP_HP_GPIO_LED), 9915 SND_PCI_QUIRK(0x103c, 0x89c3, "HP", ALC285_FIXUP_HP_GPIO_LED), 11113 SND_PCI_QUIRK(0x103c, 0x89ac, "HP EliteBook 640 G9", ALC236_FIXUP_HP_GPIO_LED), 11114 SND_PCI_QUIRK(0x103c, 0x89ae, "HP EliteBook 650 G9", ALC236_FIXUP_HP_GPIO_LED), 11115 SND_PCI_QUIRK(0x103c, 0x89c0, "HP ZBook Power 15.6 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11116 SND_PCI_QUIRK(0x103c, 0x89c3, "Zbook Studio G9", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED), 11117 SND_PCI_QUIRK(0x103c, 0x89c6, "Zbook Fury 17 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 9916 11118 SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11119 SND_PCI_QUIRK(0x103c, 0x89d3, "HP EliteBook 645 G9 (MB 89D2)", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11120 SND_PCI_QUIRK(0x103c, 0x8a0f, "HP Pavilion 14-ec1xxx", ALC287_FIXUP_HP_GPIO_LED), 11121 SND_PCI_QUIRK(0x103c, 0x8a20, "HP Laptop 15s-fq5xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 11122 SND_PCI_QUIRK(0x103c, 0x8a25, "HP Victus 16-d1xxx (MB 8A25)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT), 9917 11123 SND_PCI_QUIRK(0x103c, 0x8a78, "HP Dev One", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST), 9918 11124 SND_PCI_QUIRK(0x103c, 0x8aa0, "HP ProBook 440 G9 (MB 8A9E)", ALC236_FIXUP_HP_GPIO_LED), … … 9920 11126 SND_PCI_QUIRK(0x103c, 0x8aa8, "HP EliteBook 640 G9 (MB 8AA6)", ALC236_FIXUP_HP_GPIO_LED), 9921 11127 SND_PCI_QUIRK(0x103c, 0x8aab, "HP EliteBook 650 G9 (MB 8AA9)", ALC236_FIXUP_HP_GPIO_LED), 11128 SND_PCI_QUIRK(0x103c, 0x8ab9, "HP EliteBook 840 G8 (MB 8AB8)", ALC285_FIXUP_HP_GPIO_LED), 11129 SND_PCI_QUIRK(0x103c, 0x8abb, "HP ZBook Firefly 14 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11130 SND_PCI_QUIRK(0x103c, 0x8ad1, "HP EliteBook 840 14 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11131 SND_PCI_QUIRK(0x103c, 0x8ad2, "HP EliteBook 860 16 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11132 SND_PCI_QUIRK(0x103c, 0x8b0f, "HP Elite mt645 G7 Mobile Thin Client U81", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11133 SND_PCI_QUIRK(0x103c, 0x8b2f, "HP 255 15.6 inch G10 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 11134 SND_PCI_QUIRK(0x103c, 0x8b3f, "HP mt440 Mobile Thin Client U91", ALC236_FIXUP_HP_GPIO_LED), 11135 SND_PCI_QUIRK(0x103c, 0x8b42, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11136 SND_PCI_QUIRK(0x103c, 0x8b43, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11137 SND_PCI_QUIRK(0x103c, 0x8b44, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11138 SND_PCI_QUIRK(0x103c, 0x8b45, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11139 SND_PCI_QUIRK(0x103c, 0x8b46, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11140 SND_PCI_QUIRK(0x103c, 0x8b47, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11141 SND_PCI_QUIRK(0x103c, 0x8b59, "HP Elite mt645 G7 Mobile Thin Client U89", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11142 SND_PCI_QUIRK(0x103c, 0x8b5d, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11143 SND_PCI_QUIRK(0x103c, 0x8b5e, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11144 SND_PCI_QUIRK(0x103c, 0x8b5f, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11145 SND_PCI_QUIRK(0x103c, 0x8b63, "HP Elite Dragonfly 13.5 inch G4", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED), 11146 SND_PCI_QUIRK(0x103c, 0x8b65, "HP ProBook 455 15.6 inch G10 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11147 SND_PCI_QUIRK(0x103c, 0x8b66, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11148 SND_PCI_QUIRK(0x103c, 0x8b70, "HP EliteBook 835 G10", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 11149 SND_PCI_QUIRK(0x103c, 0x8b72, "HP EliteBook 845 G10", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 11150 SND_PCI_QUIRK(0x103c, 0x8b74, "HP EliteBook 845W G10", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 11151 SND_PCI_QUIRK(0x103c, 0x8b77, "HP ElieBook 865 G10", ALC287_FIXUP_CS35L41_I2C_2), 11152 SND_PCI_QUIRK(0x103c, 0x8b7a, "HP", ALC236_FIXUP_HP_GPIO_LED), 11153 SND_PCI_QUIRK(0x103c, 0x8b7d, "HP", ALC236_FIXUP_HP_GPIO_LED), 11154 SND_PCI_QUIRK(0x103c, 0x8b87, "HP", ALC236_FIXUP_HP_GPIO_LED), 11155 SND_PCI_QUIRK(0x103c, 0x8b8a, "HP", ALC236_FIXUP_HP_GPIO_LED), 11156 SND_PCI_QUIRK(0x103c, 0x8b8b, "HP", ALC236_FIXUP_HP_GPIO_LED), 11157 SND_PCI_QUIRK(0x103c, 0x8b8d, "HP", ALC236_FIXUP_HP_GPIO_LED), 11158 SND_PCI_QUIRK(0x103c, 0x8b8f, "HP", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED), 11159 SND_PCI_QUIRK(0x103c, 0x8b92, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11160 SND_PCI_QUIRK(0x103c, 0x8b96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11161 SND_PCI_QUIRK(0x103c, 0x8b97, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11162 SND_PCI_QUIRK(0x103c, 0x8bf0, "HP", ALC236_FIXUP_HP_GPIO_LED), 11163 SND_PCI_QUIRK(0x103c, 0x8c46, "HP EliteBook 830 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11164 SND_PCI_QUIRK(0x103c, 0x8c47, "HP EliteBook 840 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11165 SND_PCI_QUIRK(0x103c, 0x8c48, "HP EliteBook 860 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11166 SND_PCI_QUIRK(0x103c, 0x8c49, "HP Elite x360 830 2-in-1 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11167 SND_PCI_QUIRK(0x103c, 0x8c70, "HP EliteBook 835 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 11168 SND_PCI_QUIRK(0x103c, 0x8c71, "HP EliteBook 845 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 11169 SND_PCI_QUIRK(0x103c, 0x8c72, "HP EliteBook 865 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 11170 SND_PCI_QUIRK(0x103c, 0x8c7b, "HP ProBook 445 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11171 SND_PCI_QUIRK(0x103c, 0x8c7c, "HP ProBook 445 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11172 SND_PCI_QUIRK(0x103c, 0x8c7d, "HP ProBook 465 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11173 SND_PCI_QUIRK(0x103c, 0x8c7e, "HP ProBook 465 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11174 SND_PCI_QUIRK(0x103c, 0x8c7f, "HP EliteBook 645 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11175 SND_PCI_QUIRK(0x103c, 0x8c80, "HP EliteBook 645 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11176 SND_PCI_QUIRK(0x103c, 0x8c81, "HP EliteBook 665 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11177 SND_PCI_QUIRK(0x103c, 0x8c89, "HP ProBook 460 G11", ALC236_FIXUP_HP_GPIO_LED), 11178 SND_PCI_QUIRK(0x103c, 0x8c8a, "HP EliteBook 630", ALC236_FIXUP_HP_GPIO_LED), 11179 SND_PCI_QUIRK(0x103c, 0x8c8c, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED), 11180 SND_PCI_QUIRK(0x103c, 0x8c8d, "HP ProBook 440 G11", ALC236_FIXUP_HP_GPIO_LED), 11181 SND_PCI_QUIRK(0x103c, 0x8c8e, "HP ProBook 460 G11", ALC236_FIXUP_HP_GPIO_LED), 11182 SND_PCI_QUIRK(0x103c, 0x8c90, "HP EliteBook 640", ALC236_FIXUP_HP_GPIO_LED), 11183 SND_PCI_QUIRK(0x103c, 0x8c91, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED), 11184 SND_PCI_QUIRK(0x103c, 0x8c96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11185 SND_PCI_QUIRK(0x103c, 0x8c97, "HP ZBook", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11186 SND_PCI_QUIRK(0x103c, 0x8ca1, "HP ZBook Power", ALC236_FIXUP_HP_GPIO_LED), 11187 SND_PCI_QUIRK(0x103c, 0x8ca2, "HP ZBook Power", ALC236_FIXUP_HP_GPIO_LED), 11188 SND_PCI_QUIRK(0x103c, 0x8ca4, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11189 SND_PCI_QUIRK(0x103c, 0x8ca7, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11190 SND_PCI_QUIRK(0x103c, 0x8cf5, "HP ZBook Studio 16", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED), 11191 SND_PCI_QUIRK(0x103c, 0x8d01, "HP ZBook Power 14 G12", ALC285_FIXUP_HP_GPIO_LED), 11192 SND_PCI_QUIRK(0x103c, 0x8d84, "HP EliteBook X G1i", ALC285_FIXUP_HP_GPIO_LED), 11193 SND_PCI_QUIRK(0x103c, 0x8d91, "HP ZBook Firefly 14 G12", ALC285_FIXUP_HP_GPIO_LED), 11194 SND_PCI_QUIRK(0x103c, 0x8d92, "HP ZBook Firefly 16 G12", ALC285_FIXUP_HP_GPIO_LED), 11195 SND_PCI_QUIRK(0x103c, 0x8e18, "HP ZBook Firefly 14 G12A", ALC285_FIXUP_HP_GPIO_LED), 11196 SND_PCI_QUIRK(0x103c, 0x8e19, "HP ZBook Firefly 14 G12A", ALC285_FIXUP_HP_GPIO_LED), 11197 SND_PCI_QUIRK(0x103c, 0x8e1a, "HP ZBook Firefly 14 G12A", ALC285_FIXUP_HP_GPIO_LED), 9922 11198 SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), 9923 11199 SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), … … 9926 11202 SND_PCI_QUIRK(0x1043, 0x10c0, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), 9927 11203 SND_PCI_QUIRK(0x1043, 0x10d0, "ASUS X540LA/X540LJ", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), 11204 SND_PCI_QUIRK(0x1043, 0x10d3, "ASUS K6500ZC", ALC294_FIXUP_ASUS_SPK), 9928 11205 SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 9929 11206 SND_PCI_QUIRK(0x1043, 0x11c0, "ASUS X556UR", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), … … 9932 11209 SND_PCI_QUIRK(0x1043, 0x1290, "ASUS X441SA", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE), 9933 11210 SND_PCI_QUIRK(0x1043, 0x12a0, "ASUS X441UV", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE), 11211 SND_PCI_QUIRK(0x1043, 0x12a3, "Asus N7691ZM", ALC269_FIXUP_ASUS_N7601ZM), 11212 SND_PCI_QUIRK(0x1043, 0x12af, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2), 9934 11213 SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC), 9935 11214 SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC), 11215 SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE), 9936 11216 SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC), 9937 11217 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK), 11218 SND_PCI_QUIRK(0x1043, 0x1433, "ASUS GX650PY/PZ/PV/PU/PYV/PZV/PIV/PVV", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC), 11219 SND_PCI_QUIRK(0x1043, 0x1460, "Asus VivoBook 15", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 11220 SND_PCI_QUIRK(0x1043, 0x1463, "Asus GA402X/GA402N", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC), 11221 SND_PCI_QUIRK(0x1043, 0x1473, "ASUS GU604VI/VC/VE/VG/VJ/VQ/VU/VV/VY/VZ", ALC285_FIXUP_ASUS_HEADSET_MIC), 11222 SND_PCI_QUIRK(0x1043, 0x1483, "ASUS GU603VQ/VU/VV/VJ/VI", ALC285_FIXUP_ASUS_HEADSET_MIC), 11223 SND_PCI_QUIRK(0x1043, 0x1493, "ASUS GV601VV/VU/VJ/VQ/VI", ALC285_FIXUP_ASUS_HEADSET_MIC), 11224 SND_PCI_QUIRK(0x1043, 0x14d3, "ASUS G614JY/JZ/JG", ALC245_FIXUP_CS35L41_SPI_2), 11225 SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS G513PI/PU/PV", ALC287_FIXUP_CS35L41_I2C_2), 11226 SND_PCI_QUIRK(0x1043, 0x1503, "ASUS G733PY/PZ/PZV/PYV", ALC287_FIXUP_CS35L41_I2C_2), 9938 11227 SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A), 11228 SND_PCI_QUIRK(0x1043, 0x1533, "ASUS GV302XA/XJ/XQ/XU/XV/XI", ALC287_FIXUP_CS35L41_I2C_2), 11229 SND_PCI_QUIRK(0x1043, 0x1573, "ASUS GZ301VV/VQ/VU/VJ/VA/VC/VE/VVC/VQC/VUC/VJC/VEC/VCC", ALC285_FIXUP_ASUS_HEADSET_MIC), 11230 SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK), 11231 SND_PCI_QUIRK(0x1043, 0x1663, "ASUS GU603ZI/ZJ/ZQ/ZU/ZV", ALC285_FIXUP_ASUS_HEADSET_MIC), 11232 SND_PCI_QUIRK(0x1043, 0x1683, "ASUS UM3402YAR", ALC287_FIXUP_CS35L41_I2C_2), 11233 SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS UX3402VA", ALC245_FIXUP_CS35L41_SPI_2), 11234 SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401), 9939 11235 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), 9940 11236 SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS), 9941 11237 SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK), 9942 SND_PCI_QUIRK(0x1043, 0x1 662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK),11238 SND_PCI_QUIRK(0x1043, 0x17f3, "ROG Ally NR2301L/X", ALC294_FIXUP_ASUS_ALLY), 9943 11239 SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS), 9944 11240 SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC), 11241 SND_PCI_QUIRK(0x1043, 0x18d3, "ASUS UM3504DA", ALC294_FIXUP_CS35L41_I2C_2), 9945 11242 SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC), 9946 11243 SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE), … … 9950 11247 SND_PCI_QUIRK(0x1043, 0x19e1, "ASUS UX581LV", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE), 9951 11248 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), 9952 SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC), 11249 SND_PCI_QUIRK(0x1043, 0x1a63, "ASUS UX3405MA", ALC245_FIXUP_CS35L41_SPI_2), 11250 SND_PCI_QUIRK(0x1043, 0x1a83, "ASUS UM5302LA", ALC294_FIXUP_CS35L41_I2C_2), 11251 SND_PCI_QUIRK(0x1043, 0x1a8f, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2), 9953 11252 SND_PCI_QUIRK(0x1043, 0x1b11, "ASUS UX431DA", ALC294_FIXUP_ASUS_COEF_1B), 9954 11253 SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC), 11254 SND_PCI_QUIRK(0x1043, 0x1b93, "ASUS G614JVR/JIR", ALC245_FIXUP_CS35L41_SPI_2), 9955 11255 SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), 11256 SND_PCI_QUIRK(0x1043, 0x1c03, "ASUS UM3406HA", ALC287_FIXUP_CS35L41_I2C_2), 9956 11257 SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 11258 SND_PCI_QUIRK(0x1043, 0x1c33, "ASUS UX5304MA", ALC245_FIXUP_CS35L41_SPI_2), 11259 SND_PCI_QUIRK(0x1043, 0x1c43, "ASUS UX8406MA", ALC245_FIXUP_CS35L41_SPI_2), 11260 SND_PCI_QUIRK(0x1043, 0x1c62, "ASUS GU603", ALC289_FIXUP_ASUS_GA401), 11261 SND_PCI_QUIRK(0x1043, 0x1c92, "ASUS ROG Strix G15", ALC285_FIXUP_ASUS_G533Z_PINS), 11262 SND_PCI_QUIRK(0x1043, 0x1c9f, "ASUS G614JU/JV/JI", ALC285_FIXUP_ASUS_HEADSET_MIC), 11263 SND_PCI_QUIRK(0x1043, 0x1caf, "ASUS G634JY/JZ/JI/JG", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), 9957 11264 SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC), 11265 SND_PCI_QUIRK(0x1043, 0x1ccf, "ASUS G814JU/JV/JI", ALC245_FIXUP_CS35L41_SPI_2), 11266 SND_PCI_QUIRK(0x1043, 0x1cdf, "ASUS G814JY/JZ/JG", ALC245_FIXUP_CS35L41_SPI_2), 11267 SND_PCI_QUIRK(0x1043, 0x1cef, "ASUS G834JY/JZ/JI/JG", ALC285_FIXUP_ASUS_HEADSET_MIC), 11268 SND_PCI_QUIRK(0x1043, 0x1d1f, "ASUS G713PI/PU/PV/PVN", ALC287_FIXUP_CS35L41_I2C_2), 11269 SND_PCI_QUIRK(0x1043, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401), 9958 11270 SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE), 11271 SND_PCI_QUIRK(0x1043, 0x1da2, "ASUS UP6502ZA/ZD", ALC245_FIXUP_CS35L41_SPI_2), 11272 SND_PCI_QUIRK(0x1043, 0x1e02, "ASUS UX3402ZA", ALC245_FIXUP_CS35L41_SPI_2), 9959 11273 SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502), 11274 SND_PCI_QUIRK(0x1043, 0x1e12, "ASUS UM3402", ALC287_FIXUP_CS35L41_I2C_2), 9960 11275 SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15", ALC294_FIXUP_ASUS_GU502_PINS), 11276 SND_PCI_QUIRK(0x1043, 0x1e5e, "ASUS ROG Strix G513", ALC294_FIXUP_ASUS_G513_PINS), 9961 11277 SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401), 11278 SND_PCI_QUIRK(0x1043, 0x1ee2, "ASUS UM6702RA/RC", ALC287_FIXUP_CS35L41_I2C_2), 11279 SND_PCI_QUIRK(0x1043, 0x1c52, "ASUS Zephyrus G15 2022", ALC289_FIXUP_ASUS_GA401), 9962 11280 SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401), 9963 SND_PCI_QUIRK(0x1043, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401), 9964 SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401), 11281 SND_PCI_QUIRK(0x1043, 0x1f12, "ASUS UM5302", ALC287_FIXUP_CS35L41_I2C_2), 11282 SND_PCI_QUIRK(0x1043, 0x1f62, "ASUS UX7602ZM", ALC245_FIXUP_CS35L41_SPI_2), 11283 SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16", ALC289_FIXUP_ASUS_GA401), 9965 11284 SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2), 11285 SND_PCI_QUIRK(0x1043, 0x3a20, "ASUS G614JZR", ALC245_FIXUP_CS35L41_SPI_2), 11286 SND_PCI_QUIRK(0x1043, 0x3a30, "ASUS G814JVR/JIR", ALC245_FIXUP_CS35L41_SPI_2), 11287 SND_PCI_QUIRK(0x1043, 0x3a40, "ASUS G814JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), 11288 SND_PCI_QUIRK(0x1043, 0x3a50, "ASUS G834JYR/JZR", ALC245_FIXUP_CS35L41_SPI_2), 11289 SND_PCI_QUIRK(0x1043, 0x3a60, "ASUS G634JYR/JZR", ALC245_FIXUP_CS35L41_SPI_2), 9966 11290 SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC), 9967 11291 SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC), … … 9983 11307 SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE), 9984 11308 SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE), 11309 SND_PCI_QUIRK(0x10ec, 0x119e, "Positivo SU C1400", ALC269_FIXUP_ASPIRE_HEADSET_MIC), 11310 SND_PCI_QUIRK(0x10ec, 0x11bc, "VAIO VJFE-IL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 9985 11311 SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 11312 SND_PCI_QUIRK(0x10ec, 0x124c, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 9986 11313 SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 9987 11314 SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 9988 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE), 11315 SND_PCI_QUIRK(0x10ec, 0x12cc, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 11316 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_ASPIRE_HEADSET_MIC), 9989 11317 SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC), 9990 SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), 9991 SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), 9992 SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), 9993 SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), 11318 SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_AMP), 11319 SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_AMP), 11320 SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_AMP), 11321 SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NP930XCJ-K01US)", ALC298_FIXUP_SAMSUNG_AMP), 11322 SND_PCI_QUIRK(0x144d, 0xc1a3, "Samsung Galaxy Book Pro (NP935XDB-KC1SE)", ALC298_FIXUP_SAMSUNG_AMP), 11323 SND_PCI_QUIRK(0x144d, 0xc1a4, "Samsung Galaxy Book Pro 360 (NT935QBD)", ALC298_FIXUP_SAMSUNG_AMP), 11324 SND_PCI_QUIRK(0x144d, 0xc1a6, "Samsung Galaxy Book Pro 360 (NP930QBD)", ALC298_FIXUP_SAMSUNG_AMP), 9994 11325 SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8), 9995 SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_ HEADPHONE_VERY_QUIET),9996 SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_ HEADPHONE_VERY_QUIET),11326 SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_AMP), 11327 SND_PCI_QUIRK(0x144d, 0xc830, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_AMP), 9997 11328 SND_PCI_QUIRK(0x144d, 0xc832, "Samsung Galaxy Book Flex Alpha (NP730QCJ)", ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), 11329 SND_PCI_QUIRK(0x144d, 0xca03, "Samsung Galaxy Book2 Pro 360 (NP930QED)", ALC298_FIXUP_SAMSUNG_AMP), 11330 SND_PCI_QUIRK(0x144d, 0xca06, "Samsung Galaxy Book3 360 (NP730QFG)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), 11331 SND_PCI_QUIRK(0x144d, 0xc868, "Samsung Galaxy Book2 Pro (NP930XED)", ALC298_FIXUP_SAMSUNG_AMP), 9998 11332 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC), 9999 11333 SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC), 10000 11334 SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC), 10001 11335 SND_PCI_QUIRK(0x152d, 0x1082, "Quanta NL3", ALC269_FIXUP_LIFEBOOK), 11336 SND_PCI_QUIRK(0x152d, 0x1262, "Huawei NBLB-WAX9N", ALC2XX_FIXUP_HEADSET_MIC), 11337 SND_PCI_QUIRK(0x1558, 0x0353, "Clevo V35[05]SN[CDE]Q", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10002 11338 SND_PCI_QUIRK(0x1558, 0x1323, "Clevo N130ZU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10003 11339 SND_PCI_QUIRK(0x1558, 0x1325, "Clevo N15[01][CW]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), … … 10006 11342 SND_PCI_QUIRK(0x1558, 0x1404, "Clevo N150CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10007 11343 SND_PCI_QUIRK(0x1558, 0x14a1, "Clevo L141MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11344 SND_PCI_QUIRK(0x1558, 0x2624, "Clevo L240TU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11345 SND_PCI_QUIRK(0x1558, 0x28c1, "Clevo V370VND", ALC2XX_FIXUP_HEADSET_MIC), 10008 11346 SND_PCI_QUIRK(0x1558, 0x4018, "Clevo NV40M[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10009 11347 SND_PCI_QUIRK(0x1558, 0x4019, "Clevo NV40MZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10010 11348 SND_PCI_QUIRK(0x1558, 0x4020, "Clevo NV40MB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11349 SND_PCI_QUIRK(0x1558, 0x4041, "Clevo NV4[15]PZ", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10011 11350 SND_PCI_QUIRK(0x1558, 0x40a1, "Clevo NL40GU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10012 11351 SND_PCI_QUIRK(0x1558, 0x40c1, "Clevo NL40[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), … … 10029 11368 SND_PCI_QUIRK(0x1558, 0x5157, "Clevo W517GU1", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10030 11369 SND_PCI_QUIRK(0x1558, 0x51a1, "Clevo NS50MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11370 SND_PCI_QUIRK(0x1558, 0x51b1, "Clevo NS50AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11371 SND_PCI_QUIRK(0x1558, 0x51b3, "Clevo NS70AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11372 SND_PCI_QUIRK(0x1558, 0x5630, "Clevo NP50RNJS", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10031 11373 SND_PCI_QUIRK(0x1558, 0x70a1, "Clevo NB70T[HJK]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10032 11374 SND_PCI_QUIRK(0x1558, 0x70b3, "Clevo NK70SB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), … … 10036 11378 SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10037 11379 SND_PCI_QUIRK(0x1558, 0x7716, "Clevo NS50PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11380 SND_PCI_QUIRK(0x1558, 0x7717, "Clevo NS70PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10038 11381 SND_PCI_QUIRK(0x1558, 0x7718, "Clevo L140PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11382 SND_PCI_QUIRK(0x1558, 0x7724, "Clevo L140AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10039 11383 SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10040 11384 SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), … … 10062 11406 SND_PCI_QUIRK(0x1558, 0xa500, "Clevo NL5[03]RU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10063 11407 SND_PCI_QUIRK(0x1558, 0xa600, "Clevo NL50NU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11408 SND_PCI_QUIRK(0x1558, 0xa650, "Clevo NP[567]0SN[CD]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11409 SND_PCI_QUIRK(0x1558, 0xa671, "Clevo NP70SN[CDE]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11410 SND_PCI_QUIRK(0x1558, 0xa763, "Clevo V54x_6x_TU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10064 11411 SND_PCI_QUIRK(0x1558, 0xb018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 10065 11412 SND_PCI_QUIRK(0x1558, 0xb019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), … … 10095 11442 SND_PCI_QUIRK(0x17aa, 0x2231, "Thinkpad T560", ALC292_FIXUP_TPT460), 10096 11443 SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460), 11444 SND_PCI_QUIRK(0x17aa, 0x2234, "Thinkpad ICE-1", ALC287_FIXUP_TAS2781_I2C), 10097 11445 SND_PCI_QUIRK(0x17aa, 0x2245, "Thinkpad T470", ALC298_FIXUP_TPT470_DOCK), 10098 11446 SND_PCI_QUIRK(0x17aa, 0x2246, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), … … 10107 11455 SND_PCI_QUIRK(0x17aa, 0x22c1, "Thinkpad P1 Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK), 10108 11456 SND_PCI_QUIRK(0x17aa, 0x22c2, "Thinkpad X1 Extreme Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK), 11457 SND_PCI_QUIRK(0x17aa, 0x22f1, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 11458 SND_PCI_QUIRK(0x17aa, 0x22f2, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 11459 SND_PCI_QUIRK(0x17aa, 0x22f3, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 11460 SND_PCI_QUIRK(0x17aa, 0x2316, "Thinkpad P1 Gen 6", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 11461 SND_PCI_QUIRK(0x17aa, 0x2317, "Thinkpad P1 Gen 6", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 11462 SND_PCI_QUIRK(0x17aa, 0x2318, "Thinkpad Z13 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 11463 SND_PCI_QUIRK(0x17aa, 0x2319, "Thinkpad Z16 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 11464 SND_PCI_QUIRK(0x17aa, 0x231a, "Thinkpad Z16 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 10109 11465 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 10110 11466 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), … … 10118 11474 SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), 10119 11475 SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340), 10120 SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), 11476 SND_PCI_QUIRK(0x17aa, 0x334b, "Lenovo ThinkCentre M70 Gen5", ALC283_FIXUP_HEADSET_MIC), 11477 SND_PCI_QUIRK(0x17aa, 0x3384, "ThinkCentre M90a PRO", ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED), 11478 SND_PCI_QUIRK(0x17aa, 0x3386, "ThinkCentre M90a Gen6", ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED), 11479 SND_PCI_QUIRK(0x17aa, 0x3387, "ThinkCentre M70a Gen6", ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED), 11480 SND_PCI_QUIRK(0x17aa, 0x3801, "Lenovo Yoga9 14IAP7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), 11481 SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga Pro 9 14IRP8 / DuetITL 2021", ALC287_FIXUP_LENOVO_14IRP8_DUETITL), 10121 11482 SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS), 10122 11483 SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7), 10123 11484 SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS), 10124 SND_PCI_QUIRK(0x17aa, 0x3820, " Yoga Duet 7 13ITL6", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),11485 SND_PCI_QUIRK(0x17aa, 0x3820, "IdeaPad 330-17IKB 81DM", ALC269_FIXUP_ASPIRE_HEADSET_MIC), 10125 11486 SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS), 10126 11487 SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF), … … 10128 11489 SND_PCI_QUIRK(0x17aa, 0x383d, "Legion Y9000X 2019", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS), 10129 11490 SND_PCI_QUIRK(0x17aa, 0x3843, "Yoga 9i", ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP), 11491 SND_PCI_QUIRK(0x17aa, 0x3847, "Legion 7 16ACHG6", ALC287_FIXUP_LEGION_16ACHG6), 10130 11492 SND_PCI_QUIRK(0x17aa, 0x384a, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), 10131 11493 SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), 10132 11494 SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), 11495 SND_PCI_QUIRK(0x17aa, 0x3855, "Legion 7 16ITHG6", ALC287_FIXUP_LEGION_16ITHG6), 11496 SND_PCI_QUIRK(0x17aa, 0x3865, "Lenovo 13X", ALC287_FIXUP_CS35L41_I2C_2), 11497 SND_PCI_QUIRK(0x17aa, 0x3866, "Lenovo 13X", ALC287_FIXUP_CS35L41_I2C_2), 11498 SND_PCI_QUIRK(0x17aa, 0x3869, "Lenovo Yoga7 14IAL7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), 11499 SND_PCI_QUIRK(0x17aa, 0x387d, "Yoga S780-16 pro Quad AAC", ALC287_FIXUP_TAS2781_I2C), 11500 SND_PCI_QUIRK(0x17aa, 0x387e, "Yoga S780-16 pro Quad YC", ALC287_FIXUP_TAS2781_I2C), 11501 SND_PCI_QUIRK(0x17aa, 0x3881, "YB9 dual power mode2 YC", ALC287_FIXUP_TAS2781_I2C), 11502 SND_PCI_QUIRK(0x17aa, 0x3882, "Lenovo Yoga Pro 7 14APH8", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), 11503 SND_PCI_QUIRK(0x17aa, 0x3884, "Y780 YG DUAL", ALC287_FIXUP_TAS2781_I2C), 11504 SND_PCI_QUIRK(0x17aa, 0x3886, "Y780 VECO DUAL", ALC287_FIXUP_TAS2781_I2C), 11505 SND_PCI_QUIRK(0x17aa, 0x3891, "Lenovo Yoga Pro 7 14AHP9", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), 11506 SND_PCI_QUIRK(0x17aa, 0x38a7, "Y780P AMD YG dual", ALC287_FIXUP_TAS2781_I2C), 11507 SND_PCI_QUIRK(0x17aa, 0x38a8, "Y780P AMD VECO dual", ALC287_FIXUP_TAS2781_I2C), 11508 SND_PCI_QUIRK(0x17aa, 0x38ba, "Yoga S780-14.5 Air AMD quad YC", ALC287_FIXUP_TAS2781_I2C), 11509 SND_PCI_QUIRK(0x17aa, 0x38bb, "Yoga S780-14.5 Air AMD quad AAC", ALC287_FIXUP_TAS2781_I2C), 11510 SND_PCI_QUIRK(0x17aa, 0x38be, "Yoga S980-14.5 proX YC Dual", ALC287_FIXUP_TAS2781_I2C), 11511 SND_PCI_QUIRK(0x17aa, 0x38bf, "Yoga S980-14.5 proX LX Dual", ALC287_FIXUP_TAS2781_I2C), 11512 SND_PCI_QUIRK(0x17aa, 0x38c3, "Y980 DUAL", ALC287_FIXUP_TAS2781_I2C), 11513 SND_PCI_QUIRK(0x17aa, 0x38cb, "Y790 YG DUAL", ALC287_FIXUP_TAS2781_I2C), 11514 SND_PCI_QUIRK(0x17aa, 0x38cd, "Y790 VECO DUAL", ALC287_FIXUP_TAS2781_I2C), 11515 SND_PCI_QUIRK(0x17aa, 0x38d2, "Lenovo Yoga 9 14IMH9", ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN), 11516 SND_PCI_QUIRK(0x17aa, 0x38d7, "Lenovo Yoga 9 14IMH9", ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN), 11517 SND_PCI_QUIRK(0x17aa, 0x38df, "Y990 YG DUAL", ALC287_FIXUP_TAS2781_I2C), 11518 SND_PCI_QUIRK(0x17aa, 0x38f9, "Thinkbook 16P Gen5", ALC287_FIXUP_CS35L41_I2C_2), 11519 SND_PCI_QUIRK(0x17aa, 0x38fa, "Thinkbook 16P Gen5", ALC287_FIXUP_CS35L41_I2C_2), 10133 11520 SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI), 11521 SND_PCI_QUIRK(0x17aa, 0x3913, "Lenovo 145", ALC236_FIXUP_LENOVO_INV_DMIC), 10134 11522 SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC), 10135 11523 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI), … … 10155 11543 SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), 10156 11544 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), 11545 SND_PCI_QUIRK(0x17aa, 0x9e56, "Lenovo ZhaoYang CF4620Z", ALC286_FIXUP_SONY_MIC_NO_PRESENCE), 11546 SND_PCI_QUIRK(0x1849, 0x0269, "Positivo Master C6400", ALC269VB_FIXUP_ASUS_ZENBOOK), 10157 11547 SND_PCI_QUIRK(0x1849, 0x1233, "ASRock NUC Box 1100", ALC233_FIXUP_NO_AUDIO_JACK), 11548 SND_PCI_QUIRK(0x1849, 0xa233, "Positivo Master C6300", ALC269_FIXUP_HEADSET_MIC), 10158 11549 SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS), 11550 SND_PCI_QUIRK(0x19e5, 0x320f, "Huawei WRT-WX9 ", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), 11551 SND_PCI_QUIRK(0x19e5, 0x3212, "Huawei KLV-WX9 ", ALC256_FIXUP_ACER_HEADSET_MIC), 10159 11552 SND_PCI_QUIRK(0x1b35, 0x1235, "CZC B20", ALC269_FIXUP_CZC_B20), 10160 11553 SND_PCI_QUIRK(0x1b35, 0x1236, "CZC TMI", ALC269_FIXUP_CZC_TMI), … … 10163 11556 SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802), 10164 11557 SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X), 11558 SND_PCI_QUIRK(0x1c6c, 0x122a, "Positivo N14AP7", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 11559 SND_PCI_QUIRK(0x1c6c, 0x1251, "Positivo N14KP6-TG", ALC288_FIXUP_DELL1_MIC_NO_PRESENCE), 10165 11560 SND_PCI_QUIRK(0x1d05, 0x1132, "TongFang PHxTxX1", ALC256_FIXUP_SET_COEF_DEFAULTS), 10166 11561 SND_PCI_QUIRK(0x1d05, 0x1096, "TongFang GMxMRxx", ALC269_FIXUP_NO_SHUTUP), … … 10172 11567 SND_PCI_QUIRK(0x1d05, 0x115c, "TongFang GMxTGxx", ALC269_FIXUP_NO_SHUTUP), 10173 11568 SND_PCI_QUIRK(0x1d05, 0x121b, "TongFang GMxAGxx", ALC269_FIXUP_NO_SHUTUP), 11569 SND_PCI_QUIRK(0x1d05, 0x1387, "TongFang GMxIXxx", ALC2XX_FIXUP_HEADSET_MIC), 11570 SND_PCI_QUIRK(0x1d05, 0x1409, "TongFang GMxIXxx", ALC2XX_FIXUP_HEADSET_MIC), 11571 SND_PCI_QUIRK(0x1d17, 0x3288, "Haier Boyue G42", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS), 10174 11572 SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC), 10175 11573 SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE), … … 10177 11575 SND_PCI_QUIRK(0x1d72, 0x1945, "Redmi G", ALC256_FIXUP_ASUS_HEADSET_MIC), 10178 11576 SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC), 11577 SND_PCI_QUIRK(0x1f66, 0x0105, "Ayaneo Portable Game Player", ALC287_FIXUP_CS35L41_I2C_2), 11578 SND_PCI_QUIRK(0x2014, 0x800a, "Positivo ARN50", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 11579 SND_PCI_QUIRK(0x2782, 0x0214, "VAIO VJFE-CL", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 11580 SND_PCI_QUIRK(0x2782, 0x0228, "Infinix ZERO BOOK 13", ALC269VB_FIXUP_INFINIX_ZERO_BOOK_13), 11581 SND_PCI_QUIRK(0x2782, 0x0232, "CHUWI CoreBook XPro", ALC269VB_FIXUP_CHUWI_COREBOOK_XPRO), 11582 SND_PCI_QUIRK(0x2782, 0x1701, "Infinix Y4 Max", ALC269VC_FIXUP_INFINIX_Y4_MAX), 11583 SND_PCI_QUIRK(0x2782, 0x1705, "MEDION E15433", ALC269VC_FIXUP_INFINIX_Y4_MAX), 11584 SND_PCI_QUIRK(0x2782, 0x1707, "Vaio VJFE-ADL", ALC298_FIXUP_SPK_VOLUME), 10179 11585 SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC), 10180 11586 SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED), 10181 11587 SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10), 11588 SND_PCI_QUIRK(0x8086, 0x3038, "Intel NUC 13", ALC295_FIXUP_CHROME_BOOK), 11589 SND_PCI_QUIRK(0xf111, 0x0001, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE), 11590 SND_PCI_QUIRK(0xf111, 0x0006, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE), 11591 SND_PCI_QUIRK(0xf111, 0x0009, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE), 11592 SND_PCI_QUIRK(0xf111, 0x000c, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE), 10182 11593 10183 11594 #if 0 … … 10232 11643 }; 10233 11644 10234 static const struct snd_pci_quirk alc269_fixup_vendor_tbl[] = {11645 static const struct hda_quirk alc269_fixup_vendor_tbl[] = { 10235 11646 SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC), 10236 11647 SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED), … … 10258 11669 {.id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, .name = "dell-headset3"}, 10259 11670 {.id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, .name = "dell-headset4"}, 11671 {.id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET, .name = "dell-headset4-quiet"}, 10260 11672 {.id = ALC283_FIXUP_CHROME_BOOK, .name = "alc283-dac-wcaps"}, 10261 11673 {.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"}, … … 10352 11764 {.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"}, 10353 11765 {.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"}, 10354 {.id = ALC298_FIXUP_SAMSUNG_ HEADPHONE_VERY_QUIET, .name = "alc298-samsung-headphone"},11766 {.id = ALC298_FIXUP_SAMSUNG_AMP, .name = "alc298-samsung-amp"}, 10355 11767 {.id = ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc256-samsung-headphone"}, 10356 11768 {.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"}, … … 10360 11772 {.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"}, 10361 11773 {.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"}, 11774 {.id = ALC285_FIXUP_HP_ENVY_X360, .name = "alc285-hp-envy-x360"}, 10362 11775 {.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"}, 11776 {.id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, .name = "alc287-yoga9-bass-spk-pin"}, 10363 11777 {.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"}, 10364 11778 {.id = ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, .name = "alc255-acer-headphone-and-mic"}, 10365 11779 {.id = ALC285_FIXUP_HP_GPIO_AMP_INIT, .name = "alc285-hp-amp-init"}, 11780 {.id = ALC236_FIXUP_LENOVO_INV_DMIC, .name = "alc236-fixup-lenovo-inv-mic"}, 11781 {.id = ALC2XX_FIXUP_HEADSET_MIC, .name = "alc2xx-fixup-headset-mic"}, 10366 11782 {0} 10367 11783 }; … … 10394 11810 10395 11811 static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { 10396 #ifdef TARGET_OS2xxx11812 #ifdef NOT_USED 10397 11813 SND_HDA_PIN_QUIRK(0x10ec0221, 0x103c, "HP Workstation", ALC221_FIXUP_HP_HEADSET_MIC, 10398 11814 {0x14, 0x01014020}, … … 10660 12076 {0x19, 0x03a11030}, 10661 12077 {0x21, 0x03211020}), 12078 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC287_FIXUP_THINKPAD_I2S_SPK, 12079 {0x17, 0x90170110}, 12080 {0x19, 0x03a11030}, 12081 {0x21, 0x03211020}), 12082 SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC287_FIXUP_THINKPAD_I2S_SPK, 12083 {0x17, 0x90170110}, /* 0x231f with RTK I2S AMP */ 12084 {0x19, 0x04a11040}, 12085 {0x21, 0x04211020}), 10662 12086 SND_HDA_PIN_QUIRK(0x10ec0286, 0x1025, "Acer", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE, 10663 12087 {0x12, 0x90a60130}, … … 10754 12178 {0x17, 0x90170110}, 10755 12179 {0x21, 0x03211020}), 10756 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,10757 {0x14, 0x90170110},10758 {0x21, 0x04211020}),10759 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,10760 {0x14, 0x90170110},10761 {0x21, 0x04211030}),10762 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,10763 ALC295_STANDARD_PINS,10764 {0x17, 0x21014020},10765 {0x18, 0x21a19030}),10766 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,10767 ALC295_STANDARD_PINS,10768 {0x17, 0x21014040},10769 {0x18, 0x21a19050}),10770 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,10771 ALC295_STANDARD_PINS),10772 12180 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, 10773 12181 ALC298_STANDARD_PINS, … … 10811 12219 */ 10812 12220 static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = { 10813 #ifdef TARGET_OS2xxx 12221 #ifdef NOT_USED 12222 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1025, "Acer", ALC2XX_FIXUP_HEADSET_MIC, 12223 {0x19, 0x40000000}), 10814 12224 SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, 12225 {0x19, 0x40000000}, 12226 {0x1b, 0x40000000}), 12227 SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE_QUIET, 10815 12228 {0x19, 0x40000000}, 10816 12229 {0x1b, 0x40000000}), … … 10818 12231 {0x19, 0x40000000}, 10819 12232 {0x1a, 0x40000000}), 10820 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_ MIC_NO_PRESENCE,12233 SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_LIMIT_INT_MIC_BOOST, 10821 12234 {0x19, 0x40000000}, 10822 12235 {0x1a, 0x40000000}), 10823 SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC2 74_FIXUP_DELL_AIO_LINEOUT_VERB,12236 SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC269_FIXUP_DELL1_LIMIT_INT_MIC_BOOST, 10824 12237 {0x19, 0x40000000}, 10825 12238 {0x1a, 0x40000000}), 12239 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC2XX_FIXUP_HEADSET_MIC, 12240 {0x19, 0x40000000}), 12241 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1558, "Clevo", ALC2XX_FIXUP_HEADSET_MIC, 12242 {0x19, 0x40000000}), 10826 12243 #endif 10827 12244 {0} … … 10882 12299 spec->gen.shared_mic_vref_pin = 0x18; 10883 12300 codec->power_save_node = 0; 12301 spec->en_3kpull_low = true; 10884 12302 10885 12303 #ifdef CONFIG_PM … … 10964 12382 spec->init_hook = alc256_init; 10965 12383 spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */ 12384 if (codec->core.vendor_id == 0x10ec0236 && 12385 codec->bus->pci->vendor != PCI_VENDOR_ID_AMD) 12386 spec->en_3kpull_low = false; 10966 12387 break; 10967 12388 case 0x10ec0257: … … 10970 12391 spec->init_hook = alc256_init; 10971 12392 spec->gen.mixer_nid = 0; 12393 spec->en_3kpull_low = false; 10972 12394 break; 10973 12395 case 0x10ec0215: … … 11009 12431 spec->gen.mixer_nid = 0; /* no loopback on ALC300 */ 11010 12432 break; 12433 case 0x10ec0222: 11011 12434 case 0x10ec0623: 11012 12435 spec->codec_variant = ALC269_TYPE_ALC623; 12436 spec->shutup = alc222_shutup; 12437 spec->init_hook = alc222_init; 11013 12438 break; 11014 12439 case 0x10ec0700: … … 11175 12600 }; 11176 12601 11177 static const struct snd_pci_quirk alc861_fixup_tbl[] = {12602 static const struct hda_quirk alc861_fixup_tbl[] = { 11178 12603 SND_PCI_QUIRK(0x1043, 0x1253, "ASUS W7J", ALC660_FIXUP_ASUS_W7J), 11179 12604 SND_PCI_QUIRK(0x1043, 0x1263, "ASUS Z35HL", ALC660_FIXUP_ASUS_W7J), … … 11285 12710 .chain_id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE, 11286 12711 }, 11287 #ifdef TARGET_OS2xxx12712 #ifdef NOT_USED 11288 12713 [ALC256_FIXUP_ACER_HEADSET_MIC] = { 11289 12714 .type = HDA_FIXUP_PINS, … … 11299 12724 }; 11300 12725 11301 static const struct snd_pci_quirk alc861vd_fixup_tbl[] = {12726 static const struct hda_quirk alc861vd_fixup_tbl[] = { 11302 12727 SND_PCI_QUIRK(0x103c, 0x30bf, "HP TX1000", ALC861VD_FIX_DALLAS), 11303 12728 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS A7-K", ALC660VD_FIX_ASUS_GPIO1), … … 11531 12956 snd_hda_gen_hp_automute(codec, jack); 11532 12957 vref = spec->gen.hp_jack_present ? (PIN_HP | AC_PINCTL_VREF_100) : PIN_HP; 11533 snd_hda_codec_write(codec, 0x1b, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 11534 vref); 12958 snd_hda_set_pin_ctl(codec, 0x1b, vref); 11535 12959 } 11536 12960 … … 11540 12964 struct alc_spec *spec = codec->spec; 11541 12965 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 12966 spec->gen.hp_automute_hook = alc897_hp_automute_hook; 12967 spec->no_shutup_pins = 1; 12968 } 12969 if (action == HDA_FIXUP_ACT_PROBE) { 12970 snd_hda_set_pin_ctl_cache(codec, 0x1a, PIN_IN | AC_PINCTL_VREF_100); 12971 } 12972 } 12973 12974 static void alc897_fixup_lenovo_headset_mode(struct hda_codec *codec, 12975 const struct hda_fixup *fix, int action) 12976 { 12977 struct alc_spec *spec = codec->spec; 12978 12979 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 12980 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; 11542 12981 spec->gen.hp_automute_hook = alc897_hp_automute_hook; 11543 12982 } … … 11627 13066 ALC897_FIXUP_HEADSET_MIC_PIN, 11628 13067 ALC897_FIXUP_HP_HSMIC_VERB, 13068 ALC897_FIXUP_LENOVO_HEADSET_MODE, 13069 ALC897_FIXUP_HEADSET_MIC_PIN2, 13070 ALC897_FIXUP_UNIS_H3C_X500S, 13071 ALC897_FIXUP_HEADSET_MIC_PIN3, 11629 13072 }; 11630 13073 … … 11771 13214 .v.func = alc272_fixup_mario, 11772 13215 }, 11773 #ifdef TARGET_OS2xxx13216 #ifdef NOT_USED 11774 13217 [ALC662_FIXUP_CZC_ET26] = { 11775 13218 .type = HDA_FIXUP_PINS, … … 11993 13436 .chain_id = ALC668_FIXUP_DELL_MIC_NO_PRESENCE 11994 13437 }, 11995 #ifdef TARGET_OS2xxx13438 #ifdef NOT_USED 11996 13439 [ALC662_FIXUP_DELL_MIC_NO_PRESENCE] = { 11997 13440 .type = HDA_FIXUP_PINS, … … 12009 13452 .v.func = alc_fixup_headset_mode_alc662, 12010 13453 }, 12011 #ifdef TARGET_OS2xxx13454 #ifdef NOT_USED 12012 13455 [ALC668_FIXUP_DELL_MIC_NO_PRESENCE] = { 12013 13456 .type = HDA_FIXUP_PINS, … … 12072 13515 .chain_id = ALC662_FIXUP_BASS_CHMAP 12073 13516 }, 12074 #ifdef TARGET_OS2xxx13517 #ifdef NOT_USED 12075 13518 [ALC668_FIXUP_ASUS_Nx51] = { 12076 13519 .type = HDA_FIXUP_PINS, … … 12106 13549 .v.func = alc_fixup_headset_mode, 12107 13550 }, 12108 #ifdef TARGET_OS2xxx13551 #ifdef NOT_USED 12109 13552 [ALC891_FIXUP_DELL_MIC_NO_PRESENCE] = { 12110 13553 .type = HDA_FIXUP_PINS, … … 12137 13580 .v.func = alc662_fixup_usi_headset_mic, 12138 13581 }, 12139 #ifdef TARGET_OS2xxx13582 #ifdef NOT_USED 12140 13583 [ALC662_FIXUP_USI_HEADSET_MODE] = { 12141 13584 .type = HDA_FIXUP_PINS, … … 12157 13600 .v.func = alc662_fixup_aspire_ethos_hp, 12158 13601 }, 12159 #ifdef TARGET_OS2xxx13602 #ifdef NOT_USED 12160 13603 [ALC669_FIXUP_ACER_ASPIRE_ETHOS] = { 12161 13604 .type = HDA_FIXUP_PINS, … … 12174 13617 .v.func = alc671_fixup_hp_headset_mic2, 12175 13618 }, 12176 #ifdef TARGET_OS2xxx13619 #ifdef NOT_USED 12177 13620 [ALC662_FIXUP_ACER_X2660G_HEADSET_MODE] = { 12178 13621 .type = HDA_FIXUP_PINS, … … 12210 13653 .chain_id = ALC668_FIXUP_MIC_DET_COEF 12211 13654 }, 12212 #ifdef TARGET_OS2xxx13655 #ifdef NOT_USED 12213 13656 [ALC668_FIXUP_MIC_DET_COEF] = { 12214 13657 .type = HDA_FIXUP_VERBS, … … 12224 13667 .v.func = alc897_fixup_lenovo_headset_mic, 12225 13668 }, 12226 #ifdef TARGET_OS2xxx13669 #ifdef NOT_USED 12227 13670 [ALC897_FIXUP_HEADSET_MIC_PIN] = { 12228 13671 .type = HDA_FIXUP_PINS, … … 12242 13685 }, 12243 13686 #endif 13687 [ALC897_FIXUP_LENOVO_HEADSET_MODE] = { 13688 .type = HDA_FIXUP_FUNC, 13689 .v.func = alc897_fixup_lenovo_headset_mode, 13690 }, 13691 #ifdef NOT_USED 13692 [ALC897_FIXUP_HEADSET_MIC_PIN2] = { 13693 .type = HDA_FIXUP_PINS, 13694 .v.pins = (const struct hda_pintbl[]) { 13695 { 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */ 13696 { } 13697 }, 13698 .chained = true, 13699 .chain_id = ALC897_FIXUP_LENOVO_HEADSET_MODE 13700 }, 13701 [ALC897_FIXUP_UNIS_H3C_X500S] = { 13702 .type = HDA_FIXUP_VERBS, 13703 .v.verbs = (const struct hda_verb[]) { 13704 { 0x14, AC_VERB_SET_EAPD_BTLENABLE, 0 }, 13705 {} 13706 }, 13707 }, 13708 [ALC897_FIXUP_HEADSET_MIC_PIN3] = { 13709 .type = HDA_FIXUP_PINS, 13710 .v.pins = (const struct hda_pintbl[]) { 13711 { 0x19, 0x03a11050 }, /* use as headset mic */ 13712 { } 13713 }, 13714 }, 13715 #endif 12244 13716 }; 12245 13717 12246 static const struct snd_pci_quirk alc662_fixup_tbl[] = {13718 static const struct hda_quirk alc662_fixup_tbl[] = { 12247 13719 SND_PCI_QUIRK(0x1019, 0x9087, "ECS", ALC662_FIXUP_ASUS_MODE2), 13720 SND_PCI_QUIRK(0x1019, 0x9859, "JP-IK LEAP W502", ALC897_FIXUP_HEADSET_MIC_PIN3), 12248 13721 SND_PCI_QUIRK(0x1025, 0x022f, "Acer Aspire One", ALC662_FIXUP_INV_DMIC), 12249 13722 SND_PCI_QUIRK(0x1025, 0x0241, "Packard Bell DOTS", ALC662_FIXUP_INV_DMIC), … … 12267 13740 SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 12268 13741 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), 13742 SND_PCI_QUIRK(0x103c, 0x870c, "HP", ALC897_FIXUP_HP_HSMIC_VERB), 12269 13743 SND_PCI_QUIRK(0x103c, 0x8719, "HP", ALC897_FIXUP_HP_HSMIC_VERB), 13744 SND_PCI_QUIRK(0x103c, 0x872b, "HP", ALC897_FIXUP_HP_HSMIC_VERB), 12270 13745 SND_PCI_QUIRK(0x103c, 0x873e, "HP", ALC671_FIXUP_HP_HEADSET_MIC2), 13746 SND_PCI_QUIRK(0x103c, 0x8768, "HP Slim Desktop S01", ALC671_FIXUP_HP_HEADSET_MIC2), 12271 13747 SND_PCI_QUIRK(0x103c, 0x877e, "HP 288 Pro G6", ALC671_FIXUP_HP_HEADSET_MIC2), 12272 13748 SND_PCI_QUIRK(0x103c, 0x885f, "HP 288 Pro G8", ALC671_FIXUP_HP_HEADSET_MIC2), … … 12290 13766 SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC662_FIXUP_LENOVO_MULTI_CODECS), 12291 13767 SND_PCI_QUIRK(0x17aa, 0x1057, "Lenovo P360", ALC897_FIXUP_HEADSET_MIC_PIN), 13768 SND_PCI_QUIRK(0x17aa, 0x1064, "Lenovo P3 Tower", ALC897_FIXUP_HEADSET_MIC_PIN), 12292 13769 SND_PCI_QUIRK(0x17aa, 0x32ca, "Lenovo ThinkCentre M80", ALC897_FIXUP_HEADSET_MIC_PIN), 12293 13770 SND_PCI_QUIRK(0x17aa, 0x32cb, "Lenovo ThinkCentre M70", ALC897_FIXUP_HEADSET_MIC_PIN), 12294 13771 SND_PCI_QUIRK(0x17aa, 0x32cf, "Lenovo ThinkCentre M950", ALC897_FIXUP_HEADSET_MIC_PIN), 12295 13772 SND_PCI_QUIRK(0x17aa, 0x32f7, "Lenovo ThinkCentre M90", ALC897_FIXUP_HEADSET_MIC_PIN), 13773 SND_PCI_QUIRK(0x17aa, 0x3321, "Lenovo ThinkCentre M70 Gen4", ALC897_FIXUP_HEADSET_MIC_PIN), 13774 SND_PCI_QUIRK(0x17aa, 0x331b, "Lenovo ThinkCentre M90 Gen4", ALC897_FIXUP_HEADSET_MIC_PIN), 13775 SND_PCI_QUIRK(0x17aa, 0x3364, "Lenovo ThinkCentre M90 Gen5", ALC897_FIXUP_HEADSET_MIC_PIN), 13776 SND_PCI_QUIRK(0x17aa, 0x3742, "Lenovo TianYi510Pro-14IOB", ALC897_FIXUP_HEADSET_MIC_PIN2), 12296 13777 SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD), 12297 13778 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD), … … 12301 13782 SND_PCI_QUIRK(0x1b35, 0x1234, "CZC ET26", ALC662_FIXUP_CZC_ET26), 12302 13783 SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T), 13784 SND_PCI_QUIRK(0x1c6c, 0x1239, "Compaq N14JP6-V2", ALC897_FIXUP_HP_HSMIC_VERB), 12303 13785 12304 13786 #if 0 … … 12395 13877 {.id = ALC662_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"}, 12396 13878 {.id = ALC669_FIXUP_ACER_ASPIRE_ETHOS, .name = "aspire-ethos"}, 13879 {.id = ALC897_FIXUP_UNIS_H3C_X500S, .name = "unis-h3c-x500s"}, 12397 13880 {0} 12398 13881 }; 12399 13882 12400 13883 static const struct snd_hda_pin_quirk alc662_pin_fixup_tbl[] = { 12401 #ifdef TARGET_OS2xxx13884 #ifdef NOT_USED 12402 13885 SND_HDA_PIN_QUIRK(0x10ec0867, 0x1028, "Dell", ALC891_FIXUP_DELL_MIC_NO_PRESENCE, 12403 13886 {0x17, 0x02211010}, … … 12510 13993 goto error; 12511 13994 12512 #ifndef TARGET_OS212513 13995 if (!spec->gen.no_analog && spec->gen.beep_nid) { 12514 13996 switch (codec->core.vendor_id) { … … 12529 14011 goto error; 12530 14012 } 12531 #endif 14013 12532 14014 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); 12533 14015 -
GPL/trunk/alsa-kernel/pci/hda/patch_sigmatel.c
r717 r772 214 214 /* beep widgets */ 215 215 hda_nid_t anabeep_nid; 216 bool beep_power_on; 216 217 217 218 /* SPDIF-out mux */ … … 1482 1483 }; 1483 1484 1484 static const struct snd_pci_quirk stac9200_fixup_tbl[] = {1485 static const struct hda_quirk stac9200_fixup_tbl[] = { 1485 1486 /* SigmaTel reference board */ 1486 1487 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, … … 1703 1704 }; 1704 1705 1705 static const struct snd_pci_quirk stac925x_fixup_tbl[] = {1706 static const struct hda_quirk stac925x_fixup_tbl[] = { 1706 1707 /* SigmaTel reference board */ 1707 1708 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_REF), … … 1727 1728 1728 1729 static const struct hda_pintbl ref92hd73xx_pin_configs[] = { 1730 // Port A-H 1729 1731 { 0x0a, 0x02214030 }, 1730 1732 { 0x0b, 0x02a19040 }, … … 1735 1737 { 0x10, 0x01014020 }, 1736 1738 { 0x11, 0x01014030 }, 1739 // CD in 1737 1740 { 0x12, 0x02319040 }, 1741 // Digial Mic ins 1738 1742 { 0x13, 0x90a000f0 }, 1739 1743 { 0x14, 0x90a000f0 }, 1744 // Digital outs 1740 1745 { 0x22, 0x01452050 }, 1741 1746 { 0x23, 0x01452050 }, … … 1778 1783 1779 1784 static const struct hda_pintbl intel_dg45id_pin_configs[] = { 1785 // Analog outputs 1780 1786 { 0x0a, 0x02214230 }, 1781 1787 { 0x0b, 0x02A19240 }, … … 1785 1791 { 0x0f, 0x01011212 }, 1786 1792 { 0x10, 0x01016211 }, 1793 // Digital output 1794 { 0x22, 0x01451380 }, 1795 { 0x23, 0x40f000f0 }, 1787 1796 {0} 1788 1797 }; … … 1984 1993 }; 1985 1994 1986 static const struct snd_pci_quirk stac92hd73xx_fixup_tbl[] = {1995 static const struct hda_quirk stac92hd73xx_fixup_tbl[] = { 1987 1996 /* SigmaTel reference board */ 1988 1997 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, … … 1990 1999 SND_PCI_QUIRK(PCI_VENDOR_ID_DFI, 0x3101, 1991 2000 "DFI LanParty", STAC_92HD73XX_REF), 2001 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x5001, 2002 "Intel DP45SG", STAC_92HD73XX_INTEL), 1992 2003 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x5002, 1993 2004 "Intel DG45ID", STAC_92HD73XX_INTEL), … … 2800 2811 }; 2801 2812 2802 static const struct snd_pci_quirk stac92hd83xxx_fixup_tbl[] = {2813 static const struct hda_quirk stac92hd83xxx_fixup_tbl[] = { 2803 2814 /* SigmaTel reference board */ 2804 2815 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, … … 3283 3294 }; 3284 3295 3285 static const struct snd_pci_quirk stac92hd71bxx_fixup_tbl[] = {3296 static const struct hda_quirk stac92hd71bxx_fixup_tbl[] = { 3286 3297 /* SigmaTel reference board */ 3287 3298 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, … … 3543 3554 3544 3555 /* codec SSIDs for Intel Mac sharing the same PCI SSID 8384:7680 */ 3545 static const struct snd_pci_quirk stac922x_intel_mac_fixup_tbl[] = {3556 static const struct hda_quirk stac922x_intel_mac_fixup_tbl[] = { 3546 3557 SND_PCI_QUIRK(0x0000, 0x0100, "Mac Mini", STAC_INTEL_MAC_V3), 3547 3558 SND_PCI_QUIRK(0x106b, 0x0800, "Mac", STAC_INTEL_MAC_V1), … … 3687 3698 }; 3688 3699 3689 static const struct snd_pci_quirk stac922x_fixup_tbl[] = {3700 static const struct hda_quirk stac922x_fixup_tbl[] = { 3690 3701 /* SigmaTel reference board */ 3691 3702 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, … … 4050 4061 }; 4051 4062 4052 static const struct snd_pci_quirk stac927x_fixup_tbl[] = {4063 static const struct hda_quirk stac927x_fixup_tbl[] = { 4053 4064 /* SigmaTel reference board */ 4054 4065 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, … … 4260 4271 }; 4261 4272 4262 static const struct snd_pci_quirk stac9205_fixup_tbl[] = {4273 static const struct hda_quirk stac9205_fixup_tbl[] = { 4263 4274 /* SigmaTel reference board */ 4264 4275 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, … … 4348 4359 }; 4349 4360 4350 static const struct snd_pci_quirk stac92hd95_fixup_tbl[] = {4361 static const struct hda_quirk stac92hd95_fixup_tbl[] = { 4351 4362 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1911, "HP Spectre 13", STAC_92HD95_HP_BASS), 4352 4363 {0} /* terminator */ … … 4413 4424 /* IDT/STAC codecs have linear beep tone parameter */ 4414 4425 codec->beep->linear_tone = spec->linear_tone_beep; 4426 /* keep power up while beep is enabled */ 4427 codec->beep->keep_power_at_enable = 1; 4415 4428 /* if no beep switch is available, make its own one */ 4416 4429 caps = query_amp_caps(codec, nid, HDA_OUTPUT); … … 4545 4558 return 0; 4546 4559 } 4560 4561 static int stac_check_power_status(struct hda_codec *codec, hda_nid_t nid) 4562 { 4563 #ifdef CONFIG_SND_HDA_INPUT_BEEP 4564 struct sigmatel_spec *spec = codec->spec; 4565 #endif 4566 int ret = snd_hda_gen_check_power_status(codec, nid); 4567 4568 #ifdef CONFIG_SND_HDA_INPUT_BEEP 4569 if (nid == spec->gen.beep_nid && codec->beep) { 4570 if (codec->beep->enabled != spec->beep_power_on) { 4571 spec->beep_power_on = codec->beep->enabled; 4572 if (spec->beep_power_on) 4573 snd_hda_power_up_pm(codec); 4574 else 4575 snd_hda_power_down_pm(codec); 4576 } 4577 ret |= spec->beep_power_on; 4578 } 4579 #endif 4580 return ret; 4581 } 4547 4582 #else 4548 4583 #define stac_suspend NULL … … 4557 4592 #ifdef CONFIG_PM 4558 4593 .suspend = stac_suspend, 4594 .check_power_status = stac_check_power_status, 4559 4595 #endif 4560 4596 }; … … 5101 5137 }; 5102 5138 5103 static const struct snd_pci_quirk stac9872_fixup_tbl[] = {5139 static const struct hda_quirk stac9872_fixup_tbl[] = { 5104 5140 SND_PCI_QUIRK_MASK(0x104d, 0xfff0, 0x81e0, 5105 5141 "Sony VAIO F/S", STAC_9872_VAIO), -
GPL/trunk/alsa-kernel/pci/hda/patch_via.c
r717 r772 458 458 snd_hda_codec_set_pincfg(codec, nid, def_conf); 459 459 } 460 461 return;462 460 } 463 461 … … 830 828 nums = snd_hda_get_connections(codec, spec->gen.mixer_nid, conn, 831 829 ARRAY_SIZE(conn) - 1); 830 if (nums < 0) 831 return nums; 832 832 833 for (i = 0; i < nums; i++) { 833 834 if (get_wcaps_type(get_wcaps(codec, conn[i])) == AC_WID_AUD_OUT) … … 1062 1063 }; 1063 1064 1064 static const struct snd_pci_quirk vt2002p_fixups[] = {1065 static const struct hda_quirk vt2002p_fixups[] = { 1065 1066 SND_PCI_QUIRK(0x1043, 0x13f7, "Asus B23E", VIA_FIXUP_POWER_SAVE), 1066 1067 SND_PCI_QUIRK(0x1043, 0x1487, "Asus G75", VIA_FIXUP_ASUS_G75),
Note:
See TracChangeset
for help on using the changeset viewer.
