ASoC: intel: skl: Fix display power regression
authorTakashi Iwai <tiwai@suse.de>
Tue, 8 Jan 2019 10:37:31 +0000 (11:37 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 14 Jan 2019 18:06:29 +0000 (19:06 +0100)
commit687ae9e287b3a1a71e5e1c2a9c96b23d70768821
tree5ff281255c9ca13e6f312c65d84a9c34e57c2ebb
parent82aa0d7e09840704d9a37434fef1770179d663fb
ASoC: intel: skl: Fix display power regression

Since the refactoring of HD-audio display power management, the
display power status is managed per domain.  Meanwhile the ASoC
hdac_hdmi driver still keeps and relies (incorrectly) on the
refcounting together with ASoC skl driver, and this leads to the
display state always on.

This patch is an attempt to address the regression by simplifying the
PM code of ASoC skl and hdac_hdmi drivers.  Basically, since the
refactoring, we don't have to manage the display power at HD-audio
controller suspend / resume but only at HD-audio HDMI codec suspend /
resume.  So the patch drops the superfluous snd_hdac_display_power()
calls in skl driver.

Meanwhile, in hdac_hdmi side, we rewrite the PM call just to re-use
the runtime PM callbacks like other drivers do.  Now the logic is
simple: turn off at suspend and turn on at resume.

The patch also fixes the possibly missing display-power off at skl
driver removal as well as some error paths at probe.

Fixes: 029d92c289bd ("ALSA: hda: Refactor display power management")
Reported-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/soc/codecs/hdac_hdmi.c
sound/soc/intel/skylake/skl.c