{
struct sigmatel_spec *spec = codec->spec;
- if (action != HDA_FIXUP_ACT_PRE_PROBE)
+ if (action != HDA_FIXUP_ACT_PROBE)
return;
spec->hp_detect = 0;
}
case HDA_FIXUP_ACT_PRE_PROBE:
snd_hda_codec_set_pincfg(codec, 0x0d, 0x90170010);
stac92xx_auto_set_pinctl(codec, 0x0d, AC_PINCTL_OUT_EN);
+ break;
+
+ case HDA_FIXUP_ACT_PROBE:
/* HP dv6 gives the headphone pin as a line-out. Thus we
* need to set hp_detect flag here to force to enable HP
* detection.
*/
spec->hp_detect = 1;
- break;
-
- case HDA_FIXUP_ACT_PROBE:
/* enable bass on HP dv7 */
cap = snd_hda_param_read(codec, 0x1, AC_PAR_GPIO_CAP);
cap &= AC_GPIO_IO_COUNT;
}
}
- if (find_mute_led_cfg(codec, 1))
+ if (find_mute_led_cfg(codec, spec->default_polarity))
snd_printd("mute LED gpio %d polarity %d\n",
spec->gpio_led,
spec->gpio_led_polarity);
spec->dmic_nids)) < 0)
return err;
if (! spec->autocfg.line_outs)
- return 0; /* can't find valid pin config */
+ return -EINVAL; /* can't find valid pin config */
/* If we have no real line-out pin and multiple hp-outs, HPs should
* be set up as multi-channel outputs.
spec->dinput_mux = &spec->private_dimux;
spec->sinput_mux = &spec->private_smux;
spec->mono_mux = &spec->private_mono_mux;
- return 1;
+ return 0;
}
/* add playback controls for HP output */
spec->input_mux = &spec->private_imux;
spec->dinput_mux = &spec->private_dimux;
- return 1;
+ return 0;
}
/*
snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
err = stac92xx_parse_auto_config(codec);
- if (!err)
- err = -EINVAL;
if (err < 0) {
stac92xx_free(codec);
return err;
snd_hda_add_verbs(codec, stac92hd73xx_core_init);
err = stac92xx_parse_auto_config(codec);
-
- if (!err)
- err = -EINVAL;
if (err < 0) {
stac92xx_free(codec);
return err;
stac_setup_gpio(codec);
err = stac92xx_parse_auto_config(codec);
- if (!err)
- err = -EINVAL;
if (err < 0) {
stac92xx_free(codec);
return err;
spec->num_dmuxes = ARRAY_SIZE(stac92hd71bxx_dmux_nids);
spec->num_smuxes = stac92hd71bxx_connected_smuxes(codec, 0x1e);
+ spec->multiout.dac_nids = spec->dac_nids;
+ spec->default_polarity = 1;
+
snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
stac_setup_gpio(codec);
- spec->multiout.dac_nids = spec->dac_nids;
-
err = stac92xx_parse_auto_config(codec);
- if (!err)
- err = -EINVAL;
if (err < 0) {
stac92xx_free(codec);
return err;
snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
err = stac92xx_parse_auto_config(codec);
- if (!err)
- err = -EINVAL;
if (err < 0) {
stac92xx_free(codec);
return err;
spec->aloopback_shift = 0;
spec->eapd_switch = 1;
+ snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
+
if (!spec->volknob_init)
snd_hda_add_verbs(codec, stac927x_core_init);
- snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
-
err = stac92xx_parse_auto_config(codec);
- if (!err)
- err = -EINVAL;
if (err < 0) {
stac92xx_free(codec);
return err;
snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
err = stac92xx_parse_auto_config(codec);
- if (!err)
- err = -EINVAL;
if (err < 0) {
stac92xx_free(codec);
return err;