linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Takashi Iwai <tiwai@suse.de>, Jaroslav Kysela <perex@perex.cz>,
	alsa-devel@alsa-project.org, linux-input@vger.kernel.org
Cc: mjg59@srcf.ucam.org
Subject: Re: Jack reporting v2
Date: Tue, 3 Jun 2008 11:17:26 -0400	[thread overview]
Message-ID: <20080603105920.ZZRA012@mailhub.coreip.homeip.net> (raw)
In-Reply-To: <20080603104048.GA17007@rakim.wolfsonmicro.main>

Hi Mark,

On Tue, Jun 03, 2008 at 11:40:48AM +0100, Mark Brown wrote:
> The following couple of patches update the jack reporting API I posted
> last week with the feedback I have received so far.  The changes since
> the last submision are:
> 
>  - Addition of snd_jack_set_parent(), allowing drivers to override the
>    default parent for the input device prior to registration.
>  - The jack detection support is now included unconditionally in ALSA,
>    requiring a dependency on the input subsystem.
> 
> I'm not entirely happy with making ALSA depend on input but given that
> it is only optional on embedded systems and that the input core is not
> that large it seemed the best way of ensuring that the input subsystem
> is available for the jack API without hassle for drivers using it,
> especially given the lack of dependency propagation from select.

I think it is a great idea to intoroduce a mechanism treporting state
of a generic connector, it was a long overdue. However I don't think
that using input as a delivery mechanism is the best solution. What is
needed from a connector:

1. A way to query its state
2. A way to notify userspace of state change.

Pros for using input devices:
- we already have them

Cons:
- space consideration. Input_dev structure is quite fat. It has all
  the capabilities strings exported through sysfs, hist of other
  attributes, etc. On top of that we have a character device (evdev)
  plus its own sysfs representation. IOW lots of stuff.
- input device require ioctl to get the switch state, no easy way to
  do it through sysfs.
- As the number of types of connectors grows new switches will need to
  be added to input, potentially completely unrelated. My lacmus test
  for it - does it make sense to add network cable state to inputi
  core?

Do you think that something small that has only one sysfs device per
switch and uses KOBJ_ONLINE/KOBJ_OFFLINE to signal state change would
be better suited here?

BTW, the same goes for the SW_DOCK that Matthew wants to add (CC-ed).

-- 
Dmitry

  parent reply	other threads:[~2008-06-03 15:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-29 21:09 [PATCH/RFC 1/2] Add jack reporting API for ALSA Mark Brown
2008-05-29 21:09 ` [PATCH/RFC 2/2] Add microphone and headset reporting Mark Brown
2008-05-30  8:15 ` [PATCH/RFC 1/2] Add jack reporting API for ALSA Takashi Iwai
2008-05-30 10:15   ` Mark Brown
2008-06-03 10:40 ` Jack reporting v2 Mark Brown
2008-06-03 10:42   ` [PATCH 1/2] Add jack reporting API for ALSA Mark Brown
2008-06-03 10:42     ` [PATCH 2/2] Add microphone and headset reporting Mark Brown
2008-06-03 14:49   ` Jack reporting v2 Takashi Iwai
2008-06-03 15:36     ` Mark Brown
2008-06-03 15:17   ` Dmitry Torokhov [this message]
2008-06-03 23:38     ` Mark Brown
2008-06-06 14:23       ` Mark Brown
2008-07-01  9:24       ` Mark Brown

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=20080603105920.ZZRA012@mailhub.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-input@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /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).