···110111 unsigned int dell_automute;112 unsigned int port_d_mode;0113};114115static int conexant_playback_pcm_open(struct hda_pcm_stream *hinfo,···1928static hda_nid_t cxt5066_capsrc_nids[1] = { 0x17 };1929#define CXT5066_SPDIF_OUT 0x211930000001931static struct hda_channel_mode cxt5066_modes[1] = {1932 { 2, NULL },1933};···1986/* toggle input of built-in and mic jack appropriately */1987static void cxt5066_automic(struct hda_codec *codec)1988{1989- static struct hda_verb ext_mic_present[] = {01990 /* enable external mic, port B */1991- {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},19921993 /* switch to external mic input */1994 {0x17, AC_VERB_SET_CONNECT_SEL, 0},···2242 {0x19, AC_VERB_SET_CONNECT_SEL, 0x00}, /* DAC1 */22432244 /* Port B: external microphone */2245- {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},22462247 /* Port C: internal microphone */2248 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},···2360 spec->input_mux = &cxt5066_capture_source;23612362 spec->port_d_mode = PIN_HP;023632364 spec->num_init_verbs = 1;2365 spec->init_verbs[0] = cxt5066_init_verbs;···2392 spec->mixers[spec->num_mixers++] = cxt5066_mixer_master_olpc;2393 spec->mixers[spec->num_mixers++] = cxt5066_mixers;2394 spec->port_d_mode = 0;023952396 /* no S/PDIF out */2397 spec->multiout.dig_out_nid = 0;
···110111 unsigned int dell_automute;112 unsigned int port_d_mode;113+ unsigned char ext_mic_bias;114};115116static int conexant_playback_pcm_open(struct hda_pcm_stream *hinfo,···1927static hda_nid_t cxt5066_capsrc_nids[1] = { 0x17 };1928#define CXT5066_SPDIF_OUT 0x2119291930+/* OLPC's microphone port is DC coupled for use with external sensors,1931+ * therefore we use a 50% mic bias in order to center the input signal with1932+ * the DC input range of the codec. */1933+#define CXT5066_OLPC_EXT_MIC_BIAS PIN_VREF501934+1935static struct hda_channel_mode cxt5066_modes[1] = {1936 { 2, NULL },1937};···1980/* toggle input of built-in and mic jack appropriately */1981static void cxt5066_automic(struct hda_codec *codec)1982{1983+ struct conexant_spec *spec = codec->spec;1984+ struct hda_verb ext_mic_present[] = {1985 /* enable external mic, port B */1986+ {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, spec->ext_mic_bias},19871988 /* switch to external mic input */1989 {0x17, AC_VERB_SET_CONNECT_SEL, 0},···2235 {0x19, AC_VERB_SET_CONNECT_SEL, 0x00}, /* DAC1 */22362237 /* Port B: external microphone */2238+ {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, CXT5066_OLPC_EXT_MIC_BIAS},22392240 /* Port C: internal microphone */2241 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},···2353 spec->input_mux = &cxt5066_capture_source;23542355 spec->port_d_mode = PIN_HP;2356+ spec->ext_mic_bias = PIN_VREF80;23572358 spec->num_init_verbs = 1;2359 spec->init_verbs[0] = cxt5066_init_verbs;···2384 spec->mixers[spec->num_mixers++] = cxt5066_mixer_master_olpc;2385 spec->mixers[spec->num_mixers++] = cxt5066_mixers;2386 spec->port_d_mode = 0;2387+ spec->ext_mic_bias = CXT5066_OLPC_EXT_MIC_BIAS;23882389 /* no S/PDIF out */2390 spec->multiout.dig_out_nid = 0;