示例#1
0
/* mic_autoswitch hook */
static void olpc_xo_automic(struct hda_codec *codec,
			    struct hda_jack_callback *jack)
{
	struct conexant_spec *spec = codec->spec;

	/* in DC mode, we don't handle automic */
	if (!spec->dc_enable)
		snd_hda_gen_mic_autoswitch(codec, jack);
	olpc_xo_update_mic_pins(codec);
	if (spec->dc_enable)
		olpc_xo_update_mic_boost(codec);
}
示例#2
0
/* mic_autoswitch hook */
static void olpc_xo_automic(struct hda_codec *codec, struct hda_jack_tbl *jack)
{
	struct conexant_spec *spec = codec->spec;
	int saved_cached_write = codec->cached_write;

	codec->cached_write = 1;
	/* in DC mode, we don't handle automic */
	if (!spec->dc_enable)
		snd_hda_gen_mic_autoswitch(codec, jack);
	olpc_xo_update_mic_pins(codec);
	snd_hda_codec_flush_cache(codec);
	codec->cached_write = saved_cached_write;
	if (spec->dc_enable)
		olpc_xo_update_mic_boost(codec);
}