summaryrefslogtreecommitdiff
path: root/src/ec/lenovo/h8
diff options
context:
space:
mode:
authorChristopher Spinrath <christopher.spinrath@rwth-aachen.de>2016-03-24 20:45:13 +0100
committerMartin Roth <martinroth@google.com>2016-04-10 18:14:15 +0200
commitb2f9a10c189a267e834167e224b5d4be4c1f3269 (patch)
tree8c0981880d4c1a211e373393cf5c350d90d0c2f5 /src/ec/lenovo/h8
parent2bf7a2ca829e945efb6d63960cd53ecdf02ba14e (diff)
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 <christopher.spinrath@rwth-aachen.de> Reviewed-on: https://review.coreboot.org/14183 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
Diffstat (limited to 'src/ec/lenovo/h8')
-rw-r--r--src/ec/lenovo/h8/h8.c3
1 files changed, 2 insertions, 1 deletions
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 <arch/acpi.h>
#include <arch/io.h>
#include <console/console.h>
#include <device/device.h>
@@ -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)