]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda - Manage power well properly for resume
authorTakashi Iwai <tiwai@suse.de>
Thu, 4 Aug 2016 20:38:36 +0000 (22:38 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 10 Aug 2016 13:05:17 +0000 (15:05 +0200)
commitb7431bf9d92cf77eec02071cbb166579832fcfe7
tree1690217f584b284eb714a7509c3a7f0f9d3bba68
parentb0907f7894c67c36400523a432c0e7f80c6ec3bc
ALSA: hda - Manage power well properly for resume

For SKL and later Intel chips, we control the power well per codec
basis via link_power callback since the commit [c1948b6450d2: ALSA:
hda - remove dependency on i915 power well for SKL].
However, there are a few exceptional cases where the gfx registers are
accessed from the audio driver: namely the wakeup override bit
toggling at (both system and runtime) resume.  This seems causing a
kernel warning when accessed during the power well down (and likely
resulting in the bogus register accesses).

This patch puts the proper power up / down sequence around the resume
code so that the wakeup bit is fiddled properly while the power is
up.  (The other callback, sync_audio_rate, is used only in the PCM
callback, so it's guaranteed in the power-on.)

Also, by this proper power up/down, the instantaneous flip of wakeup
bit in the resume callback that was introduced by the commit
[c92cb1a62789: ALSA: hda - Fix Skylake codec timeout] becomes
superfluous, as snd_hdac_display_power() already does it.  So we can
clean it up together.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96214
Fixes: c1948b6450d2 ('ALSA: hda - remove dependency on i915 power well for SKL')
Cc: <stable@vger.kernel.org> # v4.2+
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_intel.c