ALSA: hda - Use init callback in stac92xx_resume()
Call the init callback and remove duplicated codes in stac92xx_resume(). This also fixes the missing initialization such as digital I/O pins. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -4142,17 +4142,13 @@ static int stac92xx_resume(struct hda_codec *codec)
|
|||||||
struct sigmatel_spec *spec = codec->spec;
|
struct sigmatel_spec *spec = codec->spec;
|
||||||
|
|
||||||
stac92xx_set_config_regs(codec);
|
stac92xx_set_config_regs(codec);
|
||||||
snd_hda_sequence_write(codec, spec->init);
|
stac92xx_init(codec);
|
||||||
stac_gpio_set(codec, spec->gpio_mask,
|
|
||||||
spec->gpio_dir, spec->gpio_data);
|
|
||||||
snd_hda_codec_resume_amp(codec);
|
snd_hda_codec_resume_amp(codec);
|
||||||
snd_hda_codec_resume_cache(codec);
|
snd_hda_codec_resume_cache(codec);
|
||||||
/* power down inactive DACs */
|
/* fake event to set up pins again to override cached values */
|
||||||
if (spec->dac_list)
|
|
||||||
stac92xx_power_down(codec);
|
|
||||||
/* invoke unsolicited event to reset the HP state */
|
|
||||||
if (spec->hp_detect)
|
if (spec->hp_detect)
|
||||||
codec->patch_ops.unsol_event(codec, STAC_HP_EVENT << 26);
|
codec->patch_ops.unsol_event(codec,
|
||||||
|
(STAC_HP_EVENT | spec->autocfg.hp_pins[0]) << 26);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user