muteing speakers if headphones were plugged in?
Hi,
I was asked to built a new feature into pbbuttons: To mute the speakers if headphones are plugged in.
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?
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?
Thanks for your help and best regards
Matthias
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 6 lines
Hi,
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.
Quoted 8 lines
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.
Quoted 2 lines
I saw the most headphone code within the Tumbler section so I assume that it would only work on new TiBooks and iBooks?
Yes.
Quoted 2 lines
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.
Ben.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 11 lines · Benjamin Herrenschmidt
Quoted 9 lines
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.
Is someone working on that issue to implement it for the other chipsets?
Matthias
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 3 lines
Is someone working on that issue to implement it for the other chipsets?
I think the Alsa driver can work on other chipsets. I don't know if someone is working on it for dmasound, I don't think so.
On these (awacs, burgundy), I think you don't have to register a second interrupt, the main chip interrupt will be called when the jack state changes, you can probably act from there. A good source of info is the darwin source code which contains source code for all of Apple sound drivers.
Ben.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/