static void cxt_fixup_olpc_xo(struct hda_codec *codec, const struct hda_fixup *fix, int action) { struct conexant_spec *spec = codec->spec; int i; if (action != HDA_FIXUP_ACT_PROBE) return; spec->gen.mic_autoswitch_hook = olpc_xo_automic; spec->gen.pcm_capture_hook = olpc_xo_capture_hook; spec->dc_mode_path = snd_hda_add_new_path(codec, 0x1e, 0x14, 0); snd_hda_add_new_ctls(codec, olpc_xo_mixers); /* OLPC's microphone port is DC coupled for use with external sensors, * therefore we use a 50% mic bias in order to center the input signal * with the DC input range of the codec. */ snd_hda_codec_set_pin_target(codec, 0x1a, PIN_VREF50); /* override mic boost control */ for (i = 0; i < spec->gen.kctls.used; i++) { struct snd_kcontrol_new *kctl = snd_array_elem(&spec->gen.kctls, i); if (!strcmp(kctl->name, "Mic Boost Volume")) { kctl->put = olpc_xo_mic_boost_put; break; } } }
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); } }
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); } }