|
@@ -417,9 +417,11 @@ static void stac_update_outputs(struct hda_codec *codec)
|
|
|
val &= ~spec->eapd_mask;
|
|
|
else
|
|
|
val |= spec->eapd_mask;
|
|
|
- if (spec->gpio_data != val)
|
|
|
+ if (spec->gpio_data != val) {
|
|
|
+ spec->gpio_data = val;
|
|
|
stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir,
|
|
|
val);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -3612,20 +3614,18 @@ static int stac_parse_auto_config(struct hda_codec *codec)
|
|
|
static int stac_init(struct hda_codec *codec)
|
|
|
{
|
|
|
struct sigmatel_spec *spec = codec->spec;
|
|
|
- unsigned int gpio;
|
|
|
int i;
|
|
|
|
|
|
/* override some hints */
|
|
|
stac_store_hints(codec);
|
|
|
|
|
|
/* set up GPIO */
|
|
|
- gpio = spec->gpio_data;
|
|
|
/* turn on EAPD statically when spec->eapd_switch isn't set.
|
|
|
* otherwise, unsol event will turn it on/off dynamically
|
|
|
*/
|
|
|
if (!spec->eapd_switch)
|
|
|
- gpio |= spec->eapd_mask;
|
|
|
- stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, gpio);
|
|
|
+ spec->gpio_data |= spec->eapd_mask;
|
|
|
+ stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, spec->gpio_data);
|
|
|
|
|
|
snd_hda_gen_init(codec);
|
|
|
|
|
@@ -3915,6 +3915,7 @@ static void stac_setup_gpio(struct hda_codec *codec)
|
|
|
{
|
|
|
struct sigmatel_spec *spec = codec->spec;
|
|
|
|
|
|
+ spec->gpio_mask |= spec->eapd_mask;
|
|
|
if (spec->gpio_led) {
|
|
|
if (!spec->vref_mute_led_nid) {
|
|
|
spec->gpio_mask |= spec->gpio_led;
|