static int cs421x_init(struct hda_codec *codec) { struct cs_spec *spec = codec->spec; if (spec->vendor_nid == CS4210_VENDOR_NID) { snd_hda_sequence_write(codec, cs421x_coef_init_verbs); snd_hda_sequence_write(codec, cs421x_coef_init_verbs_A1_silicon_fixes); cs4210_pinmux_init(codec); } snd_hda_gen_init(codec); if (spec->gpio_mask) { snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_MASK, spec->gpio_mask); snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DIRECTION, spec->gpio_dir); snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, spec->gpio_data); } init_input_coef(codec); cs4210_spdif_automute(codec, NULL); return 0; }
static int cs_init(struct hda_codec *codec) { struct cs_spec *spec = codec->spec; if (spec->vendor_nid == CS420X_VENDOR_NID) { /* init_verb sequence for C0/C1/C2 errata*/ snd_hda_sequence_write(codec, cs_errata_init_verbs); snd_hda_sequence_write(codec, cs_coef_init_verbs); } else if (spec->vendor_nid == CS4208_VENDOR_NID) { snd_hda_sequence_write(codec, cs4208_coef_init_verbs); } snd_hda_gen_init(codec); if (spec->gpio_mask) { snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_MASK, spec->gpio_mask); snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DIRECTION, spec->gpio_dir); snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, spec->gpio_data); } if (spec->vendor_nid == CS420X_VENDOR_NID) { init_input_coef(codec); init_digital_coef(codec); } return 0; }
static int cmi9880_init(struct hda_codec *codec) { struct cmi_spec *spec = codec->spec; if (spec->board_config == CMI_ALLOUT) snd_hda_sequence_write(codec, cmi9880_allout_init); else snd_hda_sequence_write(codec, cmi9880_basic_init); if (spec->board_config == CMI_AUTO) snd_hda_sequence_write(codec, spec->multi_init); return 0; }
void snd_hda_apply_verbs(struct hda_codec *codec) { int i; for (i = 0; i < codec->verbs.used; i++) { struct hda_verb **v = snd_array_elem(&codec->verbs, i); snd_hda_sequence_write(codec, *v); } }
/* * initialization (common callbacks) */ static int ad198x_init(struct hda_codec *codec) { struct ad198x_spec *spec = codec->spec; int i; for (i = 0; i < spec->num_init_verbs; i++) snd_hda_sequence_write(codec, spec->init_verbs[i]); return 0; }
void snd_hda_gen_apply_verbs(struct hda_codec *codec) { struct hda_gen_spec *spec = codec->spec; int i; for (i = 0; i < spec->verbs.used; i++) { struct hda_verb **v = snd_array_elem(&spec->verbs, i); snd_hda_sequence_write(codec, *v); } }
static int atihdmi_init(struct hda_codec *codec) { snd_hda_sequence_write(codec, atihdmi_basic_init); /* SI codec requires to unmute the pin */ if (get_wcaps(codec, PIN_NID) & AC_WCAP_OUT_AMP) snd_hda_codec_write(codec, PIN_NID, 0, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); return 0; }
/* toggle input of built-in and mic jack appropriately */ static void cxt5045_hp_automic(struct hda_codec *codec) { static struct hda_verb mic_jack_on[] = { {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, {0x12, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, {} }; static struct hda_verb mic_jack_off[] = { {0x12, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080}, {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000}, {} }; unsigned int present; present = snd_hda_codec_read(codec, 0x12, 0, AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; if (present) snd_hda_sequence_write(codec, mic_jack_on); else snd_hda_sequence_write(codec, mic_jack_off); }
static int nvhdmi_init(struct hda_codec *codec) { struct hdmi_spec *spec = codec->spec; int i; if ((spec->codec_type == HDA_CODEC_NVIDIA_MCP89) || (spec->codec_type == HDA_CODEC_NVIDIA_GT21X)) { for (i = 0; spec->pin[i]; i++) { hdmi_enable_output(codec, spec->pin[i]); snd_hda_codec_write(codec, spec->pin[i], 0, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | spec->pin[i]); } } else { snd_hda_sequence_write(codec, nvhdmi_basic_init_7x); } return 0; }
static int via_init(struct hda_codec *codec) { struct via_spec *spec = codec->spec; snd_hda_sequence_write(codec, spec->init_verbs); return 0; }
static int nvhdmi_init(struct hda_codec *codec) { snd_hda_sequence_write(codec, nvhdmi_basic_init); return 0; }