public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: David Henningsson <david.henningsson@canonical.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: ALSA Development Mailing List <alsa-devel@alsa-project.org>,
	Kay Sievers <kay.sievers@vrfy.org>,
	Lennart Poettering <lennart@poettering.net>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: Jack event API - decision needed
Date: Mon, 20 Jun 2011 20:24:14 +0200	[thread overview]
Message-ID: <4DFF904E.3090802@canonical.com> (raw)
In-Reply-To: <s5hoc1s4iu3.wl%tiwai@suse.de>

On 2011-06-20 17:35, Takashi Iwai wrote:
> At Mon, 20 Jun 2011 16:19:51 +0200,
> Kay Sievers wrote:
>>
>> On Mon, Jun 20, 2011 at 15:56, Mark Brown
>> <broonie@opensource.wolfsonmicro.com>  wrote:
>>> Sorry about the top posting, but as I wasn't involved in any of the discussions and am on a mobile device right now and your mail isn't directly legible it would be enormously helpful if you could summarize the issues you're trying to address, your proposed solution and the problems Kay had.
>>
>> Domain-specific events should not be 'faked' as 'input' devices. No
>> non-input subsystem should do that if it can be avoided. That 'input'
>> supports nice and easy events to userspace should not be a reason to
>> misuse it for pretty much unrelated things.
>>
>> There are patches to have the ALSA control device emit these ALSA
>> related events natively. That's would be just better, simpler and more
>> correct than any additionally created input device.
>>
>> If Takashi can make that possible in a reasonable time frame, we
>> should not even start handling the (currently not handled) input
>> devices in upstream projects like udev and PulseAudio, and focus right
>> away on the native ALSA control events.
>>
>> If we can't have the native ALSA events anytime soon for some reason,
>> we might need to merge the input device support, but I would like to
>> avoid that.
>
> Well, the implementation would be relatively easy.  There was already
> a patch, so not too hard to revisit.
>
> But, there are still some open questions.  For example, what
> information is mandatory and what information is preferred about the
> pin.  HD-audio provides the location, type, color, etc.  We can encode
> these into a single name string, but is it a preferred way?

I was thinking the same thing. We don't want another parser as we now 
have for the volume control names in Pulseaudio. [1] Better encode the 
information in binary.

> Alternatively, the control element can provide the HD-audio pin config
> via an extra TLV data, so that apps can refer to it if needed in
> addition to the name string.
>
> Also, we may consider some way to expose the corelation of the jack
> control element and other mixer elements.  Though, this sounds
> optional to me for the time being.

I think this correlation is what I'm missing the most, I think. We need 
e g, a way to figure out that if you plugged something into HDMI port nr 
2, we should output through PCM device 2 on that card. Exposing what 
mixers affect this port is highly desirable as well to get more accurate 
than the current name-based algorithm Pulseaudio currently uses.

For the jack itself, the most important info would be
1) Type (Headphone / Line-out / etc)
2) Channel allocation (Front / Side / LFE / etc)
3) Location (Rear / Docking station / and can also be Front, just to add 
to the confusion)

> These questions are basically requirements from the apps; so I'd like
> to know the exact demands before going to implementation.

Hopefully this mail gives a little more insight from the Pulseaudio 
viewport at least.

Should we design something new, I think we should start with a pin/port 
concept rather than a jack concept. "Internal speaker" would then be a 
port that does not have a jack, whereas "Headphone" would be a port that 
has a jack.

(Btw, I don't know much about DAPM and how well that scales to cope with 
these requirements, it looks very ASoC to me, but perhaps it's just the 
SND_SOC_DAPM_* naming that fools me. But can DAPM e g send events to 
userspace?)

-- 
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic

[1] It becomes even worse when some things such as "I control headphones 
and line-out but not internal speaker" cannot be expressed with a name, 
at least there is no current standard for doing so. :-(

  parent reply	other threads:[~2011-06-20 18:24 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20 13:56 Jack event API - decision needed 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 [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
2011-06-20 13:37 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
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

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=4DFF904E.3090802@canonical.com \
    --to=david.henningsson@canonical.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.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