Re: [ibm-acpi-devel] Volume control on T400

2009-04-26 Thread Henrique de Moraes Holschuh
On Sun, 26 Apr 2009, Yang Zhe wrote: > By echo 0x30 0x** > ecdump, I discover something... > > In the driver thinkpad_acpi.c, file /proc/acpi/ibm/volume is handled > in lines 5652~5737, function volume_read(), volume_write(), and it's > read through acpi_ec_read(). But in function hotkey_read_nvra

Re: [ibm-acpi-devel] Volume control on T400

2009-04-26 Thread Henrique de Moraes Holschuh
On Sun, 26 Apr 2009, Yang Zhe wrote: > > Does the mute command from /proc/acpi/ibm/volume causes MUTE to activate? > Yes. > The only thing goes wrong is that with mute button pressed, the volume > byte becomes 0x4*, * is the level. By echo mute > volume, it becomes > 0xc*. c & 4 = 4. > > Great tha

[ibm-acpi-devel] [RFC] thinkpad-acpi: dock and bay drivers: any users left?

2009-04-26 Thread Henrique de Moraes Holschuh
The ACPI "dock" driver in Linux 2.6.27 and newer handles hotswap docks AND bays a lot better than thinkpad-acpi does, thus I am seriously considering getting rid of the thinkpad-acpi dock and bay drivers. So, I'd like to know if there are still any users of the thinkpad-acpi dock driver left (this

Re: [ibm-acpi-devel] Volume control on T400

2009-04-26 Thread Yang Zhe
I have some strange idea in the past when I'm debugging tpb's code. After I detect a mute state, I immediately toggle the mute property the PCM in ALSA, then unmute the hardware. Now I can detect mute again. Therefore once the button is pressed, the mute property is toggled. But it seems tricky.

Re: [ibm-acpi-devel] Volume control on T400

2009-04-26 Thread Yang Zhe
> Does the mute command from /proc/acpi/ibm/volume causes MUTE to activate? Yes. The only thing goes wrong is that with mute button pressed, the volume byte becomes 0x4*, * is the level. By echo mute > volume, it becomes 0xc*. c & 4 = 4. Great thanks if you can do something around ALSA. As far as

Re: [ibm-acpi-devel] Volume control on T400

2009-04-26 Thread Yang Zhe
May I ask a simple question? What's the difference between ec and nvram? By echo 0x30 0x** > ecdump, I discover something... In the driver thinkpad_acpi.c, file /proc/acpi/ibm/volume is handled in lines 5652~5737, function volume_read(), volume_write(), and it's read through acpi_ec_read(). But i