Re: [PATCH] platform/x86: asus-wmi: try to set als by default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 21.04.2017 um 21:06 schrieb Andy Shevchenko:
> On Fri, Apr 21, 2017 at 6:24 PM, Oleksij Rempel <linux@xxxxxxxxxxxxxxxx> wrote:
>> some laptops, for example ASUS UX330UAK, have brocken als_get function
>> but working als_set funktion. In this case, ALS will stay turned off.
> 
> Please, spell check the above.
> 
> some -> Some
> brocken -> broken
> funktion -> function

ok. thank you.

>>
>>              Method (WMNB, 3, Serialized)
>>             {
>>             ...
>>                If (Local0 == 0x53545344)
>>                 {
>>                 ...
>>                     If (IIA0 == 0x00050001)
>>                     {
>>                         If (!ALSP)
>>                         {
>>                             Return (0x02)
>>                         }
>>
>>                         Local0 = (GALS & 0x10)    <<<---- bug,
>>                                                     should be: (GALS () & 0x10)
> 
> How GALS is defined in ASL?

                    Method (GALS, 0, NotSerialized)
                    {
                        Local0 = Zero
                        Local0 |= 0x20
                        If (ALAE)
                        {
                            Local0 |= 0x10
                        }

                        Local1 = 0x0A
                        Local1 <<= 0x08
                        Local0 |= Local1
                        Return (Local0)
                    }


beside, same part of code on ASUS UX32A, which works just fine:

                    If ((IIA0 == 0x00050001))
                    {
                        If (!ALSP)
                        {
                            Return (0x02)
                        }

                        Local0 = (GALS () & 0x10)
                        If (Local0)
                        {
                            Return (0x00050001)
                        }
                        Else
                        {
                            Return (0x00050000)
                        }
                    }

                    If ((IIA0 == 0x00050013))
                    {
                        Local0 = (GALS () & 0x0F0F)
                        Return (Local0)
                    }

....
            Method (GALS, 0, NotSerialized)
            {
                Local0 = (LBTN & 0x0F)
                Local0 |= 0x20
                If (ALAE)
                {
                    Local0 |= 0x10
                }

                Local1 = (0x0B - One)
                Local1 <<= 0x08
                Local0 |= Local1
                Return (Local0)
            }


>> Since it works without problems on Windows I assume ASUS WMI driver for Win
>> never trying to get ALS state, and instead it is setting it by default to ON.
>>
>> This patch will do the same. Turn ALS on by default.
> 
> It would be good to see if there is no regression added.

sure. Is there anything i can do for this, except continue to use this
patch with my HW?

-- 
Regards,
Oleksij

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux