Miscellany
public text v1 · immutable/* toggle speaker-output according to the hp-jack state */
static void alc861vd_lenovo_hp_automute(struct hda_codec *codec)
{
unsigned int present;
unsigned char bits;
present = snd_hda_codec_read(codec, 0x1b, 0,
AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
bits = present ? 0x80 : 0;
snd_hda_codec_amp_update(codec, 0x14, 0, HDA_OUTPUT, 0,
0x80, bits);
snd_hda_codec_amp_update(codec, 0x14, 1, HDA_OUTPUT, 0,
0x80, bits);
}