Help - Search - Members - Calendar
Full Version: Embedded Controller (ec)
Project OS X Forums > Snow Leopard Guides & Tutorials > DSDT Patching
Slice
Two year ago I notice that AppleACPIEC.kext prevents Battery to be shown correctly.
Now I repeat the same observation with Dell 1525 Snow 10.6.2.
Previously I have no (EC) device in DSDT.
- battery indicator works with AppleACPIBatteryManager
- brightness changes by keys Fn+Up/Fn+Down, but not with Fn+Scroll/Fn+Pause that show me sun on the screen.
Now I add EC device according to MacBook4,1 DSDT
CODE

Device (EC)
{
Name (_HID, EisaId ("PNP0C09"))
Name (_GPE, 0x17)
Method (_STA, 0, NotSerialized)
{
Return (0x0F)
}

Name (_CRS, ResourceTemplate ()
{
IO (Decode16,
0x0062, // Range Minimum
0x0062, // Range Maximum
0x00, // Alignment
0x01, // Length
)
IO (Decode16,
0x0066, // Range Minimum
0x0066, // Range Maximum
0x00, // Alignment
0x01, // Length
)
})
OperationRegion (ECO1, SystemIO, 0x62, One)
Field (ECO1, ByteAcc, Lock, Preserve)
{
PX62, 8
}

OperationRegion (ECO2, SystemIO, 0x66, One)
Field (ECO2, ByteAcc, Lock, Preserve)
{
PX66, 8
}

Name(REGC,Ones)
Method(_REG,2) {
If(Lequal(Arg0, 3)) {
Store(Arg1, REGC)
}
}

Method(ECAV,0) {
If(Lequal(REGC,Ones)) {
If(LgreaterEqual(_REV,2)) {
Return(One)
}
Else {
Return(Zero)
}
}
Return(REGC)
}


Name (_PRW, Package (0x02)
{
0x18,
0x03
})
Name (ECOK, 0x00)
OperationRegion (ECOR, EmbeddedControl, 0x00, 0xFF)
Field (ECOR, ByteAcc, Lock, Preserve)
{
ECVS, 8,
LSTE, 1,
RPWR, 1,
CDIN, 1,
Offset (0x02),
LWAK, 1,
ACWK, 1,
CDWK, 1,
Offset (0x03),
Offset (0x10),
ECSS, 8,
PLIM, 8,
Offset (0x20),
SPTR, 8,
SSTS, 8,
SADR, 8,
SCMD, 8,
SBFR, 256,
SCNT, 8,
SAAD, 8,
SAD0, 8,
SAD1, 8,
SMUX, 8
}

Field (ECOR, ByteAcc, Lock, Preserve)
{
Offset (0x24),
SBDW, 16,
Offset (0x46),
SADW, 16
}

Device (SMB0)
{
Name (_HID, "ACPI0001")
Name (_EC, 0x2010)
Mutex (SMTX, 0x00)
Method (_STA, 0, NotSerialized)
{
Return (0x0F)
}

Device (SBS0)
{
Name (_HID, "ACPI0002")
Name (_SBS, 0x01)
}

Method (SBPC, 1, NotSerialized)
{
Store (Arg0, Local0)
While (Local0)
{
If (LEqual (SPTR, 0x00))
{
Return (And (SSTS, 0x1F))
}

Sleep (0x01)
Decrement (Local0)
}

Return (0x18)
}

Method (SBRW, 3, NotSerialized)
{
Store (One, Local0)
If (LNot (Acquire (\_SB.PCI0.LPCB.EC.SMB0.SMTX, 0xFFFF)))
{
If (LEqual (SPTR, 0x00))
{
Store (ShiftLeft (Arg0, 0x01), SADR)
Store (Arg1, SCMD)
Store (0x09, SPTR)
Store (SBPC (0x03E8), Local0)
If (LNot (Local0))
{
Store (SBDW, Arg2)
}
}

Release (\_SB.PCI0.LPCB.EC.SMB0.SMTX)
}

Return (Local0)
}

Method (SBRB, 3, NotSerialized)
{
Store (One, Local0)
Store (Buffer (0x01)
{
0x00
}, Local1)
If (LNot (Acquire (\_SB.PCI0.LPCB.EC.SMB0.SMTX, 0xFFFF)))
{
If (LEqual (SPTR, 0x00))
{
Store (ShiftLeft (Arg0, 0x01), SADR)
Store (Arg1, SCMD)
Store (0x0B, SPTR)
Store (SBPC (0x03E8), Local0)
If (LNot (Local0))
{
Store (SBFR, Arg2)
}
}

Release (\_SB.PCI0.LPCB.EC.SMB0.SMTX)
}

Return (Local0)
}
}

Method (_Q10, 0, NotSerialized)
{
Notify (\_SB.PCI0.LPCB.EC.SMB0, 0x80)
}
// I don't know what methods must be for brightness control
Method (_Q1C, 0, NotSerialized)
{
Store (0x1C, P80H)
Notify (\_SB.PCI0.GFX0.LCD, 0x86)
}

Method (_Q1D, 0, NotSerialized)
{
Store (0x1D, P80H)
Notify (\_SB.PCI0.GFX0.LCD, 0x87)
}


}

Previously these region was occupied by Keyboard device
CODE
Device (KBC)
{
Name (_HID, EisaId ("PNP0303"))
//Name (_CID, "ps2controller")
Name (_UID, 0x0D)
Name (CRS, ResourceTemplate ()
{
IO (Decode16,
0x0060, // Range Minimum
0x0060, // Range Maximum
0x10, // Alignment
0x01, // Length
)
IO (Decode16,
0x0064, // Range Minimum
0x0064, // Range Maximum
0x04, // Alignment
0x01, // Length
)
IO (Decode16,
0x0062, // Range Minimum
0x0062, // Range Maximum
0x02, // Alignment
0x01, // Length
)
IO (Decode16,
0x0066, // Range Minimum
0x0066, // Range Maximum
0x06, // Alignment
0x01, // Length
)
IRQNoFlags ()
{1}
})

Now these events go to EC. (There is no IRQ?)
In this case
- I have no brightness control at all
- battery indicator doesn't change
While all kexts is loaded fine
CODE
| +-o EC <class IOACPIPlatformDevice, id 0x100000126, registered, matched, active, busy 0 (49 ms), retain 12>
| | | {
| | | "IODeviceMemory" = (({"address"=0x62,"length"=0x1}),({"address"=0x66,"length"=0x1}))
| | | "acpi-wake-gpe" = 0x18
| | | "acpi-wake-system-state" = 0x3
| | | "IOInterruptControllers" = ("ACPIEventController")
| | | "_STA" = 0xf
| | | "IOInterruptSpecifiers" = (<1c00000000000000>)
| | | "name" = <504e503043303900>
| | | }
| | |
| | +-o AppleACPIEC <class AppleACPIEC, id 0x1000001de, !registered, !matched, active, busy 0, retain 4>
| | {
| | "IOProbeScore" = 0x0
| | "CFBundleIdentifier" = "com.apple.driver.AppleACPIEC"
| | "IOProviderClass" = "IOACPIPlatformDevice"
| | "IOClass" = "AppleACPIEC"
| | "IOMatchCategory" = "IODefaultMatchCategory"
| | "IONameMatch" = ("PNP0C09","boot-ec")
| | "IONameMatched" = "PNP0C09"
| | }
| |
| +-o SMB0 <class IOACPIPlatformDevice, id 0x100000127, registered, matched, active, busy 0 (172 ms), retain 9>
| | | {
| | | "name" = <414350493030303100>
| | | "_STA" = 0xf
| | | }
| | |
| | +-o AppleECSMBusController <class AppleECSMBusController, id 0x1000001df, registered, matched, active, busy 0 (7 ms), retain 5>
| | | {
| | | "_SBS" = 0x1
| | | "IOSMBusSmartBatteryManager" = Yes
| | | }
| | |
| | +-o AppleSmartBatteryManager <class AppleSmartBatteryManager, id 0x1000001e4, registered, matched, active, busy 0 (1 ms), retain 6>
| | | {
| | | "IOPropertyMatch" = {"IOSMBusSmartBatteryManager"=Yes}
| | | "IOProbeScore" = 0x0
| | | "IOProviderClass" = "IOSMBusController"
| | | "IOClass" = "AppleSmartBatteryManager"
| | | "CFBundleIdentifier" = "com.apple.driver.AppleSmartBatteryManager"
| | | "IOMatchCategory" = "IODefaultMatchCategory"
| | | "IOUserClientClass" = "AppleSmartBatteryManagerUserClient"
| | | "IOPowerManagement" = {"CurrentPowerState"=0x1}
| | | }
| | |
| | +-o AppleSmartBattery <class AppleSmartBattery, id 0x1000001e6, registered, matched, active, busy 0 (1 ms), retain 6>
| | {
| | "CurrentCapacity" = 0x0
| | "Amperage" = 0x0
| | "PostDischargeWaitSeconds" = 0x78
| | "LatestErrorType" = "Read Retry Attempts Exceeded"
| | "TimeRemaining" = 0x0
| | "BatteryInstalled" = No
| | "BatteryInvalidWakeSeconds" = 0x1e
| | "IOGeneralInterest" = "IOCommand is not serializable"
| | "Voltage" = 0x0
| | "Location" = 0x0
| | "CycleCount" = 0x0
| | "PostChargeWaitSeconds" = 0x78
| | "ExternalChargeCapable" = No
| | "AdapterInfo" = 0x0
| | "LegacyBatteryInfo" = {"Amperage"=0x0,"Flags"=0x1,"Capacity"=0x0,"Current"=0x0,"Voltage"=0x0,"Cycle Count"=0x0}
| | "MaxCapacity" = 0x0
| | "IsCharging" = No
| | "ExternalConnected" = Yes
| | "FullyCharged" = No
| | }


Any one has working the things with AppleACPIEC presents? Publish, please, your DSDT.
If you have EC and have no brightness control try to exclude it as me before and assign 62, 66 to KBC device.

Fn Keys problem resolved!
http://www.projectosx.com/forum/index.php?showtopic=1452
THe KiNG
Copy/paste from apple is a bad idea, unless you have same Embedded Controller.
For sure the registers will not match and cause more trouble then fix something.
The scenario is like this:
On Apple(both mobile/desk) they have Embedded Controller plus SMC(that is basically a Super I/O)
On us on notebooks we have combined/or separate EC + Super I/O in one chip or just Super I/O on desktops boards.
Take a look here for more info: http://www.coreboot.org/Embedded_controller http://www.coreboot.org/Superiotool

I suggest you find first what EC/Super I/O you have (I have to dissam my lappie for that) then try to find a Intel notebook that use same chip and you got the registers, if you are lucky maybe you can find also the datasheet for it, not in my case sad.gif
Slice
QUOTE (THe KiNG @ Mar 4 2010, 10:39 PM) *
Copy/paste from apple is a bad idea, unless you have same Embedded Controller.
For sure the registers will not match and cause more trouble then fix something.
The scenario is like this:
On Apple(both mobile/desk) they have Embedded Controller plus SMC(that is basically a Super I/O)
On us on notebooks we have combined/or separate EC + Super I/O in one chip or just Super I/O on desktops boards.
Take a look here for more info: http://www.coreboot.org/Embedded_controller http://www.coreboot.org/Superiotool

I suggest you find first what EC/Super I/O you have (I have to dissam my lappie for that) then try to find a Intel notebook that use same chip and you got the registers, if you are lucky maybe you can find also the datasheet for it, not in my case sad.gif

I have exactly the same chipset as MacBook4,1 so I'd copy from it. I also have datasheet on it.
I am trying to understand why
- I have brightness control with keys Fn+Up/Fn+down, but I see no any procedure in DSDT or in PS2Controller sources that perform this manipulation.
- I have no brightness control if AppleACPIEC is loaded. What is happen?
THe KiNG
What chip is?
Gimme datasheet to look @ it.
Slice
QUOTE (THe KiNG @ Mar 6 2010, 08:01 PM) *
What chip is?
Gimme datasheet to look @ it.

O sorry, I understand. My chipset is ICH8M that is good documented @intel.com. But for SMI my laptop uses Dell SMI chip that is not documented and it is not the same as Apple uses. For this reason I have no thermal sensors and fans control with Mark-i application.
Is it the Embedded Controller?
I think it is possible to take control on EC because AppleACPIEC.kext operates with stardard ACPI command so I can write all needed command into DSDT but some more information needed.
Nontheless I don't understand why Fn+Scroll show me SUN on the screen. What driver do it?
And nothing happen if ACPIEC is loaded.
THe KiNG
I don't think Dell has own IC, most cases use ITE ENE or Winbond(Nuovoton).
Take it in small steps, first dissambly your lappie and see what chip is.
I did the same:

As I said if you are lucky u may find the datasheet for it, not my case the only link I found is this http://chinafix.com.cn/thread-96452-1-1.html but can't register and get it...maybe someone has account there and gimme a hand?

QUOTE
Nontheless I don't understand why Fn+Scroll show me SUN on the screen. What driver do it?

I get the same, IMHO is a keyboard scancode that does a apple known combination...
Here brightness control works if ACPIEC is loaded.

BTW Mark-i fails on my lappie too, guess b/c there is no support added for my chip...
Slice
I can't disambly my pc yet. Under cover I found ISL626
QUOTE
The ISL6262 is a two-phase buck converter regulator
implementing Intel® IMVP-6 protocol, with embedded gate
drivers.

and MAXIM 8731AE
CODE
The MAX8731A is an SMBus™ programmable multichemistry
battery charger

There are datasheets for its.
It seems these chips perform operations without any OS influence.
Checking in Windows with cpuz and everest I have no find any Winbond or ITE chips.
THe KiNG
QUOTE (Slice @ Mar 9 2010, 11:10 AM) *
Checking in Windows with cpuz and everest I have no find any Winbond or ITE chips.

Do not trust windoze app's, even linux tools failed to read my EC+Super I/O chip...
Only way for me was to take it in pieces and make pics smile.gif
bcc9
QUOTE (Slice @ Mar 3 2010, 05:19 AM) *
Two year ago I notice that AppleACPIEC.kext prevents Battery to be shown correctly.
Now I repeat the same observation with Dell 1525 Snow 10.6.2.

I fixed a similar problem for the dell 1340. AppleACPIEC was failing to load with the error "ACPI: EC <number> register GPE handler failed". This is because the Dell bios has 2 GPE blocks and the Apple code assumes there is 1 (and mis-counts the length). I patched AppleACPIPlatform with the correct length hard coded in, and bingo, working battery status.
Perhaps the 1525 has the same issue.
gabiz_ro
Most probably Dell notebook have a EC based on some SMSC family my E1705 have MEC5004 one (based on Intel 8051 cpu) but for those there are no datasheets available.
Also for Dell now is possible to decrypt and decompose bios.
I did some test with inserting custom DSDT into and seems was working.
Maybe thats the way (patching bios) to enable HPET.
Slice
QUOTE (THe KiNG @ Mar 7 2010, 12:37 PM) *
I get the same, IMHO is a keyboard scancode that does a apple known combination...

It seems brightness control is in AppleACPIButtons.kext as well as sound volume. What can we do? DSDT patch? New kext same way as ACPIPS2 or ACPIBattery?
EDITED: not Buttons but ACPIPlatform

QUOTE (bcc9 @ Mar 30 2010, 08:06 AM) *
I fixed a similar problem for the dell 1340. AppleACPIEC was failing to load with the error "ACPI: EC <number> register GPE handler failed". This is because the Dell bios has 2 GPE blocks and the Apple code assumes there is 1 (and mis-counts the length). I patched AppleACPIPlatform with the correct length hard coded in, and bingo, working battery status.
Perhaps the 1525 has the same issue.

Can you tell something more about your patch?
bcc9
QUOTE (Slice @ Apr 9 2010, 05:23 AM) *
It seems brightness control is in AppleACPIButtons.kext as well as sound volume. What can we do? DSDT patch? New kext same way as ACPIPS2 or ACPIBattery?
EDITED: not Buttons but ACPIPlatform


Can you tell something more about your patch?
From my posts over in my insanleymac dell 1340 threads:

My newer version of this change simply hacks initEventVectors() to compute the total size with GPE block #1 included. Hacking the length of block 0 seemed cleaner but was causing AcpiEnterSleepState() to fail.

With my patch, AppleACPIEC loads without error, and consequently the control method battery's status works. Ditto for other ACPI controlled tidbits such as the lid status.

For newbie dell xps 1340 users, I made a pkg whose contained post installer script patches AppleACPIPlatform for 10.6.x automatically.
That pkg is here: http://www.insanelymac.com/forum/index.php...st&id=68969
From this post:
http://www.insanelymac.com/forum/index.php...t&p=1233371

What else would you like to know?
Slice
Thank you for tha explanation. I will to study this question.

I have working AppleACPIEC at laptop Samsung P29. So I have material to research.
Slice
Yes, AppleACPIEC.kext works on notebook Samsung with Tiger. And useful!
With it I have working battery status in menu bar, brightness control (again with Fn+Up/Down), battery info by Fn+F3, touchpad off by Fn+F8, LCD/CRT switch. None of them working without EC controller kext.
Differencies multiple.
MacBook
CODE
                    OperationRegion (ECOR, EmbeddedControl, 0x00, 0xFF)
                    Field (ECOR, ByteAcc, Lock, Preserve)
                    {
                        ECVS,   8,
                        LSTE,   1,
                        RPWR,   1,

Samsung
CODE
                    OperationRegion (ECR, EmbeddedControl, 0x00, 0xFF)
                    Field (ECR, ByteAcc, Lock, Preserve)
                    {
                                Offset (0x80),   // all fields begin from offset 0x80
                        B1EX,   1,
                        B2EX,   1,
                        ACEX,   1,


What I notice that Tiger's ACPIPlatform contains PS2NUB inside while no one in Snow kext so why we need custom AppleACPIPS2NUB. Is it good enough to be a replacement of native NUB to send Fn keys to EC controller?
Slice
QUOTE (THe KiNG @ Mar 7 2010, 12:37 PM) *
I don't think Dell has own IC, most cases use ITE ENE or Winbond(Nuovoton).

I get the same, IMHO is a keyboard scancode that does a apple known combination...
Here brightness control works if ACPIEC is loaded.

No, EC controller is not related to ITE/Winbond chip.
EC has addresses 62, 66
ITE is accessed through ports 2e, 2f.

So EC controller is just a part of PS2 controller (addresses 60-66).

EDITED:
CODE
; AppleACPIEC::instantiateSMBus(IOService *)

So EC controller is connected to SMBus and get information from it but it seems it is not the common case. Dell has SMI subsystem while SMBus controller is not defined in ACPI (DSDT).
Slice
New observation.
I connect iMac USB keyboard to my Dell and found working media buttons: brightness (Fn+F1/F2), volume(Fn+F11/F12), play(Fn+F8), next song in iTunes(Fn+F9).
So this buttons work not by PS2, not by ACPI. These are system events.
How can I assign Fn events to my native keyboard?
lanbing
i check my ioreg i found the AppleACPIEC was load and i add PEGP to driver my vodeo card ,before i add PEGP in the dsdt i could change brightness by fn+up/down(as the same in win),but after i drivers the video card gt240m i lost the brightness change!
why ?

Slice
QUOTE (THe KiNG @ Mar 4 2010, 10:39 PM) *
Copy/paste from apple is a bad idea, unless you have same Embedded Controller.
For sure the registers will not match and cause more trouble then fix something.
The scenario is like this:
On Apple(both mobile/desk) they have Embedded Controller plus SMC(that is basically a Super I/O)
On us on notebooks we have combined/or separate EC + Super I/O in one chip or just Super I/O on desktops boards.
Take a look here for more info: http://www.coreboot.org/Embedded_controller http://www.coreboot.org/Superiotool

I suggest you find first what EC/Super I/O you have (I have to dissam my lappie for that) then try to find a Intel notebook that use same chip and you got the registers, if you are lucky maybe you can find also the datasheet for it, not in my case sad.gif

Yes, now I know that motherboard contain some more programmable chips then just CPU. smile.gif
Usually for PC there is a LPC chip (ITE, Winbond, Fintek, SMSC, NSC or else) that contains old devices: COM, LPT, FDD, PS2, RTC, and sometimes also Thermal Monitoring System and EC. Thus function keys works with this chip which decided it is an ordinary keys combination to generate scan codes or it is Fn+key to generate System Event.
In some computers, for example my laptop Samsung P29 there is a separate chip such as F21xx which is programmable in any way. Apple use it to make SMC controller. If I could program the chip I can make hardware SMC device inside my laptop! ohmy.gif Like a real mac. But for now it performs the functions of EC controller that works fine with AppleACPIEC.kext.

But the question of the topic remains unresolved.
Why when I press Fn+Left I see Speaker on the screen? What kext writes it? Where is the picture? I checked. It is not EC event.
Also it is not kernel. It is not any Video driver nor Sound. The same about Sun of brightness.
THe KiNG
QUOTE (Slice @ Jul 15 2010, 08:53 PM) *
But the question of the topic remains unresolved.
Why when I press Fn+Left I see Speaker on the screen? What kext writes it? Where is the picture? I checked. It is not EC event.
Also it is not kernel. It is not any Video driver nor Sound. The same about Sun of brightness.

Your keyboard controller(or/and PS2 driver) generate a code that is recognized by kernel as speaker +/-/mute, same as for rest.
IMHO the PS2 driver dosen't interpret/fit the keyboard in use, take a look here:
http://www.opensource.apple.com/source/IOH...tem/ev_keymap.h

QUOTE
#define NX_KEYTYPE_SOUND_UP 0
#define NX_KEYTYPE_SOUND_DOWN 1
#define NX_KEYTYPE_BRIGHTNESS_UP 2
#define NX_KEYTYPE_BRIGHTNESS_DOWN 3
............
Slice
Thank you for the found.
Now I am thinking what to do with IOHIDFamily, recompile it or make a subclass driver to have a possibility to change Fn key functions.
THe KiNG
Heh, is not my found, meklort used the same in his ASUSHotkeys driver, so credits goes to him.
His driver capture the ACPI event, same way you used for fakesmc plugin, and assign it for corresponding one from IOHIDFamily.
Slice
QUOTE (THe KiNG @ Aug 29 2010, 11:13 AM) *
Heh, is not my found, meklort used the same in his ASUSHotkeys driver, so credits goes to him.
His driver capture the ACPI event, same way you used for fakesmc plugin, and assign it for corresponding one from IOHIDFamily.

It would be interesting to obtain his sources.
Your means ACPImonitor? Thus some DSDT patches is needed?
THe KiNG
No DSDT patches needed since ASUS has already stuff there(ASOC/ATKD device)
You have to ask him about sources...
Slice
QUOTE (THe KiNG @ Aug 29 2010, 02:58 PM) *
No DSDT patches needed since ASUS has already stuff there(ASOC/ATKD device)
You have to ask him about sources...

ASOC sad.gif
I have no ASUS so the way is not for me.
THe KiNG
QUOTE (Slice @ Aug 29 2010, 02:07 PM) *
ASOC sad.gif
I have no ASUS so the way is not for me.

You should have something for hotkeys, some Method (_Qxy...
Search for stuff like AVOL, HKEY or _Qxy that has some Notify...
Slice
QUOTE (THe KiNG @ Aug 29 2010, 05:11 PM) *
You should have something for hotkeys, some Method (_Qxy...
Search for stuff like AVOL, HKEY or _Qxy that has some Notify...

Some unknown device
CODE
        Device (MBTN)
        {
            Name (_HID, "PNP0C32")
            Name (_UID, Zero)
            Method (_STA, 0, NotSerialized)
            {
                If (LLess (OSID (), 0x20))
                {
                    Return (Zero)
                }

                Return (0x0F)
            }

            Name (_PRW, Package (0x02)
            {
                0x1C,
                0x05
            })
            Method (GHID, 0, NotSerialized)   // connect to IOHIDFamily?
            {
                Store (HSCO (One), Local0)    // this is SMI method like read from EC controller by SMBus protocol
                If (Local0)
                {
                    Notify (MBTN, 0x02)
                    HSCO (0x02)
                }

                Return (Buffer (One)
                {
                    0x00
                })
            }
        }

Also I have a device AMW0. Dunno how it works.

I study IOHIDFamily and found we need some new keys for keyboard in registry.
CODE
    number = OSDynamicCast(OSNumber, getProperty(kIOHIDStandardTypeKey));  //"StandardType"
    if ( number ) {
        result = number->unsigned32BitValue();
    }
    else {
        UInt16 productID    = getProductID();
        UInt16 vendorID     = getVendorID();

        if (vendorID == kIOUSBVendorIDAppleComputer) {
......
           result = kIOHIDStandardTypeISO;  
                }
            setProperty(kIOHIDStandardTypeKey, result, 32);
.....
enum {
    kIOHIDStandardTypeANSI                = 0,
    kIOHIDStandardTypeISO                 = 1,
    kIOHIDStandardTypeJIS                 = 2
};

But what about multimedia buttons?
THe KiNG
That AMW0 should be the ACPI device you need.
Is it an Acer?
SuperHai knows more about it, but IMHO should be the same stuff...
Slice
QUOTE (THe KiNG @ Aug 29 2010, 08:10 PM) *
That AMW0 should be the ACPI device you need.
Is it an Acer?
SuperHai knows more about it, but IMHO should be the same stuff...

It's Dell.
I have the sources of Superhai's AMW0.kext but he dropped the development at very initial stage.
OK, will look again into AMW0 device in DSDT.
I can watch its behaviour by my ACPImonitor using temperature smc-keys rolleyes.gif
Slice
Look IOHIDFamily
Event driver is empty!
Click to view attachment
But the sources is not empty, just incomplete! huh.gif
Slice
Now I understand why with AppleKeyboard I have multimedia buttons but not with my keyboard.
IOHIDFamily is very simple driver. More functional one is AppleUSBTCKeyboard which is subclass of IOHIDKeyboardDevice.
So if we want to have a full functional keyboard with Fn keys and multimedia buttons we need to write a new driver...
CODE
class PCKeyboard: public IOHIDKeyboardDevice

as well as EventDriver
CODE
    | |   |     |   | +-o AppleUSBTCKeyEventDriver  <class AppleUSBTCKeyEventDriver, registered, matched, active, busy 0, retain 8>
    | |   |     |   |   | {
    | |   |     |   |   |   "FnModifierUsagePage" = 255
    | |   |     |   |   |   "Product" = "Apple Internal Keyboard / Trackpad"
    | |   |     |   |   |   "CFBundleIdentifier" = "com.apple.driver.AppleUSBTCKeyEventDriver"
    | |   |     |   |   |   "IOMatchCategory" = "IODefaultMatchCategory"
    | |   |     |   |   |   "ProductID" = 553
    | |   |     |   |   |   "FnFunctionUsageMap" = "0x0007003a,0x00ff0005,0x0007003b,0x00ff0004,0x0007003c,0xff010010,0x0007003d
,0xff010002,0x00070040,0x000C00B4,0x00070041,0x000C00CD,0x00070042,0x000C00B3,0x
0
0070043,0x000C00E2,0x00070044,0x000C00EA,0x00070045,0x000C00E9"

But these drivers are not opensource.
sad.gif
Slice
QUOTE (THe KiNG @ Aug 29 2010, 08:10 PM) *
That AMW0 should be the ACPI device you need.
Is it an Acer?
SuperHai knows more about it, but IMHO should be the same stuff...

Some information about the device here
http://www.microsoft.com/whdc/system/pnppw...i/wmi-acpi.mspx
smile.gif
Slice
It seems I need no EC driver.
Fn keyboard function is resolved by modded ApplePS2Controller.
For Home button I write MBTN driver that got messages
CODE
Sep 15 11:40:27 sergey kernel[0]: MBTN: Message received, type e0028010, from: MBTN arg 80

But it also send event to keyboard driver so I can assign anything to it
CODE
Sep 15 11:40:27 sergey kernel[0]: Unknown key= 0012

I don't know what it would be the best using of the key smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.