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
As far as I know, Thinkpad T400 and T500 wihch I met are in the same status with the volume control. -- Sincerely, Yang Zhe -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licens

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

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

2009-04-25 Thread Yang Zhe
ne after some time, whether the mute bit changed, if it was changed, mute the alsa sound. In fact, tpb provide some functions, but the code of tpb is somehow bad... -- Sincerely, Yang Zhe -- Crystal Reports - New Fre

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

2009-04-24 Thread Yang Zhe
Thank you for your responce. Now let's focus on the mute key.. If I plugged a headphone, the mute key won't mute the sound in headphone, then the mute key is lack of functional.. So that I think it's better to send a keycode, or emulate a keycode against the mute bit. --

[ibm-acpi-devel] Volume control on T400

2009-04-20 Thread Yang Zhe
ven or odd) now echo mute > volume, the byte comes 0xc1. and the sounds are not muted. I think that there is something wrong with the handle of the volume key, but i have a sketch on the code and can't figure it