Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | sound/pci/hda/patch_realtek.c |
static int alc880_parse_auto_config(struct hda_codec *codec) {
static const hda_nid_t alc880_ignore[] = {0x1d, 0};
static const hda_nid_t alc880_ssids[] = {0x15, 0x1b, 0x14, 0};
return alc_parse_auto_config(codec, alc880_ignore, alc880_ssids);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc880_fixup_vol_knob(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
if (action == HDA_FIXUP_ACT_PROBE)
snd_hda_jack_detect_enable_callback(codec, 0x21, alc_update_knob_master);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc260_fixup_kn1(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
struct alc_spec *spec = codec->spec;
static const struct hda_pintbl pincfgs[] = {
{0x0f, 0x02214000},
{0x12, 0x90a60160}, /* int mic */
{0x13, 0x02a19000}, /* ext mic */
... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc260_fixup_fsc_s7020(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
struct alc_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PRE_PROBE)
spec->init_amp = ALC_INIT_NONE;
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc889_fixup_mac_pins(struct hda_codec *codec,
const hda_nid_t *nids, int num_nids) {
struct alc_spec *spec = codec->spec;
int i;
for (i = 0; i < num_nids; i++) {
unsigned int val;
val = snd_hda_codec_get_pin_target(codec, nids[i]);
val |= AC_PINCTL_VREF... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static int alc882_parse_auto_config(struct hda_codec *codec) {
static const hda_nid_t alc882_ignore[] = {0x1d, 0};
static const hda_nid_t alc882_ssids[] = {0x15, 0x1b, 0x14, 0};
return alc_parse_auto_config(codec, alc882_ignore, alc882_ssids);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static int alc262_parse_auto_config(struct hda_codec *codec) {
static const hda_nid_t alc262_ignore[] = {0x1d, 0};
static const hda_nid_t alc262_ssids[] = {0x15, 0x1b, 0x14, 0};
return alc_parse_auto_config(codec, alc262_ignore, alc262_ssids);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static int patch_alc262(struct hda_codec *codec) {
struct alc_spec *spec;
int err;
err = alc_alloc_spec(codec, 0x0b);
if (err < 0)
return err;
spec = codec->spec;
spec->gen.shared_mic_vref_pin = 0x18;
spec->shutup = alc_eapd_shutup;
#if 0
alc_update_coefex_idx(codec, 0x1a, 7, 0, 0x80);
#endif
... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static int alc268_beep_switch_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
unsigned long pval;
int err;
mutex_lock(&codec->control_mutex);
pval = kcontrol->private_value;
kcontrol->private_... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc_disable_headset_jack_key(struct hda_codec *codec) {
struct alc_spec *spec = codec->spec;
if (!spec->has_hs_key)
return;
switch (codec->core.vendor_id) {
case 0x10ec0215:
case 0x10ec0225:
case 0x10ec0285:
case 0x10ec0287:
case 0x10ec0295:
case 0x10ec0289:
case 0x10ec0299:
a... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc_enable_headset_jack_key(struct hda_codec *codec) {
struct alc_spec *spec = codec->spec;
if (!spec->has_hs_key)
return;
switch (codec->core.vendor_id) {
case 0x10ec0215:
case 0x10ec0225:
case 0x10ec0285:
case 0x10ec0287:
case 0x10ec0295:
case 0x10ec0289:
case 0x10ec0299:
al... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc283_init(struct hda_codec *codec) {
struct alc_spec *spec = codec->spec;
hda_nid_t hp_pin = alc_get_hp_pin(spec);
bool hp_pin_sense;
alc283_restore_default_value(codec);
if (!hp_pin)
return;
msleep(30);
hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
/* Headphone capless set to... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc294_hp_init(struct hda_codec *codec) {
struct alc_spec *spec = codec->spec;
hda_nid_t hp_pin = alc_get_hp_pin(spec);
int i, val;
if (!hp_pin)
return;
snd_hda_codec_write(codec, hp_pin, 0, AC_VERB_SET_AMP_GAIN_MUTE,
AMP_OUT_MUTE);
msleep(100);
if (!spec->no_shut... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc294_init(struct hda_codec *codec) {
struct alc_spec *spec = codec->spec;
if (!spec->done_hp_init ||
codec->core.dev.power.power_state.event == PM_EVENT_RESTORE) {
alc294_hp_init(codec);
spec->done_hp_init = true;
}
alc_default_init(codec);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static int alc5505_coef_get(struct hda_codec *codec, unsigned int index_reg) {
unsigned int val;
snd_hda_codec_write(codec, 0x51, 0, AC_VERB_SET_COEF_INDEX, index_reg >> 1);
val = snd_hda_codec_read(codec, 0x51, 0, AC_VERB_GET_PROC_COEF, 0) & 0xffff;
val |= snd_hda_codec_read(codec, 0x51, 0, AC_VERB_GET_PROC_... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static int alc269_suspend(struct hda_codec *codec) {
struct alc_spec *spec = codec->spec;
if (spec->has_alc5505_dsp)
alc5505_dsp_suspend(codec);
return alc_suspend(codec);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
struct alc_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PRE_PROBE)
spec->parse_flags =... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc271_fixup_dmic(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
static const struct hda_verb verbs[] = {{0x20, AC_VERB_SET_COEF_INDEX, 0x0d},
{0x20, AC_VERB_SET_PROC_COEF, 0x4000},
... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc269vb_fixup_aspire_e1_coef(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
if (action == HDA_FIXUP_ACT_INIT)
alc_update_coef_idx(codec, 0x0d, 0x6000, 0x6000);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc269_quanta_automute(struct hda_codec *codec) {
snd_hda_gen_update_outputs(codec);
alc_write_coef_idx(codec, 0x0c, 0x680);
alc_write_coef_idx(codec, 0x0c, 0x480);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc269_fixup_hp_mute_led_mic1(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x18);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc269_fixup_hp_mute_led_mic3(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
alc269_fixup_hp_mute_led_micx(codec, fix, action, 0x1b);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc_fixup_hp_gpio_led(struct hda_codec *codec, int action,
unsigned int mute_mask,
unsigned int micmute_mask) {
struct alc_spec *spec = codec->spec;
alc_fixup_gpio(codec, action, mute_mask | micmute_mask);
if (action != HDA_FIXUP_AC... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc280_fixup_hp_gpio4(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
struct alc_spec *spec = codec->spec;
alc_fixup_hp_gpio_led(codec, action, 0x08, 0);
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
spec->cap_mute_led_nid = 0x18;
snd_hda_gen_... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc274_fixup_hp_envy_gpio(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
struct alc_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PROBE) {
spec->gpio_mask |= 0x04;
spec->gpio_dir |= 0x04;
spec->gen.pcm_playback_hook = alc27... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc285_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
struct alc_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
spec->mute_led_polarity = 0;
... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static int coef_micmute_led_set(struct led_classdev *led_cdev,
enum led_brightness brightness) {
struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
struct alc_spec *spec = codec->spec;
alc_update_coef_led(codec, &spec->mic_led_coef, spec->micmute_led_polarity,
... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc285_fixup_hp_mute_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
alc285_fixup_hp_mute_led_coefbit(codec, fix, action);
alc285_fixup_hp_coef_micmute_led(codec, fix, action);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc236_fixup_hp_mute_led(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
alc236_fixup_hp_mute_led_coefbit(codec, fix, action);
alc236_fixup_hp_coef_micmute_led(codec, fix, action);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static inline void
alc298_samsung_write_coef_pack(struct hda_codec *codec,
const unsigned short coefs[2]) {
alc_write_coef_idx(codec, 0x23, coefs[0]);
alc_write_coef_idx(codec, 0x25, coefs[1]);
alc_write_coef_idx(codec, 0x26, 0xb011);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc298_fixup_samsung_amp(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
int i, j;
static const unsigned short init_seq[][2] = {
{0x19, 0x00}, {0x20, 0xc0}, {0x22, 0x44}, {0x23, 0x08}, {0x24, 0x85},
{0x25, 0x41}, {0x35, 0x40}, {0x36, ... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static int alc_register_micmute_input_device(struct hda_codec *codec) {
struct alc_spec *spec = codec->spec;
int i;
spec->kb_dev = input_allocate_device();
if (!spec->kb_dev) {
codec_err(codec, "Out of memory (input_allocate_device)\n");
return -ENOMEM;
}
spec->alc_mute_keycode_map[ALC_KEY_MICMUT... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc233_fixup_lenovo_line2_mic_hotkey(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
struct alc_spec *spec = codec->spec;
alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
if (action == ... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc_update_headset_jack_cb(struct hda_codec *codec,
struct hda_jack_callback *jack) {
snd_hda_gen_hp_automute(codec, jack);
alc_update_headset_mode(codec);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc_fixup_headset_mode(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
struct alc_spec *spec = codec->spec;
switch (action) {
case HDA_FIXUP_ACT_PRE_PROBE:
spec->parse_flags |= HDA_PINCFG_HEADSET_MIC | HDA_PINCFG_HEADPHONE_MIC;
break;
... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc_fixup_headset_mode_alc255(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
alc255_set_default_jack_type(codec);
}
alc_fixup_headset_mode(codec, fix, ... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc_fixup_auto_mute_via_amp(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
struct alc_spec *spec = codec->spec;
spec->gen.auto_mute_via_amp = 1;
}
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc_fixup_tpt470_dock(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
static const struct hda_pintbl pincfgs[] = {{0x17, 0x21211010},
{0x19, 0x21a11010}, /* dock mic */
... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc_fixup_tpt470_dacs(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
static const hda_nid_t preferred_pairs[] = {0x14, 0x03, 0x17, 0x02,
0x21, 0x02, 0};
struct alc_spec *spec = codec->spec;
if (actio... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc283_fixup_sense_combo_jack(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
struct alc_spec *spec = codec->spec;
switch (action) {
case HDA_FIXUP_ACT_PRE_PROBE:
spec->gen.hp_automute_hook = a... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc298_fixup_speaker_volume(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
static const hda_nid_t conn1[] = {0x0c};
snd_hda_override_conn_list(codec, 0x17,... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc280_hp_gpio4_automute_hook(struct hda_codec *codec,
struct hda_jack_callback *jack) {
struct alc_spec *spec = codec->spec;
snd_hda_gen_hp_automute(codec, jack);
alc_update_gpio_led(codec, 0x10, spec->mute_led_polarity,
!spec->gen.hp_... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc280_fixup_hp_9480m(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
struct alc_spec *spec = codec->spec;
alc_fixup_hp_gpio_led(codec, action, 0x08, 0);
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
spec->gpio_mask |= 0x10;
spec->gpio_dir |= ... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc275_fixup_gpio4_off(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
struct alc_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
spec->gpio_mask |= 0x04;
spec->gpio_dir |= 0x04;
}
} | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc225_fixup_s3_pop_noise(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
if (action != HDA_FIXUP_ACT_PRE_PROBE)
return;
codec->power_save_node = 1;
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc274_fixup_bind_dacs(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
struct alc_spec *spec = codec->spec;
static const hda_nid_t preferred_pairs[] = {0x21, 0x03, 0x1b, 0x03,
0x16, 0x02, 0};
if (acti... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc285_fixup_invalidate_dacs(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
if (action != HDA_FIXUP_ACT_PRE_PROBE)
return;
snd_hda_override_wcaps(codec, 0x03, 0);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc295_fixup_chromebook(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
struct alc_spec *spec = codec->spec;
switch (action) {
case HDA_FIXUP_ACT_PRE_PROBE:
spec->ultra_low_power = true;
break;
case HDA_FIXUP_ACT_INIT:
alc_combo_j... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc294_fixup_gu502_hp(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
if (!is_jack_detectable(codec, 0x21))
return;
switch (action) {
case HDA_FIXUP_ACT_PRE_PROBE:
snd_hda_jack_detect_enable_callback(codec, 0x21,
... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
static const hda_nid_t conn[] = {0x02};
struct alc_spec *spec = codec->spec;
static const struct hda_pintbl pi... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc287_fixup_legion_16achg6_speakers(struct hda_codec *cdc,
const struct hda_fixup *fix,
int action) {
cs35l41_generic_fixup(cdc, action, "i2c", "CLSA0100", 2);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc_fixup_dell4_mic_no_presence_quiet(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
struct alc_spec *spec = codec->spec;
struct hda_input_mux *imux = &spec->gen.input_mux;
int i;
... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc287_fixup_yoga9_14iap7_bass_spk_pin(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
static const struct hda_pintbl pincfgs[] = {{0x17, 0x90170121}, {}};
/*
* Avoid DAC 0x06 an... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc269_fill_coef(struct hda_codec *codec) {
struct alc_spec *spec = codec->spec;
int val;
if (spec->codec_variant != ALC269_TYPE_ALC269VB)
return;
if ((alc_get_coef0(codec) & 0x00ff) < 0x015) {
alc_write_coef_idx(codec, 0xf, 0x960b);
alc_write_coef_idx(codec, 0xe, 0x8817);
}
if ((... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static int patch_alc861(struct hda_codec *codec) {
struct alc_spec *spec;
int err;
err = alc_alloc_spec(codec, 0x15);
if (err < 0)
return err;
spec = codec->spec;
if (has_cdefine_beep(codec))
spec->gen.beep_nid = 0x23;
#ifdef CONFIG_PM
spec->power_hook = alc_power_eapd;
#endif
alc_pre_init(c... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc861vd_fixup_dallas(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
snd_hda_override_pin_caps(codec, 0x18, 0x00000734);
snd_hda_override_pin_caps(codec, 0x19, 0x0000073c);
}
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static int alc662_parse_auto_config(struct hda_codec *codec) {
static const hda_nid_t alc662_ignore[] = {0x1d, 0};
static const hda_nid_t alc663_ssids[] = {0x15, 0x1b, 0x14, 0x21};
static const hda_nid_t alc662_ssids[] = {0x15, 0x1b, 0x14, 0};
const hda_nid_t *ssids;
if (codec->core.vendor_id == 0x10ec0272 |... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc662_fixup_led_gpio1(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
struct alc_spec *spec = codec->spec;
alc_fixup_hp_gpio_led(codec, action, 0x01, 0);
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
spec->mute_led_polarity = 1;
codec->power... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc662_fixup_aspire_ethos_hp(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
if (!is_jack_detectable(codec, 0x1b))
return;
switch (action) {
case HDA_FIXUP_ACT_PRE_PROBE:
snd_hda_jack_detect... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc671_fixup_hp_headset_mic2(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
struct alc_spec *spec = codec->spec;
static const struct hda_pintbl pincfgs[] = {
{0x19, 0x02a11040}, {0x1b, 0x0181304... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc897_fixup_lenovo_headset_mic(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
struct alc_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
spec->gen.hp_automute_hook = alc8... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_si3054.c |
static int si3054_switch_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *uvalue) {
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
u16 reg = PRIVATE_REG(kcontrol->private_value);
u16 mask = PRIVATE_MASK(kcontrol->private_value);
uvalue->value.integer.value[0] =... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_si3054.c |
static int si3054_switch_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *uvalue) {
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
u16 reg = PRIVATE_REG(kcontrol->private_value);
u16 mask = PRIVATE_MASK(kcontrol->private_value);
if (uvalue->value.integer.value[... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_si3054.c | static int si3054_pcm_prepare(struct hda_pcm_stream *hinfo,
struct hda_codec *codec, unsigned int stream_tag,
unsigned int format,
struct snd_pcm_substream *substream) {
u16 val;
SET_REG(codec, SI3054_LINE_RATE, substream->ru... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_si3054.c | static int si3054_init(struct hda_codec *codec) {
struct si3054_spec *spec = codec->spec;
unsigned wait_count;
u16 val;
if (snd_hdac_regmap_add_vendor_verb(&codec->core, SI3054_VERB_WRITE_NODE))
return -ENOMEM;
snd_hda_codec_write(codec, AC_NODE_ROOT, 0, AC_VERB_SET_CODEC_RESET, 0);
snd_hda_codec_writ... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_si3054.c |
static int patch_si3054(struct hda_codec *codec) {
struct si3054_spec *spec = kzalloc(sizeof(*spec), GFP_KERNEL);
if (spec == NULL)
return -ENOMEM;
codec->spec = spec;
codec->patch_ops = si3054_patch_ops;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c | static void stac_gpio_set(struct hda_codec *codec, unsigned int mask,
unsigned int dir_mask, unsigned int data) {
unsigned int gpiostate, gpiomask, gpiodir;
hda_nid_t fg = codec->core.afg;
codec_dbg(codec, "%s msk %x dir %x gpio %x\n", __func__, mask, dir_mask,
data);
gpi... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c | static void stac_init_power_map(struct hda_codec *codec) {
struct sigmatel_spec *spec = codec->spec;
int i;
for (i = 0; i < spec->num_pwrs; i++) {
hda_nid_t nid = spec->pwr_nids[i];
unsigned int def_conf = snd_hda_codec_get_pincfg(codec, nid);
def_conf = get_defcfg_connect(def_conf);
if (def_conf... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c | static inline bool get_int_hint(struct hda_codec *codec, const char *key,
int *valp) {
return !snd_hda_get_int_hint(codec, key, valp);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c | static void stac_store_hints(struct hda_codec *codec) {
struct sigmatel_spec *spec = codec->spec;
int val;
if (get_int_hint(codec, "gpio_mask", &spec->gpio_mask)) {
spec->eapd_mask = spec->gpio_dir = spec->gpio_data = spec->gpio_mask;
}
if (get_int_hint(codec, "gpio_dir", &spec->gpio_dir))
spec->gpio... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c | static bool has_builtin_speaker(struct hda_codec *codec) {
struct sigmatel_spec *spec = codec->spec;
const hda_nid_t *nid_pin;
int nids, i;
if (spec->gen.autocfg.line_out_type == AUTO_PIN_SPEAKER_OUT) {
nid_pin = spec->gen.autocfg.line_out_pins;
nids = spec->gen.autocfg.line_outs;
} else {
nid_pi... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c |
static int stac_dig_beep_switch_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
return snd_hda_enable_beep_device(codec, ucontrol->value.integer.value[0]);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c |
static int stac_smux_enum_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
struct sigmatel_spec *spec = codec->spec;
unsigned int smux_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
ucontrol->val... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c |
static void stac92hd73xx_fixup_dell_eq(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
struct sigmatel_spec *spec = codec->spec;
if (action != HDA_FIXUP_ACT_PRE_PROBE)
return;
stac92hd73xx_fixup_dell(codec);
... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c | static void stac92hd73xx_fixup_dell_m6_both(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
if (action != HDA_FIXUP_ACT_PRE_PROBE)
return;
stac92hd73xx_fixup_dell(codec);
snd_hda_codec_set_pincfg(codec... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c |
static void stac92hd73xx_fixup_alienware_m17x(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
struct sigmatel_spec *spec = codec->spec;
if (action != HDA_FIXUP_ACT_PRE_PROBE)
return;
snd_hda_appl... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c |
static void stac92hd83xxx_fixup_hp_led(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
struct sigmatel_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PRE_PROBE)
spec->default_polarity = 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c |
static void stac92hd83xxx_fixup_hp_inv_led(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
struct sigmatel_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PRE_PROBE)
spec->default_polarity = 1;
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c | static void stac92hd83xxx_fixup_hp_mic_led(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
struct sigmatel_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
spec->mic_mute_led_gpio = 0x08;... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c | static void fixup_hp_headphone(struct hda_codec *codec, hda_nid_t pin) {
unsigned int pin_cfg = snd_hda_codec_get_pincfg(codec, pin);
pin_cfg = (pin_cfg & (~AC_DEFCFG_DEVICE)) |
(AC_JACK_HP_OUT << AC_DEFCFG_DEVICE_SHIFT);
pin_cfg = (pin_cfg & (~(AC_DEFCFG_DEF_ASSOC | AC_DEFCFG_SEQUENCE))) | 0x1f;
s... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c | static void stac922x_fixup_intel_mac_auto(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
if (action != HDA_FIXUP_ACT_PRE_PROBE)
return;
codec->fixup_id = HDA_FIXUP_ID_NOT_SET;
snd_hda_pick_fixup(codec, NU... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c |
static void stac922x_fixup_intel_mac_gpio(struct hda_codec *codec,
const struct hda_fixup *fix,
int action) {
struct sigmatel_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
spec->gpio_mask = spec->gpio_dir ... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c | static void stac927x_fixup_dell_dmic(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
struct sigmatel_spec *spec = codec->spec;
if (action != HDA_FIXUP_ACT_PRE_PROBE)
return;
if (codec->core.subsystem_id != 0x1028022f) {
spec->eapd_mask = spec->gp... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c |
static void stac927x_fixup_volknob(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
struct sigmatel_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
snd_hda_add_verbs(codec, stac927x_volknob_core_init);
spec->volknob_init = 1;
}
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c |
static void stac9205_fixup_eapd(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
struct sigmatel_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PRE_PROBE)
spec->eapd_switch = 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c |
static void analog_loop_proc_hook(struct snd_info_buffer *buffer,
struct hda_codec *codec, unsigned int verb) {
snd_iprintf(buffer, "Analog Loopback: 0x%02x\n",
snd_hda_codec_read(codec, codec->core.afg, 0, verb, 0));
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c |
static void stac927x_proc_hook(struct snd_info_buffer *buffer,
struct hda_codec *codec, hda_nid_t nid) {
if (nid == codec->core.afg)
analog_loop_proc_hook(buffer, codec, 0xfeb);
}
#else
#define stac92hd_proc_hook NULL
#define stac92hd7x_proc_hook NULL
#define stac9205_proc_hook NUL... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c | static int patch_stac922x(struct hda_codec *codec) {
struct sigmatel_spec *spec;
int err;
err = alloc_stac_spec(codec);
if (err < 0)
return err;
spec = codec->spec;
spec->linear_tone_beep = 1;
spec->gen.own_eapd_ctl = 1;
snd_hda_add_verbs(codec, stac922x_core_init);
snd_hda_override_amp_caps(
... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c | static int patch_stac927x(struct hda_codec *codec) {
struct sigmatel_spec *spec;
int err;
err = alloc_stac_spec(codec);
if (err < 0)
return err;
spec = codec->spec;
spec->linear_tone_beep = 1;
spec->gen.own_eapd_ctl = 1;
spec->have_spdif_mux = 1;
spec->spdif_labels = stac927x_spdif_labels;
sp... | [
1,
1
] |
Linux Kernel | sound/pci/hda/patch_sigmatel.c |
static int patch_stac9872(struct hda_codec *codec) {
struct sigmatel_spec *spec;
int err;
err = alloc_stac_spec(codec);
if (err < 0)
return err;
spec = codec->spec;
spec->linear_tone_beep = 1;
spec->gen.own_eapd_ctl = 1;
snd_hda_add_verbs(codec, stac9872_core_init);
snd_hda_pick_fixup(codec, ... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_via.c |
static int via_pin_power_ctl_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
struct via_spec *spec = codec->spec;
ucontrol->value.enumerated.item[0] = spec->gen.power_down_unused;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_via.c |
static int set_beep_amp(struct via_spec *spec, hda_nid_t nid, int idx,
int dir) {
struct snd_kcontrol_new *knew;
unsigned int beep_amp = HDA_COMPOSE_AMP_VAL(nid, 1, idx, dir);
int i;
spec->gen.beep_nid = nid;
for (i = 0; i < ARRAY_SIZE(via_beep_mixer); i++) {
knew = snd_hda_gen_a... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_via.c | static void __analog_low_current_mode(struct hda_codec *codec, bool force) {
struct via_spec *spec = codec->spec;
bool enable;
unsigned int verb, parm;
if (!codec->power_save_node)
enable = false;
else
enable = is_aa_path_mute(codec) && !spec->gen.active_streams;
if (enable == spec->alc_mode && !fo... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_via.c | static int via_resume(struct hda_codec *codec) {
msleep(10);
codec->patch_ops.init(codec);
snd_hda_regmap_sync(codec);
return 0;
}
#endif
#ifdef CONFIG_PM | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_via.c | static int vt1708_build_controls(struct hda_codec *codec) {
int err;
int old_interval = codec->jackpoll_interval;
codec->jackpoll_interval = msecs_to_jiffies(100);
err = snd_hda_gen_build_controls(codec);
codec->jackpoll_interval = old_interval;
return err;
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_via.c | static int add_secret_dac_path(struct hda_codec *codec) {
struct via_spec *spec = codec->spec;
int i, nums;
hda_nid_t conn[8];
hda_nid_t nid;
if (!spec->gen.mixer_nid)
return 0;
nums = snd_hda_get_connections(codec, spec->gen.mixer_nid, conn,
ARRAY_SIZE(conn) - 1);
fo... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_via.c | static int patch_vt1718S(struct hda_codec *codec) {
struct via_spec *spec;
int err;
spec = via_new_spec(codec);
if (spec == NULL)
return -ENOMEM;
spec->gen.mixer_nid = 0x21;
override_mic_boost(codec, 0x2b, 0, 3, 40);
override_mic_boost(codec, 0x29, 0, 3, 40);
add_secret_dac_path(codec);
err = s... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_via.c |
static int vt1716s_dmic_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
int index = 0;
index = snd_hda_codec_read(codec, 0x26, 0, AC_VERB_GET_CONNECT_SEL, 0);
if (index != -1)
*ucontrol->value.inte... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_via.c |
static void via_fixup_intmic_boost(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
if (action == HDA_FIXUP_ACT_PRE_PROBE)
override_mic_boost(codec, 0x30, 0, 2, 40);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_via.c | static void fix_vt1802_connections(struct hda_codec *codec) {
static const hda_nid_t conn_24[] = {0x14, 0x1c};
static const hda_nid_t conn_33[] = {0x1c};
snd_hda_override_conn_list(codec, 0x24, ARRAY_SIZE(conn_24), conn_24);
snd_hda_override_conn_list(codec, 0x33, ARRAY_SIZE(conn_33), conn_33);
} | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.