driver seem hardcode to use first pin spec->gen.autocfg.hp_pins[0] as hp of the headset
and imux_pin to determine the selected mic
this mean that if you set the correct pin default of headset mic (headset mic phantom jack)
you can select internal mic, headset mic or mic jack manually using the capture source control
static void alc_update_headset_mode(struct hda_codec *codec) { struct alc_spec *spec = codec->spec;
hda_nid_t mux_pin = spec->gen.imux_pins[spec->gen.cur_mux[0]]; hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0];
int new_headset_mode;
if (!snd_hda_jack_detect(codec, hp_pin)) new_headset_mode = ALC_HEADSET_MODE_UNPLUGGED; else if (mux_pin == spec->headset_mic_pin) new_headset_mode = ALC_HEADSET_MODE_HEADSET; else if (mux_pin == spec->headphone_mic_pin) new_headset_mode = ALC_HEADSET_MODE_MIC; else new_headset_mode = ALC_HEADSET_MODE_HEADPHONE;
driver seem hardcode to use first pin spec->gen. autocfg. hp_pins[ 0] as hp of the headset
and imux_pin to determine the selected mic
this mean that if you set the correct pin default of headset mic (headset mic phantom jack)
you can select internal mic, headset mic or mic jack manually using the capture source control
static void alc_update_ headset_ mode(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;
hda_nid_t mux_pin = spec->gen. imux_pins[ spec->gen. cur_mux[ 0]]; autocfg. hp_pins[ 0];
hda_nid_t hp_pin = spec->gen.
int new_headset_mode;
if (!snd_hda_ jack_detect( codec, hp_pin)) MODE_UNPLUGGED; mic_pin) MODE_HEADSET; _mic_pin) MODE_MIC; MODE_HEADPHONE;
new_headset_mode = ALC_HEADSET_
else if (mux_pin == spec->headset_
new_headset_mode = ALC_HEADSET_
else if (mux_pin == spec->headphone
new_headset_mode = ALC_HEADSET_
else
new_headset_mode = ALC_HEADSET_