Lenovo H8: Fix h8_set_audio_mute()
authorSven Schnelle <svens@stackframe.org>
Tue, 25 Oct 2011 13:29:47 +0000 (15:29 +0200)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Tue, 25 Oct 2011 15:48:41 +0000 (17:48 +0200)
Logic is inverted (if argument is true, one would expect that
mute is enabled) and the wrong bit was used (1 instead 0)

Change-Id: I71133ba639f1fb0d3c3582f16211dd266a11cc64
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Reviewed-on: http://review.coreboot.org/334
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
src/ec/lenovo/h8/h8.c

index 560c39cb872d6ae216a5a19d68aa393ed30cf47a..f81a39cb24357078d589869bd00e602e9e92fd53 100644 (file)
@@ -63,12 +63,12 @@ static void h8_log_ec_version(void)
               fwvh >> 4, fwvh & 0x0f, fwvl >> 4, 0x41 + (fwvl & 0xf));
 }
 
-void h8_set_audio_mute(int on)
+void h8_set_audio_mute(int mute)
 {
-       if (on)
-               ec_clr_bit(0x3a, 0);
+       if (mute)
+               ec_set_bit(0x3a, 0);
        else
-               ec_set_bit(0x3a, 1);
+               ec_clr_bit(0x3a, 0);
 }
 
 void h8_enable_event(int event)