[alsa-devel] How can you tell if the speaker jack on your sound card has anything plugged into it???
Tobin Davis
tdavis at dsl-only.net
Fri Apr 25 23:32:42 CEST 2008
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
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.
Tobin
On Fri, 2008-04-25 at 23:08 +0200, Robert Jarzmik wrote:
> Mark Brown <broonie at opensource.wolfsonmicro.com> writes:
>
> > There's currently no standard way of getting this information from user
> > space even where the hardware provides it.
> Isn't the event api switch "SW_HEADPHONE_INSERT" standard ?
> I thought it was designed for such use.
>
> If I'm not mistaken, the Neo teams handles it that way, as I do for the mio :
> -> input_report_switch(mioa701_evdev, SW_HEADPHONE_INSERT, val);
>
> --
> Robert
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
--
Tobin Davis
All of the true things I am about to tell you are shameless lies.
-- The Book of Bokonon / Kurt Vonnegut Jr.
More information about the Alsa-devel
mailing list