[ltp] Any reason why the recommended hotkey mask is 0x008c7fff on X60s

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Mon, 20 Oct 2008 14:39:35 -0200


On Mon, 20 Oct 2008, Damjan wrote:
> I repeat once more, on mine X60s [model no. 1704-5UG, bios 7BETD2WW
> (2.13 )] the volume keys definitelly control a separate mixer than all
> the ALSA mixers, and also /proc/acpi/ibm/volume DOES control the volume.
> 
> Latest BIOS for this X60s is 2.17, the changelog doesn't offer much
> incentives for updating though :)
> ftp://ftp.software.ibm.com/pc/pccbbs/mobiles/7buj26uc.txt

Well, if you ever hit any nags with ACPI or thermal control, remember to try
an up-to-date BIOS.  That changelog is hideously "cleaned up".

> Ok, I checked again. HAL does report the brightness change, and the
> value. It's getting this info by listening to ACPI events, through the
> standard video acpi module - so that works. Previously I was wrongly
> reading HAL output and I thought I need to enable the hotkey mask for
> the brightness buttons.
> 
> So only the volume keys are my concern now.

Ok.

> > > > OSD for volume is to be done by querying the ALSA mixers.
> > > 
> > > On my X60s, the volume is only reported by /proc/acpi/ibm/volume, and
> > > not in any (Master or PCM) Alsa mixer. it's a completelly separate mixer.
> > 
> > The X60s has the good old internal thinkpad mixer?  That's news to me.  If
> > changing /proc/acpi/ibm/volume in *single user mode* changes the volume on
> > the speakers, then yes, it does.  I would appreciate if you could confirm
> > this.   And still I'd only act on it if someone with an up-to-date BIOS
> > confirms it.
> 
> Yes, this X60s *DOES* have the good old internal thinkpad mixer!
> yes, in single user mode it does change the volume.

Now, THAT is very nice.  Thank you for that information!  Ok, here's the
full scoop:

1. I won't change the default (in the driver) because that's not the proper
way to do volume OSD anyway, and it has undesired effects by default on very
popular distros that have screwed it up (Ubuntu, Debian, maybe others).

2. I will provide an ALSA mixer sooner or later that can be used properly
for OSD and also to change the volume, mute/unmute (and will work on your
X60s, since it has the internal mixer).  I have to get to it sooner or
later, since /proc/acpi might be removed in a not too far future, and when
it does, so does /proc/acpi/ibm.

3. As you are aware, you are free to override the default setting using
hotkey_mask and other parameters, just be aware that if your userspace is
badly configured for your setup, it will cause a weird dynamic range
response from the keys.

4. The correct way to mess with the hotkey_mask, is to read the hotkey_mask
and set the bits you specifically want, then write it back.  If your
hotkey_mask starts differently from the recommended mask, it means the
distro is doing something weird.  Keep in mind you might have to reprogram
keycodes in the thinkpad-acpi input device if you use that, too.   It is all
in the driver documentation.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh