From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Balaji Rao <balajirrao@gmail.com>
Cc: liam.girdwood@wolfsonmicro.com, alsa-devel@alsa-project.org
Subject: Re: support for jackSense feature in modern sound cards
Date: Sun, 10 Feb 2008 21:55:20 +0000 [thread overview]
Message-ID: <20080210215519.GC32198@sirena.org.uk> (raw)
In-Reply-To: <200802110103.37082.balajirrao@gmail.com>
On Mon, Feb 11, 2008 at 01:03:37AM +0530, Balaji Rao wrote:
> How well is the jack sense feature in modern soundcards supported in the
> kernel ? I opened up a few driver sources like hda-intel and found the
> word 'jack sense' in some files, but i could not find it being used anywhere.
FWIW this feature is frequently called "jack detect" or "headphone
detect". I have actually been looking at this, mostly within the
context of ASoC although obviously this all applies to ALSA core too.
There is some in-kernel support for it at present, though some of those
don't expose anything to user space and do fixed things to the hardware
when there is a headphone detect event.
There is also an existing user space API for communicating events to
user space via the input subsystem - this is in use by some of the
Zaurus systems. Jacks are represented as switch events of type
SW_HEADPHONE_INSERT. User space can listen for these events and can
then adjust the system configuration as appropriate.
My plan for supporting this in ALSA had been to add helpers to assist in
the creation of input devices representing the jacks along with new
switch types to allow systems that can detect the type of device plugged
into a jack to represent this to user space (eg, SW_SPEAKER_INSERT).
The helpers would parent the input device off the sound card device and
provide a name for the jack to user space. My intention is to post some
code once I've got sound working on the Zylonite (since that has jack
detect support and would allow me to show working code).
> Are there standard interfaces in kmix or equivalent software that use the jack
> sense feature ? If not, wouldn't it be nice to have a standard interface to
> expose this feature so that kmix and others could make use of in a device
> independent way ?
The existing user space API does seem reasonable to me - logically, a
headphone jack does correspond to a switch and applications that respond
to jack insert events are likely to also want to pay attention to other
input events such as the mute and volume control keys often found on
keyboards.
For embedded uses the expectation was that this would be used in
conjunction with the ALSA scenario management API which my colleague
Liam Girdwood is currently developing:
http://opensource.wolfsonmicro.com/node/14
This may or may not be appropriate for desktop systems, I am less
familiar with the issues there.
prev parent reply other threads:[~2008-02-10 21:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-10 19:33 support for jackSense feature in modern sound cards Balaji Rao
2008-02-10 19:59 ` Tobin Davis
2008-02-10 21:55 ` Mark Brown [this message]
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=20080210215519.GC32198@sirena.org.uk \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=balajirrao@gmail.com \
--cc=liam.girdwood@wolfsonmicro.com \
/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