Changeset 777 for GPL/trunk/alsa-kernel/pci/hda
- Timestamp:
- Apr 21, 2025, 7:17:25 PM (7 months ago)
- Location:
- GPL/trunk
- Files:
-
- 23 edited
- 1 copied
-
. (modified) (1 prop)
-
alsa-kernel/pci/hda/Makefile (modified) (1 diff)
-
alsa-kernel/pci/hda/hda_beep.h (modified) (1 diff)
-
alsa-kernel/pci/hda/hda_codec.c (modified) (20 diffs)
-
alsa-kernel/pci/hda/hda_component.c (copied) (copied from GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_component.c ) (1 diff)
-
alsa-kernel/pci/hda/hda_component2.h (modified) (2 diffs)
-
alsa-kernel/pci/hda/hda_controller.c (modified) (14 diffs)
-
alsa-kernel/pci/hda/hda_controller.h (modified) (1 diff)
-
alsa-kernel/pci/hda/hda_eld.c (modified) (1 diff)
-
alsa-kernel/pci/hda/hda_generic.c (modified) (4 diffs)
-
alsa-kernel/pci/hda/hda_generic.h (modified) (2 diffs)
-
alsa-kernel/pci/hda/hda_intel.c (modified) (26 diffs)
-
alsa-kernel/pci/hda/hda_intel.h (modified) (1 diff)
-
alsa-kernel/pci/hda/hda_intel_trace.h (modified) (2 diffs)
-
alsa-kernel/pci/hda/hda_sysfs.c (modified) (3 diffs)
-
alsa-kernel/pci/hda/patch_analog.c (modified) (3 diffs)
-
alsa-kernel/pci/hda/patch_ca0132.c (modified) (11 diffs)
-
alsa-kernel/pci/hda/patch_cirrus.c (modified) (3 diffs)
-
alsa-kernel/pci/hda/patch_cmedia.c (modified) (3 diffs)
-
alsa-kernel/pci/hda/patch_conexant.c (modified) (13 diffs)
-
alsa-kernel/pci/hda/patch_hdmi.c (modified) (13 diffs)
-
alsa-kernel/pci/hda/patch_realtek.c (modified) (72 diffs)
-
alsa-kernel/pci/hda/patch_sigmatel.c (modified) (4 diffs)
-
alsa-kernel/pci/hda/patch_via.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-exp merged: 766-767,770-771,773-774
- Property svn:mergeinfo changed
-
GPL/trunk/alsa-kernel/pci/hda/Makefile
r709 r777 12 12 # 13 13 #=================================================================== 14 FILES = hda_intel.obj hda_codec.obj hda_controller.obj hda_auto_parser.obj hda_jack.obj & 15 hda_proc.obj hda_generic.obj hda_hwdep.obj hda_sysfs.obj hda_bind.obj hda_eld.obj & 16 patch_analog.obj patch_cmedia.obj patch_conexant.obj patch_ca0110.obj patch_ca0132.obj patch_cirrus.obj & 17 patch_hdmi.obj patch_realtek.obj patch_si3054.obj patch_sigmatel.obj patch_via.obj 14 FILES = hda_intel.obj hda_codec.obj hda_controller.obj hda_auto_parser.obj & 15 hda_jack.obj hda_proc.obj hda_generic.obj hda_hwdep.obj hda_sysfs.obj & 16 hda_bind.obj hda_eld.obj hda_component.obj patch_analog.obj & 17 patch_cmedia.obj patch_conexant.obj patch_ca0110.obj patch_ca0132.obj & 18 patch_cirrus.obj patch_hdmi.obj patch_realtek.obj patch_si3054.obj & 19 patch_sigmatel.obj patch_via.obj 18 20 19 21 TARGET = hda -
GPL/trunk/alsa-kernel/pci/hda/hda_beep.h
r772 r777 28 28 unsigned int keep_power_at_enable:1; /* set by driver */ 29 29 struct work_struct beep_work; /* scheduled task for beep event */ 30 struct mutex mutex;31 30 void (*power_hook)(struct hda_beep *beep, bool on); 32 31 }; -
GPL/trunk/alsa-kernel/pci/hda/hda_codec.c
r772 r777 89 89 int len; 90 90 hda_nid_t nid; 91 hda_nid_t conns[] ;91 hda_nid_t conns[] __counted_by(len); 92 92 }; 93 93 … … 625 625 EXPORT_SYMBOL_GPL(snd_hda_shutup_pins); 626 626 627 #ifdef CONFIG_PM628 627 /* Restore the pin controls cleared previously via snd_hda_shutup_pins() */ 629 628 static void restore_shutup_pins(struct hda_codec *codec) … … 643 642 codec->pins_shutup = 0; 644 643 } 645 #endif646 644 647 645 static void hda_jackpoll_work(struct work_struct *work) … … 1014 1012 codec->addr = codec_addr; 1015 1013 1016 #ifdef CONFIG_PM1017 1014 codec->power_jiffies = jiffies; 1018 #endif1019 1015 1020 1016 snd_hda_sysfs_init(codec); … … 1251 1247 } 1252 1248 1253 #ifdef CONFIG_PM1254 1249 /* clean up all streams; called from suspend */ 1255 1250 static void hda_cleanup_all_streams(struct hda_codec *codec) … … 1263 1258 } 1264 1259 } 1265 #endif1266 1260 1267 1261 /* … … 1515 1509 maxval = get_amp_max_value(codec, nid, dir, 0); 1516 1510 if (val > maxval) 1517 val = maxval;1511 return -EINVAL; 1518 1512 return snd_hda_codec_amp_update(codec, nid, ch, dir, idx, 1519 1513 HDA_AMP_VOLMASK, val); … … 1566 1560 long *valp = ucontrol->value.integer.value; 1567 1561 int change = 0; 1562 int err; 1568 1563 1569 1564 if (chs & 1) { 1570 change = update_amp_value(codec, nid, 0, dir, idx, ofs, *valp); 1565 err = update_amp_value(codec, nid, 0, dir, idx, ofs, *valp); 1566 if (err < 0) 1567 return err; 1568 change |= err; 1571 1569 valp++; 1572 1570 } 1573 if (chs & 2) 1574 change |= update_amp_value(codec, nid, 1, dir, idx, ofs, *valp); 1571 if (chs & 2) { 1572 err = update_amp_value(codec, nid, 1, dir, idx, ofs, *valp); 1573 if (err < 0) 1574 return err; 1575 change |= err; 1576 } 1575 1577 return change; 1576 1578 } … … 1745 1747 * snd_hda_add_nid - Assign a NID to a control element 1746 1748 * @codec: HD-audio codec 1747 * @nid: corresponding NID (optional)1748 1749 * @kctl: the control element to assign 1749 1750 * @index: index to kctl 1751 * @nid: corresponding NID (optional) 1750 1752 * 1751 1753 * Add the given control element to an array inside the codec instance. … … 2174 2176 2175 2177 if (chs & 1) { 2178 if (*valp < 0 || *valp > 1) 2179 return -EINVAL; 2176 2180 change = snd_hda_codec_amp_update(codec, nid, 0, dir, idx, 2177 2181 HDA_AMP_MUTE, … … 2179 2183 valp++; 2180 2184 } 2181 if (chs & 2) 2185 if (chs & 2) { 2186 if (*valp < 0 || *valp > 1) 2187 return -EINVAL; 2182 2188 change |= snd_hda_codec_amp_update(codec, nid, 1, dir, idx, 2183 2189 HDA_AMP_MUTE, 2184 2190 *valp ? 0 : HDA_AMP_MUTE); 2191 } 2185 2192 hda_call_check_power_status(codec, nid); 2186 2193 return change; … … 2878 2885 #endif 2879 2886 2880 #ifdef CONFIG_PM2881 2887 /* update the power on/off account with the current jiffies */ 2882 2888 static void update_power_acct(struct hda_codec *codec, bool on) … … 2986 2992 } 2987 2993 2988 #endif /* CONFIG_PM */2989 2990 #ifdef CONFIG_PM_SLEEP2991 2994 static int hda_codec_pm_prepare(struct device *dev) 2992 2995 { … … 3045 3048 return pm_runtime_force_resume(dev); 3046 3049 } 3047 #endif /* CONFIG_PM_SLEEP */3048 3050 3049 3051 /* referred in hda_bind.c */ 3050 3052 const struct dev_pm_ops hda_codec_driver_pm = { 3051 #ifdef CONFIG_PM_SLEEP 3052 .prepare = hda_codec_pm_prepare, 3053 .complete = hda_codec_pm_complete, 3054 .suspend = hda_codec_pm_suspend, 3055 .resume = hda_codec_pm_resume, 3056 .freeze = hda_codec_pm_freeze, 3057 .thaw = hda_codec_pm_thaw, 3058 .poweroff = hda_codec_pm_suspend, 3059 .restore = hda_codec_pm_restore, 3060 #endif /* CONFIG_PM_SLEEP */ 3061 SET_RUNTIME_PM_OPS(hda_codec_runtime_suspend, hda_codec_runtime_resume, 3062 NULL) 3053 .prepare = pm_sleep_ptr(hda_codec_pm_prepare), 3054 .complete = pm_sleep_ptr(hda_codec_pm_complete), 3055 .suspend = pm_sleep_ptr(hda_codec_pm_suspend), 3056 .resume = pm_sleep_ptr(hda_codec_pm_resume), 3057 .freeze = pm_sleep_ptr(hda_codec_pm_freeze), 3058 .thaw = pm_sleep_ptr(hda_codec_pm_thaw), 3059 .poweroff = pm_sleep_ptr(hda_codec_pm_suspend), 3060 .restore = pm_sleep_ptr(hda_codec_pm_restore), 3061 .runtime_suspend = pm_ptr(hda_codec_runtime_suspend), 3062 .runtime_resume = pm_ptr(hda_codec_runtime_resume), 3063 3063 }; 3064 3064 … … 3185 3185 info->rates ? NULL : &info->rates, 3186 3186 info->formats ? NULL : &info->formats, 3187 info->subformats ? NULL : &info->subformats, 3187 3188 info->maxbps ? NULL : &info->maxbps); 3188 3189 if (err < 0){ … … 3335 3336 int stream; 3336 3337 3337 for (stream = 0; stream < 2; stream++) {3338 for_each_pcm_streams(stream) { 3338 3339 struct hda_pcm_stream *info = &cpcm->stream[stream]; 3339 3340 … … 3447 3448 EXPORT_SYMBOL_GPL(snd_hda_add_new_ctls); 3448 3449 3449 #ifdef CONFIG_PM3450 3450 /** 3451 3451 * snd_hda_codec_set_power_save - Configure codec's runtime PM … … 3538 3538 } 3539 3539 EXPORT_SYMBOL_GPL(snd_hda_check_amp_list_power); 3540 #endif3541 3540 3542 3541 /* … … 3780 3779 &mout->spdif_rates, 3781 3780 &mout->spdif_formats, 3781 NULL, 3782 3782 &mout->spdif_maxbps); 3783 3783 } … … 4083 4083 cancel_delayed_work_sync(&codec->jackpoll_work); 4084 4084 #endif 4085 #ifdef CONFIG_PM4086 4085 if (hda_codec_is_power_on(codec)) { 4087 4086 hda_call_codec_suspend(codec); 4088 4087 hda_call_codec_resume(codec); 4089 4088 } 4090 #endif4091 4089 } 4092 4090 } -
GPL/trunk/alsa-kernel/pci/hda/hda_component.c
r775 r777 14 14 #include "hda_component2.h" 15 15 #include "hda_local.h" 16 #include <ctype.h> 16 17 17 18 #ifdef CONFIG_ACPI -
GPL/trunk/alsa-kernel/pci/hda/hda_component2.h
r772 r777 7 7 */ 8 8 9 #ifndef __HDA_COMPONENT_H__ 10 #define __HDA_COMPONENT_H__ 11 12 #include <linux/acpi.h> 9 13 #include <linux/component.h> 14 #include <linux/mutex.h> 15 #include <sound/hda_codec.h> 10 16 11 17 #define HDA_MAX_COMPONENTS 4 … … 15 21 struct device *dev; 16 22 char name[HDA_MAX_NAME_SIZE]; 17 struct hda_codec *codec; 23 struct acpi_device *adev; 24 bool acpi_notifications_supported; 25 // void (*acpi_notify)(acpi_handle handle, u32 event, struct device *dev); 18 26 void (*pre_playback_hook)(struct device *dev, int action); 19 27 void (*playback_hook)(struct device *dev, int action); 20 28 void (*post_playback_hook)(struct device *dev, int action); 21 29 }; 30 31 struct hda_component_parent { 32 struct mutex mutex; 33 struct hda_codec *codec; 34 struct hda_component comps[HDA_MAX_COMPONENTS]; 35 }; 36 37 #ifdef CONFIG_ACPI 38 void hda_component_acpi_device_notify(struct hda_component_parent *parent, 39 acpi_handle handle, u32 event, void *data); 40 int hda_component_manager_bind_acpi_notifications(struct hda_codec *cdc, 41 struct hda_component_parent *parent, 42 acpi_notify_handler handler, void *data); 43 void hda_component_manager_unbind_acpi_notifications(struct hda_codec *cdc, 44 struct hda_component_parent *parent, 45 acpi_notify_handler handler); 46 #else 47 static inline void hda_component_acpi_device_notify(struct hda_component_parent *parent, 48 acpi_handle handle, 49 u32 event, 50 void *data) 51 { 52 } 53 54 static inline int hda_component_manager_bind_acpi_notifications(struct hda_codec *cdc, 55 struct hda_component_parent *parent, 56 acpi_notify_handler handler, 57 void *data) 58 59 { 60 return 0; 61 } 62 63 static inline void hda_component_manager_unbind_acpi_notifications(struct hda_codec *cdc, 64 struct hda_component_parent *parent, 65 acpi_notify_handler handler) 66 { 67 } 68 #endif /* ifdef CONFIG_ACPI */ 69 70 void hda_component_manager_playback_hook(struct hda_component_parent *parent, int action); 71 72 int hda_component_manager_init(struct hda_codec *cdc, 73 struct hda_component_parent *parent, int count, 74 const char *bus, const char *hid, 75 const char *match_str, 76 const struct component_master_ops *ops); 77 78 void hda_component_manager_free(struct hda_component_parent *parent, 79 const struct component_master_ops *ops); 80 81 int hda_component_manager_bind(struct hda_codec *cdc, struct hda_component_parent *parent); 82 83 static inline struct hda_component *hda_component_from_index(struct hda_component_parent *parent, 84 int index) 85 { 86 if (!parent) 87 return NULL; 88 89 if (index < 0 || index >= ARRAY_SIZE(parent->comps)) 90 return NULL; 91 92 return &parent->comps[index]; 93 } 94 95 static inline void hda_component_manager_unbind(struct hda_codec *cdc, 96 struct hda_component_parent *parent) 97 { 98 mutex_lock(&parent->mutex); 99 component_unbind_all(hda_codec_dev(cdc), parent); 100 mutex_unlock(&parent->mutex); 101 } 102 103 #endif /* ifndef __HDA_COMPONENT_H__ */ -
GPL/trunk/alsa-kernel/pci/hda/hda_controller.c
r772 r777 4 4 * Implementation of primary alsa driver code base for Intel HD Audio. 5 5 * 6 * Copyright(c) 2004 Intel Corporation . All rights reserved.6 * Copyright(c) 2004 Intel Corporation 7 7 * 8 8 * Copyright (c) 2004 Takashi Iwai <tiwai@suse.de> … … 25 25 #include <sound/core.h> 26 26 #include <sound/initval.h> 27 #include <sound/pcm_params.h> 27 28 #include "hda_controller.h" 28 29 #include "hda_local.h" … … 117 118 //NOT_USED struct azx *chip = apcm->chip; 118 119 struct azx_dev *azx_dev = get_azx_dev(substream); 120 struct hdac_stream *hdas = azx_stream(azx_dev); 119 121 int ret = 0; 120 122 … … 126 128 } 127 129 128 azx_dev->core.bufsize = 0; 129 azx_dev->core.period_bytes = 0; 130 azx_dev->core.format_val = 0; 130 /* Set up BDLEs here, return -ENOMEM if too many BDLEs are required */ 131 hdas->bufsize = params_buffer_bytes(hw_params); 132 hdas->period_bytes = params_period_bytes(hw_params); 133 hdas->format_val = 0; 134 hdas->no_period_wakeup = 135 (hw_params->info & SNDRV_PCM_INFO_NO_PERIOD_WAKEUP) && 136 (hw_params->flags & SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP); 137 if (snd_hdac_stream_setup_periods(hdas) < 0) 138 ret = -ENOMEM; 131 139 132 140 unlock: … … 160 168 struct hda_pcm_stream *hinfo = to_hda_pcm_stream(substream); 161 169 struct snd_pcm_runtime *runtime = substream->runtime; 162 unsigned int format_val, stream_tag ;170 unsigned int format_val, stream_tag, bits; 163 171 int err; 164 172 struct hda_spdif_out *spdif = … … 174 182 175 183 snd_hdac_stream_reset(azx_stream(azx_dev)); 176 format_val = snd_hdac_calc_stream_format(runtime->rate, 177 runtime->channels, 178 runtime->format, 179 hinfo->maxbps, 180 ctls); 184 bits = snd_hdac_stream_format_bits(runtime->format, SNDRV_PCM_SUBFORMAT_STD, hinfo->maxbps); 185 186 format_val = snd_hdac_spdif_stream_format(runtime->channels, bits, runtime->rate, ctls); 181 187 if (!format_val) { 182 188 dev_err(chip->card->dev, … … 191 197 goto unlock; 192 198 193 snd_hdac_stream_setup(azx_stream(azx_dev) );199 snd_hdac_stream_setup(azx_stream(azx_dev), false); 194 200 195 201 stream_tag = azx_dev->core.stream_tag; … … 280 286 /* reset SYNC bits */ 281 287 snd_hdac_stream_sync_trigger(hstr, false, sbits, sync_reg); 282 if (start) 283 snd_hdac_stream_timecounter_init(hstr, sbits); 288 snd_hdac_stream_timecounter_init(hstr, sbits, start); 284 289 spin_unlock(&bus->reg_lock); 285 290 return 0; … … 470 475 ((HDA_MAX_CYCLE_VALUE + 1) * runtime->rate)); 471 476 472 *system = convert_art_to_tsc(tsc_counter); 477 system->cycles = tsc_counter; 478 system->cs_id = CSID_X86_ART; 473 479 474 480 return 0; … … 933 939 if (chip->disabled) 934 940 return 0; 935 if (chip->single_cmd )941 if (chip->single_cmd || bus->use_pio_for_commands) 936 942 return azx_single_send_cmd(bus, val); 937 943 else … … 947 953 if (chip->disabled) 948 954 return 0; 949 if (chip->single_cmd )955 if (chip->single_cmd || bus->use_pio_for_commands) 950 956 return azx_single_get_response(bus, addr, res); 951 957 else … … 1094 1100 int repeat = 0; /* count for avoiding endless loop */ 1095 1101 1096 #ifdef CONFIG_PM1097 1102 if (azx_has_pm_runtime(chip)) 1098 1103 if (!pm_runtime_active(chip->card->dev)) 1099 1104 return IRQ_NONE; 1100 #endif1101 1105 1102 1106 spin_lock(&bus->reg_lock); … … 1212 1216 bus->core.align_bdle_4k = true; 1213 1217 1218 if (chip->driver_caps & AZX_DCAPS_PIO_COMMANDS) 1219 bus->core.use_pio_for_commands = true; 1220 1214 1221 /* enable sync_write flag for stable communication as default */ 1215 1222 bus->core.sync_write = 1; … … 1239 1246 "Codec #%d probe error; disabling it...\n", c); 1240 1247 bus->codec_mask &= ~(1 << c); 1248 /* no codecs */ 1249 if (bus->codec_mask == 0) 1250 break; 1241 1251 /* More badly, accessing to a non-existing 1242 1252 * codec often screws up the controller chip, -
GPL/trunk/alsa-kernel/pci/hda/hda_controller.h
r772 r777 46 46 #define AZX_DCAPS_NO_MSI64 (1 << 29) /* Stick to 32-bit MSIs */ 47 47 #define AZX_DCAPS_SEPARATE_STREAM_TAG (1 << 30) /* capture and playback use separate stream tag */ 48 #define AZX_DCAPS_PIO_COMMANDS (1 << 31) /* Use PIO instead of CORB for commands */ 48 49 49 50 enum { -
GPL/trunk/alsa-kernel/pci/hda/hda_eld.c
r772 r777 13 13 #include <linux/slab.h> 14 14 #include <sound/core.h> 15 #include < asm/unaligned.h>15 #include <linux/unaligned.h> 16 16 #include <sound/hda_chmap.h> 17 17 #include <sound/hda_codec.h> -
GPL/trunk/alsa-kernel/pci/hda/hda_generic.c
r772 r777 3958 3958 cdev->default_trigger = micmute ? "audio-micmute" : "audio-mute"; 3959 3959 cdev->brightness_set_blocking = callback; 3960 cdev->brightness = ledtrig_audio_get(idx);3961 3960 cdev->flags = LED_CORE_SUSPENDRESUME; 3962 3961 … … 6097 6096 EXPORT_SYMBOL_GPL(snd_hda_gen_free); 6098 6097 6099 #ifdef CONFIG_PM6100 6098 /** 6101 6099 * snd_hda_gen_check_power_status - check the loopback power save state … … 6111 6109 } 6112 6110 EXPORT_SYMBOL_GPL(snd_hda_gen_check_power_status); 6113 #endif6114 6111 6115 6112 … … 6124 6121 .free = snd_hda_gen_free, 6125 6122 .unsol_event = snd_hda_jack_unsol_event, 6126 #ifdef CONFIG_PM6127 6123 .check_power_status = snd_hda_gen_check_power_status, 6128 #endif6129 6124 }; 6130 6125 -
GPL/trunk/alsa-kernel/pci/hda/hda_generic.h
r772 r777 233 233 unsigned int dac_min_mute:1; /* minimal = mute for DACs */ 234 234 unsigned int suppress_vmaster:1; /* don't create vmaster kctls */ 235 unsigned int obey_preferred_dacs:1; /* obey preferred_dacs assignment */236 235 237 236 /* other internal flags */ … … 341 340 void snd_hda_gen_update_outputs(struct hda_codec *codec); 342 341 343 #ifdef CONFIG_PM344 342 int snd_hda_gen_check_power_status(struct hda_codec *codec, hda_nid_t nid); 345 #endif346 343 unsigned int snd_hda_gen_path_power_filter(struct hda_codec *codec, 347 344 hda_nid_t nid, -
GPL/trunk/alsa-kernel/pci/hda/hda_intel.c
r772 r777 5 5 * for Intel HD Audio. 6 6 * 7 * Copyright(c) 2004 Intel Corporation . All rights reserved.7 * Copyright(c) 2004 Intel Corporation 8 8 * 9 9 * Copyright (c) 2004 Takashi Iwai <tiwai@suse.de> … … 198 198 "(in second, 0 = disable)."); 199 199 200 static bool pm_blacklist = true;201 module_param(pm_blacklist, b ool, 0644);200 static int pm_blacklist = -1; 201 module_param(pm_blacklist, bint, 0644); 202 202 MODULE_PARM_DESC(pm_blacklist, "Enable power-management denylist"); 203 203 … … 209 209 module_param(power_save_controller, bool, 0644); 210 210 MODULE_PARM_DESC(power_save_controller, "Reset controller in power save mode."); 211 #else 211 #else /* CONFIG_PM */ 212 212 #define power_save 0 213 #define pm_blacklist 0 214 #define power_save_controller false 213 215 #endif /* CONFIG_PM */ 214 216 … … 312 314 #define AZX_DCAPS_INTEL_BROXTON AZX_DCAPS_INTEL_SKYLAKE 313 315 316 #define AZX_DCAPS_INTEL_LNL \ 317 (AZX_DCAPS_INTEL_SKYLAKE | AZX_DCAPS_PIO_COMMANDS) 318 314 319 /* quirks for ATI SB / AMD Hudson */ 315 320 #define AZX_DCAPS_PRESET_ATI_SB \ … … 839 844 mod_dma_pos %= azx_dev->core.period_bytes; 840 845 841 fifo_size = azx_stream(azx_dev)->fifo_size - 1;846 fifo_size = azx_stream(azx_dev)->fifo_size; 842 847 843 848 if (azx_dev->insufficient) { … … 923 928 } 924 929 925 #ifdef CONFIG_PM926 930 static DEFINE_MUTEX(card_list_lock); 927 931 static LIST_HEAD(card_list); … … 950 954 #ifdef NOT_USED 951 955 /* trigger power-save check at writing parameter */ 952 static int param_set_xint(const char *val, const struct kernel_param *kp)956 static int __maybe_unused param_set_xint(const char *val, const struct kernel_param *kp) 953 957 { 954 958 struct hda_intel *hda; … … 960 964 return ret; 961 965 966 if (pm_blacklist > 0) 967 return 0; 968 962 969 mutex_lock(&card_list_lock); 963 970 list_for_each_entry(hda, &card_list, list, struct hda_intel) { 964 971 chip = &hda->chip; 965 if (!hda->probe_continued || chip->disabled) 972 if (!hda->probe_continued || chip->disabled || 973 hda->runtime_pm_disabled) 966 974 continue; 967 975 snd_hda_set_power_save(&chip->bus, power_save * 1000); … … 1022 1030 } 1023 1031 1024 #ifdef CONFIG_PM_SLEEP1025 1032 static int azx_prepare(struct device *dev) 1026 1033 { … … 1081 1088 } 1082 1089 1083 static int azx_resume(struct device *dev)1090 static int __maybe_unused azx_resume(struct device *dev) 1084 1091 { 1085 1092 struct snd_card *card = dev_get_drvdata(dev); … … 1132 1139 return 0; 1133 1140 } 1134 #endif /* CONFIG_PM_SLEEP */1135 1141 1136 1142 #ifdef NOT_USED 1137 static int azx_runtime_suspend(struct device *dev)1143 static int __maybe_unused azx_runtime_suspend(struct device *dev) 1138 1144 { 1139 1145 struct snd_card *card = dev_get_drvdata(dev); … … 1152 1158 } 1153 1159 1154 static int azx_runtime_resume(struct device *dev)1160 static int __maybe_unused azx_runtime_resume(struct device *dev) 1155 1161 { 1156 1162 struct snd_card *card = dev_get_drvdata(dev); … … 1169 1175 } 1170 1176 1171 static int azx_runtime_idle(struct device *dev)1177 static int __maybe_unused azx_runtime_idle(struct device *dev) 1172 1178 { 1173 1179 struct snd_card *card = dev_get_drvdata(dev); … … 1196 1202 1197 1203 static const struct dev_pm_ops azx_pm = { 1198 SET_SYSTEM_SLEEP_PM_OPS(azx_suspend, azx_resume) 1199 #ifdef CONFIG_PM_SLEEP 1200 .prepare = azx_prepare, 1201 .complete = azx_complete, 1202 .freeze_noirq = azx_freeze_noirq, 1203 .thaw_noirq = azx_thaw_noirq, 1204 #endif 1204 SYSTEM_SLEEP_PM_OPS(azx_suspend, azx_resume) 1205 .prepare = pm_sleep_ptr(azx_prepare), 1206 .complete = pm_sleep_ptr(azx_complete), 1207 .freeze_noirq = pm_sleep_ptr(azx_freeze_noirq), 1208 .thaw_noirq = pm_sleep_ptr(azx_thaw_noirq), 1205 1209 #ifdef CONFIG_PM_RUNTIME 1206 1210 SET_RUNTIME_PM_OPS(azx_runtime_suspend, azx_runtime_resume, azx_runtime_idle) 1207 1211 #endif 1208 1212 }; 1209 1210 #define AZX_PM_OPS &azx_pm1211 #else1212 #define azx_add_card_list(chip) /* NOP */1213 #define azx_del_card_list(chip) /* NOP */1214 #define AZX_PM_OPS NULL1215 #endif /* CONFIG_PM */1216 1213 1217 1214 … … 1458 1455 acpi_status status; 1459 1456 1460 while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) { 1461 dhandle = ACPI_HANDLE(&pdev->dev); 1462 if (dhandle) { 1463 status = acpi_get_handle(dhandle, "ATPX", &atpx_handle); 1464 if (ACPI_SUCCESS(status)) { 1465 pci_dev_put(pdev); 1466 return true; 1467 } 1468 } 1469 } 1470 while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_OTHER << 8, pdev)) != NULL) { 1457 while ((pdev = pci_get_base_class(PCI_BASE_CLASS_DISPLAY, pdev))) { 1458 if ((pdev->class != PCI_CLASS_DISPLAY_VGA << 8) && 1459 (pdev->class != PCI_CLASS_DISPLAY_OTHER << 8)) 1460 continue; 1461 1471 1462 dhandle = ACPI_HANDLE(&pdev->dev); 1472 1463 if (dhandle) { … … 1863 1854 /* use the non-cached pages in non-snoop mode */ 1864 1855 if (!azx_snoop(chip)) 1865 azx_bus(chip)->dma_type = SNDRV_DMA_TYPE_DEV_WC _SG;1856 azx_bus(chip)->dma_type = SNDRV_DMA_TYPE_DEV_WC; 1866 1857 1867 1858 if (chip->driver_type == AZX_DRIVER_NVIDIA) { … … 2116 2107 { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1462, 0xcb59) }, /* MSI TRX40 Creator */ 2117 2108 { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1462, 0xcb60) }, /* MSI TRX40 */ 2109 { PCI_DEVICE_SUB(0x1022, 0x15e3, 0x1022, 0xd601) }, /* ASRock X670E Taichi */ 2118 2110 {0} 2119 2111 }; … … 2188 2180 pci_set_drvdata(pci, card); 2189 2181 2182 #ifdef CONFIG_SND_HDA_I915 2183 /* bind with i915 if needed */ 2184 if (chip->driver_caps & AZX_DCAPS_I915_COMPONENT) { 2185 err = snd_hdac_i915_init(azx_bus(chip)); 2186 if (err < 0) { 2187 if (err == -EPROBE_DEFER) 2188 goto out_free; 2189 2190 /* if the controller is bound only with HDMI/DP 2191 * (for HSW and BDW), we need to abort the probe; 2192 * for other chips, still continue probing as other 2193 * codecs can be on the same link. 2194 */ 2195 if (HDA_CONTROLLER_IN_GPU(pci)) { 2196 dev_err_probe(card->dev, err, 2197 "HSW/BDW HD-audio HDMI/DP requires binding with gfx driver\n"); 2198 2199 goto out_free; 2200 } else { 2201 /* don't bother any longer */ 2202 chip->driver_caps &= ~AZX_DCAPS_I915_COMPONENT; 2203 } 2204 } 2205 2206 /* HSW/BDW controllers need this power */ 2207 if (HDA_CONTROLLER_IN_GPU(pci)) 2208 hda->need_i915_power = true; 2209 } 2210 #else 2211 if (HDA_CONTROLLER_IN_GPU(pci)) 2212 dev_err(card->dev, "Haswell/Broadwell HDMI/DP must build in CONFIG_SND_HDA_I915\n"); 2213 #endif 2214 2190 2215 err = register_vga_switcheroo(chip); 2191 2216 if (err < 0) { … … 2215 2240 #endif /* CONFIG_SND_HDA_PATCH_LOADER */ 2216 2241 2217 #if !defined(CONFIG_SND_HDA_I915) && !defined(TARGET_OS2)2218 if (HDA_CONTROLLER_IN_GPU(pci))2219 dev_err(card->dev, "Haswell/Broadwell HDMI/DP must build in CONFIG_SND_HDA_I915\n");2220 #endif2221 2222 2242 #ifdef TARGET_OS2 // modified code from 3.13 otherwise we don't detect hardware. Is schedule_work a stub? 2223 2243 if (schedule_probe) { … … 2237 2257 2238 2258 out_free: 2259 pci_set_drvdata(pci, NULL); 2239 2260 snd_card_free(card); 2240 2261 return err; 2241 2262 } 2242 2263 2243 #ifdef CONFIG_PM2244 2264 /* On some boards setting power_save to a non 0 value leads to clicking / 2245 2265 * popping sounds when ever we enter/leave powersaving mode. Ideally we would … … 2285 2305 {0} 2286 2306 }; 2287 #endif /* CONFIG_PM */2288 2307 2289 2308 static void set_default_power_save(struct azx *chip) 2290 2309 { 2310 struct hda_intel *hda = container_of(chip, struct hda_intel, chip); 2291 2311 int val = power_save; 2292 2312 2293 #ifdef CONFIG_PM 2294 if (pm_blacklist) { 2313 if (pm_blacklist < 0) { 2295 2314 const struct snd_pci_quirk *q; 2296 2315 … … 2300 2319 q->subvendor, q->subdevice); 2301 2320 val = 0; 2321 hda->runtime_pm_disabled = 1; 2302 2322 } 2303 } 2304 #endif /* CONFIG_PM */ 2323 } else if (pm_blacklist > 0) { 2324 dev_info(chip->card->dev, "Forcing power_save to 0 via option\n"); 2325 val = 0; 2326 } 2305 2327 snd_hda_set_power_save(&chip->bus, val * 1000); 2306 2328 } … … 2327 2349 to_hda_bus(bus)->bus_probing = 1; 2328 2350 hda->probe_continued = 1; 2329 2330 /* bind with i915 if needed */2331 if (chip->driver_caps & AZX_DCAPS_I915_COMPONENT) {2332 err = snd_hdac_i915_init(bus);2333 if (err < 0) {2334 /* if the controller is bound only with HDMI/DP2335 * (for HSW and BDW), we need to abort the probe;2336 * for other chips, still continue probing as other2337 * codecs can be on the same link.2338 */2339 if (HDA_CONTROLLER_IN_GPU(pci)) {2340 dev_err(chip->card->dev,2341 "HSW/BDW HD-audio HDMI/DP requires binding with gfx driver\n");2342 goto out_free;2343 } else {2344 /* don't bother any longer */2345 chip->driver_caps &= ~AZX_DCAPS_I915_COMPONENT;2346 }2347 }2348 2349 /* HSW/BDW controllers need this power */2350 if (HDA_CONTROLLER_IN_GPU(pci))2351 hda->need_i915_power = true;2352 }2353 2351 2354 2352 /* Request display power well for the HDA controller or codec. For … … 2382 2380 if (err < 0) 2383 2381 goto out_free; 2384 #ifndef CONFIG_PM2385 release_firmware(chip->fw); /* no longer needed */2386 chip->fw = NULL;2387 #endif2388 2382 } 2389 2383 #endif … … 2563 2557 { PCI_DEVICE_DATA(INTEL, HDA_RPL_PX, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2564 2558 { PCI_DEVICE_DATA(INTEL, HDA_MTL, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2559 /* Battlemage */ 2560 { PCI_DEVICE_DATA(INTEL, HDA_BMG, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2565 2561 /* Lunarlake-P */ 2566 { PCI_DEVICE_DATA(INTEL, HDA_LNL_P, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_ SKYLAKE) },2562 { PCI_DEVICE_DATA(INTEL, HDA_LNL_P, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_LNL) }, 2567 2563 /* Arrow Lake-S */ 2568 2564 { PCI_DEVICE_DATA(INTEL, HDA_ARL_S, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2569 2565 /* Arrow Lake */ 2570 2566 { PCI_DEVICE_DATA(INTEL, HDA_ARL, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE) }, 2567 /* Panther Lake */ 2568 { PCI_DEVICE_DATA(INTEL, HDA_PTL, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_LNL) }, 2569 /* Panther Lake-H */ 2570 { PCI_DEVICE_DATA(INTEL, HDA_PTL_H, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_LNL) }, 2571 2571 /* Apollolake (Broxton-P) */ 2572 2572 { PCI_DEVICE_DATA(INTEL, HDA_APL, AZX_DRIVER_SKL | AZX_DCAPS_INTEL_BROXTON) }, … … 2826 2826 .shutdown = azx_shutdown, 2827 2827 .driver = { 2828 .pm = AZX_PM_OPS,2828 .pm = &azx_pm, 2829 2829 }, 2830 2830 }; -
GPL/trunk/alsa-kernel/pci/hda/hda_intel.h
r772 r777 23 23 unsigned int irq_pending_warned:1; 24 24 unsigned int probe_continued:1; 25 unsigned int runtime_pm_disabled:1; 25 26 26 27 /* vga_switcheroo setup */ -
GPL/trunk/alsa-kernel/pci/hda/hda_intel_trace.h
r772 r777 35 35 ); 36 36 37 #ifdef CONFIG_PM38 37 DEFINE_EVENT(hda_pm, azx_runtime_suspend, 39 38 TP_PROTO(struct azx *chip), … … 45 44 TP_ARGS(chip) 46 45 ); 47 #endif48 46 49 47 #endif /* _TRACE_HDA_INTEL_H */ -
GPL/trunk/alsa-kernel/pci/hda/hda_sysfs.c
r772 r777 30 30 }; 31 31 32 #ifdef CONFIG_PM33 32 static ssize_t power_on_acct_show(struct device *dev, 34 33 struct device_attribute *attr, … … 51 50 static DEVICE_ATTR_RO(power_on_acct); 52 51 static DEVICE_ATTR_RO(power_off_acct); 53 #endif /* CONFIG_PM */54 52 55 53 #define CODEC_INFO_SHOW(type, field) \ … … 749 747 &dev_attr_init_pin_configs.attr, 750 748 &dev_attr_driver_pin_configs.attr, 751 #ifdef CONFIG_PM752 749 &dev_attr_power_on_acct.attr, 753 750 &dev_attr_power_off_acct.attr, 754 #endif755 751 #ifdef CONFIG_SND_HDA_RECONFIG 756 752 &dev_attr_init_verbs.attr, -
GPL/trunk/alsa-kernel/pci/hda/patch_analog.c
r772 r777 76 76 #endif 77 77 78 #ifdef CONFIG_PM79 78 static void ad198x_power_eapd_write(struct hda_codec *codec, hda_nid_t front, 80 79 hda_nid_t hp) … … 122 121 return 0; 123 122 } 124 #endif125 123 126 124 /* follow EAPD via vmaster hook */ … … 162 160 .free = snd_hda_gen_free, 163 161 .unsol_event = snd_hda_jack_unsol_event, 164 #ifdef CONFIG_PM165 162 .check_power_status = snd_hda_gen_check_power_status, 166 163 .suspend = ad198x_suspend, 167 #endif168 164 }; 169 165 -
GPL/trunk/alsa-kernel/pci/hda/patch_ca0132.c
r772 r777 3040 3040 unsigned int format_val; 3041 3041 3042 format_val = snd_hdac_calc_stream_format(sample_rate, 3043 channels, SNDRV_PCM_FORMAT_S32_LE, 32, 0); 3042 format_val = snd_hdac_stream_format(channels, 32, sample_rate); 3044 3043 3045 3044 if (hda_format) … … 3634 3633 static bool dspload_wait_loaded(struct hda_codec *codec) 3635 3634 { 3635 #ifndef TARGET_OS2 3636 3636 unsigned long timeout = jiffies + msecs_to_jiffies(2000); 3637 3637 3638 3638 do { 3639 #ifndef TARGET_OS23640 3639 if (dspload_is_loaded(codec)) { 3641 3640 codec_info(codec, "ca0132 DSP downloaded and running\n"); 3642 3641 return true; 3643 3642 } 3644 #endif3645 3643 msleep(20); 3646 3644 } while (time_before(jiffies, timeout)); 3647 3645 #endif 3648 3646 codec_err(codec, "ca0132 failed to download DSP\n"); 3649 3647 return false; … … 6675 6673 struct snd_kcontrol_new knew = { 6676 6674 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 6677 .index = 0, \6675 .index = 0, 6678 6676 .subdevice = HDA_SUBDEV_AMP_FLAG, 6679 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | 6680 SNDRV_CTL_ELEM_ACCESS_TLV_READ | 6677 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | 6678 SNDRV_CTL_ELEM_ACCESS_TLV_READ | 6681 6679 SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK, 6682 .info = snd_hda_mixer_amp_volume_info, \6680 .info = snd_hda_mixer_amp_volume_info, 6683 6681 .get = snd_hda_mixer_amp_volume_get, 6684 6682 .put = snd_hda_mixer_amp_volume_put, … … 6755 6753 #else 6756 6754 struct snd_kcontrol_new knew = 6757 { 6755 { 6758 6756 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 6759 6757 .index = 0, … … 6765 6763 knew.name = ca0132_voicefx.name; 6766 6764 knew.private_value = HDA_COMPOSE_AMP_VAL(VOICEFX, 1, 0, HDA_INPUT); 6767 6768 6765 #endif 6769 6766 knew.info = ca0132_voicefx_info; … … 6782 6779 #else 6783 6780 struct snd_kcontrol_new knew = 6784 { 6781 { 6785 6782 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 6786 6783 .index = 0, … … 6891 6888 #else 6892 6889 struct snd_kcontrol_new knew = { 6893 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 6890 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 6894 6891 .index = 0, \ 6895 .subdevice = HDA_SUBDEV_AMP_FLAG, 6896 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | 6897 SNDRV_CTL_ELEM_ACCESS_TLV_READ | 6898 SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK, 6892 .subdevice = HDA_SUBDEV_AMP_FLAG, 6893 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | 6894 SNDRV_CTL_ELEM_ACCESS_TLV_READ | 6895 SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK, 6899 6896 .info = snd_hda_mixer_amp_volume_info, \ 6900 6897 .get = snd_hda_mixer_amp_volume_get, 6901 .put = snd_hda_mixer_amp_volume_put, 6898 .put = snd_hda_mixer_amp_volume_put, 6902 6899 .tlv = { .c = snd_hda_mixer_amp_tlv }, 6903 6900 }; … … 9170 9167 { 9171 9168 /* put any chip cleanup stuffs here. */ 9172 #ifndef TARGET_OS2 9169 9170 #ifndef TARGET_OS2 9173 9171 if (dspload_is_loaded(codec)) 9174 9172 dsp_reset(codec); 9175 #endif9173 #endif 9176 9174 } 9177 9175 … … 9795 9793 } 9796 9794 9797 #ifdef CONFIG_PM9798 9795 static int ca0132_suspend(struct hda_codec *codec) 9799 9796 { … … 9803 9800 return 0; 9804 9801 } 9805 #endif9806 9802 9807 9803 static const struct hda_codec_ops ca0132_patch_ops = { … … 9811 9807 .free = ca0132_free, 9812 9808 .unsol_event = snd_hda_jack_unsol_event, 9813 #ifdef CONFIG_PM9814 9809 .suspend = ca0132_suspend, 9815 #endif9816 9810 }; 9817 9811 -
GPL/trunk/alsa-kernel/pci/hda/patch_cirrus.c
r772 r777 1135 1135 } 1136 1136 1137 #ifdef CONFIG_PM1138 1137 /* 1139 1138 * Manage PDREF, when transitioning to D3hot … … 1160 1159 return 0; 1161 1160 } 1162 #endif1163 1161 1164 1162 static const struct hda_codec_ops cs421x_patch_ops = { … … 1168 1166 .free = cs_free, 1169 1167 .unsol_event = snd_hda_jack_unsol_event, 1170 #ifdef CONFIG_PM1171 1168 .suspend = cs421x_suspend, 1172 #endif1173 1169 }; 1174 1170 -
GPL/trunk/alsa-kernel/pci/hda/patch_cmedia.c
r679 r777 22 22 #endif 23 23 24 /* CM9825 Offset Definitions */ 25 26 #define CM9825_VERB_SET_HPF_1 0x781 27 #define CM9825_VERB_SET_HPF_2 0x785 28 #define CM9825_VERB_SET_PLL 0x7a0 29 #define CM9825_VERB_SET_NEG 0x7a1 30 #define CM9825_VERB_SET_ADCL 0x7a2 31 #define CM9825_VERB_SET_DACL 0x7a3 32 #define CM9825_VERB_SET_MBIAS 0x7a4 33 #define CM9825_VERB_SET_VNEG 0x7a8 34 #define CM9825_VERB_SET_D2S 0x7a9 35 #define CM9825_VERB_SET_DACTRL 0x7aa 36 #define CM9825_VERB_SET_PDNEG 0x7ac 37 #define CM9825_VERB_SET_VDO 0x7ad 38 #define CM9825_VERB_SET_CDALR 0x7b0 39 #define CM9825_VERB_SET_MTCBA 0x7b1 40 #define CM9825_VERB_SET_OTP 0x7b2 41 #define CM9825_VERB_SET_OCP 0x7b3 42 #define CM9825_VERB_SET_GAD 0x7b4 43 #define CM9825_VERB_SET_TMOD 0x7b5 44 #define CM9825_VERB_SET_SNR 0x7b6 45 24 46 struct cmi_spec { 25 47 struct hda_gen_spec gen; 26 }; 48 const struct hda_verb *chip_d0_verbs; 49 const struct hda_verb *chip_d3_verbs; 50 const struct hda_verb *chip_hp_present_verbs; 51 const struct hda_verb *chip_hp_remove_verbs; 52 struct hda_codec *codec; 53 struct delayed_work unsol_hp_work; 54 int quirk; 55 }; 56 57 static const struct hda_verb cm9825_std_d3_verbs[] = { 58 /* chip sleep verbs */ 59 {0x43, CM9825_VERB_SET_D2S, 0x62}, /* depop */ 60 {0x43, CM9825_VERB_SET_PLL, 0x01}, /* PLL set */ 61 {0x43, CM9825_VERB_SET_NEG, 0xc2}, /* NEG set */ 62 {0x43, CM9825_VERB_SET_ADCL, 0x00}, /* ADC */ 63 {0x43, CM9825_VERB_SET_DACL, 0x02}, /* DACL */ 64 {0x43, CM9825_VERB_SET_VNEG, 0x50}, /* VOL NEG */ 65 {0x43, CM9825_VERB_SET_MBIAS, 0x00}, /* MBIAS */ 66 {0x43, CM9825_VERB_SET_PDNEG, 0x04}, /* SEL OSC */ 67 {0x43, CM9825_VERB_SET_CDALR, 0xf6}, /* Class D */ 68 {0x43, CM9825_VERB_SET_OTP, 0xcd}, /* OTP set */ 69 {0} 70 }; 71 72 static const struct hda_verb cm9825_std_d0_verbs[] = { 73 /* chip init verbs */ 74 {0x34, AC_VERB_SET_EAPD_BTLENABLE, 0x02}, /* EAPD set */ 75 {0x43, CM9825_VERB_SET_SNR, 0x30}, /* SNR set */ 76 {0x43, CM9825_VERB_SET_PLL, 0x00}, /* PLL set */ 77 {0x43, CM9825_VERB_SET_ADCL, 0x00}, /* ADC */ 78 {0x43, CM9825_VERB_SET_DACL, 0x02}, /* DACL */ 79 {0x43, CM9825_VERB_SET_MBIAS, 0x00}, /* MBIAS */ 80 {0x43, CM9825_VERB_SET_VNEG, 0x56}, /* VOL NEG */ 81 {0x43, CM9825_VERB_SET_D2S, 0x62}, /* depop */ 82 {0x43, CM9825_VERB_SET_DACTRL, 0x00}, /* DACTRL set */ 83 {0x43, CM9825_VERB_SET_PDNEG, 0x0c}, /* SEL OSC */ 84 {0x43, CM9825_VERB_SET_VDO, 0x80}, /* VDO set */ 85 {0x43, CM9825_VERB_SET_CDALR, 0xf4}, /* Class D */ 86 {0x43, CM9825_VERB_SET_OTP, 0xcd}, /* OTP set */ 87 {0x43, CM9825_VERB_SET_MTCBA, 0x61}, /* SR set */ 88 {0x43, CM9825_VERB_SET_OCP, 0x33}, /* OTP set */ 89 {0x43, CM9825_VERB_SET_GAD, 0x07}, /* ADC -3db */ 90 {0x43, CM9825_VERB_SET_TMOD, 0x26}, /* Class D clk */ 91 {0x3C, AC_VERB_SET_AMP_GAIN_MUTE | 92 AC_AMP_SET_OUTPUT | AC_AMP_SET_RIGHT, 0x2d}, /* Gain set */ 93 {0x3C, AC_VERB_SET_AMP_GAIN_MUTE | 94 AC_AMP_SET_OUTPUT | AC_AMP_SET_LEFT, 0x2d}, /* Gain set */ 95 {0x43, CM9825_VERB_SET_HPF_1, 0x40}, /* HPF set */ 96 {0x43, CM9825_VERB_SET_HPF_2, 0x40}, /* HPF set */ 97 {0} 98 }; 99 100 static const struct hda_verb cm9825_hp_present_verbs[] = { 101 {0x42, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00}, /* PIN off */ 102 {0x43, CM9825_VERB_SET_ADCL, 0x88}, /* ADC */ 103 {0x43, CM9825_VERB_SET_DACL, 0xaa}, /* DACL */ 104 {0x43, CM9825_VERB_SET_MBIAS, 0x10}, /* MBIAS */ 105 {0x43, CM9825_VERB_SET_D2S, 0xf2}, /* depop */ 106 {0x43, CM9825_VERB_SET_DACTRL, 0x00}, /* DACTRL set */ 107 {0x43, CM9825_VERB_SET_VDO, 0xc4}, /* VDO set */ 108 {0} 109 }; 110 111 static const struct hda_verb cm9825_hp_remove_verbs[] = { 112 {0x43, CM9825_VERB_SET_ADCL, 0x00}, /* ADC */ 113 {0x43, CM9825_VERB_SET_DACL, 0x56}, /* DACL */ 114 {0x43, CM9825_VERB_SET_MBIAS, 0x00}, /* MBIAS */ 115 {0x43, CM9825_VERB_SET_D2S, 0x62}, /* depop */ 116 {0x43, CM9825_VERB_SET_DACTRL, 0xe0}, /* DACTRL set */ 117 {0x43, CM9825_VERB_SET_VDO, 0x80}, /* VDO set */ 118 {0x42, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, /* PIN on */ 119 {0} 120 }; 121 122 static void cm9825_unsol_hp_delayed(struct work_struct *work) 123 { 124 struct cmi_spec *spec = 125 container_of(to_delayed_work(work), struct cmi_spec, unsol_hp_work); 126 struct hda_jack_tbl *jack; 127 hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0]; 128 bool hp_jack_plugin = false; 129 int err = 0; 130 131 hp_jack_plugin = snd_hda_jack_detect(spec->codec, hp_pin); 132 133 codec_dbg(spec->codec, "hp_jack_plugin %d, hp_pin 0x%X\n", 134 (int)hp_jack_plugin, hp_pin); 135 136 if (!hp_jack_plugin) { 137 err = 138 snd_hda_codec_write(spec->codec, 0x42, 0, 139 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40); 140 if (err) 141 codec_dbg(spec->codec, "codec_write err %d\n", err); 142 143 snd_hda_sequence_write(spec->codec, spec->chip_hp_remove_verbs); 144 } else { 145 snd_hda_sequence_write(spec->codec, 146 spec->chip_hp_present_verbs); 147 } 148 149 jack = snd_hda_jack_tbl_get(spec->codec, hp_pin); 150 if (jack) { 151 jack->block_report = 0; 152 snd_hda_jack_report_sync(spec->codec); 153 } 154 } 155 156 static void hp_callback(struct hda_codec *codec, struct hda_jack_callback *cb) 157 { 158 struct cmi_spec *spec = codec->spec; 159 struct hda_jack_tbl *tbl; 160 161 /* Delay enabling the HP amp, to let the mic-detection 162 * state machine run. 163 */ 164 165 codec_dbg(spec->codec, "cb->nid 0x%X\n", cb->nid); 166 167 tbl = snd_hda_jack_tbl_get(codec, cb->nid); 168 if (tbl) 169 tbl->block_report = 1; 170 schedule_delayed_work(&spec->unsol_hp_work, msecs_to_jiffies(200)); 171 } 172 173 static void cm9825_setup_unsol(struct hda_codec *codec) 174 { 175 struct cmi_spec *spec = codec->spec; 176 177 hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0]; 178 179 snd_hda_jack_detect_enable_callback(codec, hp_pin, hp_callback); 180 } 181 182 static int cm9825_init(struct hda_codec *codec) 183 { 184 snd_hda_gen_init(codec); 185 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_INIT); 186 187 return 0; 188 } 189 190 static void cm9825_free(struct hda_codec *codec) 191 { 192 struct cmi_spec *spec = codec->spec; 193 194 cancel_delayed_work_sync(&spec->unsol_hp_work); 195 snd_hda_gen_free(codec); 196 } 197 198 static int cm9825_suspend(struct hda_codec *codec) 199 { 200 struct cmi_spec *spec = codec->spec; 201 202 cancel_delayed_work_sync(&spec->unsol_hp_work); 203 204 snd_hda_sequence_write(codec, spec->chip_d3_verbs); 205 206 return 0; 207 } 208 209 static int cm9825_resume(struct hda_codec *codec) 210 { 211 struct cmi_spec *spec = codec->spec; 212 hda_nid_t hp_pin = 0; 213 bool hp_jack_plugin = false; 214 int err; 215 216 err = 217 snd_hda_codec_write(spec->codec, 0x42, 0, 218 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00); 219 if (err) 220 codec_dbg(codec, "codec_write err %d\n", err); 221 222 msleep(150); /* for depop noise */ 223 224 codec->patch_ops.init(codec); 225 226 hp_pin = spec->gen.autocfg.hp_pins[0]; 227 hp_jack_plugin = snd_hda_jack_detect(spec->codec, hp_pin); 228 229 codec_dbg(spec->codec, "hp_jack_plugin %d, hp_pin 0x%X\n", 230 (int)hp_jack_plugin, hp_pin); 231 232 if (!hp_jack_plugin) { 233 err = 234 snd_hda_codec_write(spec->codec, 0x42, 0, 235 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40); 236 237 if (err) 238 codec_dbg(codec, "codec_write err %d\n", err); 239 240 snd_hda_sequence_write(codec, cm9825_hp_remove_verbs); 241 } 242 243 snd_hda_regmap_sync(codec); 244 hda_call_check_power_status(codec, 0x01); 245 246 return 0; 247 } 27 248 28 249 /* … … 36 257 .unsol_event = snd_hda_jack_unsol_event, 37 258 }; 259 260 static int patch_cm9825(struct hda_codec *codec) 261 { 262 struct cmi_spec *spec; 263 struct auto_pin_cfg *cfg; 264 int err; 265 266 spec = kzalloc(sizeof(*spec), GFP_KERNEL); 267 if (spec == NULL) 268 return -ENOMEM; 269 270 INIT_DELAYED_WORK(&spec->unsol_hp_work, cm9825_unsol_hp_delayed); 271 codec->spec = spec; 272 spec->codec = codec; 273 codec->patch_ops = cmi_auto_patch_ops; 274 codec->patch_ops.init = cm9825_init; 275 codec->patch_ops.suspend = cm9825_suspend; 276 codec->patch_ops.resume = cm9825_resume; 277 codec->patch_ops.free = cm9825_free; 278 codec->patch_ops.check_power_status = snd_hda_gen_check_power_status; 279 cfg = &spec->gen.autocfg; 280 snd_hda_gen_spec_init(&spec->gen); 281 spec->chip_d0_verbs = cm9825_std_d0_verbs; 282 spec->chip_d3_verbs = cm9825_std_d3_verbs; 283 spec->chip_hp_present_verbs = cm9825_hp_present_verbs; 284 spec->chip_hp_remove_verbs = cm9825_hp_remove_verbs; 285 286 snd_hda_sequence_write(codec, spec->chip_d0_verbs); 287 288 err = snd_hda_parse_pin_defcfg(codec, cfg, NULL, 0); 289 if (err < 0) 290 goto error; 291 err = snd_hda_gen_parse_auto_config(codec, cfg); 292 if (err < 0) 293 goto error; 294 295 cm9825_setup_unsol(codec); 296 297 return 0; 298 299 error: 300 cm9825_free(codec); 301 302 codec_info(codec, "Enter err %d\n", err); 303 304 return err; 305 } 38 306 39 307 static int patch_cmi9880(struct hda_codec *codec) … … 118 386 HDA_CODEC_ENTRY(0x13f69880, "CMI9880", patch_cmi9880), 119 387 HDA_CODEC_ENTRY(0x434d4980, "CMI9880", patch_cmi9880), 388 HDA_CODEC_ENTRY(0x13f69825, "CM9825", patch_cm9825), 120 389 {0} /* terminator */ 121 390 }; -
GPL/trunk/alsa-kernel/pci/hda/patch_conexant.c
r772 r777 173 173 static void cx_fixup_headset_recog(struct hda_codec *codec) 174 174 { 175 unsigned int mic_p ersent;175 unsigned int mic_present; 176 176 177 177 /* fix some headset type recognize fail issue, such as EDIFIER headset */ 178 /* set micbias doutput current comparator threshold from 66% to 55%. */178 /* set micbias output current comparator threshold from 66% to 55%. */ 179 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 regist or180 /* set OFF voltage for DFET from -1.2V to -0.8V, set headset micbias register 181 181 * value adjustment trim from 2.2K ohms to 2.0K ohms. 182 182 */ 183 183 snd_hda_codec_write(codec, 0x1c, 0, 0x3b0, 0xe10); 184 184 /* fix reboot headset type recognize fail issue */ 185 mic_p ersent = snd_hda_codec_read(codec, 0x19, 0, AC_VERB_GET_PIN_SENSE, 0x0);186 if (mic_p ersent & AC_PINSENSE_PRESENCE)185 mic_present = snd_hda_codec_read(codec, 0x19, 0, AC_VERB_GET_PIN_SENSE, 0x0); 186 if (mic_present & AC_PINSENSE_PRESENCE) 187 187 /* enable headset mic VREF */ 188 188 snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24); … … 254 254 unsigned int mic_present; 255 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 p ulgin&plugout.256 /* In cx8070 and sn6140, the node 16 can only be configured to headphone or disabled, 257 * the node 19 can only be configured to microphone or disabled. 258 * Check hp&mic tag to process headset plugin & plugout. 259 259 */ 260 260 mic_present = snd_hda_codec_read(codec, 0x19, 0, AC_VERB_GET_PIN_SENSE, 0x0); … … 265 265 } 266 266 267 #ifdef CONFIG_PM268 267 static int cx_auto_suspend(struct hda_codec *codec) 269 268 { … … 271 270 return 0; 272 271 } 273 #endif274 272 275 273 static const struct hda_codec_ops cx_auto_patch_ops = { … … 279 277 .free = cx_auto_free, 280 278 .unsol_event = snd_hda_jack_unsol_event, 281 #ifdef CONFIG_PM282 279 .suspend = cx_auto_suspend, 283 280 .check_power_status = snd_hda_gen_check_power_status, 284 #endif285 281 }; 286 282 … … 792 788 } 793 789 794 #ifndef TARGET_OS2795 790 static void cxt_setup_gpio_unmute(struct hda_codec *codec, 796 791 unsigned int gpio_mute_mask) … … 804 799 } 805 800 } 806 #endif807 801 808 802 static void cxt_fixup_mute_led_gpio(struct hda_codec *codec, … … 820 814 } 821 815 822 #ifndef TARGET_OS2823 816 static void cxt_fixup_hp_a_u(struct hda_codec *codec, 824 817 const struct hda_fixup *fix, int action) … … 829 822 cxt_setup_gpio_unmute(codec, 0x2); 830 823 } 831 #endif832 824 833 825 /* ThinkPad X200 & co with cxt5051 */ … … 884 876 {0} 885 877 }; 886 #endif /* TARGET_OS2 */ 887 888 #ifndef TARGET_OS2 878 #endif 879 889 880 /* SuoWoSi/South-holding JS201D with sn6140 */ 890 881 static const struct hda_pintbl cxt_pincfg_sws_js201d[] = { … … 897 888 {0} 898 889 }; 899 #endif900 890 901 891 static const struct hda_fixup cxt_fixups[] = { … … 1081 1071 .chain_id = CXT_FIXUP_HEADSET_MIC, 1082 1072 }, 1073 #endif 1083 1074 [CXT_PINCFG_SWS_JS201D] = { 1084 1075 .type = HDA_FIXUP_PINS, 1085 1076 .v.pins = cxt_pincfg_sws_js201d, 1086 1077 }, 1078 #ifdef NOT_USED 1087 1079 [CXT_PINCFG_TOP_SPEAKER] = { 1088 1080 .type = HDA_FIXUP_PINS, … … 1092 1084 }, 1093 1085 }, 1086 #endif 1094 1087 [CXT_FIXUP_HP_A_U] = { 1095 1088 .type = HDA_FIXUP_FUNC, 1096 1089 .v.func = cxt_fixup_hp_a_u, 1097 1090 }, 1098 #endif1099 1091 }; 1100 1092 -
GPL/trunk/alsa-kernel/pci/hda/patch_hdmi.c
r772 r777 4 4 * patch_hdmi.c - routines for HDMI/DisplayPort codecs 5 5 * 6 * Copyright(c) 2008-2010 Intel Corporation . All rights reserved.6 * Copyright(c) 2008-2010 Intel Corporation 7 7 * Copyright (c) 2006 ATI Technologies Inc. 8 8 * Copyright (c) 2008 NVIDIA Corp. All rights reserved. … … 55 55 IS_ENABLED(CONFIG_SND_HDA_INTEL_HDMI_SILENT_STREAM); 56 56 #else 57 1 57 1; 58 58 #endif 59 59 module_param(enable_silent_stream, bool, 0644); … … 1672 1672 #define I915_SILENT_RATE 48000 1673 1673 #define I915_SILENT_CHANNELS 2 1674 #define I915_SILENT_FORMAT SNDRV_PCM_FORMAT_S16_LE1675 1674 #define I915_SILENT_FORMAT_BITS 16 1676 1675 #define I915_SILENT_FMT_MASK 0xf … … 1685 1684 1686 1685 /* trigger silent stream generation in hw */ 1687 format = snd_hdac_ calc_stream_format(I915_SILENT_RATE, I915_SILENT_CHANNELS,1688 I915_SILENT_FORMAT, I915_SILENT_FORMAT_BITS, 0);1686 format = snd_hdac_stream_format(I915_SILENT_CHANNELS, I915_SILENT_FORMAT_BITS, 1687 I915_SILENT_RATE); 1689 1688 snd_hda_codec_setup_stream(codec, per_pin->cvt_nid, 1690 1689 I915_SILENT_FMT_MASK, I915_SILENT_FMT_MASK, format); … … 1994 1993 &per_cvt->rates, 1995 1994 &per_cvt->formats, 1995 NULL, 1996 1996 &per_cvt->maxbps); 1997 1997 if (err < 0) … … 2083 2083 mutex_lock(&codec->spdif_mutex); 2084 2084 spdif = snd_hda_spdif_out_of_nid(codec, cvt_nid); 2085 #ifndef TARGET_OS2 2085 2086 /* Add sanity check to pass klockwork check. 2086 2087 * This should never happen. 2087 2088 */ 2088 #ifndef TARGET_OS22089 2089 if (WARN_ON(spdif == NULL)) { 2090 2090 mutex_unlock(&codec->spdif_mutex); 2091 2091 return true; 2092 2092 } 2093 #endif2093 #endif 2094 2094 non_pcm = !!(spdif->status & IEC958_AES0_NONAUDIO); 2095 2095 mutex_unlock(&codec->spdif_mutex); … … 2540 2540 } 2541 2541 2542 #ifdef CONFIG_PM2543 2542 static int generic_hdmi_suspend(struct hda_codec *codec) 2544 2543 { … … 2567 2566 return 0; 2568 2567 } 2569 #endif2570 2568 2571 2569 static const struct hda_codec_ops generic_hdmi_patch_ops = { … … 2575 2573 .build_controls = generic_hdmi_build_controls, 2576 2574 .unsol_event = hdmi_unsol_event, 2577 #ifdef CONFIG_PM2578 2575 .suspend = generic_hdmi_suspend, 2579 2576 .resume = generic_hdmi_resume, 2580 #endif2581 2577 }; 2582 2578 … … 2983 2979 } 2984 2980 2985 #ifdef CONFIG_PM2986 2981 static int i915_adlp_hdmi_suspend(struct hda_codec *codec) 2987 2982 { … … 3063 3058 return res; 3064 3059 } 3065 #endif3066 3060 3067 3061 /* precondition and allocation for Intel codecs */ … … 3198 3192 spec->silent_stream_type = SILENT_STREAM_KAE; 3199 3193 3200 #ifdef CONFIG_PM3201 3194 codec->patch_ops.resume = i915_adlp_hdmi_resume; 3202 3195 codec->patch_ops.suspend = i915_adlp_hdmi_suspend; 3203 #endif3204 3196 } 3205 3197 } … … 4673 4665 HDA_CODEC_ENTRY(0x8086281c, "Alderlake-P HDMI", patch_i915_adlp_hdmi), 4674 4666 HDA_CODEC_ENTRY(0x8086281d, "Meteor Lake HDMI", patch_i915_adlp_hdmi), 4667 HDA_CODEC_ENTRY(0x8086281e, "Battlemage HDMI", patch_i915_adlp_hdmi), 4675 4668 HDA_CODEC_ENTRY(0x8086281f, "Raptor Lake P HDMI", patch_i915_adlp_hdmi), 4676 4669 HDA_CODEC_ENTRY(0x80862820, "Lunar Lake HDMI", patch_i915_adlp_hdmi), -
GPL/trunk/alsa-kernel/pci/hda/patch_realtek.c
r772 r777 11 11 */ 12 12 13 #include <linux/acpi.h> 14 #include <linux/cleanup.h> 13 15 #include <linux/init.h> 14 16 #include <linux/delay.h> … … 17 19 #include <linux/dmi.h> 18 20 #include <linux/module.h> 21 //#include <linux/i2c.h> 19 22 #include <linux/input.h> 20 23 #include <linux/leds.h> 21 24 #include <linux/ctype.h> 25 //#include <linux/spi/spi.h> 22 26 #include <sound/core.h> 23 27 #include <sound/jack.h> … … 118 122 /* hooks */ 119 123 void (*init_hook)(struct hda_codec *codec); 120 #ifdef CONFIG_PM121 124 void (*power_hook)(struct hda_codec *codec); 122 #endif123 125 void (*shutup)(struct hda_codec *codec); 124 126 … … 133 135 unsigned int no_internal_mic_pin:1; 134 136 unsigned int en_3kpull_low:1; 137 int num_speaker_amps; 135 138 136 139 /* for PLL fix */ … … 142 145 143 146 /* component binding */ 144 struct component_match *match; 145 struct hda_component comps[HDA_MAX_COMPONENTS]; 147 struct hda_component_parent comps; 146 148 }; 147 149 … … 938 940 #define is_s4_resume(codec) \ 939 941 ((codec)->core.dev.power.power_state.event == PM_EVENT_RESTORE) 942 #define is_s4_suspend(codec) \ 943 ((codec)->core.dev.power.power_state.event == PM_EVENT_FREEZE) 940 944 941 945 static int alc_init(struct hda_codec *codec) … … 962 966 } 963 967 964 #define alc_free snd_hda_gen_free 965 966 #ifdef CONFIG_PM 968 /* forward declaration */ 969 static const struct component_master_ops comp_master_ops; 970 971 static void alc_free(struct hda_codec *codec) 972 { 973 struct alc_spec *spec = codec->spec; 974 975 if (spec) 976 hda_component_manager_free(&spec->comps, &comp_master_ops); 977 978 snd_hda_gen_free(codec); 979 } 980 967 981 static inline void alc_shutup(struct hda_codec *codec) 968 982 { … … 1003 1017 return 0; 1004 1018 } 1005 #endif1006 1019 1007 1020 /* … … 1013 1026 .free = alc_free, 1014 1027 .unsol_event = snd_hda_jack_unsol_event, 1015 #ifdef CONFIG_PM1016 1028 .resume = alc_resume, 1017 1029 .suspend = alc_suspend, 1018 1030 .check_power_status = snd_hda_gen_check_power_status, 1019 #endif1020 1031 }; 1021 1032 … … 3099 3110 { 0x18, PIN_VREF50 }, /* rear mic */ 3100 3111 { 0x19, PIN_VREF50 }, /* front mic */ 3101 { }3112 {0} 3102 3113 } 3103 3114 }, … … 3524 3535 .v.pins = (const struct hda_pintbl[]) { 3525 3536 { 0x18, PIN_VREF100 }, /* headset mic */ 3526 { }3537 {0} 3527 3538 } 3528 3539 }, … … 4759 4770 #endif 4760 4771 4761 #ifdef CONFIG_PM4762 4772 static int alc269_suspend(struct hda_codec *codec) 4763 4773 { … … 4808 4818 return 0; 4809 4819 } 4810 #endif /* CONFIG_PM */4811 4820 4812 4821 static void alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec *codec, … … 5561 5570 } 5562 5571 5563 #ifndef TARGET_OS2 5572 struct alc298_samsung_v2_amp_desc { 5573 unsigned short nid; 5574 int init_seq_size; 5575 unsigned short init_seq[18][2]; 5576 }; 5577 5578 static const struct alc298_samsung_v2_amp_desc 5579 alc298_samsung_v2_amp_desc_tbl[] = { 5580 { 0x38, 18, { 5581 { 0x23e1, 0x0000 }, { 0x2012, 0x006f }, { 0x2014, 0x0000 }, 5582 { 0x201b, 0x0001 }, { 0x201d, 0x0001 }, { 0x201f, 0x00fe }, 5583 { 0x2021, 0x0000 }, { 0x2022, 0x0010 }, { 0x203d, 0x0005 }, 5584 { 0x203f, 0x0003 }, { 0x2050, 0x002c }, { 0x2076, 0x000e }, 5585 { 0x207c, 0x004a }, { 0x2081, 0x0003 }, { 0x2399, 0x0003 }, 5586 { 0x23a4, 0x00b5 }, { 0x23a5, 0x0001 }, { 0x23ba, 0x0094 } 5587 }}, 5588 { 0x39, 18, { 5589 { 0x23e1, 0x0000 }, { 0x2012, 0x006f }, { 0x2014, 0x0000 }, 5590 { 0x201b, 0x0002 }, { 0x201d, 0x0002 }, { 0x201f, 0x00fd }, 5591 { 0x2021, 0x0001 }, { 0x2022, 0x0010 }, { 0x203d, 0x0005 }, 5592 { 0x203f, 0x0003 }, { 0x2050, 0x002c }, { 0x2076, 0x000e }, 5593 { 0x207c, 0x004a }, { 0x2081, 0x0003 }, { 0x2399, 0x0003 }, 5594 { 0x23a4, 0x00b5 }, { 0x23a5, 0x0001 }, { 0x23ba, 0x0094 } 5595 }}, 5596 { 0x3c, 15, { 5597 { 0x23e1, 0x0000 }, { 0x2012, 0x006f }, { 0x2014, 0x0000 }, 5598 { 0x201b, 0x0001 }, { 0x201d, 0x0001 }, { 0x201f, 0x00fe }, 5599 { 0x2021, 0x0000 }, { 0x2022, 0x0010 }, { 0x203d, 0x0005 }, 5600 { 0x203f, 0x0003 }, { 0x2050, 0x002c }, { 0x2076, 0x000e }, 5601 { 0x207c, 0x004a }, { 0x2081, 0x0003 }, { 0x23ba, 0x008d } 5602 }}, 5603 { 0x3d, 15, { 5604 { 0x23e1, 0x0000 }, { 0x2012, 0x006f }, { 0x2014, 0x0000 }, 5605 { 0x201b, 0x0002 }, { 0x201d, 0x0002 }, { 0x201f, 0x00fd }, 5606 { 0x2021, 0x0001 }, { 0x2022, 0x0010 }, { 0x203d, 0x0005 }, 5607 { 0x203f, 0x0003 }, { 0x2050, 0x002c }, { 0x2076, 0x000e }, 5608 { 0x207c, 0x004a }, { 0x2081, 0x0003 }, { 0x23ba, 0x008d } 5609 }} 5610 }; 5611 5612 static void alc298_samsung_v2_enable_amps(struct hda_codec *codec) 5613 { 5614 struct alc_spec *spec = codec->spec; 5615 static const unsigned short enable_seq[][2] = { 5616 { 0x203a, 0x0081 }, { 0x23ff, 0x0001 }, 5617 }; 5618 int i, j; 5619 5620 for (i = 0; i < spec->num_speaker_amps; i++) { 5621 alc_write_coef_idx(codec, 0x22, alc298_samsung_v2_amp_desc_tbl[i].nid); 5622 for (j = 0; j < ARRAY_SIZE(enable_seq); j++) 5623 alc298_samsung_write_coef_pack(codec, enable_seq[j]); 5624 codec_dbg(codec, "alc298_samsung_v2: Enabled speaker amp 0x%02x\n", 5625 alc298_samsung_v2_amp_desc_tbl[i].nid); 5626 } 5627 } 5628 5629 static void alc298_samsung_v2_disable_amps(struct hda_codec *codec) 5630 { 5631 struct alc_spec *spec = codec->spec; 5632 static const unsigned short disable_seq[][2] = { 5633 { 0x23ff, 0x0000 }, { 0x203a, 0x0080 }, 5634 }; 5635 int i, j; 5636 5637 for (i = 0; i < spec->num_speaker_amps; i++) { 5638 alc_write_coef_idx(codec, 0x22, alc298_samsung_v2_amp_desc_tbl[i].nid); 5639 for (j = 0; j < ARRAY_SIZE(disable_seq); j++) 5640 alc298_samsung_write_coef_pack(codec, disable_seq[j]); 5641 codec_dbg(codec, "alc298_samsung_v2: Disabled speaker amp 0x%02x\n", 5642 alc298_samsung_v2_amp_desc_tbl[i].nid); 5643 } 5644 } 5645 5646 static void alc298_samsung_v2_playback_hook(struct hda_pcm_stream *hinfo, 5647 struct hda_codec *codec, 5648 struct snd_pcm_substream *substream, 5649 int action) 5650 { 5651 /* Dynamically enable/disable speaker amps before and after playback */ 5652 if (action == HDA_GEN_PCM_ACT_OPEN) 5653 alc298_samsung_v2_enable_amps(codec); 5654 if (action == HDA_GEN_PCM_ACT_CLOSE) 5655 alc298_samsung_v2_disable_amps(codec); 5656 } 5657 5658 static void alc298_samsung_v2_init_amps(struct hda_codec *codec, 5659 int num_speaker_amps) 5660 { 5661 struct alc_spec *spec = codec->spec; 5662 int i, j; 5663 5664 /* Set spec's num_speaker_amps before doing anything else */ 5665 spec->num_speaker_amps = num_speaker_amps; 5666 5667 /* Disable speaker amps before init to prevent any physical damage */ 5668 alc298_samsung_v2_disable_amps(codec); 5669 5670 /* Initialize the speaker amps */ 5671 for (i = 0; i < spec->num_speaker_amps; i++) { 5672 alc_write_coef_idx(codec, 0x22, alc298_samsung_v2_amp_desc_tbl[i].nid); 5673 for (j = 0; j < alc298_samsung_v2_amp_desc_tbl[i].init_seq_size; j++) { 5674 alc298_samsung_write_coef_pack(codec, 5675 alc298_samsung_v2_amp_desc_tbl[i].init_seq[j]); 5676 } 5677 alc_write_coef_idx(codec, 0x89, 0x0); 5678 codec_dbg(codec, "alc298_samsung_v2: Initialized speaker amp 0x%02x\n", 5679 alc298_samsung_v2_amp_desc_tbl[i].nid); 5680 } 5681 5682 /* register hook to enable speaker amps only when they are needed */ 5683 spec->gen.pcm_playback_hook = alc298_samsung_v2_playback_hook; 5684 } 5685 5686 static void alc298_fixup_samsung_amp_v2_2_amps(struct hda_codec *codec, 5687 const struct hda_fixup *fix, int action) 5688 { 5689 if (action == HDA_FIXUP_ACT_PROBE) 5690 alc298_samsung_v2_init_amps(codec, 2); 5691 } 5692 5693 static void alc298_fixup_samsung_amp_v2_4_amps(struct hda_codec *codec, 5694 const struct hda_fixup *fix, int action) 5695 { 5696 if (action == HDA_FIXUP_ACT_PROBE) 5697 alc298_samsung_v2_init_amps(codec, 4); 5698 } 5699 5700 #ifdef NOT_USED 5564 5701 static void gpio2_mic_hotkey_event(struct hda_codec *codec, 5565 5702 struct hda_jack_callback *event) … … 5608 5745 return 0; 5609 5746 } 5610 #endif /* TARGET_OS2 */5747 #endif 5611 5748 5612 5749 /* GPIO1 = set according to SKU external amp … … 7281 7418 struct alc_spec *spec = codec->spec; 7282 7419 7283 if (action == HDA_FIXUP_ACT_PRE_PROBE) {7420 if (action == HDA_FIXUP_ACT_PRE_PROBE) 7284 7421 spec->gen.preferred_dacs = preferred_pairs; 7285 spec->gen.obey_preferred_dacs = 1;7286 }7287 7422 } 7288 7423 #endif /* NOT_USED */ … … 7333 7468 case HDA_FIXUP_ACT_INIT: 7334 7469 alc_combo_jack_hp_jd_restart(codec); 7470 break; 7471 } 7472 } 7473 7474 static void alc256_fixup_chromebook(struct hda_codec *codec, 7475 const struct hda_fixup *fix, int action) 7476 { 7477 struct alc_spec *spec = codec->spec; 7478 7479 switch (action) { 7480 case HDA_FIXUP_ACT_PRE_PROBE: 7481 spec->gen.suppress_auto_mute = 1; 7482 spec->gen.suppress_auto_mic = 1; 7483 spec->en_3kpull_low = false; 7335 7484 break; 7336 7485 } … … 7580 7729 } 7581 7730 7731 static void comp_acpi_device_notify(acpi_handle handle, u32 event, void *data) 7732 { 7733 struct hda_codec *cdc = data; 7734 struct alc_spec *spec = cdc->spec; 7735 7736 codec_info(cdc, "ACPI Notification %d\n", event); 7737 7738 hda_component_acpi_device_notify(&spec->comps, handle, event, data); 7739 } 7740 7582 7741 static int comp_bind(struct device *dev) 7583 7742 { 7584 7743 struct hda_codec *cdc = dev_to_hda_codec(dev); 7585 7744 struct alc_spec *spec = cdc->spec; 7586 7587 return component_bind_all(dev, spec->comps); 7745 int ret; 7746 7747 ret = hda_component_manager_bind(cdc, &spec->comps); 7748 if (ret) 7749 return ret; 7750 7751 return hda_component_manager_bind_acpi_notifications(cdc, 7752 &spec->comps, 7753 comp_acpi_device_notify, cdc); 7588 7754 } 7589 7755 … … 7593 7759 struct alc_spec *spec = cdc->spec; 7594 7760 7595 component_unbind_all(dev, spec->comps); 7761 hda_component_manager_unbind_acpi_notifications(cdc, &spec->comps, comp_acpi_device_notify); 7762 hda_component_manager_unbind(cdc, &spec->comps); 7596 7763 } 7597 7764 … … 7605 7772 { 7606 7773 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); 7774 7775 hda_component_manager_playback_hook(&spec->comps, action); 7776 } 7777 7778 static void comp_generic_fixup(struct hda_codec *cdc, int action, const char *bus, 7779 const char *hid, const char *match_str, int count) 7780 { 7672 7781 struct alc_spec *spec = cdc->spec; 7673 struct scodec_dev_name *rec; 7674 int ret, i; 7782 int ret; 7675 7783 7676 7784 switch (action) { 7677 7785 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); 7786 ret = hda_component_manager_init(cdc, &spec->comps, count, bus, hid, 7787 match_str, &comp_master_ops); 7690 7788 if (ret) 7691 codec_err(cdc, "Fail to register component aggregator %d\n", ret);7692 else 7789 return; 7790 7693 7791 spec->gen.pcm_playback_hook = comp_generic_playback_hook; 7694 7792 break; 7695 7793 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 { 7794 hda_component_manager_free(&spec->comps, &comp_master_ops); 7795 break; 7796 } 7797 } 7798 7799 static void find_cirrus_companion_amps(struct hda_codec *cdc) 7800 { 7801 #ifndef TARGET_OS2 7704 7802 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 } 7803 struct acpi_device *adev; 7804 struct fwnode_handle *fwnode __free(fwnode_handle) = NULL; 7805 const char *bus = NULL; 7806 static const struct { 7807 const char *hid; 7808 const char *name; 7809 } acpi_ids[] = {{ "CSC3554", "cs35l54-hda" }, 7810 { "CSC3556", "cs35l56-hda" }, 7811 { "CSC3557", "cs35l57-hda" }}; 7812 char *match; 7813 int i, count = 0, count_devindex = 0; 7814 7815 for (i = 0; i < ARRAY_SIZE(acpi_ids); ++i) { 7816 adev = acpi_dev_get_first_match_dev(acpi_ids[i].hid, NULL, -1); 7817 if (adev) 7818 break; 7819 } 7820 7821 if (!adev) { 7822 codec_dbg(cdc, "Did not find ACPI entry for a Cirrus Amp\n"); 7823 return; 7824 } 7825 7826 count = i2c_acpi_client_count(adev); 7827 if (count > 0) { 7828 bus = "i2c"; 7829 } else { 7830 count = acpi_spi_count_resources(adev); 7831 if (count > 0) 7832 bus = "spi"; 7833 } 7834 7835 fwnode = fwnode_handle_get(acpi_fwnode_handle(adev)); 7836 acpi_dev_put(adev); 7837 7838 if (!bus) { 7839 codec_err(cdc, "Did not find any buses for %s\n", acpi_ids[i].hid); 7840 return; 7841 } 7842 7843 if (!fwnode) { 7844 codec_err(cdc, "Could not get fwnode for %s\n", acpi_ids[i].hid); 7845 return; 7846 } 7847 7848 /* 7849 * When available the cirrus,dev-index property is an accurate 7850 * count of the amps in a system and is used in preference to 7851 * the count of bus devices that can contain additional address 7852 * alias entries. 7853 */ 7854 count_devindex = fwnode_property_count_u32(fwnode, "cirrus,dev-index"); 7855 if (count_devindex > 0) 7856 count = count_devindex; 7857 match = devm_kasprintf(dev, GFP_KERNEL, "-%%s:00-%s.%%d", acpi_ids[i].name); 7858 if (!match) 7859 return; 7860 codec_info(cdc, "Found %d %s on %s (%s)\n", count, acpi_ids[i].hid, bus, match); 7861 comp_generic_fixup(cdc, HDA_FIXUP_ACT_PRE_PROBE, bus, acpi_ids[i].hid, match, count); 7862 #else 7863 codec_dbg(cdc, "Cirrus Amp detection not supported on OS/2\n"); 7864 return; 7865 7866 #endif 7734 7867 } 7735 7868 7736 7869 static void cs35l41_fixup_i2c_two(struct hda_codec *cdc, const struct hda_fixup *fix, int action) 7737 7870 { 7738 cs35l41_generic_fixup(cdc, action, "i2c", "CSC3551", 2); 7871 comp_generic_fixup(cdc, action, "i2c", "CSC3551", "-%s:00-cs35l41-hda.%d", 2); 7872 } 7873 7874 static void cs35l41_fixup_i2c_four(struct hda_codec *cdc, const struct hda_fixup *fix, int action) 7875 { 7876 comp_generic_fixup(cdc, action, "i2c", "CSC3551", "-%s:00-cs35l41-hda.%d", 4); 7739 7877 } 7740 7878 7741 7879 static void cs35l41_fixup_spi_two(struct hda_codec *codec, const struct hda_fixup *fix, int action) 7742 7880 { 7743 c s35l41_generic_fixup(codec, action, "spi", "CSC3551", 2);7881 comp_generic_fixup(codec, action, "spi", "CSC3551", "-%s:00-cs35l41-hda.%d", 2); 7744 7882 } 7745 7883 7746 7884 static void cs35l41_fixup_spi_four(struct hda_codec *codec, const struct hda_fixup *fix, int action) 7747 7885 { 7748 c s35l41_generic_fixup(codec, action, "spi", "CSC3551", 4);7886 comp_generic_fixup(codec, action, "spi", "CSC3551", "-%s:00-cs35l41-hda.%d", 4); 7749 7887 } 7750 7888 … … 7752 7890 int action) 7753 7891 { 7754 c s35l41_generic_fixup(cdc, action, "i2c", "CLSA0100", 2);7755 } 7756 7757 #if ndef TARGET_OS27892 comp_generic_fixup(cdc, action, "i2c", "CLSA0100", "-%s:00-cs35l41-hda.%d", 2); 7893 } 7894 7895 #ifdef NOT_USED 7758 7896 static void alc287_fixup_legion_16ithg6_speakers(struct hda_codec *cdc, const struct hda_fixup *fix, 7759 7897 int action) 7760 7898 { 7761 cs35l41_generic_fixup(cdc, action, "i2c", "CLSA0101", 2); 7762 } 7763 #endif /* TARGET_OS2 */ 7899 comp_generic_fixup(cdc, action, "i2c", "CLSA0101", "-%s:00-cs35l41-hda.%d", 2); 7900 } 7901 #endif 7902 7903 static void alc285_fixup_asus_ga403u(struct hda_codec *cdc, const struct hda_fixup *fix, int action) 7904 { 7905 /* 7906 * The same SSID has been re-used in different hardware, they have 7907 * different codecs and the newer GA403U has a ALC285. 7908 */ 7909 if (cdc->core.vendor_id != 0x10ec0285) 7910 alc_fixup_inv_dmic(cdc, fix, action); 7911 } 7764 7912 7765 7913 static void tas2781_fixup_i2c(struct hda_codec *cdc, 7766 7914 const struct hda_fixup *fix, int action) 7767 7915 { 7768 tas2781_generic_fixup(cdc, action, "i2c", "TIAS2781"); 7769 } 7916 comp_generic_fixup(cdc, action, "i2c", "TIAS2781", "-%s:00", 1); 7917 } 7918 7919 static void yoga7_14arb7_fixup_i2c(struct hda_codec *cdc, 7920 const struct hda_fixup *fix, int action) 7921 { 7922 comp_generic_fixup(cdc, action, "i2c", "INT8866", "-%s:00", 1); 7923 } 7924 7925 static void alc256_fixup_acer_sfg16_micmute_led(struct hda_codec *codec, 7926 const struct hda_fixup *fix, int action) 7927 { 7928 alc_fixup_hp_gpio_led(codec, action, 0, 0x04); 7929 } 7930 7770 7931 7771 7932 /* for alc295_fixup_hp_top_speakers */ … … 7833 7994 snd_hda_codec_set_pincfg(codec, 0x1a, 0x04a1113c); 7834 7995 } 7996 } 7997 7998 static void alc256_decrease_headphone_amp_val(struct hda_codec *codec, 7999 const struct hda_fixup *fix, int action) 8000 { 8001 u32 caps; 8002 u8 nsteps, offs; 8003 8004 if (action != HDA_FIXUP_ACT_PRE_PROBE) 8005 return; 8006 8007 caps = query_amp_caps(codec, 0x3, HDA_OUTPUT); 8008 nsteps = ((caps & AC_AMPCAP_NUM_STEPS) >> AC_AMPCAP_NUM_STEPS_SHIFT) - 10; 8009 offs = ((caps & AC_AMPCAP_OFFSET) >> AC_AMPCAP_OFFSET_SHIFT) - 10; 8010 caps &= ~AC_AMPCAP_NUM_STEPS & ~AC_AMPCAP_OFFSET; 8011 caps |= (nsteps << AC_AMPCAP_NUM_STEPS_SHIFT) | (offs << AC_AMPCAP_OFFSET_SHIFT); 8012 8013 if (snd_hda_override_amp_caps(codec, 0x3, HDA_OUTPUT, caps)) 8014 codec_warn(codec, "failed to override amp caps for NID 0x3\n"); 7835 8015 } 7836 8016 … … 7973 8153 break; 7974 8154 } 8155 } 8156 8157 static void alc245_fixup_hp_spectre_x360_eu0xxx(struct hda_codec *codec, 8158 const struct hda_fixup *fix, int action) 8159 { 8160 /* 8161 * The Pin Complex 0x14 for the treble speakers is wrongly reported as 8162 * unconnected. 8163 * The Pin Complex 0x17 for the bass speakers has the lowest association 8164 * and sequence values so shift it up a bit to squeeze 0x14 in. 8165 */ 8166 static const struct hda_pintbl pincfgs[] = { 8167 { 0x14, 0x90170110 }, // top/treble 8168 { 0x17, 0x90170111 }, // bottom/bass 8169 {0} 8170 }; 8171 8172 /* 8173 * Force DAC 0x02 for the bass speakers 0x17. 8174 */ 8175 static const hda_nid_t conn[] = { 0x02 }; 8176 8177 switch (action) { 8178 case HDA_FIXUP_ACT_PRE_PROBE: 8179 snd_hda_apply_pincfgs(codec, pincfgs); 8180 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 8181 break; 8182 } 8183 8184 cs35l41_fixup_i2c_two(codec, fix, action); 8185 #ifdef NOT_USED 8186 alc245_fixup_hp_mute_led_coefbit(codec, fix, action); 8187 alc245_fixup_hp_gpio_led(codec, fix, action); 8188 #endif 8189 } 8190 8191 /* some changes for Spectre x360 16, 2024 model */ 8192 static void alc245_fixup_hp_spectre_x360_16_aa0xxx(struct hda_codec *codec, 8193 const struct hda_fixup *fix, int action) 8194 { 8195 /* 8196 * The Pin Complex 0x14 for the treble speakers is wrongly reported as 8197 * unconnected. 8198 * The Pin Complex 0x17 for the bass speakers has the lowest association 8199 * and sequence values so shift it up a bit to squeeze 0x14 in. 8200 */ 8201 struct alc_spec *spec = codec->spec; 8202 static const struct hda_pintbl pincfgs[] = { 8203 { 0x14, 0x90170110 }, // top/treble 8204 { 0x17, 0x90170111 }, // bottom/bass 8205 {0} 8206 }; 8207 8208 /* 8209 * Force DAC 0x02 for the bass speakers 0x17. 8210 */ 8211 static const hda_nid_t conn[] = { 0x02 }; 8212 8213 switch (action) { 8214 case HDA_FIXUP_ACT_PRE_PROBE: 8215 /* needed for amp of back speakers */ 8216 spec->gpio_mask |= 0x01; 8217 spec->gpio_dir |= 0x01; 8218 snd_hda_apply_pincfgs(codec, pincfgs); 8219 snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); 8220 break; 8221 case HDA_FIXUP_ACT_INIT: 8222 /* need to toggle GPIO to enable the amp of back speakers */ 8223 alc_update_gpio_data(codec, 0x01, true); 8224 msleep(100); 8225 alc_update_gpio_data(codec, 0x01, false); 8226 break; 8227 } 8228 8229 cs35l41_fixup_i2c_two(codec, fix, action); 8230 #ifdef NOT_USED 8231 alc245_fixup_hp_mute_led_coefbit(codec, fix, action); 8232 alc245_fixup_hp_gpio_led(codec, fix, action); 8233 #endif 8234 } 8235 8236 /* 8237 * ALC287 PCM hooks 8238 */ 8239 static void alc287_alc1318_playback_pcm_hook(struct hda_pcm_stream *hinfo, 8240 struct hda_codec *codec, 8241 struct snd_pcm_substream *substream, 8242 int action) 8243 { 8244 switch (action) { 8245 case HDA_GEN_PCM_ACT_OPEN: 8246 alc_write_coefex_idx(codec, 0x5a, 0x00, 0x954f); /* write gpio3 to high */ 8247 break; 8248 case HDA_GEN_PCM_ACT_CLOSE: 8249 alc_write_coefex_idx(codec, 0x5a, 0x00, 0x554f); /* write gpio3 as default value */ 8250 break; 8251 } 8252 } 8253 8254 static void alc287_s4_power_gpio3_default(struct hda_codec *codec) 8255 { 8256 #ifndef TARGET_OS2 8257 if (is_s4_suspend(codec)) { 8258 alc_write_coefex_idx(codec, 0x5a, 0x00, 0x554f); /* write gpio3 as default value */ 8259 } 8260 #endif 8261 } 8262 8263 static void alc287_fixup_lenovo_thinkpad_with_alc1318(struct hda_codec *codec, 8264 const struct hda_fixup *fix, int action) 8265 { 8266 struct alc_spec *spec = codec->spec; 8267 static const struct coef_fw coefs[] = { 8268 WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC300), 8269 WRITE_COEF(0x28, 0x0001), WRITE_COEF(0x29, 0xb023), 8270 WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC301), 8271 WRITE_COEF(0x28, 0x0001), WRITE_COEF(0x29, 0xb023), 8272 }; 8273 8274 if (action != HDA_FIXUP_ACT_PRE_PROBE) 8275 return; 8276 alc_update_coef_idx(codec, 0x10, 1<<11, 1<<11); 8277 alc_process_coef_fw(codec, coefs); 8278 spec->power_hook = alc287_s4_power_gpio3_default; 8279 spec->gen.pcm_playback_hook = alc287_alc1318_playback_pcm_hook; 7975 8280 } 7976 8281 … … 8179 8484 ALC236_FIXUP_LENOVO_INV_DMIC, 8180 8485 ALC298_FIXUP_SAMSUNG_AMP, 8486 ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS, 8487 ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS, 8181 8488 ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, 8182 8489 ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, … … 8202 8509 ALC274_FIXUP_HP_HEADSET_MIC, 8203 8510 ALC274_FIXUP_HP_ENVY_GPIO, 8511 ALC274_FIXUP_ASUS_ZEN_AIO_27, 8204 8512 ALC256_FIXUP_ASUS_HPE, 8205 8513 ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK, … … 8224 8532 ALC287_FIXUP_YOGA7_14ITL_SPEAKERS, 8225 8533 ALC298_FIXUP_LENOVO_C940_DUET7, 8226 ALC287_FIXUP_LENOVO_14IRP8_DUETITL,8227 8534 ALC287_FIXUP_13S_GEN2_SPEAKERS, 8228 8535 ALC256_FIXUP_SET_COEF_DEFAULTS, … … 8235 8542 ALC287_FIXUP_CS35L41_I2C_2, 8236 8543 ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED, 8544 ALC287_FIXUP_CS35L41_I2C_4, 8237 8545 ALC245_FIXUP_CS35L41_SPI_2, 8238 8546 ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED, … … 8249 8557 ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI, 8250 8558 ALC287_FIXUP_TAS2781_I2C, 8559 ALC287_FIXUP_YOGA7_14ARB7_I2C, 8251 8560 ALC245_FIXUP_HP_MUTE_LED_COEFBIT, 8252 8561 ALC245_FIXUP_HP_X360_MUTE_LEDS, … … 8256 8565 ALC289_FIXUP_DELL_CS35L41_SPI_2, 8257 8566 ALC294_FIXUP_CS35L41_I2C_2, 8567 ALC256_FIXUP_ACER_SFG16_MICMUTE_LED, 8568 ALC256_FIXUP_HEADPHONE_AMP_VOL, 8569 ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX, 8570 ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX, 8571 ALC285_FIXUP_ASUS_GA403U, 8572 ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC, 8573 ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1, 8574 ALC285_FIXUP_ASUS_GU605_SPI_2_HEADSET_MIC, 8575 ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1, 8576 ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318, 8577 ALC256_FIXUP_CHROME_BOOK, 8578 ALC245_FIXUP_CLEVO_NOISY_MIC, 8579 ALC269_FIXUP_VAIO_VJFH52_MIC_NO_PRESENCE, 8580 ALC233_FIXUP_MEDION_MTL_SPK, 8258 8581 }; 8259 8582 … … 8443 8766 {0} 8444 8767 }; 8445 #endif 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 */ 8768 8769 static const struct hda_pintbl ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC_PINS[] = { 8770 { 0x19, 0x03a11050 }, 8771 { 0x1b, 0x03a11c30 }, 8772 {0} 8773 }; 8774 8775 static const struct hda_pintbl ALC294_FIXUP_LENOVO_MIC_LOCATION_PINS[] = { 8776 /* Change the mic location from front to right, otherwise there are 8777 two front mics with the same name, pulseaudio can't handle them. 8778 This is just a temporary workaround, after applying this fixup, 8779 there will be one "Front Mic" and one "Mic" in this machine. 8780 */ 8781 { 0x1a, 0x04a19040 }, 8782 {0} 8783 }; 8784 #endif 8468 8785 8469 8786 static const struct hda_fixup alc269_fixups[] = { … … 9598 9915 .chain_id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE 9599 9916 }, 9917 #endif 9600 9918 [ALC294_FIXUP_LENOVO_MIC_LOCATION] = { 9601 9919 .type = HDA_FIXUP_PINS, 9920 #ifndef TARGET_OS2 9602 9921 .v.pins = (const struct hda_pintbl[]) { 9603 9922 /* Change the mic location from front to right, otherwise there are … … 9609 9928 {0} 9610 9929 }, 9611 }, 9930 #else 9931 .v.pins = ALC294_FIXUP_LENOVO_MIC_LOCATION_PINS, 9932 #endif 9933 }, 9934 #ifdef NOT_USED 9612 9935 [ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE] = { 9613 9936 .type = HDA_FIXUP_PINS, … … 10123 10446 .chain_id = ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET 10124 10447 }, 10448 [ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS] = { 10449 .type = HDA_FIXUP_FUNC, 10450 .v.func = alc298_fixup_samsung_amp_v2_2_amps 10451 }, 10452 [ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS] = { 10453 .type = HDA_FIXUP_FUNC, 10454 .v.func = alc298_fixup_samsung_amp_v2_4_amps 10455 }, 10125 10456 #ifdef NOT_USED 10126 10457 [ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = { … … 10334 10665 .v.func = alc274_fixup_hp_envy_gpio, 10335 10666 }, 10667 [ALC274_FIXUP_ASUS_ZEN_AIO_27] = { 10668 .type = HDA_FIXUP_VERBS, 10669 .v.verbs = (const struct hda_verb[]) { 10670 { 0x20, AC_VERB_SET_COEF_INDEX, 0x10 }, 10671 { 0x20, AC_VERB_SET_PROC_COEF, 0xc420 }, 10672 { 0x20, AC_VERB_SET_COEF_INDEX, 0x40 }, 10673 { 0x20, AC_VERB_SET_PROC_COEF, 0x8800 }, 10674 { 0x20, AC_VERB_SET_COEF_INDEX, 0x49 }, 10675 { 0x20, AC_VERB_SET_PROC_COEF, 0x0249 }, 10676 { 0x20, AC_VERB_SET_COEF_INDEX, 0x4a }, 10677 { 0x20, AC_VERB_SET_PROC_COEF, 0x202b }, 10678 { 0x20, AC_VERB_SET_COEF_INDEX, 0x62 }, 10679 { 0x20, AC_VERB_SET_PROC_COEF, 0xa007 }, 10680 { 0x20, AC_VERB_SET_COEF_INDEX, 0x6b }, 10681 { 0x20, AC_VERB_SET_PROC_COEF, 0x5060 }, 10682 {0} 10683 }, 10684 .chained = true, 10685 .chain_id = ALC2XX_FIXUP_HEADSET_MIC, 10686 }, 10336 10687 [ALC256_FIXUP_ASUS_HPE] = { 10337 10688 .type = HDA_FIXUP_VERBS, … … 10408 10759 { 0x1e, 0x411111f0 }, 10409 10760 { 0x21, 0x03211020 }, 10410 { }10761 {0} 10411 10762 }, 10412 10763 .chained = true, … … 10505 10856 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10506 10857 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10507 { }10858 {0} 10508 10859 }, 10509 10860 .chained = true, … … 10552 10903 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10553 10904 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10554 { }10905 {0} 10555 10906 }, 10556 10907 .chained = true, … … 10560 10911 .type = HDA_FIXUP_FUNC, 10561 10912 .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,10566 10913 }, 10567 10914 [ALC287_FIXUP_13S_GEN2_SPEAKERS] = { … … 10582 10929 { 0x20, AC_VERB_SET_PROC_COEF, 0x0 }, 10583 10930 { 0x20, AC_VERB_SET_PROC_COEF, 0xb020 }, 10584 { }10931 {0} 10585 10932 }, 10586 10933 .chained = true, … … 10630 10977 .chained = true, 10631 10978 .chain_id = ALC285_FIXUP_HP_MUTE_LED, 10979 }, 10980 [ALC287_FIXUP_CS35L41_I2C_4] = { 10981 .type = HDA_FIXUP_FUNC, 10982 .v.func = cs35l41_fixup_i2c_four, 10632 10983 }, 10633 10984 [ALC245_FIXUP_CS35L41_SPI_2] = { … … 10782 11133 .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK, 10783 11134 }, 11135 [ALC287_FIXUP_YOGA7_14ARB7_I2C] = { 11136 .type = HDA_FIXUP_FUNC, 11137 .v.func = yoga7_14arb7_fixup_i2c, 11138 .chained = true, 11139 .chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK, 11140 }, 10784 11141 [ALC245_FIXUP_HP_MUTE_LED_COEFBIT] = { 10785 11142 .type = HDA_FIXUP_FUNC, … … 10818 11175 .v.func = cs35l41_fixup_i2c_two, 10819 11176 }, 11177 [ALC256_FIXUP_ACER_SFG16_MICMUTE_LED] = { 11178 .type = HDA_FIXUP_FUNC, 11179 .v.func = alc256_fixup_acer_sfg16_micmute_led, 11180 }, 11181 [ALC256_FIXUP_HEADPHONE_AMP_VOL] = { 11182 .type = HDA_FIXUP_FUNC, 11183 .v.func = alc256_decrease_headphone_amp_val, 11184 }, 11185 [ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX] = { 11186 .type = HDA_FIXUP_FUNC, 11187 .v.func = alc245_fixup_hp_spectre_x360_eu0xxx, 11188 }, 11189 [ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX] = { 11190 .type = HDA_FIXUP_FUNC, 11191 .v.func = alc245_fixup_hp_spectre_x360_16_aa0xxx, 11192 }, 11193 [ALC285_FIXUP_ASUS_GA403U] = { 11194 .type = HDA_FIXUP_FUNC, 11195 .v.func = alc285_fixup_asus_ga403u, 11196 }, 11197 [ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC] = { 11198 .type = HDA_FIXUP_PINS, 11199 #ifndef TARGET_OS2 11200 .v.pins = (const struct hda_pintbl[]) { 11201 { 0x19, 0x03a11050 }, 11202 { 0x1b, 0x03a11c30 }, 11203 { } 11204 }, 11205 #else 11206 .v.pins = ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC_PINS, 11207 #endif 11208 .chained = true, 11209 .chain_id = ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1 11210 }, 11211 [ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1] = { 11212 .type = HDA_FIXUP_FUNC, 11213 .v.func = alc285_fixup_speaker2_to_dac1, 11214 .chained = true, 11215 .chain_id = ALC285_FIXUP_ASUS_GU605_SPI_2_HEADSET_MIC, 11216 }, 11217 #ifdef NOT_USED 11218 [ALC285_FIXUP_ASUS_GU605_SPI_2_HEADSET_MIC] = { 11219 .type = HDA_FIXUP_PINS, 11220 .v.pins = (const struct hda_pintbl[]) { 11221 { 0x19, 0x03a11050 }, 11222 { 0x1b, 0x03a11c30 }, 11223 { } 11224 }, 11225 }, 11226 #endif 11227 [ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1] = { 11228 .type = HDA_FIXUP_FUNC, 11229 .v.func = alc285_fixup_speaker2_to_dac1, 11230 .chained = true, 11231 .chain_id = ALC285_FIXUP_ASUS_GA403U, 11232 }, 11233 [ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318] = { 11234 .type = HDA_FIXUP_FUNC, 11235 .v.func = alc287_fixup_lenovo_thinkpad_with_alc1318, 11236 .chained = true, 11237 .chain_id = ALC269_FIXUP_THINKPAD_ACPI 11238 }, 11239 [ALC256_FIXUP_CHROME_BOOK] = { 11240 .type = HDA_FIXUP_FUNC, 11241 .v.func = alc256_fixup_chromebook, 11242 .chained = true, 11243 .chain_id = ALC225_FIXUP_HEADSET_JACK 11244 }, 11245 [ALC245_FIXUP_CLEVO_NOISY_MIC] = { 11246 .type = HDA_FIXUP_FUNC, 11247 .v.func = alc269_fixup_limit_int_mic_boost, 11248 .chained = true, 11249 .chain_id = ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE, 11250 }, 11251 #ifdef NOT_USED 11252 [ALC269_FIXUP_VAIO_VJFH52_MIC_NO_PRESENCE] = { 11253 .type = HDA_FIXUP_PINS, 11254 .v.pins = (const struct hda_pintbl[]) { 11255 { 0x19, 0x03a1113c }, /* use as headset mic, without its own jack detect */ 11256 { 0x1b, 0x20a11040 }, /* dock mic */ 11257 { } 11258 }, 11259 .chained = true, 11260 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST 11261 }, 11262 [ALC233_FIXUP_MEDION_MTL_SPK] = { 11263 .type = HDA_FIXUP_PINS, 11264 .v.pins = (const struct hda_pintbl[]) { 11265 { 0x1b, 0x90170110 }, 11266 { } 11267 }, 11268 }, 11269 #endif 10820 11270 }; 10821 11271 … … 10865 11315 SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC), 10866 11316 SND_PCI_QUIRK(0x1025, 0x1534, "Acer Predator PH315-54", ALC255_FIXUP_ACER_MIC_NO_PRESENCE), 11317 SND_PCI_QUIRK(0x1025, 0x159c, "Acer Nitro 5 AN515-58", ALC2XX_FIXUP_HEADSET_MIC), 11318 SND_PCI_QUIRK(0x1025, 0x169a, "Acer Swift SFG16", ALC256_FIXUP_ACER_SFG16_MICMUTE_LED), 10867 11319 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), 10868 11320 SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X), … … 10924 11376 SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK), 10925 11377 SND_PCI_QUIRK(0x1028, 0x0b1a, "Dell Precision 5570", ALC289_FIXUP_DUAL_SPK), 11378 SND_PCI_QUIRK(0x1028, 0x0b27, "Dell", ALC245_FIXUP_CS35L41_SPI_2), 11379 SND_PCI_QUIRK(0x1028, 0x0b28, "Dell", ALC245_FIXUP_CS35L41_SPI_2), 10926 11380 SND_PCI_QUIRK(0x1028, 0x0b37, "Dell Inspiron 16 Plus 7620 2-in-1", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS), 10927 11381 SND_PCI_QUIRK(0x1028, 0x0b71, "Dell Inspiron 16 Plus 7620", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS), … … 10937 11391 SND_PCI_QUIRK(0x1028, 0x0c1d, "Dell Precision 3440", ALC236_FIXUP_DELL_DUAL_CODECS), 10938 11392 SND_PCI_QUIRK(0x1028, 0x0c1e, "Dell Precision 3540", ALC236_FIXUP_DELL_DUAL_CODECS), 11393 SND_PCI_QUIRK(0x1028, 0x0c28, "Dell Inspiron 16 Plus 7630", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS), 11394 SND_PCI_QUIRK(0x1028, 0x0c4d, "Dell", ALC287_FIXUP_CS35L41_I2C_4), 11395 SND_PCI_QUIRK(0x1028, 0x0c94, "Dell Polaris 3 metal", ALC287_FIXUP_TAS2781_I2C), 11396 SND_PCI_QUIRK(0x1028, 0x0c96, "Dell Polaris 2in1", ALC287_FIXUP_TAS2781_I2C), 10939 11397 SND_PCI_QUIRK(0x1028, 0x0cbd, "Dell Oasis 13 CS MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2), 10940 11398 SND_PCI_QUIRK(0x1028, 0x0cbe, "Dell Oasis 13 2-IN-1 MTL-U", ALC289_FIXUP_DELL_CS35L41_SPI_2), … … 11118 11576 SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11119 11577 SND_PCI_QUIRK(0x103c, 0x89d3, "HP EliteBook 645 G9 (MB 89D2)", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11578 SND_PCI_QUIRK(0x103c, 0x89e7, "HP Elite x2 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11120 11579 SND_PCI_QUIRK(0x103c, 0x8a0f, "HP Pavilion 14-ec1xxx", ALC287_FIXUP_HP_GPIO_LED), 11121 11580 SND_PCI_QUIRK(0x103c, 0x8a20, "HP Laptop 15s-fq5xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 11122 11581 SND_PCI_QUIRK(0x103c, 0x8a25, "HP Victus 16-d1xxx (MB 8A25)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT), 11582 SND_PCI_QUIRK(0x103c, 0x8a28, "HP Envy 13", ALC287_FIXUP_CS35L41_I2C_2), 11583 SND_PCI_QUIRK(0x103c, 0x8a29, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 11584 SND_PCI_QUIRK(0x103c, 0x8a2a, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 11585 SND_PCI_QUIRK(0x103c, 0x8a2b, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 11586 SND_PCI_QUIRK(0x103c, 0x8a2c, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 11587 SND_PCI_QUIRK(0x103c, 0x8a2d, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 11588 SND_PCI_QUIRK(0x103c, 0x8a2e, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 11589 SND_PCI_QUIRK(0x103c, 0x8a30, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 11590 SND_PCI_QUIRK(0x103c, 0x8a31, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 11591 SND_PCI_QUIRK(0x103c, 0x8a6e, "HP EDNA 360", ALC287_FIXUP_CS35L41_I2C_4), 11592 SND_PCI_QUIRK(0x103c, 0x8a74, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), 11123 11593 SND_PCI_QUIRK(0x103c, 0x8a78, "HP Dev One", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST), 11124 11594 SND_PCI_QUIRK(0x103c, 0x8aa0, "HP ProBook 440 G9 (MB 8A9E)", ALC236_FIXUP_HP_GPIO_LED), … … 11130 11600 SND_PCI_QUIRK(0x103c, 0x8ad1, "HP EliteBook 840 14 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11131 11601 SND_PCI_QUIRK(0x103c, 0x8ad2, "HP EliteBook 860 16 inch G9 Notebook PC", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11602 SND_PCI_QUIRK(0x103c, 0x8ad8, "HP 800 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11132 11603 SND_PCI_QUIRK(0x103c, 0x8b0f, "HP Elite mt645 G7 Mobile Thin Client U81", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11133 11604 SND_PCI_QUIRK(0x103c, 0x8b2f, "HP 255 15.6 inch G10 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), 11605 SND_PCI_QUIRK(0x103c, 0x8b3a, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 11134 11606 SND_PCI_QUIRK(0x103c, 0x8b3f, "HP mt440 Mobile Thin Client U91", ALC236_FIXUP_HP_GPIO_LED), 11135 11607 SND_PCI_QUIRK(0x103c, 0x8b42, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), … … 11160 11632 SND_PCI_QUIRK(0x103c, 0x8b96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11161 11633 SND_PCI_QUIRK(0x103c, 0x8b97, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11634 SND_PCI_QUIRK(0x103c, 0x8bb3, "HP Slim OMEN", ALC287_FIXUP_CS35L41_I2C_2), 11635 SND_PCI_QUIRK(0x103c, 0x8bb4, "HP Slim OMEN", ALC287_FIXUP_CS35L41_I2C_2), 11636 SND_PCI_QUIRK(0x103c, 0x8bdd, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 11637 SND_PCI_QUIRK(0x103c, 0x8bde, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 11638 SND_PCI_QUIRK(0x103c, 0x8bdf, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 11639 SND_PCI_QUIRK(0x103c, 0x8be0, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 11640 SND_PCI_QUIRK(0x103c, 0x8be1, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 11641 SND_PCI_QUIRK(0x103c, 0x8be2, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 11642 SND_PCI_QUIRK(0x103c, 0x8be3, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 11643 SND_PCI_QUIRK(0x103c, 0x8be5, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 11644 SND_PCI_QUIRK(0x103c, 0x8be6, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 11645 SND_PCI_QUIRK(0x103c, 0x8be7, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 11646 SND_PCI_QUIRK(0x103c, 0x8be8, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 11647 SND_PCI_QUIRK(0x103c, 0x8be9, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 11162 11648 SND_PCI_QUIRK(0x103c, 0x8bf0, "HP", ALC236_FIXUP_HP_GPIO_LED), 11649 SND_PCI_QUIRK(0x103c, 0x8c15, "HP Spectre x360 2-in-1 Laptop 14-eu0xxx", ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX), 11650 SND_PCI_QUIRK(0x103c, 0x8c16, "HP Spectre x360 2-in-1 Laptop 16-aa0xxx", ALC245_FIXUP_HP_SPECTRE_X360_16_AA0XXX), 11651 SND_PCI_QUIRK(0x103c, 0x8c17, "HP Spectre 16", ALC287_FIXUP_CS35L41_I2C_2), 11652 SND_PCI_QUIRK(0x103c, 0x8c21, "HP Pavilion Plus Laptop 14-ey0XXX", ALC245_FIXUP_HP_X360_MUTE_LEDS), 11653 SND_PCI_QUIRK(0x103c, 0x8c30, "HP Victus 15-fb1xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT), 11163 11654 SND_PCI_QUIRK(0x103c, 0x8c46, "HP EliteBook 830 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11164 11655 SND_PCI_QUIRK(0x103c, 0x8c47, "HP EliteBook 840 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11165 11656 SND_PCI_QUIRK(0x103c, 0x8c48, "HP EliteBook 860 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11166 11657 SND_PCI_QUIRK(0x103c, 0x8c49, "HP Elite x360 830 2-in-1 G11", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11658 SND_PCI_QUIRK(0x103c, 0x8c4d, "HP Omen", ALC287_FIXUP_CS35L41_I2C_2), 11659 SND_PCI_QUIRK(0x103c, 0x8c4e, "HP Omen", ALC287_FIXUP_CS35L41_I2C_2), 11660 SND_PCI_QUIRK(0x103c, 0x8c4f, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), 11661 SND_PCI_QUIRK(0x103c, 0x8c50, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 11662 SND_PCI_QUIRK(0x103c, 0x8c51, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 11663 SND_PCI_QUIRK(0x103c, 0x8c52, "HP EliteBook 1040 G11", ALC285_FIXUP_HP_GPIO_LED), 11664 SND_PCI_QUIRK(0x103c, 0x8c53, "HP Elite x360 1040 2-in-1 G11", ALC285_FIXUP_HP_GPIO_LED), 11665 SND_PCI_QUIRK(0x103c, 0x8c66, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 11666 SND_PCI_QUIRK(0x103c, 0x8c67, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 11667 SND_PCI_QUIRK(0x103c, 0x8c68, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), 11668 SND_PCI_QUIRK(0x103c, 0x8c6a, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2), 11167 11669 SND_PCI_QUIRK(0x103c, 0x8c70, "HP EliteBook 835 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 11168 11670 SND_PCI_QUIRK(0x103c, 0x8c71, "HP EliteBook 845 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), … … 11188 11690 SND_PCI_QUIRK(0x103c, 0x8ca4, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11189 11691 SND_PCI_QUIRK(0x103c, 0x8ca7, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), 11692 SND_PCI_QUIRK(0x103c, 0x8caf, "HP Elite mt645 G8 Mobile Thin Client", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 11693 SND_PCI_QUIRK(0x103c, 0x8cbd, "HP Pavilion Aero Laptop 13-bg0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS), 11694 SND_PCI_QUIRK(0x103c, 0x8cdd, "HP Spectre", ALC287_FIXUP_CS35L41_I2C_2), 11695 SND_PCI_QUIRK(0x103c, 0x8cde, "HP Spectre", ALC287_FIXUP_CS35L41_I2C_2), 11696 SND_PCI_QUIRK(0x103c, 0x8cdf, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 11697 SND_PCI_QUIRK(0x103c, 0x8ce0, "HP SnowWhite", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED), 11190 11698 SND_PCI_QUIRK(0x103c, 0x8cf5, "HP ZBook Studio 16", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED), 11191 11699 SND_PCI_QUIRK(0x103c, 0x8d01, "HP ZBook Power 14 G12", ALC285_FIXUP_HP_GPIO_LED), … … 11200 11708 SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 11201 11709 SND_PCI_QUIRK(0x1043, 0x10a1, "ASUS UX391UA", ALC294_FIXUP_ASUS_SPK), 11710 SND_PCI_QUIRK(0x1043, 0x10a4, "ASUS TP3407SA", ALC287_FIXUP_TAS2781_I2C), 11202 11711 SND_PCI_QUIRK(0x1043, 0x10c0, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), 11203 11712 SND_PCI_QUIRK(0x1043, 0x10d0, "ASUS X540LA/X540LJ", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), 11204 11713 SND_PCI_QUIRK(0x1043, 0x10d3, "ASUS K6500ZC", ALC294_FIXUP_ASUS_SPK), 11714 SND_PCI_QUIRK(0x1043, 0x1154, "ASUS TP3607SH", ALC287_FIXUP_TAS2781_I2C), 11205 11715 SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 11206 11716 SND_PCI_QUIRK(0x1043, 0x11c0, "ASUS X556UR", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), 11717 SND_PCI_QUIRK(0x1043, 0x1204, "ASUS Strix G615JHR_JMR_JPR", ALC287_FIXUP_TAS2781_I2C), 11718 SND_PCI_QUIRK(0x1043, 0x1214, "ASUS Strix G615LH_LM_LP", ALC287_FIXUP_TAS2781_I2C), 11207 11719 SND_PCI_QUIRK(0x1043, 0x125e, "ASUS Q524UQK", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), 11208 11720 SND_PCI_QUIRK(0x1043, 0x1271, "ASUS X430UN", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), … … 11233 11745 SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS UX3402VA", ALC245_FIXUP_CS35L41_SPI_2), 11234 11746 SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401), 11747 SND_PCI_QUIRK(0x1043, 0x16d3, "ASUS UX5304VA", ALC245_FIXUP_CS35L41_SPI_2), 11235 11748 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), 11749 SND_PCI_QUIRK(0x1043, 0x16f3, "ASUS UX7602VI/BZ", ALC245_FIXUP_CS35L41_SPI_2), 11236 11750 SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS), 11237 11751 SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK), 11238 11752 SND_PCI_QUIRK(0x1043, 0x17f3, "ROG Ally NR2301L/X", ALC294_FIXUP_ASUS_ALLY), 11753 SND_PCI_QUIRK(0x1043, 0x1863, "ASUS UX6404VI/VV", ALC245_FIXUP_CS35L41_SPI_2), 11239 11754 SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS), 11240 11755 SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC), … … 11251 11766 SND_PCI_QUIRK(0x1043, 0x1a8f, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2), 11252 11767 SND_PCI_QUIRK(0x1043, 0x1b11, "ASUS UX431DA", ALC294_FIXUP_ASUS_COEF_1B), 11253 SND_PCI_QUIRK(0x1043, 0x1b13, "A sus U41SV", ALC269_FIXUP_INV_DMIC),11768 SND_PCI_QUIRK(0x1043, 0x1b13, "ASUS U41SV/GA403U", ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC), 11254 11769 SND_PCI_QUIRK(0x1043, 0x1b93, "ASUS G614JVR/JIR", ALC245_FIXUP_CS35L41_SPI_2), 11255 11770 SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), … … 11259 11774 SND_PCI_QUIRK(0x1043, 0x1c43, "ASUS UX8406MA", ALC245_FIXUP_CS35L41_SPI_2), 11260 11775 SND_PCI_QUIRK(0x1043, 0x1c62, "ASUS GU603", ALC289_FIXUP_ASUS_GA401), 11776 SND_PCI_QUIRK(0x1043, 0x1c63, "ASUS GU605M", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1), 11261 11777 SND_PCI_QUIRK(0x1043, 0x1c92, "ASUS ROG Strix G15", ALC285_FIXUP_ASUS_G533Z_PINS), 11262 11778 SND_PCI_QUIRK(0x1043, 0x1c9f, "ASUS G614JU/JV/JI", ALC285_FIXUP_ASUS_HEADSET_MIC), … … 11273 11789 SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502), 11274 11790 SND_PCI_QUIRK(0x1043, 0x1e12, "ASUS UM3402", ALC287_FIXUP_CS35L41_I2C_2), 11791 SND_PCI_QUIRK(0x1043, 0x1e1f, "ASUS Vivobook 15 X1504VAP", ALC2XX_FIXUP_HEADSET_MIC), 11275 11792 SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15", ALC294_FIXUP_ASUS_GU502_PINS), 11276 11793 SND_PCI_QUIRK(0x1043, 0x1e5e, "ASUS ROG Strix G513", ALC294_FIXUP_ASUS_G513_PINS), 11794 SND_PCI_QUIRK(0x1043, 0x1e63, "ASUS H7606W", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1), 11795 SND_PCI_QUIRK(0x1043, 0x1e83, "ASUS GA605W", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1), 11277 11796 SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401), 11797 SND_PCI_QUIRK(0x1043, 0x1eb3, "ASUS Ally RCLA72", ALC287_FIXUP_TAS2781_I2C), 11798 SND_PCI_QUIRK(0x1043, 0x1ed3, "ASUS HN7306W", ALC287_FIXUP_CS35L41_I2C_2), 11278 11799 SND_PCI_QUIRK(0x1043, 0x1ee2, "ASUS UM6702RA/RC", ALC287_FIXUP_CS35L41_I2C_2), 11279 11800 SND_PCI_QUIRK(0x1043, 0x1c52, "ASUS Zephyrus G15 2022", ALC289_FIXUP_ASUS_GA401), 11280 11801 SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401), 11281 11802 SND_PCI_QUIRK(0x1043, 0x1f12, "ASUS UM5302", ALC287_FIXUP_CS35L41_I2C_2), 11803 SND_PCI_QUIRK(0x1043, 0x1f1f, "ASUS H7604JI/JV/J3D", ALC245_FIXUP_CS35L41_SPI_2), 11282 11804 SND_PCI_QUIRK(0x1043, 0x1f62, "ASUS UX7602ZM", ALC245_FIXUP_CS35L41_SPI_2), 11283 11805 SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16", ALC289_FIXUP_ASUS_GA401), 11284 11806 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), 11807 SND_PCI_QUIRK(0x1043, 0x31d0, "ASUS Zen AIO 27 Z272SD_A272SD", ALC274_FIXUP_ASUS_ZEN_AIO_27), 11808 SND_PCI_QUIRK(0x1043, 0x3a20, "ASUS G614JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), 11809 SND_PCI_QUIRK(0x1043, 0x3a30, "ASUS G814JVR/JIR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), 11287 11810 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), 11811 SND_PCI_QUIRK(0x1043, 0x3a50, "ASUS G834JYR/JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), 11812 SND_PCI_QUIRK(0x1043, 0x3a60, "ASUS G634JYR/JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), 11813 SND_PCI_QUIRK(0x1043, 0x3e30, "ASUS TP3607SA", ALC287_FIXUP_TAS2781_I2C), 11814 SND_PCI_QUIRK(0x1043, 0x3ee0, "ASUS Strix G815_JHR_JMR_JPR", ALC287_FIXUP_TAS2781_I2C), 11815 SND_PCI_QUIRK(0x1043, 0x3ef0, "ASUS Strix G635LR_LW_LX", ALC287_FIXUP_TAS2781_I2C), 11816 SND_PCI_QUIRK(0x1043, 0x3f00, "ASUS Strix G815LH_LM_LP", ALC287_FIXUP_TAS2781_I2C), 11817 SND_PCI_QUIRK(0x1043, 0x3f10, "ASUS Strix G835LR_LW_LX", ALC287_FIXUP_TAS2781_I2C), 11818 SND_PCI_QUIRK(0x1043, 0x3f20, "ASUS Strix G615LR_LW", ALC287_FIXUP_TAS2781_I2C), 11819 SND_PCI_QUIRK(0x1043, 0x3f30, "ASUS Strix G815LR_LW", ALC287_FIXUP_TAS2781_I2C), 11290 11820 SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC), 11291 11821 SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC), … … 11314 11844 SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 11315 11845 SND_PCI_QUIRK(0x10ec, 0x12cc, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 11846 SND_PCI_QUIRK(0x10ec, 0x12f6, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK), 11316 11847 SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_ASPIRE_HEADSET_MIC), 11317 11848 SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC), … … 11330 11861 SND_PCI_QUIRK(0x144d, 0xca06, "Samsung Galaxy Book3 360 (NP730QFG)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), 11331 11862 SND_PCI_QUIRK(0x144d, 0xc868, "Samsung Galaxy Book2 Pro (NP930XED)", ALC298_FIXUP_SAMSUNG_AMP), 11863 SND_PCI_QUIRK(0x144d, 0xc870, "Samsung Galaxy Book2 Pro (NP950XED)", ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS), 11864 SND_PCI_QUIRK(0x144d, 0xc872, "Samsung Galaxy Book2 Pro (NP950XEE)", ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS), 11865 SND_PCI_QUIRK(0x144d, 0xc886, "Samsung Galaxy Book3 Pro (NP964XFG)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS), 11866 SND_PCI_QUIRK(0x144d, 0xc1ca, "Samsung Galaxy Book3 Pro 360 (NP960QFG)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS), 11867 SND_PCI_QUIRK(0x144d, 0xc1cc, "Samsung Galaxy Book3 Ultra (NT960XFH)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS), 11332 11868 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC), 11333 11869 SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC), … … 11405 11941 SND_PCI_QUIRK(0x1558, 0x971d, "Clevo N970T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11406 11942 SND_PCI_QUIRK(0x1558, 0xa500, "Clevo NL5[03]RU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11943 SND_PCI_QUIRK(0x1558, 0xa554, "VAIO VJFH52", ALC269_FIXUP_VAIO_VJFH52_MIC_NO_PRESENCE), 11407 11944 SND_PCI_QUIRK(0x1558, 0xa600, "Clevo NL50NU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11408 11945 SND_PCI_QUIRK(0x1558, 0xa650, "Clevo NP[567]0SN[CD]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11409 11946 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), 11947 SND_PCI_QUIRK(0x1558, 0xa741, "Clevo V54x_6x_TNE", ALC245_FIXUP_CLEVO_NOISY_MIC), 11948 SND_PCI_QUIRK(0x1558, 0xa763, "Clevo V54x_6x_TU", ALC245_FIXUP_CLEVO_NOISY_MIC), 11411 11949 SND_PCI_QUIRK(0x1558, 0xb018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 11412 11950 SND_PCI_QUIRK(0x1558, 0xb019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), … … 11463 12001 SND_PCI_QUIRK(0x17aa, 0x2319, "Thinkpad Z16 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 11464 12002 SND_PCI_QUIRK(0x17aa, 0x231a, "Thinkpad Z16 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 12003 SND_PCI_QUIRK(0x17aa, 0x231e, "Thinkpad", ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318), 12004 SND_PCI_QUIRK(0x17aa, 0x231f, "Thinkpad", ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318), 12005 SND_PCI_QUIRK(0x17aa, 0x2326, "Hera2", ALC287_FIXUP_TAS2781_I2C), 11465 12006 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 11466 12007 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), … … 11479 12020 SND_PCI_QUIRK(0x17aa, 0x3387, "ThinkCentre M70a Gen6", ALC233_FIXUP_LENOVO_L2MH_LOW_ENLED), 11480 12021 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), 12022 HDA_CODEC_QUIRK(0x17aa, 0x3802, "DuetITL 2021", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), 12023 SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo Yoga Pro 9 14IRP8", ALC287_FIXUP_TAS2781_I2C), 11482 12024 SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS), 11483 12025 SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7), 11484 12026 SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS), 11485 SND_PCI_QUIRK(0x17aa, 0x3820, "IdeaPad 330-17IKB 81DM", ALC269_FIXUP_ASPIRE_HEADSET_MIC), 12027 HDA_CODEC_QUIRK(0x17aa, 0x3820, "IdeaPad 330-17IKB 81DM", ALC269_FIXUP_ASPIRE_HEADSET_MIC), 12028 SND_PCI_QUIRK(0x17aa, 0x3820, "Yoga Duet 7 13ITL6", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), 11486 12029 SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS), 11487 12030 SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF), … … 11497 12040 SND_PCI_QUIRK(0x17aa, 0x3866, "Lenovo 13X", ALC287_FIXUP_CS35L41_I2C_2), 11498 12041 SND_PCI_QUIRK(0x17aa, 0x3869, "Lenovo Yoga7 14IAL7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), 12042 HDA_CODEC_QUIRK(0x17aa, 0x386e, "Legion Y9000X 2022 IAH7", ALC287_FIXUP_CS35L41_I2C_2), 12043 SND_PCI_QUIRK(0x17aa, 0x386e, "Yoga Pro 7 14ARP8", ALC285_FIXUP_SPEAKER2_TO_DAC1), 12044 HDA_CODEC_QUIRK(0x17aa, 0x38a8, "Legion Pro 7 16ARX8H", ALC287_FIXUP_TAS2781_I2C), /* this must match before PCI SSID 17aa:386f below */ 12045 SND_PCI_QUIRK(0x17aa, 0x386f, "Legion Pro 7i 16IAX7", ALC287_FIXUP_CS35L41_I2C_2), 12046 SND_PCI_QUIRK(0x17aa, 0x3870, "Lenovo Yoga 7 14ARB7", ALC287_FIXUP_YOGA7_14ARB7_I2C), 12047 SND_PCI_QUIRK(0x17aa, 0x3877, "Lenovo Legion 7 Slim 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2), 12048 SND_PCI_QUIRK(0x17aa, 0x3878, "Lenovo Legion 7 Slim 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2), 11499 12049 SND_PCI_QUIRK(0x17aa, 0x387d, "Yoga S780-16 pro Quad AAC", ALC287_FIXUP_TAS2781_I2C), 11500 12050 SND_PCI_QUIRK(0x17aa, 0x387e, "Yoga S780-16 pro Quad YC", ALC287_FIXUP_TAS2781_I2C), 12051 SND_PCI_QUIRK(0x17aa, 0x387f, "Yoga S780-16 pro dual LX", ALC287_FIXUP_TAS2781_I2C), 12052 SND_PCI_QUIRK(0x17aa, 0x3880, "Yoga S780-16 pro dual YC", ALC287_FIXUP_TAS2781_I2C), 11501 12053 SND_PCI_QUIRK(0x17aa, 0x3881, "YB9 dual power mode2 YC", ALC287_FIXUP_TAS2781_I2C), 11502 12054 SND_PCI_QUIRK(0x17aa, 0x3882, "Lenovo Yoga Pro 7 14APH8", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), … … 11504 12056 SND_PCI_QUIRK(0x17aa, 0x3886, "Y780 VECO DUAL", ALC287_FIXUP_TAS2781_I2C), 11505 12057 SND_PCI_QUIRK(0x17aa, 0x3891, "Lenovo Yoga Pro 7 14AHP9", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), 12058 SND_PCI_QUIRK(0x17aa, 0x38a5, "Y580P AMD dual", ALC287_FIXUP_TAS2781_I2C), 11506 12059 SND_PCI_QUIRK(0x17aa, 0x38a7, "Y780P AMD YG dual", ALC287_FIXUP_TAS2781_I2C), 11507 12060 SND_PCI_QUIRK(0x17aa, 0x38a8, "Y780P AMD VECO dual", ALC287_FIXUP_TAS2781_I2C), 12061 SND_PCI_QUIRK(0x17aa, 0x38a9, "Thinkbook 16P", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 12062 SND_PCI_QUIRK(0x17aa, 0x38ab, "Thinkbook 16P", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 12063 SND_PCI_QUIRK(0x17aa, 0x38b4, "Legion Slim 7 16IRH8", ALC287_FIXUP_CS35L41_I2C_2), 12064 SND_PCI_QUIRK(0x17aa, 0x38b5, "Legion Slim 7 16IRH8", ALC287_FIXUP_CS35L41_I2C_2), 12065 SND_PCI_QUIRK(0x17aa, 0x38b6, "Legion Slim 7 16APH8", ALC287_FIXUP_CS35L41_I2C_2), 12066 SND_PCI_QUIRK(0x17aa, 0x38b7, "Legion Slim 7 16APH8", ALC287_FIXUP_CS35L41_I2C_2), 12067 SND_PCI_QUIRK(0x17aa, 0x38b8, "Yoga S780-14.5 proX AMD YC Dual", ALC287_FIXUP_TAS2781_I2C), 12068 SND_PCI_QUIRK(0x17aa, 0x38b9, "Yoga S780-14.5 proX AMD LX Dual", ALC287_FIXUP_TAS2781_I2C), 11508 12069 SND_PCI_QUIRK(0x17aa, 0x38ba, "Yoga S780-14.5 Air AMD quad YC", ALC287_FIXUP_TAS2781_I2C), 11509 12070 SND_PCI_QUIRK(0x17aa, 0x38bb, "Yoga S780-14.5 Air AMD quad AAC", ALC287_FIXUP_TAS2781_I2C), … … 11511 12072 SND_PCI_QUIRK(0x17aa, 0x38bf, "Yoga S980-14.5 proX LX Dual", ALC287_FIXUP_TAS2781_I2C), 11512 12073 SND_PCI_QUIRK(0x17aa, 0x38c3, "Y980 DUAL", ALC287_FIXUP_TAS2781_I2C), 12074 SND_PCI_QUIRK(0x17aa, 0x38c7, "Thinkbook 13x Gen 4", ALC287_FIXUP_CS35L41_I2C_4), 12075 SND_PCI_QUIRK(0x17aa, 0x38c8, "Thinkbook 13x Gen 4", ALC287_FIXUP_CS35L41_I2C_4), 11513 12076 SND_PCI_QUIRK(0x17aa, 0x38cb, "Y790 YG DUAL", ALC287_FIXUP_TAS2781_I2C), 11514 12077 SND_PCI_QUIRK(0x17aa, 0x38cd, "Y790 VECO DUAL", ALC287_FIXUP_TAS2781_I2C), 11515 12078 SND_PCI_QUIRK(0x17aa, 0x38d2, "Lenovo Yoga 9 14IMH9", ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN), 12079 SND_PCI_QUIRK(0x17aa, 0x38d3, "Yoga S990-16 Pro IMH YC Dual", ALC287_FIXUP_TAS2781_I2C), 12080 SND_PCI_QUIRK(0x17aa, 0x38d4, "Yoga S990-16 Pro IMH VECO Dual", ALC287_FIXUP_TAS2781_I2C), 12081 SND_PCI_QUIRK(0x17aa, 0x38d5, "Yoga S990-16 Pro IMH YC Quad", ALC287_FIXUP_TAS2781_I2C), 12082 SND_PCI_QUIRK(0x17aa, 0x38d6, "Yoga S990-16 Pro IMH VECO Quad", ALC287_FIXUP_TAS2781_I2C), 11516 12083 SND_PCI_QUIRK(0x17aa, 0x38d7, "Lenovo Yoga 9 14IMH9", ALC287_FIXUP_YOGA9_14IMH9_BASS_SPK_PIN), 12084 SND_PCI_QUIRK(0x17aa, 0x38df, "Yoga Y990 Intel YC Dual", ALC287_FIXUP_TAS2781_I2C), 12085 SND_PCI_QUIRK(0x17aa, 0x38e0, "Yoga Y990 Intel VECO Dual", ALC287_FIXUP_TAS2781_I2C), 12086 SND_PCI_QUIRK(0x17aa, 0x38f8, "Yoga Book 9i", ALC287_FIXUP_TAS2781_I2C), 11517 12087 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), 12088 SND_PCI_QUIRK(0x17aa, 0x38f9, "Thinkbook 16P Gen5", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 12089 SND_PCI_QUIRK(0x17aa, 0x38fa, "Thinkbook 16P Gen5", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), 12090 SND_PCI_QUIRK(0x17aa, 0x38fd, "ThinkBook plus Gen5 Hybrid", ALC287_FIXUP_TAS2781_I2C), 11520 12091 SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI), 11521 12092 SND_PCI_QUIRK(0x17aa, 0x3913, "Lenovo 145", ALC236_FIXUP_LENOVO_INV_DMIC), 12093 SND_PCI_QUIRK(0x17aa, 0x391f, "Yoga S990-16 pro Quad YC Quad", ALC287_FIXUP_TAS2781_I2C), 12094 SND_PCI_QUIRK(0x17aa, 0x3920, "Yoga S990-16 pro Quad VECO Quad", ALC287_FIXUP_TAS2781_I2C), 11522 12095 SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC), 11523 12096 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI), … … 11547 12120 SND_PCI_QUIRK(0x1849, 0x1233, "ASRock NUC Box 1100", ALC233_FIXUP_NO_AUDIO_JACK), 11548 12121 SND_PCI_QUIRK(0x1849, 0xa233, "Positivo Master C6300", ALC269_FIXUP_HEADSET_MIC), 12122 SND_PCI_QUIRK(0x1854, 0x0440, "LG CQ6", ALC256_FIXUP_HEADPHONE_AMP_VOL), 12123 SND_PCI_QUIRK(0x1854, 0x0441, "LG CQ6 AIO", ALC256_FIXUP_HEADPHONE_AMP_VOL), 12124 SND_PCI_QUIRK(0x1854, 0x0488, "LG gram 16 (16Z90R)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS), 12125 SND_PCI_QUIRK(0x1854, 0x048a, "LG gram 17 (17ZD90R)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS), 11549 12126 SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS), 11550 12127 SND_PCI_QUIRK(0x19e5, 0x320f, "Huawei WRT-WX9 ", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), … … 11583 12160 SND_PCI_QUIRK(0x2782, 0x1705, "MEDION E15433", ALC269VC_FIXUP_INFINIX_Y4_MAX), 11584 12161 SND_PCI_QUIRK(0x2782, 0x1707, "Vaio VJFE-ADL", ALC298_FIXUP_SPK_VOLUME), 12162 SND_PCI_QUIRK(0x2782, 0x4900, "MEDION E15443", ALC233_FIXUP_MEDION_MTL_SPK), 11585 12163 SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC), 11586 12164 SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED), … … 11761 12339 {.id = ALC225_FIXUP_HEADSET_JACK, .name = "alc-headset-jack"}, 11762 12340 {.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-chrome-book"}, 12341 {.id = ALC256_FIXUP_CHROME_BOOK, .name = "alc-2024y-chromebook"}, 11763 12342 {.id = ALC299_FIXUP_PREDATOR_SPK, .name = "predator-spk"}, 11764 12343 {.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"}, 11765 12344 {.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"}, 11766 12345 {.id = ALC298_FIXUP_SAMSUNG_AMP, .name = "alc298-samsung-amp"}, 12346 {.id = ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS, .name = "alc298-samsung-amp-v2-2-amps"}, 12347 {.id = ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS, .name = "alc298-samsung-amp-v2-4-amps"}, 11767 12348 {.id = ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc256-samsung-headphone"}, 11768 12349 {.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"}, … … 12301 12882 spec->en_3kpull_low = true; 12302 12883 12303 #ifdef CONFIG_PM12304 12884 codec->patch_ops.suspend = alc269_suspend; 12305 12885 codec->patch_ops.resume = alc269_resume; 12306 #endif12307 12886 spec->shutup = alc_default_shutup; 12308 12887 spec->init_hook = alc_default_init; … … 12472 13051 snd_hda_pick_fixup(codec, NULL, alc269_fixup_vendor_tbl, 12473 13052 alc269_fixups); 13053 13054 /* 13055 * Check whether ACPI describes companion amplifiers that require 13056 * component binding 13057 */ 13058 find_cirrus_companion_amps(codec); 13059 12474 13060 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); 12475 13061 … … 12626 13212 spec->gen.beep_nid = 0x23; 12627 13213 12628 #ifdef CONFIG_PM12629 13214 spec->power_hook = alc_power_eapd; 12630 #endif12631 13215 12632 13216 alc_pre_init(codec); … … 13659 14243 { 0x20, AC_VERB_SET_COEF_INDEX, 0x15 }, 13660 14244 { 0x20, AC_VERB_SET_PROC_COEF, 0x0d60 }, 13661 { }14245 {0} 13662 14246 }, 13663 14247 }, … … 13681 14265 .v.pins = (const struct hda_pintbl[]) { 13682 14266 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 13683 { }14267 {0} 13684 14268 }, 13685 14269 }, … … 13703 14287 .v.verbs = (const struct hda_verb[]) { 13704 14288 { 0x14, AC_VERB_SET_EAPD_BTLENABLE, 0 }, 13705 { }14289 {0} 13706 14290 }, 13707 14291 }, … … 14141 14725 MODULE_LICENSE("GPL"); 14142 14726 MODULE_DESCRIPTION("Realtek HD-audio codec"); 14727 MODULE_IMPORT_NS(SND_HDA_SCODEC_COMPONENT); 14143 14728 14144 14729 static struct hda_codec_driver realtek_driver = { -
GPL/trunk/alsa-kernel/pci/hda/patch_sigmatel.c
r772 r777 2190 2190 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 2191 2191 spec->mic_mute_led_gpio = 0x08; /* GPIO3 */ 2192 #ifdef CONFIG_PM2193 2192 /* resetting controller clears GPIO, so we need to keep on */ 2194 2193 codec->core.power_caps &= ~AC_PWRST_CLKSTOP; 2195 #endif2196 2194 } 2197 2195 } … … 4544 4542 #endif 4545 4543 4546 #ifdef CONFIG_PM4547 4544 static int stac_suspend(struct hda_codec *codec) 4548 4545 { … … 4558 4555 return 0; 4559 4556 } 4560 4561 static int stac_check_power_status(struct hda_codec *codec, hda_nid_t nid)4562 {4563 #ifdef CONFIG_SND_HDA_INPUT_BEEP4564 struct sigmatel_spec *spec = codec->spec;4565 #endif4566 int ret = snd_hda_gen_check_power_status(codec, nid);4567 4568 #ifdef CONFIG_SND_HDA_INPUT_BEEP4569 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 else4575 snd_hda_power_down_pm(codec);4576 }4577 ret |= spec->beep_power_on;4578 }4579 #endif4580 return ret;4581 }4582 #else4583 #define stac_suspend NULL4584 #endif /* CONFIG_PM */4585 4557 4586 4558 static const struct hda_codec_ops stac_patch_ops = { … … 4590 4562 .free = stac_free, 4591 4563 .unsol_event = snd_hda_jack_unsol_event, 4592 #ifdef CONFIG_PM4593 4564 .suspend = stac_suspend, 4594 .check_power_status = stac_check_power_status,4595 #endif4596 4565 }; 4597 4566 -
GPL/trunk/alsa-kernel/pci/hda/patch_via.c
r772 r777 388 388 } 389 389 390 #ifdef CONFIG_PM391 390 static int via_suspend(struct hda_codec *codec) 392 391 { … … 409 408 return 0; 410 409 } 411 #endif 412 413 #ifdef CONFIG_PM 410 414 411 static int via_check_power_status(struct hda_codec *codec, hda_nid_t nid) 415 412 { … … 419 416 return snd_hda_check_amp_list_power(codec, &spec->gen.loopback, nid); 420 417 } 421 #endif422 418 423 419 /* … … 432 428 .free = via_free, 433 429 .unsol_event = snd_hda_jack_unsol_event, 434 #ifdef CONFIG_PM435 430 .suspend = via_suspend, 436 431 .resume = via_resume, 437 432 .check_power_status = via_check_power_status, 438 #endif439 433 }; 440 434
Note:
See TracChangeset
for help on using the changeset viewer.
