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

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

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

2009-04-25 Thread Henrique de Moraes Holschuh
On Sat, 25 Apr 2009, Yang Zhe wrote: > As a good news, the mute bit in the volume byte is correct in ANY > times, even if someone is doing some funny thing with the volume in > procfs. That gives me enough to talk to Lenovo, thanks! > > How does mute and volume work in Windows?  How do they behav

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

2009-04-25 Thread Yang Zhe
> And you didn't tell me if the thinkpad-acpi driver does see changes in the > mute state properly, yet.  Please confirm that (but do NOT try to change the > volume, just check if the driver reports the mute state correctly, comparing > it with the mute led when you press the mute key, press it mul

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

2009-04-24 Thread Henrique de Moraes Holschuh
On Sat, 25 Apr 2009, Yang Zhe wrote: > Thank you for your responce. > > Now let's focus on the mute key.. It is not a key. It is a button that is entirely handled by the firmware inside the embedded controller. And you didn't tell me if the thinkpad-acpi driver does see changes in the mute stat

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. --

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

2009-04-24 Thread Henrique de Moraes Holschuh
On Mon, 20 Apr 2009, Yang Zhe wrote: > Volume mute key doesn't produce any keycode to system. Mute is done on hardware. It may be reflected somewhere in the HDA mixer (I don't know), and in the EC register space, but it does not send keycodes. > And I find that, after I echo up/down/mute/level