From b2f9a10c189a267e834167e224b5d4be4c1f3269 Mon Sep 17 00:00:00 2001 From: Christopher Spinrath Date: Thu, 24 Mar 2016 20:45:13 +0100 Subject: ec/lenovo/h8: do not reset volume on s3 wakeup On s3 wakeup h8_enable is called which resets the (audio) volume. But the volume should be the same as before the s3 state. In particular, userland programs (e.g. pulseaudio) may be out of sync, if the volume can be changed by hardware buttons also emitting acpi events. Hence, do not reset the volume on s3 wakeup. Tested on a Lenovo ThinkPad X220. Change-Id: I2af08dea1a3f14a40734d67d372e845cc18c5e09 Signed-off-by: Christopher Spinrath Reviewed-on: https://review.coreboot.org/14183 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Alexander Couzens --- src/ec/lenovo/h8/h8.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ec') diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c index 4f882c14c6..943bdd4738 100644 --- a/src/ec/lenovo/h8/h8.c +++ b/src/ec/lenovo/h8/h8.c @@ -13,6 +13,7 @@ * GNU General Public License for more details. */ +#include #include #include #include @@ -258,7 +259,7 @@ static void h8_enable(struct device *dev) h8_trackpoint_enable(1); h8_usb_power_enable(1); - if (get_option(&val, "volume") == CB_SUCCESS) + if (get_option(&val, "volume") == CB_SUCCESS && !acpi_is_wakeup_s3()) ec_write(H8_VOLUME_CONTROL, val); if (get_option(&val, "bluetooth") != CB_SUCCESS) -- cgit v1.2.3