1. OS will get brightness level from _BCL
Method(_BCL, 0, NotSerialized)
{
Return(Package(){100, // AC Default Level 16
33, // DC Default Level 5
13, // Level 1
18, // Level 2
23, // Level 3
28, // Level 4
33, // Level 5
38, // Level 6
43, // Level 7
48, // Level 8
54, // Level 9
60, // Level 10
66, // Level 11
72, // Level 12
78, // Level 13
84, // Level 14
90, // Level 15
100 // Level 16
})
}
2. OS will set brightness from _BCM
Method(_BCM, 1, NotSerialized)
{
if (LEqual(\_SB.PCI0.VGA.AF7E, 0x80000001)) // Brightness control by driver
{
// Using the equation (Arg0*3+19)/20 to convert the "0 to 100%" BCL levels
// to "0 to 15" based.
Divide(Add(Multiply(Arg0, 3), 19), 20, Local1, Local0)
Store (DeRefOf(Index(BLVL, Local0)), Local3) // Get 0-255 range level from buffer
\_SB.PCI0.AFN7(Local3)
}
}
=======================================================================
1. OS會從ACPI的Method _BCL去得到需要所訂定的明亮度
Method(_BCL, 0, NotSerialized)
{
Return(Package(){100, // AC 預設 Level 16 (預設一插上AC電源就將明亮度調至100%)
33, // DC 預設 Level 5 (預設DC電源就將明亮度調至33%)
13, // Level 1
18, // Level 2
23, // Level 3
28, // Level 4
33, // Level 5
38, // Level 6
43, // Level 7
48, // Level 8
54, // Level 9
60, // Level 10
66, // Level 11
72, // Level 12
78, // Level 13
84, // Level 14
90, // Level 15
100 // Level 16
})
}
2. OS從ACPI的Method_BCM去設定明亮度
Method(_BCM, 1, NotSerialized)
{
if (LEqual(\_SB.PCI0.VGA.AF7E, 0x80000001)) // Brightness control by driver
{
// Using the equation (Arg0*3+19)/20 轉換 "0 to 100%" BCL levels至 to "0 to 15" 階.
Divide(Add(Multiply(Arg0, 3), 19), 20, Local1, Local0)
Store (DeRefOf(Index(BLVL, Local0)), Local3) // 從buffer抓0-255的範圍
\_SB.PCI0.AFN7(Local3)
}
}
_BCL和_BCM僅使用在筆記型電腦,桌上型電腦不需支援
No comments:
Post a Comment