Comment 69 for bug 1302090

Revision history for this message
Raymond (superquad-vortex2) wrote :

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;