|
@@ -2834,7 +2834,7 @@ static hda_nid_t check_line_out_switch(struct hda_codec *codec)
|
|
if (cfg->line_out_type != AUTO_PIN_LINE_OUT)
|
|
if (cfg->line_out_type != AUTO_PIN_LINE_OUT)
|
|
return 0;
|
|
return 0;
|
|
for (i = 0; i < cfg->num_inputs; i++) {
|
|
for (i = 0; i < cfg->num_inputs; i++) {
|
|
- if (cfg->inputs[i].type == AUTO_PIN_LINE) {
|
|
|
|
|
|
+ if (cfg->inputs[i].type == AUTO_PIN_LINE_IN) {
|
|
nid = cfg->inputs[i].pin;
|
|
nid = cfg->inputs[i].pin;
|
|
pincap = snd_hda_query_pin_caps(codec, nid);
|
|
pincap = snd_hda_query_pin_caps(codec, nid);
|
|
if (pincap & AC_PINCAP_OUT)
|
|
if (pincap & AC_PINCAP_OUT)
|
|
@@ -2852,16 +2852,14 @@ static hda_nid_t check_mic_out_switch(struct hda_codec *codec, hda_nid_t *dac)
|
|
struct sigmatel_spec *spec = codec->spec;
|
|
struct sigmatel_spec *spec = codec->spec;
|
|
struct auto_pin_cfg *cfg = &spec->autocfg;
|
|
struct auto_pin_cfg *cfg = &spec->autocfg;
|
|
unsigned int def_conf, pincap;
|
|
unsigned int def_conf, pincap;
|
|
- int i, mic_type;
|
|
|
|
|
|
+ int i;
|
|
|
|
|
|
*dac = 0;
|
|
*dac = 0;
|
|
if (cfg->line_out_type != AUTO_PIN_LINE_OUT)
|
|
if (cfg->line_out_type != AUTO_PIN_LINE_OUT)
|
|
return 0;
|
|
return 0;
|
|
- mic_type = AUTO_PIN_MIC;
|
|
|
|
- again:
|
|
|
|
for (i = 0; i < cfg->num_inputs; i++) {
|
|
for (i = 0; i < cfg->num_inputs; i++) {
|
|
hda_nid_t nid = cfg->inputs[i].pin;
|
|
hda_nid_t nid = cfg->inputs[i].pin;
|
|
- if (cfg->inputs[i].type != mic_type)
|
|
|
|
|
|
+ if (cfg->inputs[i].type != AUTO_PIN_MIC)
|
|
continue;
|
|
continue;
|
|
def_conf = snd_hda_codec_get_pincfg(codec, nid);
|
|
def_conf = snd_hda_codec_get_pincfg(codec, nid);
|
|
/* some laptops have an internal analog microphone
|
|
/* some laptops have an internal analog microphone
|
|
@@ -2875,10 +2873,6 @@ static hda_nid_t check_mic_out_switch(struct hda_codec *codec, hda_nid_t *dac)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (mic_type == AUTO_PIN_MIC) {
|
|
|
|
- mic_type = AUTO_PIN_FRONT_MIC;
|
|
|
|
- goto again;
|
|
|
|
- }
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3222,7 +3216,7 @@ static int stac92xx_auto_create_multi_out_ctls(struct hda_codec *codec,
|
|
}
|
|
}
|
|
|
|
|
|
for (idx = 0; idx < cfg->num_inputs; idx++) {
|
|
for (idx = 0; idx < cfg->num_inputs; idx++) {
|
|
- if (cfg->inputs[idx].type > AUTO_PIN_FRONT_LINE)
|
|
|
|
|
|
+ if (cfg->inputs[idx].type > AUTO_PIN_LINE_IN)
|
|
break;
|
|
break;
|
|
nid = cfg->inputs[idx].pin;
|
|
nid = cfg->inputs[idx].pin;
|
|
err = stac92xx_add_jack_mode_control(codec, nid, idx);
|
|
err = stac92xx_add_jack_mode_control(codec, nid, idx);
|
|
@@ -3621,7 +3615,7 @@ static int set_mic_route(struct hda_codec *codec,
|
|
if (pin == cfg->inputs[i].pin)
|
|
if (pin == cfg->inputs[i].pin)
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
- if (i < cfg->num_inputs && cfg->inputs[i].type <= AUTO_PIN_FRONT_MIC) {
|
|
|
|
|
|
+ if (i < cfg->num_inputs && cfg->inputs[i].type == AUTO_PIN_MIC) {
|
|
/* analog pin */
|
|
/* analog pin */
|
|
i = get_connection_index(codec, spec->mux_nids[0], pin);
|
|
i = get_connection_index(codec, spec->mux_nids[0], pin);
|
|
if (i < 0)
|
|
if (i < 0)
|
|
@@ -3656,7 +3650,7 @@ static int stac_check_auto_mic(struct hda_codec *codec)
|
|
int i;
|
|
int i;
|
|
|
|
|
|
for (i = 0; i < cfg->num_inputs; i++) {
|
|
for (i = 0; i < cfg->num_inputs; i++) {
|
|
- if (cfg->inputs[i].type >= AUTO_PIN_LINE)
|
|
|
|
|
|
+ if (cfg->inputs[i].type >= AUTO_PIN_LINE_IN)
|
|
return 0; /* must be exclusively mics */
|
|
return 0; /* must be exclusively mics */
|
|
}
|
|
}
|
|
fixed = ext = 0;
|
|
fixed = ext = 0;
|
|
@@ -4394,7 +4388,7 @@ static int stac92xx_init(struct hda_codec *codec)
|
|
hda_nid_t nid = cfg->inputs[i].pin;
|
|
hda_nid_t nid = cfg->inputs[i].pin;
|
|
int type = cfg->inputs[i].type;
|
|
int type = cfg->inputs[i].type;
|
|
unsigned int pinctl, conf;
|
|
unsigned int pinctl, conf;
|
|
- if (type == AUTO_PIN_MIC || type == AUTO_PIN_FRONT_MIC) {
|
|
|
|
|
|
+ if (type == AUTO_PIN_MIC) {
|
|
/* for mic pins, force to initialize */
|
|
/* for mic pins, force to initialize */
|
|
pinctl = stac92xx_get_default_vref(codec, nid);
|
|
pinctl = stac92xx_get_default_vref(codec, nid);
|
|
pinctl |= AC_PINCTL_IN_EN;
|
|
pinctl |= AC_PINCTL_IN_EN;
|