remarkable-linux/sound/pci/hda
Lukas Wunner 009f8c90f5 ALSA: hda - Fix runtime PM
Before commit 3b5b899ca6 ("ALSA: hda: Make use of core codec functions
to sync power state"), hda_set_power_state() returned the response to
the Get Power State verb, a 32-bit unsigned integer whose expected value
is 0x233 after transitioning a codec to D3, and 0x0 after transitioning
it to D0.

The response value is significant because hda_codec_runtime_suspend()
does not clear the codec's bit in the codec_powered bitmask unless the
AC_PWRST_CLK_STOP_OK bit (0x200) is set in the response value.  That in
turn prevents the HDA controller from runtime suspending because
azx_runtime_idle() checks that the codec_powered bitmask is zero.

Since commit 3b5b899ca6, hda_set_power_state() only returns 0x0 or
0x1, thereby breaking runtime PM for any HDA controller.  That's because
an inline function introduced by the commit returns a bool instead of a
32-bit unsigned int.  The change was likely erroneous and resulted from
copying and pasting snd_hda_check_power_state(), which is immediately
preceding the newly introduced inline function.  Fix it.

Link: https://bugs.freedesktop.org/show_bug.cgi?id=106597
Fixes: 3b5b899ca6 ("ALSA: hda: Make use of core codec functions to sync power state")
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Abhijeet Kumar <abhijeet.kumar@intel.com>
Reported-and-tested-by: Gunnar Krüger <taijian@posteo.de>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-24 20:16:47 +02:00
..
ca0132_regs.h
dell_wmi_helper.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hda_auto_parser.c
hda_auto_parser.h
hda_beep.c ALSA: hda-beep: add SPDX identifiers 2018-02-20 16:49:59 +01:00
hda_beep.h ALSA: hda-beep: add SPDX identifiers 2018-02-20 16:49:59 +01:00
hda_bind.c ALSA: hda: Fix forget to free resource in error handling code path in hda_codec_driver_probe 2017-09-04 17:33:53 +02:00
hda_codec.c ALSA: hda: Make use of core codec functions to sync power state 2018-02-12 13:59:48 +01:00
hda_codec.h ALSA: hda: Fix regression of hdmi eld control created based on invalid pcm 2017-09-03 16:33:42 +02:00
hda_controller.c
hda_controller.h
hda_controller_trace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hda_eld.c
hda_generic.c ALSA: hda - silence uninitialized variable warning in activate_amp_in() 2017-10-13 15:14:44 +02:00
hda_generic.h
hda_hwdep.c ALSA: hda: Hardening for potential Spectre v1 2018-04-25 10:37:46 +02:00
hda_intel.c ALSA: hda: Add Lenovo C50 All in one to the power_save blacklist 2018-05-13 16:44:35 +02:00
hda_intel.h vga_switcheroo: Use device link for HDA controller 2018-03-13 22:58:09 +01:00
hda_intel_trace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hda_jack.c
hda_jack.h
hda_local.h ALSA: hda - Fix runtime PM 2018-05-24 20:16:47 +02:00
hda_proc.c
hda_sysfs.c
hda_tegra.c
Kconfig ALSA: hda - Use IS_REACHABLE() for dependency on input 2018-01-15 20:16:54 +01:00
local.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
patch_analog.c
patch_ca0110.c
patch_ca0132.c ALSA: hda/ca0132 - use ARRAY_SIZE 2017-10-13 15:14:08 +02:00
patch_cirrus.c ALSA: hda - Apply the existing quirk to iMac 14,1 2018-01-10 11:11:54 +01:00
patch_cmedia.c
patch_conexant.c ALSA: hda: add dock and led support for HP ProBook 640 G2 2018-03-08 17:37:10 +01:00
patch_hdmi.c ALSA: hda - Skip jack and others for non-existing PCM streams 2018-04-25 16:37:19 +02:00
patch_realtek.c ALSA: hda/realtek - Clevo P950ER ALC1220 Fixup 2018-05-13 18:55:46 +02:00
patch_si3054.c
patch_sigmatel.c
patch_via.c
thinkpad_helper.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00