public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: David Henningsson <david.henningsson@canonical.com>
Cc: Takashi Iwai <tiwai@suse.de>,
	ALSA Development Mailing List <alsa-devel@alsa-project.org>,
	Kay Sievers <kay.sievers@vrfy.org>,
	Lennart Poettering <lennart@poettering.net>
Subject: Re: Jack event API - decision needed
Date: Tue, 21 Jun 2011 13:39:09 +0100	[thread overview]
Message-ID: <20110621123908.GA25980@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <4E008A63.5080403@canonical.com>

On Tue, Jun 21, 2011 at 02:11:15PM +0200, David Henningsson wrote:
> On 2011-06-21 01:40, Mark Brown wrote:

> >Oh, then in that case we've got another issue in that jacks that happen
> >not to be associated directly with a sound card for some reason (they're
> >implemented by the embedded controller and exposed via ACPI for example)
> >won't be made available to applications.

> Which is not a problem IMO, because in the desktop world this does
> not happen (or at least I've never seen it), and in the embedded
> world you have PA running as root anyway.

This seems rather short sighted - the desktop and embedded worlds aren't
as clearly divided as all that, you've already got things like the
Genesi systems on the market at the minute running Ubuntu on ARM
hardware for example and you've also got a bunch of laptop manufacturers
putting ARM systems in their systems to dual boot into.

> >OK, well that doesn't seem like an immediately obvious choice.  I can
> >imagine there might be some concern around keyboards due to passwords
> >but in general it doesn't seem obvious that the console user shouldn't
> >be able to read physical input devices on the box (which is the case
> >we're trying to implement here; we don't need write support).  Do all
> >classes of input device currently have some root only service to mediate
> >access to them, and if that is the model we're using perhaps it'd make
> >sense to have one for this with a dbus interface or whatever that
> >PulseAudio can talk do rather than to have it talking direct to the
> >device?

> If I look at what /dev/input devices I have here, that's keyboard,
> mouse, and ACPI buttons (power, lid close etc). AFAIK, all of those
> go through the X input layer. Play/pause keys should go through
> there as well, but are you saying that audio jack events should also
> go through the X input layer?

I'm asking what the sensible model for handling this stuff is and why we
need to use a different model for this.  Perhaps this should go through
the X server, perhaps somewhere else.

It does strike me that the UI may want to be able to join the buttons up
with the particular jack - for example, if you've got a headset that
you've got assigned to telephony functions only perhaps the mic short
button on that headset should only do telephony things.

> If you are, you're welcome to try to fit it in the 248 keycodes that
> are already occupied, design a new X input extension, or whatever is
> the right solution for that. I don't know myself.

> If you're not, then that's why this is specific to audio.

It doesn't strike me as an obviously awful solution if that's what we're
using for things like the ACPI buttons which seem pretty similar - like
I say one of my questions here is why we need to do something domain
specific here.  There are certainly a bunch of other switch types in the
input API which look like the desktop might want to look at them (things
like SW_DOCK and SW_ROTATE_LOCK for example) so presumably we ought to
handle them somehow too.

It does sound like we need some input from the udev and more general
userspace stack people about how this stuff is usually handled.

> >>>>For options 2a) and 2b) I guess the existing /dev/input thing should
> >>>>be deprecated and/or removed. So part of decision should maybe be
> >>>>based on information about how widespread the usage of these devices
> >>>>are currently...?

> >>>There's a reasonable amount of usage in the embedded space.

> >>But maintaining two different implementations of input jacks without
> >>at least strongly deprecating one of them, lead to application
> >>programmers being confused, kernel being big and bloated, and so
> >>on...

> >"But"?

> Do you agree that maintaining two different implementations of input
> jacks is something we should avoid?

Show me the interfaces and I'll tell you if they look like a bad idea.
Do we have two identical APIs or do we have two APIs that sit next to
each other, more providing more detail on the data from the other?

I don't see what that's got to do with what I said above, though?

  reply	other threads:[~2011-06-21 12:39 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20 13:37 Jack event API - decision needed David Henningsson
2011-06-20 17:07 ` Mark Brown
2011-06-20 17:12   ` Takashi Iwai
2011-06-20 17:31     ` Mark Brown
2011-06-20 17:37       ` Takashi Iwai
2011-06-20 18:53   ` David Henningsson
2011-06-20 23:40     ` Mark Brown
2011-06-21 12:11       ` David Henningsson
2011-06-21 12:39         ` Mark Brown [this message]
2011-06-22 10:47           ` David Henningsson
2011-06-22 11:48             ` Mark Brown
2011-06-22 12:50               ` Kay Sievers
2011-06-22 13:25                 ` Mark Brown
2011-06-22 13:55                   ` Kay Sievers
2011-06-22 15:11                     ` Mark Brown
2011-06-22 21:41                       ` Dmitry Torokhov
2011-06-23  0:15                         ` Mark Brown
2011-06-23  8:42                           ` Dmitry Torokhov
2011-06-23 10:47                             ` Mark Brown
2011-06-22 21:01                   ` Lennart Poettering
2011-06-22 21:57                     ` Stephen Warren
2011-06-23  1:10                     ` Mark Brown
2011-06-23  7:01                       ` Clemens Ladisch
2011-06-23  7:24                         ` Takashi Iwai
2011-06-23  9:49                       ` Lennart Poettering
2011-06-23 11:43                         ` Mark Brown
2011-06-23 15:32                         ` Stephen Warren
2011-06-27 12:07 ` Mark Brown
2011-06-27 17:01   ` Colin Guthrie
2011-06-28 16:20     ` Mark Brown
2011-07-09  3:38     ` Mark Brown
2011-06-28 16:27   ` David Henningsson
2011-06-28 16:34     ` Liam Girdwood
2011-06-28 16:35     ` Mark Brown
2011-06-28 16:35     ` Takashi Iwai
2011-06-29  2:59       ` Mark Brown
2011-06-29  5:34         ` Takashi Iwai
2011-06-29  6:59           ` Mark Brown
2011-06-29  7:03             ` Takashi Iwai
2011-06-29  7:13       ` David Henningsson
2011-06-29  7:21         ` Mark Brown
2011-06-29  8:52           ` David Henningsson
2011-06-29 17:00             ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2011-06-20 13:56 Mark Brown
2011-06-20 14:11 ` David Henningsson
2011-06-20 14:19 ` Kay Sievers
2011-06-20 15:35   ` Takashi Iwai
2011-06-20 16:52     ` Mark Brown
2011-06-20 17:01       ` Takashi Iwai
2011-06-20 18:24     ` David Henningsson
2011-06-21  0:29       ` Mark Brown
2011-06-21  6:57         ` David Henningsson
2011-06-21 10:40           ` Mark Brown
2011-06-20 16:47   ` Mark Brown
2011-06-20 16:59     ` Takashi Iwai
2011-06-20 17:17       ` Mark Brown
2011-06-20 17:38         ` Takashi Iwai

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=20110621123908.GA25980@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=david.henningsson@canonical.com \
    --cc=kay.sievers@vrfy.org \
    --cc=lennart@poettering.net \
    --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