Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: hdac_hdmi: Fix to use dev_pm ops instead soc pm

Use dev_pm ops feature instead of soc pm as core assumes system
is capable of direct complete. Register with complete callback
instead of resume to synchronize with Jack notification from
display driver. This ensures correct Jack notification to user
space.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Subhransu S. Prusty and committed by
Mark Brown
0fee1798 f55532a0

+4 -7
+4 -7
sound/soc/codecs/hdac_hdmi.c
··· 1420 1420 } 1421 1421 1422 1422 #ifdef CONFIG_PM 1423 - static int hdmi_codec_resume(struct snd_soc_codec *codec) 1423 + static void hdmi_codec_complete(struct device *dev) 1424 1424 { 1425 - struct hdac_ext_device *edev = snd_soc_codec_get_drvdata(codec); 1425 + struct hdac_ext_device *edev = to_hda_ext_device(dev); 1426 1426 struct hdac_hdmi_priv *hdmi = edev->private_data; 1427 1427 struct hdac_hdmi_pin *pin; 1428 1428 struct hdac_device *hdac = &edev->hdac; ··· 1464 1464 dev_err(bus->dev, 1465 1465 "Cannot turn OFF display power on i915, err: %d\n", 1466 1466 err); 1467 - return err; 1468 1467 } 1469 - 1470 - return 0; 1471 1468 } 1472 1469 #else 1473 - #define hdmi_codec_resume NULL 1470 + #define hdmi_codec_complete NULL 1474 1471 #endif 1475 1472 1476 1473 static struct snd_soc_codec_driver hdmi_hda_codec = { 1477 1474 .probe = hdmi_codec_probe, 1478 1475 .remove = hdmi_codec_remove, 1479 - .resume = hdmi_codec_resume, 1480 1476 .idle_bias_off = true, 1481 1477 }; 1482 1478 ··· 1625 1629 1626 1630 static const struct dev_pm_ops hdac_hdmi_pm = { 1627 1631 SET_RUNTIME_PM_OPS(hdac_hdmi_runtime_suspend, hdac_hdmi_runtime_resume, NULL) 1632 + .complete = hdmi_codec_complete, 1628 1633 }; 1629 1634 1630 1635 static const struct hda_device_id hdmi_list[] = {