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@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@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel