[alsa-devel] Can a phone hook switch follow alsa jack model?

Mark Brown broonie at opensource.wolfsonmicro.com
Mon Jun 29 16:32:15 CEST 2009


On Thu, Jun 25, 2009 at 02:48:38PM +0200, Janusz Krzysztofik wrote:

> During my previous, gpio-keys based attempt, I submitted a patch
> that added new SW_HANDSET_PICK_UP event definition to
> include/linux/input.h. Even if not accepted because of no

Something like hook switch would be a more common name - the switch is
closed when the phone is on hook.

> comments, especially on the name I have choosen. However, there were
> another name proposed by ams-delta board maintainer, Jonathan
> McDowell - SW_PHONE_HOOK. Even if my wording may better match those
> already existing ..._INSERT names, I am not sure which one should I
> use.

The _INSERT isn't at all appropriate since there's nothing being
inserted here - the _INSERT names refer to the fact that something is
being plugged in to a jack.

> Please also note that SND_JACK_HEADSET, that I temporarily use for
> now, is an alias for SND_JACK_HEADPHONE | SND_JACK_MICROPHONE. Those
> two can be seen as matching what a handset actually is. On headset
> jack insert/remove, two distinct reports/events are generated, one

OTOH a phone going on hook tends to mean something rather different in
UI terms to having something plugged into a jack - it's part of the
normal flow of making a phone call.


More information about the Alsa-devel mailing list