#include <linux/acpi.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/dmi.h>
#include <linux/module.h>
#include <linux/input.h>
#include <linux/leds.h>
#include <linux/ctype.h>
#include <sound/core.h>
#include <sound/jack.h>
#include <sound/hda_codec.h>
#include "hda_local.h"
#include "hda_auto_parser.h"
#include "hda_jack.h"
#include "hda_generic.h"
#include "hda_component.h"
#define HALT_REALTEK_ALC5505
enum { … };
enum { … };
enum { … };
enum { … };
struct alc_customize_define { … };
struct alc_coef_led { … };
struct alc_spec { … };
static void coef_mutex_lock(struct hda_codec *codec)
{ … }
static void coef_mutex_unlock(struct hda_codec *codec)
{ … }
static int __alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
unsigned int coef_idx)
{ … }
static int alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
unsigned int coef_idx)
{ … }
#define alc_read_coef_idx(codec, coef_idx) …
static void __alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
unsigned int coef_idx, unsigned int coef_val)
{ … }
static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
unsigned int coef_idx, unsigned int coef_val)
{ … }
#define alc_write_coef_idx(codec, coef_idx, coef_val) …
static void __alc_update_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
unsigned int coef_idx, unsigned int mask,
unsigned int bits_set)
{ … }
static void alc_update_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
unsigned int coef_idx, unsigned int mask,
unsigned int bits_set)
{ … }
#define alc_update_coef_idx(codec, coef_idx, mask, bits_set) …
static unsigned int alc_get_coef0(struct hda_codec *codec)
{ … }
struct coef_fw { … };
#define UPDATE_COEFEX(_nid, _idx, _mask, _val) …
#define WRITE_COEFEX(_nid, _idx, _val) …
#define WRITE_COEF(_idx, _val) …
#define UPDATE_COEF(_idx, _mask, _val) …
static void alc_process_coef_fw(struct hda_codec *codec,
const struct coef_fw *fw)
{ … }
static void alc_setup_gpio(struct hda_codec *codec, unsigned int mask)
{ … }
static void alc_write_gpio_data(struct hda_codec *codec)
{ … }
static void alc_update_gpio_data(struct hda_codec *codec, unsigned int mask,
bool on)
{ … }
static void alc_write_gpio(struct hda_codec *codec)
{ … }
static void alc_fixup_gpio(struct hda_codec *codec, int action,
unsigned int mask)
{ … }
static void alc_fixup_gpio1(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fixup_gpio2(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fixup_gpio3(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fixup_gpio4(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fixup_micmute_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fix_pll(struct hda_codec *codec)
{ … }
static void alc_fix_pll_init(struct hda_codec *codec, hda_nid_t nid,
unsigned int coef_idx, unsigned int coef_bit)
{ … }
static void alc_update_knob_master(struct hda_codec *codec,
struct hda_jack_callback *jack)
{ … }
static void alc880_unsol_event(struct hda_codec *codec, unsigned int res)
{ … }
static void alc_fill_eapd_coef(struct hda_codec *codec)
{ … }
static void alc888_coef_init(struct hda_codec *codec)
{ … }
static void set_eapd(struct hda_codec *codec, hda_nid_t nid, int on)
{ … }
static void alc_auto_setup_eapd(struct hda_codec *codec, bool on)
{ … }
static int find_ext_mic_pin(struct hda_codec *codec);
static void alc_headset_mic_no_shutup(struct hda_codec *codec)
{ … }
static void alc_shutup_pins(struct hda_codec *codec)
{ … }
static void alc_eapd_shutup(struct hda_codec *codec)
{ … }
static void alc_auto_init_amp(struct hda_codec *codec, int type)
{ … }
static hda_nid_t alc_get_hp_pin(struct alc_spec *spec)
{ … }
#define ALC_FIXUP_SKU_IGNORE …
static void alc_fixup_sku_ignore(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fixup_no_depop_delay(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static int alc_auto_parse_customize_define(struct hda_codec *codec)
{ … }
static int find_idx_in_nid_list(hda_nid_t nid, const hda_nid_t *list, int nums)
{ … }
static bool found_in_nid_list(hda_nid_t nid, const hda_nid_t *list, int nums)
{ … }
static int alc_subsystem_id(struct hda_codec *codec, const hda_nid_t *ports)
{ … }
static void alc_ssid_check(struct hda_codec *codec, const hda_nid_t *ports)
{ … }
static void alc_fixup_inv_dmic(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static int alc_build_controls(struct hda_codec *codec)
{ … }
static void alc_pre_init(struct hda_codec *codec)
{ … }
#define is_s3_resume(codec) …
#define is_s4_resume(codec) …
#define is_s4_suspend(codec) …
static int alc_init(struct hda_codec *codec)
{ … }
#define alc_free …
static inline void alc_shutup(struct hda_codec *codec)
{ … }
static void alc_power_eapd(struct hda_codec *codec)
{ … }
static int alc_suspend(struct hda_codec *codec)
{ … }
static int alc_resume(struct hda_codec *codec)
{ … }
static const struct hda_codec_ops alc_patch_ops = …;
#define alc_codec_rename(codec, name) …
struct alc_codec_rename_table { … };
struct alc_codec_rename_pci_table { … };
static const struct alc_codec_rename_table rename_tbl[] = …;
static const struct alc_codec_rename_pci_table rename_pci_tbl[] = …;
static int alc_codec_rename_from_preset(struct hda_codec *codec)
{ … }
#ifdef CONFIG_SND_HDA_INPUT_BEEP
static const struct snd_kcontrol_new alc_beep_mixer[] = …;
static int set_beep_amp(struct alc_spec *spec, hda_nid_t nid,
int idx, int dir)
{ … }
static const struct snd_pci_quirk beep_allow_list[] = …;
static inline int has_cdefine_beep(struct hda_codec *codec)
{ … }
#else
#define set_beep_amp …
#define has_cdefine_beep …
#endif
static int alc_parse_auto_config(struct hda_codec *codec,
const hda_nid_t *ignore_nids,
const hda_nid_t *ssid_nids)
{ … }
static int alc_alloc_spec(struct hda_codec *codec, hda_nid_t mixer_nid)
{ … }
static int alc880_parse_auto_config(struct hda_codec *codec)
{ … }
enum { … };
static void alc880_fixup_vol_knob(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static const struct hda_fixup alc880_fixups[] = …;
static const struct snd_pci_quirk alc880_fixup_tbl[] = …;
static const struct hda_model_fixup alc880_fixup_models[] = …;
static int patch_alc880(struct hda_codec *codec)
{ … }
static int alc260_parse_auto_config(struct hda_codec *codec)
{ … }
enum { … };
static void alc260_gpio1_automute(struct hda_codec *codec)
{ … }
static void alc260_fixup_gpio1_toggle(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc260_fixup_kn1(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc260_fixup_fsc_s7020(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc260_fixup_fsc_s7020_jwse(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static const struct hda_fixup alc260_fixups[] = …;
static const struct snd_pci_quirk alc260_fixup_tbl[] = …;
static const struct hda_model_fixup alc260_fixup_models[] = …;
static int patch_alc260(struct hda_codec *codec)
{ … }
enum { … };
static void alc889_fixup_coef(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc885_fixup_macpro_gpio(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc889_fixup_dac_route(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc889_fixup_mbp_vref(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc889_fixup_mac_pins(struct hda_codec *codec,
const hda_nid_t *nids, int num_nids)
{ … }
static void alc889_fixup_imac91_vref(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc889_fixup_mba11_vref(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc889_fixup_mba21_vref(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc882_fixup_no_primary_hp(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fixup_bass_chmap(struct hda_codec *codec,
const struct hda_fixup *fix, int action);
static void alc_fixup_dual_codecs(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void rename_ctl(struct hda_codec *codec, const char *oldname,
const char *newname)
{ … }
static void alc1220_fixup_gb_dual_codecs(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc1220_fixup_gb_x570(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc1220_fixup_clevo_p950(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec,
const struct hda_fixup *fix, int action);
static void alc1220_fixup_clevo_pb51ed(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc887_asus_hp_automute_hook(struct hda_codec *codec,
struct hda_jack_callback *jack)
{ … }
static void alc887_fixup_asus_jack(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static const struct hda_fixup alc882_fixups[] = …;
static const struct snd_pci_quirk alc882_fixup_tbl[] = …;
static const struct hda_model_fixup alc882_fixup_models[] = …;
static const struct snd_hda_pin_quirk alc882_pin_fixup_tbl[] = …;
static int alc882_parse_auto_config(struct hda_codec *codec)
{ … }
static int patch_alc882(struct hda_codec *codec)
{ … }
static int alc262_parse_auto_config(struct hda_codec *codec)
{ … }
enum { … };
static const struct hda_fixup alc262_fixups[] = …;
static const struct snd_pci_quirk alc262_fixup_tbl[] = …;
static const struct hda_model_fixup alc262_fixup_models[] = …;
static int patch_alc262(struct hda_codec *codec)
{ … }
static int alc268_beep_switch_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new alc268_beep_mixer[] = …;
static const struct hda_verb alc268_beep_init_verbs[] = …;
enum { … };
static const struct hda_fixup alc268_fixups[] = …;
static const struct hda_model_fixup alc268_fixup_models[] = …;
static const struct snd_pci_quirk alc268_fixup_tbl[] = …;
static int alc268_parse_auto_config(struct hda_codec *codec)
{ … }
static int patch_alc268(struct hda_codec *codec)
{ … }
static const struct hda_pcm_stream alc269_44k_pcm_analog_playback = …;
static const struct hda_pcm_stream alc269_44k_pcm_analog_capture = …;
enum { … };
static int alc269_parse_auto_config(struct hda_codec *codec)
{ … }
static const struct hda_jack_keymap alc_headset_btn_keymap[] = …;
static void alc_headset_btn_callback(struct hda_codec *codec,
struct hda_jack_callback *jack)
{ … }
static void alc_disable_headset_jack_key(struct hda_codec *codec)
{ … }
static void alc_enable_headset_jack_key(struct hda_codec *codec)
{ … }
static void alc_fixup_headset_jack(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up)
{ … }
static void alc269_shutup(struct hda_codec *codec)
{ … }
static const struct coef_fw alc282_coefs[] = …;
static void alc282_restore_default_value(struct hda_codec *codec)
{ … }
static void alc282_init(struct hda_codec *codec)
{ … }
static void alc282_shutup(struct hda_codec *codec)
{ … }
static const struct coef_fw alc283_coefs[] = …;
static void alc283_restore_default_value(struct hda_codec *codec)
{ … }
static void alc283_init(struct hda_codec *codec)
{ … }
static void alc283_shutup(struct hda_codec *codec)
{ … }
static void alc256_init(struct hda_codec *codec)
{ … }
static void alc256_shutup(struct hda_codec *codec)
{ … }
static void alc285_hp_init(struct hda_codec *codec)
{ … }
static void alc225_init(struct hda_codec *codec)
{ … }
static void alc225_shutup(struct hda_codec *codec)
{ … }
static void alc_default_init(struct hda_codec *codec)
{ … }
static void alc_default_shutup(struct hda_codec *codec)
{ … }
static void alc294_hp_init(struct hda_codec *codec)
{ … }
static void alc294_init(struct hda_codec *codec)
{ … }
static void alc5505_coef_set(struct hda_codec *codec, unsigned int index_reg,
unsigned int val)
{ … }
static int alc5505_coef_get(struct hda_codec *codec, unsigned int index_reg)
{ … }
static void alc5505_dsp_halt(struct hda_codec *codec)
{ … }
static void alc5505_dsp_back_from_halt(struct hda_codec *codec)
{ … }
static void alc5505_dsp_init(struct hda_codec *codec)
{ … }
#ifdef HALT_REALTEK_ALC5505
#define alc5505_dsp_suspend(codec) …
#define alc5505_dsp_resume(codec) …
#else
#define alc5505_dsp_suspend …
#define alc5505_dsp_resume …
#endif
static int alc269_suspend(struct hda_codec *codec)
{ … }
static int alc269_resume(struct hda_codec *codec)
{ … }
static void alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc269_fixup_pincfg_U7x7_headset_mic(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc269_fixup_hweq(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc269_fixup_headset_mic(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc271_fixup_dmic(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc269vb_fixup_aspire_e1_coef(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc269_fixup_pcm_44k(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc269_fixup_stereo_dmic(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc269_quanta_automute(struct hda_codec *codec)
{ … }
static void alc269_fixup_quanta_mute(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc269_x101_hp_automute_hook(struct hda_codec *codec,
struct hda_jack_callback *jack)
{ … }
struct hda_alc298_mbxinit { … };
static void alc298_huawei_mbx_stereo_seq(struct hda_codec *codec,
const struct hda_alc298_mbxinit *initval,
bool first)
{ … }
static void alc298_fixup_huawei_mbx_stereo(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc269_fixup_x101_headset_mic(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_update_vref_led(struct hda_codec *codec, hda_nid_t pin,
bool polarity, bool on)
{ … }
static int vref_mute_led_set(struct led_classdev *led_cdev,
enum led_brightness brightness)
{ … }
static unsigned int led_power_filter(struct hda_codec *codec,
hda_nid_t nid,
unsigned int power_state)
{ … }
static void alc269_fixup_hp_mute_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc269_fixup_hp_mute_led_micx(struct hda_codec *codec,
const struct hda_fixup *fix,
int action, hda_nid_t pin)
{ … }
static void alc269_fixup_hp_mute_led_mic1(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc269_fixup_hp_mute_led_mic2(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc269_fixup_hp_mute_led_mic3(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_update_gpio_led(struct hda_codec *codec, unsigned int mask,
int polarity, bool enabled)
{ … }
static int gpio_mute_led_set(struct led_classdev *led_cdev,
enum led_brightness brightness)
{ … }
static int micmute_led_set(struct led_classdev *led_cdev,
enum led_brightness brightness)
{ … }
static void alc_fixup_hp_gpio_led(struct hda_codec *codec,
int action,
unsigned int mute_mask,
unsigned int micmute_mask)
{ … }
static void alc236_fixup_hp_gpio_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc269_fixup_hp_gpio_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc285_fixup_hp_gpio_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc286_fixup_hp_gpio_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc287_fixup_hp_gpio_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc245_fixup_hp_gpio_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static int vref_micmute_led_set(struct led_classdev *led_cdev,
enum led_brightness brightness)
{ … }
static void alc269_fixup_hp_gpio_mic1_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc280_fixup_hp_gpio4(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc245_fixup_hp_x360_amp(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc274_hp_envy_pcm_hook(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream,
int action)
{ … }
static void alc274_fixup_hp_envy_gpio(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc_update_coef_led(struct hda_codec *codec,
struct alc_coef_led *led,
bool polarity, bool on)
{ … }
static int coef_mute_led_set(struct led_classdev *led_cdev,
enum led_brightness brightness)
{ … }
static void alc285_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc236_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc236_fixup_hp_mute_led_coefbit2(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc245_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static int coef_micmute_led_set(struct led_classdev *led_cdev,
enum led_brightness brightness)
{ … }
static void alc285_fixup_hp_coef_micmute_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc285_fixup_hp_gpio_micmute_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc236_fixup_hp_coef_micmute_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc285_fixup_hp_mute_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc285_fixup_hp_spectre_x360_mute_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc236_fixup_hp_mute_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc236_fixup_hp_micmute_led_vref(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static inline void alc298_samsung_write_coef_pack(struct hda_codec *codec,
const unsigned short coefs[2])
{ … }
struct alc298_samsung_amp_desc { … };
static void alc298_fixup_samsung_amp(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
#include "samsung_helper.c"
#if IS_REACHABLE(CONFIG_INPUT)
static void gpio2_mic_hotkey_event(struct hda_codec *codec,
struct hda_jack_callback *event)
{ … }
static int alc_register_micmute_input_device(struct hda_codec *codec)
{ … }
static void alc280_fixup_hp_gpio2_mic_hotkey(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc233_fixup_lenovo_line2_mic_hotkey(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
#else
#define alc280_fixup_hp_gpio2_mic_hotkey …
#define alc233_fixup_lenovo_line2_mic_hotkey …
#endif
static void alc269_fixup_hp_line1_mic1_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static const struct coef_fw alc225_pre_hsmode[] = …;
static void alc_headset_mode_unplugged(struct hda_codec *codec)
{ … }
static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
hda_nid_t mic_pin)
{ … }
static void alc_headset_mode_default(struct hda_codec *codec)
{ … }
static void alc_headset_mode_ctia(struct hda_codec *codec)
{ … }
static void alc_headset_mode_omtp(struct hda_codec *codec)
{ … }
static void alc_determine_headset_type(struct hda_codec *codec)
{ … }
static void alc_update_headset_mode(struct hda_codec *codec)
{ … }
static void alc_update_headset_mode_hook(struct hda_codec *codec,
struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static void alc_update_headset_jack_cb(struct hda_codec *codec,
struct hda_jack_callback *jack)
{ … }
static void alc_probe_headset_mode(struct hda_codec *codec)
{ … }
static void alc_fixup_headset_mode(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc255_set_default_jack_type(struct hda_codec *codec)
{ … }
static void alc_fixup_headset_mode_alc255(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fixup_headset_mode_alc255_no_hp_mic(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc288_update_headset_jack_cb(struct hda_codec *codec,
struct hda_jack_callback *jack)
{ … }
static void alc_fixup_headset_mode_dell_alc288(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fixup_auto_mute_via_amp(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fixup_no_shutup(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fixup_disable_aamix(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fixup_tpt440_dock(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fixup_tpt470_dock(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fixup_tpt470_dacs(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc295_fixup_asus_dacs(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_shutup_dell_xps13(struct hda_codec *codec)
{ … }
static void alc_fixup_dell_xps13(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fixup_headset_mode_alc662(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fixup_headset_mode_alc668(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static int find_ext_mic_pin(struct hda_codec *codec)
{ … }
static void alc271_hp_gate_mic_jack(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc269_fixup_limit_int_mic_boost(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc283_hp_automute_hook(struct hda_codec *codec,
struct hda_jack_callback *jack)
{ … }
static void alc283_fixup_chromebook(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc283_fixup_sense_combo_jack(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void asus_tx300_automute(struct hda_codec *codec)
{ … }
static void alc282_fixup_asus_tx300(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc290_fixup_mono_speakers(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc298_fixup_speaker_volume(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc295_fixup_disable_dac3(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc285_fixup_speaker2_to_dac1(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc280_hp_gpio4_automute_hook(struct hda_codec *codec,
struct hda_jack_callback *jack)
{ … }
static void alc280_fixup_hp_9480m(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc275_fixup_gpio4_off(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc285_fixup_thinkpad_x1_gen7(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc233_alc662_fixup_lenovo_dual_codecs(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc225_fixup_s3_pop_noise(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc274_fixup_bind_dacs(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc289_fixup_asus_ga401(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc285_fixup_invalidate_dacs(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_combo_jack_hp_jd_restart(struct hda_codec *codec)
{ … }
static void alc295_fixup_chromebook(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc256_fixup_chromebook(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fixup_disable_mic_vref(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc294_gx502_toggle_output(struct hda_codec *codec,
struct hda_jack_callback *cb)
{ … }
static void alc294_fixup_gx502_hp(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc294_gu502_toggle_output(struct hda_codec *codec,
struct hda_jack_callback *cb)
{ … }
static void alc294_fixup_gu502_hp(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc285_fixup_hp_gpio_amp_init(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc274_fixup_hp_headset_mic(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fixup_no_int_mic(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc285_fixup_hp_envy_x360(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
#include "thinkpad_helper.c"
static void alc_fixup_thinkpad_acpi(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc287_fixup_legion_15imhg05_speakers(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void comp_acpi_device_notify(acpi_handle handle, u32 event, void *data)
{ … }
static int comp_bind(struct device *dev)
{ … }
static void comp_unbind(struct device *dev)
{ … }
static const struct component_master_ops comp_master_ops = …;
static void comp_generic_playback_hook(struct hda_pcm_stream *hinfo, struct hda_codec *cdc,
struct snd_pcm_substream *sub, int action)
{ … }
static void comp_generic_fixup(struct hda_codec *cdc, int action, const char *bus,
const char *hid, const char *match_str, int count)
{ … }
static void cs35l41_fixup_i2c_two(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
{ … }
static void cs35l41_fixup_i2c_four(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
{ … }
static void cs35l41_fixup_spi_two(struct hda_codec *codec, const struct hda_fixup *fix, int action)
{ … }
static void cs35l41_fixup_spi_four(struct hda_codec *codec, const struct hda_fixup *fix, int action)
{ … }
static void alc287_fixup_legion_16achg6_speakers(struct hda_codec *cdc, const struct hda_fixup *fix,
int action)
{ … }
static void alc287_fixup_legion_16ithg6_speakers(struct hda_codec *cdc, const struct hda_fixup *fix,
int action)
{ … }
static void cs35l56_fixup_i2c_two(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
{ … }
static void cs35l56_fixup_i2c_four(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
{ … }
static void cs35l56_fixup_spi_two(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
{ … }
static void cs35l56_fixup_spi_four(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
{ … }
static void alc285_fixup_asus_ga403u(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
{ … }
static void tas2781_fixup_i2c(struct hda_codec *cdc,
const struct hda_fixup *fix, int action)
{ … }
static void yoga7_14arb7_fixup_i2c(struct hda_codec *cdc,
const struct hda_fixup *fix, int action)
{ … }
static void alc256_fixup_acer_sfg16_micmute_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
#include "hp_x360_helper.c"
#include "ideapad_s740_helper.c"
static const struct coef_fw alc256_fixup_set_coef_defaults_coefs[] = …;
static void alc256_fixup_set_coef_defaults(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static const struct coef_fw alc233_fixup_no_audio_jack_coefs[] = …;
static void alc233_fixup_no_audio_jack(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc256_fixup_mic_no_presence_and_resume(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc256_decrease_headphone_amp_val(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fixup_dell4_mic_no_presence_quiet(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc287_fixup_yoga9_14iap7_bass_spk_pin(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc295_fixup_dell_inspiron_top_speakers(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc287_fixup_bind_dacs(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fixup_headset_mic(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc245_fixup_hp_spectre_x360_eu0xxx(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc287_alc1318_playback_pcm_hook(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream,
int action)
{ … }
static void alc287_s4_power_gpio3_default(struct hda_codec *codec)
{ … }
static void alc287_fixup_lenovo_thinkpad_with_alc1318(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
enum { … };
static void alc298_fixup_lenovo_c940_duet7(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc287_fixup_lenovo_14irp8_duetitl(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc287_fixup_lenovo_14arp8_legion_iah7(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc287_fixup_lenovo_legion_7(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void alc287_fixup_lenovo_ssid_17aa3820(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static const struct hda_fixup alc269_fixups[] = …;
static const struct snd_pci_quirk alc269_fixup_tbl[] = …;
static const struct snd_pci_quirk alc269_fixup_vendor_tbl[] = …;
static const struct hda_model_fixup alc269_fixup_models[] = …;
#define ALC225_STANDARD_PINS …
#define ALC256_STANDARD_PINS …
#define ALC282_STANDARD_PINS …
#define ALC290_STANDARD_PINS …
#define ALC292_STANDARD_PINS …
#define ALC295_STANDARD_PINS …
#define ALC298_STANDARD_PINS …
static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = …;
static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = …;
static void alc269_fill_coef(struct hda_codec *codec)
{ … }
static int patch_alc269(struct hda_codec *codec)
{ … }
static int alc861_parse_auto_config(struct hda_codec *codec)
{ … }
enum { … };
static void alc861_fixup_asus_amp_vref_0f(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc_fixup_no_jack_detect(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static const struct hda_fixup alc861_fixups[] = …;
static const struct snd_pci_quirk alc861_fixup_tbl[] = …;
static int patch_alc861(struct hda_codec *codec)
{ … }
static int alc861vd_parse_auto_config(struct hda_codec *codec)
{ … }
enum { … };
static void alc861vd_fixup_dallas(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc660vd_fixup_asus_gpio1(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static const struct hda_fixup alc861vd_fixups[] = …;
static const struct snd_pci_quirk alc861vd_fixup_tbl[] = …;
static int patch_alc861vd(struct hda_codec *codec)
{ … }
static int alc662_parse_auto_config(struct hda_codec *codec)
{ … }
static void alc272_fixup_mario(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static const struct snd_pcm_chmap_elem asus_pcm_2_1_chmaps[] = …;
static void alc_fixup_bass_chmap(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static unsigned int gpio_led_power_filter(struct hda_codec *codec,
hda_nid_t nid,
unsigned int power_state)
{ … }
static void alc662_fixup_led_gpio1(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc662_usi_automute_hook(struct hda_codec *codec,
struct hda_jack_callback *jack)
{ … }
static void alc662_fixup_usi_headset_mic(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc662_aspire_ethos_mute_speakers(struct hda_codec *codec,
struct hda_jack_callback *cb)
{ … }
static void alc662_fixup_aspire_ethos_hp(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc671_fixup_hp_headset_mic2(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc897_hp_automute_hook(struct hda_codec *codec,
struct hda_jack_callback *jack)
{ … }
static void alc897_fixup_lenovo_headset_mic(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void alc897_fixup_lenovo_headset_mode(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static const struct coef_fw alc668_coefs[] = …;
static void alc668_restore_default_value(struct hda_codec *codec)
{ … }
enum { … };
static const struct hda_fixup alc662_fixups[] = …;
static const struct snd_pci_quirk alc662_fixup_tbl[] = …;
static const struct hda_model_fixup alc662_fixup_models[] = …;
static const struct snd_hda_pin_quirk alc662_pin_fixup_tbl[] = …;
static int patch_alc662(struct hda_codec *codec)
{ … }
static int alc680_parse_auto_config(struct hda_codec *codec)
{ … }
static int patch_alc680(struct hda_codec *codec)
{ … }
static const struct hda_device_id snd_hda_id_realtek[] = …;
MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_realtek);
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_IMPORT_NS(…);
static struct hda_codec_driver realtek_driver = …;
module_hda_codec_driver(…) …;