From f6dde95e8722bf8b5cfbba9469f3aabea3a593ab Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Sun, 24 May 2015 03:17:42 +0200 Subject: [PATCH] ec/lenovo/h8: silence sound on boot Fix a bug when a sound was generated while going into suspend. E.g. When a low battery sound is played while going into suspend a sample is stuck in this register. The user will hear a sample forever. Change-Id: I103a5f462c8044ef5875a9adf812234b5e6960ac Signed-off-by: Alexander Couzens Reviewed-on: http://review.coreboot.org/10297 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer Reviewed-by: Paul Menzel Reviewed-by: Nicolas Reinecke --- src/ec/lenovo/h8/h8.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c index 46480f4174..2cafc88847 100644 --- a/src/ec/lenovo/h8/h8.c +++ b/src/ec/lenovo/h8/h8.c @@ -233,6 +233,9 @@ static void h8_enable(struct device *dev) ec_write(H8_SOUND_REPEAT, 0x00); + /* silence sounds in queue */ + ec_write(H8_SOUND_REG, 0x00); + ec_write(0x10, conf->event0_enable); ec_write(0x11, conf->event1_enable); ec_write(0x12, conf->event2_enable);