public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Takashi Iwai <tiwai@suse.de>,
	ALSA Development Mailing List <alsa-devel@alsa-project.org>,
	Kay Sievers <kay.sievers@vrfy.org>,
	David Henningsson <david.henningsson@canonical.com>
Subject: Re: Jack event API - decision needed
Date: Thu, 23 Jun 2011 12:43:19 +0100	[thread overview]
Message-ID: <20110623114319.GG21932@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20110623094925.GB25686@tango.0pointer.de>

On Thu, Jun 23, 2011 at 11:49:25AM +0200, Lennart Poettering wrote:
> On Thu, 23.06.11 02:10, Mark Brown (broonie@opensource.wolfsonmicro.com) wrote:

> >  - We need to represent the fact that multiple subsystems are working
> >    with the same jack.

> Tbh I am not entirely convinced that this is really such an important
> thing. We can't even map audio controls to PCM devices which would be
> vastly more interesting, and we can't even do that.

No disagreement that being able to expose the audio routing within the
devices is needed.

> I can give you a thousand of real-life usecases for wanting to match up
> PCM devices with controls, but the one for wanting to match up HDMI
> audio with HDMI video is much weaker, since machines usually have
> multiple PCM streams, but not multiple HDMI ports.

Apparently that's becoming an issue on desktops with nVidia chipsets -
there's been a moderate amount of discussion on that recently on the
list.

> I am not saying that such a match-up shouldn't be possible, but I'd say
> it could be relatively easy to implement. One option would be to go by
> names. i.e. simply say that if an alsa control device is called "HDMI1
> Jack Sensing", and an X11 XRANDR port is called "HDMI1", then they
> should be the same, and apps should comapre the first words of these
> names, and that both can be traced to the same udev originating device.

You certainly can't assume that the same device will originate all the
functionality on the jack - in embedded systems the way functionality is
built up from blocks on the SoC means that the control bus routing is of
essentially no use in working out how the system looks to the user.

> In fact, something similar is now already in place for external usb
> speakers with built-in volume keys to map X11 XInput keypresses up to PA
> audio devices so that we can map volume keypresses to the appropriate
> audio device in gnome-settings-daemon (note that the latter is not
> making use of this yet, as the infrastructure is still very new): for
> each keypress we can find the originating XInput device, from that we
> can query the kernel device, which we can then find in sysfs. Similarly
> we can find the sysfs device from PA and then do a match-up.

OK, can you point us to a description of what the actual mechanism is
here?  This sounds hopeful, though the fact that nobody knows about it
isn't inspiring.

> If you are thinking about matching up devics across subsystems, you
> should not limit your focus to jack sensing events only: the above
> mentioned key-press use is a lot more interesting -- and is solved.

I have *repeatedly* talked about the need to hook the button presses up
with the rest of the jacks.  Including in the mail you're replying to.

> Also, I'd claim that adding an additional subsystem that covers only
> jack sensing would complicate things even further, since now you have to
> match up audio, video and input devices with this jack sensing device,
> instead of just matching them up directly.

On the other hand it also means you now have to work through any number
of separate APIs (the jack could acquire other functionality beyond
those three) and manually build up a picture of what's there.  I like
the idea that we can point application developers to a thing rather than
them having to infer what's going on from a bunch of separate devices -
the fact that nobody else seems to know about the support you mention is
one of the potential issues with this.

> >  - Even if we invent new interfaces for this we really ought to be able
> >    to teach userspace about existing kernels.

> See, I don't buy this actually. It wouldn't be a regression if we don't
> support the input device based scheme in PA.

On the other hand if we go for doing something completely new it's going
to push back support by I'd guess at least six months.  Which doesn't
seem great.

> > currently work in the application layer due to the way input is handled
> > then like I said above it looks like we have a bunch of other issues we
> > also need to cope with.

> I think bolting proximity detection and docking station stuff into the
> input layer is very wrong too. Both deserve probably their own kind of
> class devices.

I don't really disagree, I'm just saying that we have a broader problem
which we should probably look at those too.

  reply	other threads:[~2011-06-23 11:43 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
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 [this message]
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=20110623114319.GG21932@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=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