muteing speakers if headphones were plugged in?

Benjamin Herrenschmidt benh at
Wed Apr 17 03:30:26 EST 2002

>I was asked to built a new feature into pbbuttons: To mute the speakers
>if headphones are plugged in.

It's already implemented at the driver level for some chipsets.

>I don't know where to get the information if headphones are plugged in
>or not, so I had a look into the recent kernel and I saw some code (for
>eg. headphone_intr() ) that seems to do what I am asked for. On the
>other hand the code seems very experimental and not really complete as I
>could see at some comments.
>What is the status? Should this feature (muting the speakers ...) be
>part of the kernel or was it only a fast shot to get it work?

It works with recent drivers though only if your chipset is Tumbler afaik.

>I saw the most headphone code within the Tumbler section so I assume
>that it would only work on new TiBooks and iBooks?


>Nevertheless is there a method to get the information of the line-in
>jack status from user space?

Not that I know of, but I don't know the OSS API that well, it may
be possible to add this information to what is returned from the driver.


** Sent via the linuxppc-dev mail list. See

More information about the Linuxppc-dev mailing list