[RFC] Jack insertion interface

Mark Brown broonie at sirena.org.uk
Fri Oct 17 04:27:32 PDT 2008


Guillem Jover writes:

> On embedded devices (and some laptops) it's common to have support for
> jack insertion notifications, which can then trigger userland to act
> on that, like starting a recording application or changing the audio
> routing.

It's moderately common on HDA systems I believe (including desktops),
it's just that software support for it is fairly poor unded Linux at the
minute.

> With kernel 2.6.27 there's now a new SW_MICROPHONE_INSERT switch in
> the input layer [0]. And in the ALSA tree there's an upcoming jack
> reporting API [1][2].

There's currently a patch floating around for that which adds support
for reporting line outputs too.

> * it might make sense to have stuff like 'input.jack.headphone' and
>   'input.jack.microphone' as capabilities in case the computer has
>   several jack slots.

I think this is a good idea.  Note that multiple capabilities may appear
on a single jack - hardware can distinguish between different devices
that may be inserted on a single jack.  This would also allow users to
tell what devices it can expect might appear.

I'm not sure if this is present in the more generic parts of the spec
but I'd also recommend providing information on the input device name to
users since this should provide useful semantic information.  It'd help
identify which physical jack is being represented, if nothing else.


More information about the hal mailing list