Skip to contentSkip to conversation

No Backlight Control in 2.2.18pre21

DISCUSSION Simon Stapleton 3 participants 4 messages Dec 4, 2000

lore
Share & tools
lore
#0 lore raw
Quoted 9 lines

Subject says it: with current linux-pmac-stable kernels, the backlight control via [Fn-]F{1,2} does not work, neither dimming nor turning off the LCD altogether, on a PB Lombard at least.
Might have been this way since the CONFIG_PMAC section appeared, in any case, in 2.4.0-test11 there is a CONFIG_PMAC_BACKLIGHT option, and backlight control is working (I've set it to "=y", of course).

Funny you should mention this. I was about to pen a missive along the same lines. I noticed it this very weekend when getting back to hacking together ADB Wacom support (not necessarily coming any time soon, BTW)

The problem appears, to me at least, that if you use the USB backport code the powerbook buttons stuff doesn't get included. I think somewhere a CONFIG_PMAC_BACKLIGHT is being missed, but I may well be wrong. Changing CONFIG_PMAC_BACKLIGHT to CONFIG_PMAC_PBOOK seems to fix the problem (and seems to make more sense as we're dealing with powerbook button devices here. Or are we? What about the buttons on the front of some of the older pmacs, and on the apple monitors? I assume these are all ADB devices. I can't test the monitor stuff as my 1710 decided it doesn't want to start up recently. Bah.)

In a related note, I've been looking at the code that does this. I had a patch under 2.2.17 to make the volume and mute buttons work on my wallstreet, and was wanting to reinstate it - the original patch won't work but the coding seems (relatively) simple.

So - a couple of questions.

1: What is labelled as the 'contrast' button is actually the
wallstreet volume control. Is this the case for other Pbooks? (I can probably get hold of a 3400 to test, but kangas, lombards and the like are all unreachable). If this _is_ the case, could we rename the constant?
2: Getting to the sound device. This is probably a stupid question,
but here goes anyway... The sound device is controllable from userland via the /dev/mixer ioctl, as far as I can see. Can I use this from within the kernel, or is that a big no-no? I don't like the idea of putting extra helpers in the sound code (or even using existing ones directly), as there's no guarantee that sound support has been built in. And I _really_ don't like lots more #ifdef's in the code.

Thoughts, comments, flames?

Simon

--
Your mouse has moved. You must reboot Windows NT for these changes to be recognised.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 1 line · Simon Stapleton

Thoughts, comments, flames?

http://www.execpc.com/~jpgarcia/sys.html

at the above URL, i have some links to kernel patches. One is a patch to implement new input layer support for the volume/mute buttons using
a similar method to the backlight controls. The 2.4 version I wrote is incomplete, and the 2.2 version uses the 2.4 dmasound backport. An older one is more of an update from a patch that was posted to this list months ago.

The new layer one also tries to feature NIL volume keys (they're in the header), but I don't think I did it right.

Beware, I consider these patches to be 'my personal stash', and are rather messy in places.

If anyone wants me to work on them more, or work on them themselves, just say so.

My standing is, the buttons are there, lets use them. iBooks and Pismos still have them built into the keyboard too. Do we want these controlled kernel level, or send a keystroke so X (or something else) can catch it? If I can get to fixing the newer 2.2 patch, it could do either way.

--
Joseph P. Garcia
http://www.execpc.com/~jpgarcia

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#2 lore raw

Quoting [email protected],[email protected]:

Quoted 9 lines

http://www.execpc.com/~jpgarcia/sys.html

at the above URL, i have some links to kernel patches. One is a patch to implement new input layer support for the volume/mute buttons using a similar method to the backlight controls. The 2.4 version I wrote is incomplete, and the 2.2 version uses the 2.4 dmasound backport.
An older one is more of an update from a patch that was posted to this list months ago.

Rock! I'll give this a go tonight. I think it's probably worth trying to get this cleaned up and approved for a 'official' release.

Quoted 8 lines

The new layer one also tries to feature NIL volume keys (they're in the header), but I don't think I did it right.

Beware, I consider these patches to be 'my personal stash', and are rather messy in places.

If anyone wants me to work on them more, or work on them themselves, just say so.

If you need any hands to the pumps, or someone to look over changes, let me know. Unfortunately our machines appear to be very similar, but, as I said, I have access to a 3400. I should also be able to get to a firewire pbook 500 in a week or so.

Quoted 2 lines

My standing is, the buttons are there, lets use them. iBooks and Pismos still have them built into the keyboard too.

Aye to that.

Quoted 3 lines

Do we want these controlled kernel level, or send a keystroke so X (or something else) can catch it? If I can get to fixing the newer 2.2 patch, it could do either way.

My vote is for kernel level. Having a volume control daemon or the like seems very kludgy, IMHO.

A thought occurs to me, though. A friend of mine recently bought an I86 laptop wich has a bunch of 'shopping' buttons built in. Are these supported in Linux, and if so, what's the mechanism used?

Simon

--
Your mouse has moved. You must reboot Windows NT for these changes to be recognised.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#3 lore raw
In reply to Simon Stapleton
Quoted 6 lines

1: What is labelled as the 'contrast' button is actually the
wallstreet volume control. Is this the case for other Pbooks? (I can probably get hold of a 3400 to test, but kangas, lombards and the like are all unreachable). If this _is_ the case, could we rename the constant?

Some wallstreet with passive matrix display also have a contrast button (and contrast setting via the PMU). I found some infos about those and a friend with such a machine to test with, I'll try to get something out if I find some time.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/