#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 <sound/core.h>
#include <sound/jack.h>
#include <sound/hda_codec.h>
#include "hda_local.h"
#include "hda_auto_parser.h"
#include "hda_beep.h"
#include "hda_jack.h"
#include "hda_generic.h"
enum { … };
enum { … };
enum { … };
enum { … };
enum { … };
enum { … };
enum { … };
enum { … };
enum { … };
enum { … };
struct sigmatel_spec { … };
#define AC_VERB_IDT_SET_POWER_MAP …
#define AC_VERB_IDT_GET_POWER_MAP …
static const hda_nid_t stac92hd73xx_pwr_nids[8] = …;
static const hda_nid_t stac92hd83xxx_pwr_nids[7] = …;
static const hda_nid_t stac92hd71bxx_pwr_nids[3] = …;
static void stac_playback_pcm_hook(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream,
int action)
{ … }
static void stac_capture_pcm_hook(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream,
int action)
{ … }
static void stac_gpio_set(struct hda_codec *codec, unsigned int mask,
unsigned int dir_mask, unsigned int data)
{ … }
static int stac_capture_led_update(struct led_classdev *led_cdev,
enum led_brightness brightness)
{ … }
static int stac_vrefout_set(struct hda_codec *codec,
hda_nid_t nid, unsigned int new_vref)
{ … }
static unsigned int stac_vref_led_power_filter(struct hda_codec *codec,
hda_nid_t nid,
unsigned int power_state)
{ … }
static void stac_update_led_status(struct hda_codec *codec, bool muted)
{ … }
static int stac_vmaster_hook(struct led_classdev *led_cdev,
enum led_brightness brightness)
{ … }
static void stac_update_outputs(struct hda_codec *codec)
{ … }
static void stac_toggle_power_map(struct hda_codec *codec, hda_nid_t nid,
bool enable, bool do_write)
{ … }
static void jack_update_power(struct hda_codec *codec,
struct hda_jack_callback *jack)
{ … }
static void stac_vref_event(struct hda_codec *codec,
struct hda_jack_callback *event)
{ … }
static void stac_init_power_map(struct hda_codec *codec)
{ … }
static inline bool get_int_hint(struct hda_codec *codec, const char *key,
int *valp)
{ … }
static void stac_store_hints(struct hda_codec *codec)
{ … }
#define stac_aloopback_info …
static int stac_aloopback_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int stac_aloopback_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
#define STAC_ANALOG_LOOPBACK(verb_read, verb_write, cnt) …
static bool hp_bnb2011_with_dock(struct hda_codec *codec)
{ … }
static bool hp_blike_system(u32 subsystem_id)
{ … }
static void set_hp_led_gpio(struct hda_codec *codec)
{ … }
static int find_mute_led_cfg(struct hda_codec *codec, int default_polarity)
{ … }
static bool has_builtin_speaker(struct hda_codec *codec)
{ … }
static int stac_auto_create_beep_ctls(struct hda_codec *codec,
hda_nid_t nid)
{ … }
#ifdef CONFIG_SND_HDA_INPUT_BEEP
#define stac_dig_beep_switch_info …
static int stac_dig_beep_switch_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int stac_dig_beep_switch_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new stac_dig_beep_ctrl = …;
static int stac_beep_switch_ctl(struct hda_codec *codec)
{ … }
#endif
static int stac_smux_enum_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int stac_smux_enum_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int stac_smux_enum_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new stac_smux_mixer = …;
static const char * const stac_spdif_labels[] = …;
static int stac_create_spdif_mux_ctls(struct hda_codec *codec)
{ … }
static const struct hda_verb stac9200_eapd_init[] = …;
static const struct hda_verb dell_eq_core_init[] = …;
static const struct hda_verb stac92hd73xx_core_init[] = …;
static const struct hda_verb stac92hd83xxx_core_init[] = …;
static const struct hda_verb stac92hd83xxx_hp_zephyr_init[] = …;
static const struct hda_verb stac92hd71bxx_core_init[] = …;
static const hda_nid_t stac92hd71bxx_unmute_nids[] = …;
static const struct hda_verb stac925x_core_init[] = …;
static const struct hda_verb stac922x_core_init[] = …;
static const struct hda_verb d965_core_init[] = …;
static const struct hda_verb dell_3st_core_init[] = …;
static const struct hda_verb stac927x_core_init[] = …;
static const struct hda_verb stac927x_volknob_core_init[] = …;
static const struct hda_verb stac9205_core_init[] = …;
static const struct snd_kcontrol_new stac92hd73xx_6ch_loopback = …;
static const struct snd_kcontrol_new stac92hd73xx_8ch_loopback = …;
static const struct snd_kcontrol_new stac92hd73xx_10ch_loopback = …;
static const struct snd_kcontrol_new stac92hd71bxx_loopback = …;
static const struct snd_kcontrol_new stac9205_loopback = …;
static const struct snd_kcontrol_new stac927x_loopback = …;
static const struct hda_pintbl ref9200_pin_configs[] = …;
static const struct hda_pintbl gateway9200_m4_pin_configs[] = …;
static const struct hda_pintbl gateway9200_m4_2_pin_configs[] = …;
static const struct hda_pintbl dell9200_d21_pin_configs[] = …;
static const struct hda_pintbl dell9200_d22_pin_configs[] = …;
static const struct hda_pintbl dell9200_d23_pin_configs[] = …;
static const struct hda_pintbl dell9200_m21_pin_configs[] = …;
static const struct hda_pintbl dell9200_m22_pin_configs[] = …;
static const struct hda_pintbl dell9200_m23_pin_configs[] = …;
static const struct hda_pintbl dell9200_m24_pin_configs[] = …;
static const struct hda_pintbl dell9200_m25_pin_configs[] = …;
static const struct hda_pintbl dell9200_m26_pin_configs[] = …;
static const struct hda_pintbl dell9200_m27_pin_configs[] = …;
static const struct hda_pintbl oqo9200_pin_configs[] = …;
static const struct hda_pintbl nemo_pin_configs[] = …;
static void stac9200_fixup_panasonic(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static const struct hda_fixup stac9200_fixups[] = …;
static const struct hda_model_fixup stac9200_models[] = …;
static const struct snd_pci_quirk stac9200_fixup_tbl[] = …;
static const struct hda_pintbl ref925x_pin_configs[] = …;
static const struct hda_pintbl stac925xM1_pin_configs[] = …;
static const struct hda_pintbl stac925xM1_2_pin_configs[] = …;
static const struct hda_pintbl stac925xM2_pin_configs[] = …;
static const struct hda_pintbl stac925xM2_2_pin_configs[] = …;
static const struct hda_pintbl stac925xM3_pin_configs[] = …;
static const struct hda_pintbl stac925xM5_pin_configs[] = …;
static const struct hda_pintbl stac925xM6_pin_configs[] = …;
static const struct hda_fixup stac925x_fixups[] = …;
static const struct hda_model_fixup stac925x_models[] = …;
static const struct snd_pci_quirk stac925x_fixup_tbl[] = …;
static const struct hda_pintbl ref92hd73xx_pin_configs[] = …;
static const struct hda_pintbl dell_m6_pin_configs[] = …;
static const struct hda_pintbl alienware_m17x_pin_configs[] = …;
static const struct hda_pintbl intel_dg45id_pin_configs[] = …;
static const struct hda_pintbl stac92hd89xx_hp_front_jack_pin_configs[] = …;
static const struct hda_pintbl stac92hd89xx_hp_z1_g2_right_mic_jack_pin_configs[] = …;
static void stac92hd73xx_fixup_ref(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac92hd73xx_fixup_dell(struct hda_codec *codec)
{ … }
static void stac92hd73xx_fixup_dell_eq(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac92hd73xx_fixup_dell_m6_amic(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac92hd73xx_fixup_dell_m6_dmic(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac92hd73xx_fixup_dell_m6_both(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac92hd73xx_fixup_alienware_m17x(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac92hd73xx_fixup_no_jd(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac92hd73xx_disable_automute(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static const struct hda_fixup stac92hd73xx_fixups[] = …;
static const struct hda_model_fixup stac92hd73xx_models[] = …;
static const struct snd_pci_quirk stac92hd73xx_fixup_tbl[] = …;
static const struct hda_pintbl ref92hd83xxx_pin_configs[] = …;
static const struct hda_pintbl dell_s14_pin_configs[] = …;
static const struct hda_pintbl dell_vostro_3500_pin_configs[] = …;
static const struct hda_pintbl hp_dv7_4000_pin_configs[] = …;
static const struct hda_pintbl hp_zephyr_pin_configs[] = …;
static const struct hda_pintbl hp_cNB11_intquad_pin_configs[] = …;
static void stac92hd83xxx_fixup_hp(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac92hd83xxx_fixup_hp_zephyr(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac92hd83xxx_fixup_hp_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac92hd83xxx_fixup_hp_inv_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac92hd83xxx_fixup_hp_mic_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac92hd83xxx_fixup_hp_led_gpio10(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac92hd83xxx_fixup_headset_jack(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac92hd83xxx_fixup_gpio10_eapd(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void hp_envy_ts_fixup_dac_bind(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static const struct hda_verb hp_bnb13_eq_verbs[] = …;
static const struct hda_fixup stac92hd83xxx_fixups[] = …;
static const struct hda_model_fixup stac92hd83xxx_models[] = …;
static const struct snd_pci_quirk stac92hd83xxx_fixup_tbl[] = …;
#define stac_hp_bass_gpio_info …
static int stac_hp_bass_gpio_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int stac_hp_bass_gpio_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new stac_hp_bass_sw_ctrl = …;
static int stac_add_hp_bass_switch(struct hda_codec *codec)
{ … }
static const struct hda_pintbl ref92hd71bxx_pin_configs[] = …;
static const struct hda_pintbl dell_m4_1_pin_configs[] = …;
static const struct hda_pintbl dell_m4_2_pin_configs[] = …;
static const struct hda_pintbl dell_m4_3_pin_configs[] = …;
static void stac92hd71bxx_fixup_ref(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac92hd71bxx_fixup_hp_m4(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac92hd71bxx_fixup_hp_dv4(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac92hd71bxx_fixup_hp_dv5(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac92hd71bxx_fixup_hp_hdx(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static bool is_hp_output(struct hda_codec *codec, hda_nid_t pin)
{ … }
static void fixup_hp_headphone(struct hda_codec *codec, hda_nid_t pin)
{ … }
static void stac92hd71bxx_fixup_hp(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static const struct hda_fixup stac92hd71bxx_fixups[] = …;
static const struct hda_model_fixup stac92hd71bxx_models[] = …;
static const struct snd_pci_quirk stac92hd71bxx_fixup_tbl[] = …;
static const struct hda_pintbl ref922x_pin_configs[] = …;
static const struct hda_pintbl dell_922x_d81_pin_configs[] = …;
static const struct hda_pintbl dell_922x_d82_pin_configs[] = …;
static const struct hda_pintbl dell_922x_m81_pin_configs[] = …;
static const struct hda_pintbl dell_922x_m82_pin_configs[] = …;
static const struct hda_pintbl d945gtp3_pin_configs[] = …;
static const struct hda_pintbl d945gtp5_pin_configs[] = …;
static const struct hda_pintbl intel_mac_v1_pin_configs[] = …;
static const struct hda_pintbl intel_mac_v2_pin_configs[] = …;
static const struct hda_pintbl intel_mac_v3_pin_configs[] = …;
static const struct hda_pintbl intel_mac_v4_pin_configs[] = …;
static const struct hda_pintbl intel_mac_v5_pin_configs[] = …;
static const struct hda_pintbl ecs202_pin_configs[] = …;
static const struct snd_pci_quirk stac922x_intel_mac_fixup_tbl[] = …;
static const struct hda_fixup stac922x_fixups[];
static void stac922x_fixup_intel_mac_auto(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static void stac922x_fixup_intel_mac_gpio(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{ … }
static const struct hda_fixup stac922x_fixups[] = …;
static const struct hda_model_fixup stac922x_models[] = …;
static const struct snd_pci_quirk stac922x_fixup_tbl[] = …;
static const struct hda_pintbl ref927x_pin_configs[] = …;
static const struct hda_pintbl d965_3st_pin_configs[] = …;
static const struct hda_pintbl d965_5st_pin_configs[] = …;
static const struct hda_pintbl d965_5st_no_fp_pin_configs[] = …;
static const struct hda_pintbl dell_3st_pin_configs[] = …;
static void stac927x_fixup_ref_no_jd(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac927x_fixup_ref(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac927x_fixup_dell_dmic(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac927x_fixup_volknob(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static const struct hda_fixup stac927x_fixups[] = …;
static const struct hda_model_fixup stac927x_models[] = …;
static const struct snd_pci_quirk stac927x_fixup_tbl[] = …;
static const struct hda_pintbl ref9205_pin_configs[] = …;
static const struct hda_pintbl dell_9205_m42_pin_configs[] = …;
static const struct hda_pintbl dell_9205_m43_pin_configs[] = …;
static const struct hda_pintbl dell_9205_m44_pin_configs[] = …;
static void stac9205_fixup_ref(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac9205_fixup_dell_m43(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static void stac9205_fixup_eapd(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static const struct hda_fixup stac9205_fixups[] = …;
static const struct hda_model_fixup stac9205_models[] = …;
static const struct snd_pci_quirk stac9205_fixup_tbl[] = …;
static void stac92hd95_fixup_hp_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{ … }
static const struct hda_fixup stac92hd95_fixups[] = …;
static const struct snd_pci_quirk stac92hd95_fixup_tbl[] = …;
static const struct hda_model_fixup stac92hd95_models[] = …;
static int stac_parse_auto_config(struct hda_codec *codec)
{ … }
static int stac_init(struct hda_codec *codec)
{ … }
#define stac_free …
#ifdef CONFIG_SND_PROC_FS
static void stac92hd_proc_hook(struct snd_info_buffer *buffer,
struct hda_codec *codec, hda_nid_t nid)
{ … }
static void analog_loop_proc_hook(struct snd_info_buffer *buffer,
struct hda_codec *codec,
unsigned int verb)
{ … }
static void stac92hd7x_proc_hook(struct snd_info_buffer *buffer,
struct hda_codec *codec, hda_nid_t nid)
{ … }
static void stac9205_proc_hook(struct snd_info_buffer *buffer,
struct hda_codec *codec, hda_nid_t nid)
{ … }
static void stac927x_proc_hook(struct snd_info_buffer *buffer,
struct hda_codec *codec, hda_nid_t nid)
{ … }
#else
#define stac92hd_proc_hook …
#define stac92hd7x_proc_hook …
#define stac9205_proc_hook …
#define stac927x_proc_hook …
#endif
static int stac_suspend(struct hda_codec *codec)
{ … }
static const struct hda_codec_ops stac_patch_ops = …;
static int alloc_stac_spec(struct hda_codec *codec)
{ … }
static int patch_stac9200(struct hda_codec *codec)
{ … }
static int patch_stac925x(struct hda_codec *codec)
{ … }
static int patch_stac92hd73xx(struct hda_codec *codec)
{ … }
static void stac_setup_gpio(struct hda_codec *codec)
{ … }
static int patch_stac92hd83xxx(struct hda_codec *codec)
{ … }
static const hda_nid_t stac92hd95_pwr_nids[] = …;
static int patch_stac92hd95(struct hda_codec *codec)
{ … }
static int patch_stac92hd71bxx(struct hda_codec *codec)
{ … }
static int patch_stac922x(struct hda_codec *codec)
{ … }
static const char * const stac927x_spdif_labels[] = …;
static int patch_stac927x(struct hda_codec *codec)
{ … }
static int patch_stac9205(struct hda_codec *codec)
{ … }
static const struct hda_verb stac9872_core_init[] = …;
static const struct hda_pintbl stac9872_vaio_pin_configs[] = …;
static const struct hda_model_fixup stac9872_models[] = …;
static const struct hda_fixup stac9872_fixups[] = …;
static const struct snd_pci_quirk stac9872_fixup_tbl[] = …;
static int patch_stac9872(struct hda_codec *codec)
{ … }
static const struct hda_device_id snd_hda_id_sigmatel[] = …;
MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_sigmatel);
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
static struct hda_codec_driver sigmatel_driver = …;
module_hda_codec_driver(…) …;