unsigned int cur_eapd;
unsigned int hp_present;
unsigned int auto_mic;
- int auto_mic_ext; /* autocfg.inputs[] index for ext mic */
+ int auto_mic_ext; /* imux_pins[] index for ext mic */
unsigned int need_dac_fix;
hda_nid_t slave_dig_outs[2];
struct auto_pin_cfg autocfg;
struct hda_input_mux private_imux;
hda_nid_t imux_adcs[HDA_MAX_NUM_INPUTS];
+ hda_nid_t imux_pins[HDA_MAX_NUM_INPUTS];
hda_nid_t private_dac_nids[AUTO_CFG_MAX_OUTS];
struct pin_dac_pair dac_info[8];
int dac_info_filled;
static void cx_auto_automic(struct hda_codec *codec)
{
struct conexant_spec *spec = codec->spec;
- struct auto_pin_cfg *cfg = &spec->autocfg;
int ext_idx = spec->auto_mic_ext;
if (!spec->auto_mic)
return;
- if (snd_hda_jack_detect(codec, cfg->inputs[ext_idx].pin))
+ if (snd_hda_jack_detect(codec, spec->imux_pins[ext_idx]))
cx_auto_mux_enum_update(codec, &spec->private_imux, ext_idx);
else
cx_auto_mux_enum_update(codec, &spec->private_imux, !ext_idx);
static void cx_auto_check_auto_mic(struct hda_codec *codec)
{
struct conexant_spec *spec = codec->spec;
- struct auto_pin_cfg *cfg = &spec->autocfg;
- if (is_ext_mic(codec, cfg->inputs[0].pin) &&
- is_int_mic(codec, cfg->inputs[1].pin)) {
+ if (is_ext_mic(codec, spec->imux_pins[0]) &&
+ is_int_mic(codec, spec->imux_pins[1])) {
spec->auto_mic = 1;
spec->auto_mic_ext = 0;
return;
}
- if (is_int_mic(codec, cfg->inputs[0].pin) &&
- is_ext_mic(codec, cfg->inputs[1].pin)) {
+ if (is_int_mic(codec, spec->imux_pins[0]) &&
+ is_ext_mic(codec, spec->imux_pins[1])) {
spec->auto_mic = 1;
spec->auto_mic_ext = 1;
return;
if (idx >= 0) {
const char *label;
label = hda_get_autocfg_input_label(codec, cfg, i);
+ spec->imux_adcs[imux->num_items] = adc;
+ spec->imux_pins[imux->num_items] =
+ cfg->inputs[i].pin;
snd_hda_add_imux_item(imux, label, idx, NULL);
- spec->imux_adcs[i] = adc;
break;
}
}