struct hda_codec *codec;
list_for_each_entry(codec, &bus->codec_list, list) {
+ if (codec->patch_ops.pre_resume)
+ codec->patch_ops.pre_resume(codec);
if (snd_hda_codec_needs_resume(codec))
hda_call_codec_resume(codec);
}
int (*check_power_status)(struct hda_codec *codec, hda_nid_t nid);
#endif
void (*reboot_notify)(struct hda_codec *codec);
+#ifdef SND_HDA_NEEDS_RESUME
+ int (*pre_resume)(struct hda_codec *codec);
+#endif
};
/* record for amp information cache */
#endif
#ifdef SND_HDA_NEEDS_RESUME
+static int stac92xx_pre_resume(struct hda_codec *codec)
+{
+ struct sigmatel_spec *spec = codec->spec;
+
+ /* sync mute LED */
+ if (spec->gpio_led)
+ stac_gpio_set(codec, spec->gpio_mask,
+ spec->gpio_dir, spec->gpio_data);
+ return 0;
+}
+
static int stac92xx_resume(struct hda_codec *codec)
{
struct sigmatel_spec *spec = codec->spec;
#ifdef SND_HDA_NEEDS_RESUME
.suspend = stac92xx_suspend,
.resume = stac92xx_resume,
+ .pre_resume = stac92xx_pre_resume,
#endif
.reboot_notify = stac92xx_shutup,
};