22 Feb
2016
22 Feb
'16
3:10 a.m.
+#ifdef CONFIG_PM +static int hdmi_codec_resume(struct snd_soc_codec *codec) +{
- struct hdac_ext_device *edev = snd_soc_codec_get_drvdata(codec);
- struct hdac_hdmi_priv *hdmi = edev->private_data;
- struct hdac_hdmi_pin *pin;
- struct hdac_device *hdac = &edev->hdac;
- struct hdac_bus *bus = hdac->bus;
- int err;
- hdac_hdmi_skl_enable_all_pins(&edev->hdac);
- hdac_hdmi_skl_enable_dp12(&edev->hdac);
- /* Power up afg */
- if (!snd_hdac_check_power_state(hdac, hdac->afg, AC_PWRST_D0))
snd_hdac_codec_write(hdac, hdac->afg, 0,
AC_VERB_SET_POWER_STATE, AC_PWRST_D0);
You don't have to wait for D0 power up unlike runtime resume?
Didn't see any issue yet. But yes, we should wait.
- /*
* As the ELD notify callback request is not entertained while the
* device is in suspend state. Need to manually check detection of
* all pins here.
*/
- list_for_each_entry(pin, &hdmi->pin_list, head)
hdac_hdmi_present_sense(pin, 1);
- /* Codec power is turned ON during controller resume */
- err = snd_hdac_display_power(bus, false);
- if (err < 0) {
dev_err(bus->dev, "Cannot turn on display power on i915\n");
Make clear whether you're turning on or off...
Will fix it.
Takashi
--