[alsa-devel] How can you tell if the speaker jack on your sound card has anything plugged into it???
Mark Brown
broonie at opensource.wolfsonmicro.com
Fri Apr 25 23:55:31 CEST 2008
On Fri, Apr 25, 2008 at 02:32:42PM -0700, Tobin Davis wrote:
> The snd_hda_intel driver does this internally to mute the speakers when
> headphones are plugged in. Ditto for front mic. But you are right, we
> need a standard way of tracking this. I am exploring the HAL interface
> now to see what I can learn from it. And most sound chips have an
The interface I'd previously proposed here was to provide an input
device per-jack which would do this - hal should then be able to monitor
the input device. As suggested in the original message in the thread
providing sysfs information would probably be helpful for scripts.
> insert detection mechanism. Usually they are wired to specific jacks,
> but sometimes they just register a change in plug state, and read the
> jack's impedance levels to know which jack is used. It is documented in
> the Sigmatel/IDT, Realtek, and Analog Devices codec PRMs.
Yes, that's how all the codecs I've looked at do this.
More information about the Alsa-devel
mailing list