#include <linux/init.h>
#include <linux/slab.h>
#include <linux/export.h>
#include <linux/sort.h>
#include <linux/delay.h>
#include <linux/ctype.h>
#include <linux/string.h>
#include <linux/bitops.h>
#include <linux/module.h>
#include <linux/leds.h>
#include <sound/core.h>
#include <sound/jack.h>
#include <sound/tlv.h>
#include <sound/hda_codec.h>
#include "hda_local.h"
#include "hda_auto_parser.h"
#include "hda_jack.h"
#include "hda_beep.h"
#include "hda_generic.h"
int snd_hda_gen_spec_init(struct hda_gen_spec *spec)
{ … }
EXPORT_SYMBOL_GPL(…);
struct snd_kcontrol_new *
snd_hda_gen_add_kctl(struct hda_gen_spec *spec, const char *name,
const struct snd_kcontrol_new *temp)
{ … }
EXPORT_SYMBOL_GPL(…);
static void free_kctls(struct hda_gen_spec *spec)
{ … }
static void snd_hda_gen_spec_free(struct hda_gen_spec *spec)
{ … }
static void parse_user_hints(struct hda_codec *codec)
{ … }
#define update_pin_ctl(codec, pin, val) …
static inline void restore_pin_ctl(struct hda_codec *codec, hda_nid_t pin)
{ … }
static void set_pin_target(struct hda_codec *codec, hda_nid_t pin,
unsigned int val, bool do_write)
{ … }
static void set_pin_targets(struct hda_codec *codec, int num_pins,
hda_nid_t *pins, unsigned int val)
{ … }
static int find_idx_in_nid_list(hda_nid_t nid, const hda_nid_t *list, int nums)
{ … }
static bool is_nid_contained(struct nid_path *path, hda_nid_t nid)
{ … }
static struct nid_path *get_nid_path(struct hda_codec *codec,
hda_nid_t from_nid, hda_nid_t to_nid,
int anchor_nid)
{ … }
int snd_hda_get_path_idx(struct hda_codec *codec, struct nid_path *path)
{ … }
EXPORT_SYMBOL_GPL(…);
struct nid_path *snd_hda_get_path_from_idx(struct hda_codec *codec, int idx)
{ … }
EXPORT_SYMBOL_GPL(…);
static bool is_dac_already_used(struct hda_codec *codec, hda_nid_t nid)
{ … }
static bool is_reachable_path(struct hda_codec *codec,
hda_nid_t from_nid, hda_nid_t to_nid)
{ … }
#define AMP_VAL_COMPARE_MASK …
static bool is_ctl_used(struct hda_codec *codec, unsigned int val, int type)
{ … }
static bool is_ctl_associated(struct hda_codec *codec, hda_nid_t nid,
int dir, int idx, int type)
{ … }
static void print_nid_path(struct hda_codec *codec,
const char *pfx, struct nid_path *path)
{ … }
static bool __parse_nid_path(struct hda_codec *codec,
hda_nid_t from_nid, hda_nid_t to_nid,
int anchor_nid, struct nid_path *path,
int depth)
{ … }
static bool snd_hda_parse_nid_path(struct hda_codec *codec, hda_nid_t from_nid,
hda_nid_t to_nid, int anchor_nid,
struct nid_path *path)
{ … }
struct nid_path *
snd_hda_add_new_path(struct hda_codec *codec, hda_nid_t from_nid,
hda_nid_t to_nid, int anchor_nid)
{ … }
EXPORT_SYMBOL_GPL(…);
static void invalidate_nid_path(struct hda_codec *codec, int idx)
{ … }
static hda_nid_t get_preferred_dac(struct hda_codec *codec, hda_nid_t pin)
{ … }
static hda_nid_t look_for_dac(struct hda_codec *codec, hda_nid_t pin,
bool is_digital)
{ … }
static unsigned int amp_val_replace_channels(unsigned int val, unsigned int chs)
{ … }
static bool same_amp_caps(struct hda_codec *codec, hda_nid_t nid1,
hda_nid_t nid2, int dir)
{ … }
static hda_nid_t look_for_out_mute_nid(struct hda_codec *codec,
struct nid_path *path)
{ … }
static hda_nid_t look_for_out_vol_nid(struct hda_codec *codec,
struct nid_path *path)
{ … }
static bool has_amp_in(struct hda_codec *codec, struct nid_path *path, int idx)
{ … }
static bool has_amp_out(struct hda_codec *codec, struct nid_path *path, int idx)
{ … }
static bool is_active_nid(struct hda_codec *codec, hda_nid_t nid,
unsigned int dir, unsigned int idx)
{ … }
#define is_active_nid_for_any(codec, nid) …
static int get_amp_val_to_activate(struct hda_codec *codec, hda_nid_t nid,
int dir, unsigned int caps, bool enable)
{ … }
static bool is_stereo_amps(struct hda_codec *codec, hda_nid_t nid, int dir)
{ … }
static void init_amp(struct hda_codec *codec, hda_nid_t nid, int dir, int idx)
{ … }
static int update_amp(struct hda_codec *codec, hda_nid_t nid, int dir, int idx,
unsigned int mask, unsigned int val)
{ … }
static unsigned int get_amp_mask_to_modify(struct hda_codec *codec,
hda_nid_t nid, int dir, int idx,
unsigned int caps)
{ … }
static void activate_amp(struct hda_codec *codec, hda_nid_t nid, int dir,
int idx, int idx_to_check, bool enable)
{ … }
static void check_and_activate_amp(struct hda_codec *codec, hda_nid_t nid,
int dir, int idx, int idx_to_check,
bool enable)
{ … }
static void activate_amp_out(struct hda_codec *codec, struct nid_path *path,
int i, bool enable)
{ … }
static void activate_amp_in(struct hda_codec *codec, struct nid_path *path,
int i, bool enable, bool add_aamix)
{ … }
static hda_nid_t path_power_update(struct hda_codec *codec,
struct nid_path *path,
bool allow_powerdown)
{ … }
static void sync_power_state_change(struct hda_codec *codec, hda_nid_t nid)
{ … }
void snd_hda_activate_path(struct hda_codec *codec, struct nid_path *path,
bool enable, bool add_aamix)
{ … }
EXPORT_SYMBOL_GPL(…);
static void path_power_down_sync(struct hda_codec *codec, struct nid_path *path)
{ … }
static void set_pin_eapd(struct hda_codec *codec, hda_nid_t pin, bool enable)
{ … }
static void resume_path_from_idx(struct hda_codec *codec, int path_idx)
{ … }
static int hda_gen_mixer_mute_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol);
static int hda_gen_bind_mute_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol);
static int hda_gen_bind_mute_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol);
enum { … };
static const struct snd_kcontrol_new control_templates[] = …;
static struct snd_kcontrol_new *
add_control(struct hda_gen_spec *spec, int type, const char *name,
int cidx, unsigned long val)
{ … }
static int add_control_with_pfx(struct hda_gen_spec *spec, int type,
const char *pfx, const char *dir,
const char *sfx, int cidx, unsigned long val)
{ … }
#define add_pb_vol_ctrl(spec, type, pfx, val) …
#define add_pb_sw_ctrl(spec, type, pfx, val) …
#define __add_pb_vol_ctrl(spec, type, pfx, cidx, val) …
#define __add_pb_sw_ctrl(spec, type, pfx, cidx, val) …
static int add_vol_ctl(struct hda_codec *codec, const char *pfx, int cidx,
unsigned int chs, struct nid_path *path)
{ … }
static int get_default_ch_nums(struct hda_codec *codec, struct nid_path *path,
int type)
{ … }
static int add_stereo_vol(struct hda_codec *codec, const char *pfx, int cidx,
struct nid_path *path)
{ … }
static int add_sw_ctl(struct hda_codec *codec, const char *pfx, int cidx,
unsigned int chs, struct nid_path *path)
{ … }
static int add_stereo_sw(struct hda_codec *codec, const char *pfx,
int cidx, struct nid_path *path)
{ … }
static void sync_auto_mute_bits(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int hda_gen_mixer_mute_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
#define AMP_VAL_IDX_SHIFT …
#define AMP_VAL_IDX_MASK …
static int hda_gen_bind_mute_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int hda_gen_bind_mute_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static bool path_has_mixer(struct hda_codec *codec, int path_idx, int ctl_type)
{ … }
static const char * const channel_name[] = …;
static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
int *index, int ctl_type)
{ … }
enum { … };
static int assign_out_path_ctls(struct hda_codec *codec, struct nid_path *path)
{ … }
const struct badness_table hda_main_out_badness = …;
EXPORT_SYMBOL_GPL(…);
const struct badness_table hda_extra_out_badness = …;
EXPORT_SYMBOL_GPL(…);
static hda_nid_t get_primary_out(struct hda_codec *codec, int idx)
{ … }
static inline hda_nid_t try_dac(struct hda_codec *codec,
hda_nid_t dac, hda_nid_t pin)
{ … }
static int try_assign_dacs(struct hda_codec *codec, int num_outs,
const hda_nid_t *pins, hda_nid_t *dacs,
int *path_idx,
const struct badness_table *bad)
{ … }
static hda_nid_t get_dac_if_single(struct hda_codec *codec, hda_nid_t pin)
{ … }
static bool can_be_multiio_pin(struct hda_codec *codec,
unsigned int location, hda_nid_t nid)
{ … }
static int count_multiio_pins(struct hda_codec *codec, hda_nid_t reference_pin)
{ … }
static int fill_multi_ios(struct hda_codec *codec,
hda_nid_t reference_pin,
bool hardwired)
{ … }
static bool map_singles(struct hda_codec *codec, int outs,
const hda_nid_t *pins, hda_nid_t *dacs, int *path_idx)
{ … }
static inline bool has_aamix_out_paths(struct hda_gen_spec *spec)
{ … }
static int check_aamix_out_path(struct hda_codec *codec, int path_idx)
{ … }
static bool indep_hp_possible(struct hda_codec *codec)
{ … }
static void refill_shared_dacs(struct hda_codec *codec, int num_outs,
hda_nid_t *dacs, int *path_idx)
{ … }
static int fill_and_eval_dacs(struct hda_codec *codec,
bool fill_hardwired,
bool fill_mio_first)
{ … }
#define DEBUG_BADNESS
#ifdef DEBUG_BADNESS
#define debug_badness(fmt, ...) …
#else
#define debug_badness …
#endif
#ifdef DEBUG_BADNESS
static inline void print_nid_path_idx(struct hda_codec *codec,
const char *pfx, int idx)
{ … }
static void debug_show_configs(struct hda_codec *codec,
struct auto_pin_cfg *cfg)
{ … }
#else
#define debug_show_configs …
#endif
static void fill_all_dac_nids(struct hda_codec *codec)
{ … }
static int parse_output_paths(struct hda_codec *codec)
{ … }
static int create_multi_out_ctls(struct hda_codec *codec,
const struct auto_pin_cfg *cfg)
{ … }
static int create_extra_out(struct hda_codec *codec, int path_idx,
const char *pfx, int cidx)
{ … }
static int create_extra_outs(struct hda_codec *codec, int num_pins,
const int *paths, const char *pfx)
{ … }
static int create_hp_out_ctls(struct hda_codec *codec)
{ … }
static int create_speaker_out_ctls(struct hda_codec *codec)
{ … }
static void call_hp_automute(struct hda_codec *codec,
struct hda_jack_callback *jack);
static int indep_hp_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int indep_hp_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static void update_aamix_paths(struct hda_codec *codec, bool do_mix,
int nomix_path_idx, int mix_path_idx,
int out_type);
static int indep_hp_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new indep_hp_ctl = …;
static int create_indep_hp_ctls(struct hda_codec *codec)
{ … }
static int ch_mode_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int ch_mode_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static inline struct nid_path *
get_multiio_path(struct hda_codec *codec, int idx)
{ … }
static void update_automute_all(struct hda_codec *codec);
static bool aamix_default(struct hda_gen_spec *spec)
{ … }
static int set_multi_io(struct hda_codec *codec, int idx, bool output)
{ … }
static int ch_mode_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new channel_mode_enum = …;
static int create_multi_channel_mode(struct hda_codec *codec)
{ … }
#define loopback_mixing_info …
static int loopback_mixing_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static void update_aamix_paths(struct hda_codec *codec, bool do_mix,
int nomix_path_idx, int mix_path_idx,
int out_type)
{ … }
static void update_output_paths(struct hda_codec *codec, int num_outs,
const int *paths)
{ … }
static int loopback_mixing_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new loopback_mixing_enum = …;
static int create_loopback_mixing_ctl(struct hda_codec *codec)
{ … }
static void call_update_outputs(struct hda_codec *codec);
static void update_hp_mic(struct hda_codec *codec, int adc_mux, bool force)
{ … }
static int create_hp_mic(struct hda_codec *codec)
{ … }
static int create_hp_mic_jack_mode(struct hda_codec *codec, hda_nid_t pin);
static const char * const out_jack_texts[] = …;
static int out_jack_mode_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int out_jack_mode_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int out_jack_mode_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new out_jack_mode_enum = …;
static bool find_kctl_name(struct hda_codec *codec, const char *name, int idx)
{ … }
static void get_jack_mode_name(struct hda_codec *codec, hda_nid_t pin,
char *name, size_t name_len)
{ … }
static int get_out_jack_num_items(struct hda_codec *codec, hda_nid_t pin)
{ … }
static int create_out_jack_modes(struct hda_codec *codec, int num_pins,
hda_nid_t *pins)
{ … }
#define NUM_VREFS …
static const char * const vref_texts[NUM_VREFS] = …;
static unsigned int get_vref_caps(struct hda_codec *codec, hda_nid_t pin)
{ … }
static int get_vref_idx(unsigned int vref_caps, unsigned int item_idx)
{ … }
static int cvt_from_vref_idx(unsigned int vref_caps, unsigned int idx)
{ … }
static int in_jack_mode_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int in_jack_mode_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int in_jack_mode_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new in_jack_mode_enum = …;
static int get_in_jack_num_items(struct hda_codec *codec, hda_nid_t pin)
{ … }
static int create_in_jack_mode(struct hda_codec *codec, hda_nid_t pin)
{ … }
static int hp_mic_jack_mode_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int get_cur_hp_mic_jack_mode(struct hda_codec *codec, hda_nid_t nid)
{ … }
static int hp_mic_jack_mode_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int hp_mic_jack_mode_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new hp_mic_jack_mode_enum = …;
static int create_hp_mic_jack_mode(struct hda_codec *codec, hda_nid_t pin)
{ … }
static int add_loopback_list(struct hda_gen_spec *spec, hda_nid_t mix, int idx)
{ … }
static bool look_for_mix_leaf_ctls(struct hda_codec *codec, hda_nid_t mix_nid,
hda_nid_t pin, unsigned int *mix_val,
unsigned int *mute_val)
{ … }
static int new_analog_input(struct hda_codec *codec, int input_idx,
hda_nid_t pin, const char *ctlname, int ctlidx,
hda_nid_t mix_nid)
{ … }
static int is_input_pin(struct hda_codec *codec, hda_nid_t nid)
{ … }
static int fill_adc_nids(struct hda_codec *codec)
{ … }
static int check_dyn_adc_switch(struct hda_codec *codec)
{ … }
static int parse_capture_source(struct hda_codec *codec, hda_nid_t pin,
int cfg_idx, int num_adcs,
const char *label, int anchor)
{ … }
static int fill_input_pin_labels(struct hda_codec *codec)
{ … }
#define CFG_IDX_MIX …
static int create_input_ctls(struct hda_codec *codec)
{ … }
static struct nid_path *get_input_path(struct hda_codec *codec, int adc_idx, int imux_idx)
{ … }
static int mux_select(struct hda_codec *codec, unsigned int adc_idx,
unsigned int idx);
static int mux_enum_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int mux_enum_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int mux_enum_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new cap_src_temp = …;
put_call_t;
static int cap_put_caller(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol,
put_call_t func, int type)
{ … }
#define cap_vol_info …
#define cap_vol_get …
#define cap_vol_tlv …
static int cap_vol_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new cap_vol_temp = …;
#define cap_sw_info …
#define cap_sw_get …
static int cap_sw_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new cap_sw_temp = …;
static int parse_capvol_in_path(struct hda_codec *codec, struct nid_path *path)
{ … }
static bool is_inv_dmic_pin(struct hda_codec *codec, hda_nid_t nid)
{ … }
static int cap_single_sw_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int add_single_cap_ctl(struct hda_codec *codec, const char *label,
int idx, bool is_switch, unsigned int ctl,
bool inv_dmic)
{ … }
static int create_single_cap_vol_ctl(struct hda_codec *codec, int idx,
unsigned int vol_ctl, unsigned int sw_ctl,
bool inv_dmic)
{ … }
static int create_bind_cap_vol_ctl(struct hda_codec *codec, int idx,
unsigned int vol_ctl, unsigned int sw_ctl)
{ … }
static unsigned int get_first_cap_ctl(struct hda_codec *codec, int idx, int type)
{ … }
static int create_multi_cap_vol_ctl(struct hda_codec *codec)
{ … }
static int create_capture_mixers(struct hda_codec *codec)
{ … }
static bool check_boost_vol(struct hda_codec *codec, hda_nid_t nid,
int dir, int idx)
{ … }
static unsigned int look_for_boost_amp(struct hda_codec *codec,
struct nid_path *path)
{ … }
static int parse_mic_boost(struct hda_codec *codec)
{ … }
#ifdef CONFIG_SND_HDA_GENERIC_LEDS
static int create_mute_led_cdev(struct hda_codec *codec,
int (*callback)(struct led_classdev *,
enum led_brightness),
bool micmute)
{ … }
int snd_hda_gen_add_mute_led_cdev(struct hda_codec *codec,
int (*callback)(struct led_classdev *,
enum led_brightness))
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_hda_gen_add_micmute_led_cdev(struct hda_codec *codec,
int (*callback)(struct led_classdev *,
enum led_brightness))
{ … }
EXPORT_SYMBOL_GPL(…);
#endif
static void parse_digital(struct hda_codec *codec)
{ … }
static bool dyn_adc_pcm_resetup(struct hda_codec *codec, int cur);
static int mux_select(struct hda_codec *codec, unsigned int adc_idx,
unsigned int idx)
{ … }
static hda_nid_t set_path_power(struct hda_codec *codec, hda_nid_t nid,
int pin_state, int stream_state)
{ … }
static bool detect_pin_state(struct hda_codec *codec, hda_nid_t pin)
{ … }
static hda_nid_t set_pin_power_jack(struct hda_codec *codec, hda_nid_t pin,
int power)
{ … }
static void pin_power_callback(struct hda_codec *codec,
struct hda_jack_callback *jack,
bool on)
{ … }
static void pin_power_up_callback(struct hda_codec *codec,
struct hda_jack_callback *jack)
{ … }
static void pin_power_down_callback(struct hda_codec *codec,
struct hda_jack_callback *jack)
{ … }
static void add_pin_power_ctls(struct hda_codec *codec, int num_pins,
const hda_nid_t *pins, bool on)
{ … }
static void add_all_pin_power_ctls(struct hda_codec *codec, bool on)
{ … }
static void sync_pin_power_ctls(struct hda_codec *codec, int num_pins,
const hda_nid_t *pins)
{ … }
static void sync_all_pin_power_ctls(struct hda_codec *codec)
{ … }
static int add_fake_paths(struct hda_codec *codec, hda_nid_t nid,
int num_pins, const hda_nid_t *pins)
{ … }
static int add_fake_beep_paths(struct hda_codec *codec)
{ … }
static void beep_power_hook(struct hda_beep *beep, bool on)
{ … }
int snd_hda_gen_fix_pin_power(struct hda_codec *codec, hda_nid_t pin)
{ … }
EXPORT_SYMBOL_GPL(…);
static bool detect_jacks(struct hda_codec *codec, int num_pins, const hda_nid_t *pins)
{ … }
static void do_automute(struct hda_codec *codec, int num_pins, const hda_nid_t *pins,
int *paths, bool mute)
{ … }
void snd_hda_gen_update_outputs(struct hda_codec *codec)
{ … }
EXPORT_SYMBOL_GPL(…);
static void call_update_outputs(struct hda_codec *codec)
{ … }
void snd_hda_gen_hp_automute(struct hda_codec *codec,
struct hda_jack_callback *jack)
{ … }
EXPORT_SYMBOL_GPL(…);
void snd_hda_gen_line_automute(struct hda_codec *codec,
struct hda_jack_callback *jack)
{ … }
EXPORT_SYMBOL_GPL(…);
void snd_hda_gen_mic_autoswitch(struct hda_codec *codec,
struct hda_jack_callback *jack)
{ … }
EXPORT_SYMBOL_GPL(…);
static void call_hp_automute(struct hda_codec *codec,
struct hda_jack_callback *jack)
{ … }
static void call_line_automute(struct hda_codec *codec,
struct hda_jack_callback *jack)
{ … }
static void call_mic_autoswitch(struct hda_codec *codec,
struct hda_jack_callback *jack)
{ … }
static void update_automute_all(struct hda_codec *codec)
{ … }
static int automute_mode_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int automute_mode_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int automute_mode_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new automute_mode_enum = …;
static int add_automute_mode_enum(struct hda_codec *codec)
{ … }
static int check_auto_mute_availability(struct hda_codec *codec)
{ … }
static bool auto_mic_check_imux(struct hda_codec *codec)
{ … }
static int compare_attr(const void *ap, const void *bp)
{ … }
static int check_auto_mic_availability(struct hda_codec *codec)
{ … }
unsigned int snd_hda_gen_path_power_filter(struct hda_codec *codec,
hda_nid_t nid,
unsigned int power_state)
{ … }
EXPORT_SYMBOL_GPL(…);
static void mute_all_mixer_nid(struct hda_codec *codec, hda_nid_t mix)
{ … }
void snd_hda_gen_stream_pm(struct hda_codec *codec, hda_nid_t nid, bool on)
{ … }
EXPORT_SYMBOL_GPL(…);
static bool force_mute_output_path(struct hda_codec *codec, hda_nid_t nid)
{ … }
bool snd_hda_gen_shutup_speakers(struct hda_codec *codec)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_hda_gen_parse_auto_config(struct hda_codec *codec,
struct auto_pin_cfg *cfg)
{ … }
EXPORT_SYMBOL_GPL(…);
static const char * const follower_pfxs[] = …;
int snd_hda_gen_build_controls(struct hda_codec *codec)
{ … }
EXPORT_SYMBOL_GPL(…);
static void call_pcm_playback_hook(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream,
int action)
{ … }
static void call_pcm_capture_hook(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream,
int action)
{ … }
static int playback_pcm_open(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
static int playback_pcm_prepare(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
unsigned int stream_tag,
unsigned int format,
struct snd_pcm_substream *substream)
{ … }
static int playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
static int playback_pcm_close(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
static int capture_pcm_open(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
static int capture_pcm_prepare(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
unsigned int stream_tag,
unsigned int format,
struct snd_pcm_substream *substream)
{ … }
static int capture_pcm_cleanup(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
static int capture_pcm_close(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
static int alt_playback_pcm_open(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
static int alt_playback_pcm_close(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
static int alt_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
unsigned int stream_tag,
unsigned int format,
struct snd_pcm_substream *substream)
{ … }
static int alt_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
static int dig_playback_pcm_open(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
static int dig_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
unsigned int stream_tag,
unsigned int format,
struct snd_pcm_substream *substream)
{ … }
static int dig_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
static int dig_playback_pcm_close(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
#define alt_capture_pcm_open …
#define alt_capture_pcm_close …
static int alt_capture_pcm_prepare(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
unsigned int stream_tag,
unsigned int format,
struct snd_pcm_substream *substream)
{ … }
static int alt_capture_pcm_cleanup(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
static const struct hda_pcm_stream pcm_analog_playback = …;
static const struct hda_pcm_stream pcm_analog_capture = …;
static const struct hda_pcm_stream pcm_analog_alt_playback = …;
static const struct hda_pcm_stream pcm_analog_alt_capture = …;
static const struct hda_pcm_stream pcm_digital_playback = …;
static const struct hda_pcm_stream pcm_digital_capture = …;
static const struct hda_pcm_stream pcm_null_stream = …;
static bool dyn_adc_pcm_resetup(struct hda_codec *codec, int cur)
{ … }
static int dyn_adc_capture_pcm_prepare(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
unsigned int stream_tag,
unsigned int format,
struct snd_pcm_substream *substream)
{ … }
static int dyn_adc_capture_pcm_cleanup(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream)
{ … }
static const struct hda_pcm_stream dyn_adc_pcm_analog_capture = …;
static void fill_pcm_stream_name(char *str, size_t len, const char *sfx,
const char *chip_name)
{ … }
static void setup_pcm_stream(struct hda_pcm_stream *str,
const struct hda_pcm_stream *default_str,
const struct hda_pcm_stream *spec_str,
hda_nid_t nid)
{ … }
int snd_hda_gen_build_pcms(struct hda_codec *codec)
{ … }
EXPORT_SYMBOL_GPL(…);
static void set_output_and_unmute(struct hda_codec *codec, int path_idx)
{ … }
static void init_multi_out(struct hda_codec *codec)
{ … }
static void __init_extra_out(struct hda_codec *codec, int num_outs, int *paths)
{ … }
static void init_extra_out(struct hda_codec *codec)
{ … }
static void init_multi_io(struct hda_codec *codec)
{ … }
static void init_aamix_paths(struct hda_codec *codec)
{ … }
static void init_analog_input(struct hda_codec *codec)
{ … }
static void init_input_src(struct hda_codec *codec)
{ … }
static void init_digital(struct hda_codec *codec)
{ … }
static void clear_unsol_on_unused_pins(struct hda_codec *codec)
{ … }
int snd_hda_gen_init(struct hda_codec *codec)
{ … }
EXPORT_SYMBOL_GPL(…);
void snd_hda_gen_free(struct hda_codec *codec)
{ … }
EXPORT_SYMBOL_GPL(…);
int snd_hda_gen_check_power_status(struct hda_codec *codec, hda_nid_t nid)
{ … }
EXPORT_SYMBOL_GPL(…);
static const struct hda_codec_ops generic_patch_ops = …;
static int snd_hda_parse_generic_codec(struct hda_codec *codec)
{ … }
static const struct hda_device_id snd_hda_id_generic[] = …;
MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_generic);
static struct hda_codec_driver generic_driver = …;
module_hda_codec_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;