linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Jonathan McDowell <noodles@earth.li>
Cc: alsa-devel@alsa-project.org,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	linux-input@vger.kernel.org
Subject: Re: [alsa-devel] Can a phone hook switch follow alsa jack model?
Date: Thu, 25 Jun 2009 14:48:38 +0200	[thread overview]
Message-ID: <4A437226.4090202@tis.icnet.pl> (raw)
In-Reply-To: <20090625110508.GF17812@sirena.org.uk>

On 2009-06-25 13:05, Mark Brown wrote:
> On Wed, Jun 24, 2009 at 03:28:11PM +0200, Janusz Krzysztofik wrote:
> 
>> type. Don't you think that a new type like SND_JACK_PHONE_HOOK or 
>> SND_JACK_PHONE_HANDSET should be defined for the purpose? Even if 
>> HEADSET may not be very different from HANDSET, corresponding 
>> SW_HEADPHONE_INSERT and SW_MICROPHONE_INSERT event names seem have very 
>> little to do with picking up a phone.
> 
> Possibly, TBH I had thought I'd seen something for off-hook when I
> looked at this originally but I can't seem to spot it now.

As I am not native English, please somebody help me to choose best 
names, both SW_... event name and SND_JACK_... jack type.

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 acompanying code that would make use 
of it, there were no other 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.

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 for a 
microphone, and one for a headphone. Should this schema be used with a 
handset? Even if it were possible to turn any of handset microphone or 
headphone individually, would it make any sense?

Sorry for bothering you with all this stuff, but I'd like the changes to 
existing code I am going to propose, if any, be as much reusable as 
possible.

>> So, if I want to follow the ASoC jack model, my in-kernel hook switch 
>> handler should only power on/off the handset, not touching the 
>> speakerphone at all. The latter should be controlled from userspace. 
>> Please correct me if I am missing something.
> 
> That's my initial guess - I've not looked at your particular hardware
> so it may not end up being the best way of dealing with your system but
> from what you said it was the approach that sprang to mind.

Mark,
Thanks for now, all that seems clear enough for me.
Janusz


  reply	other threads:[~2009-06-25 12:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-23 13:28 Can a phone hook switch follow alsa jack model? Janusz Krzysztofik
2009-06-23 22:22 ` Mark Brown
2009-06-24 13:28   ` Janusz Krzysztofik
2009-06-25 11:05     ` Mark Brown
2009-06-25 12:48       ` Janusz Krzysztofik [this message]
2009-06-29 14:32         ` [alsa-devel] " Mark Brown
2009-06-29 16:35           ` Janusz Krzysztofik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A437226.4090202@tis.icnet.pl \
    --to=jkrzyszt@tis.icnet.pl \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=noodles@earth.li \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).