alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com,
	David Henningsson <david.henningsson@canonical.com>
Subject: Re: [PATCH 2/2] ALSA: Integrate control based jack reporting with core jack reporting
Date: Mon, 13 Feb 2012 11:23:10 -0800	[thread overview]
Message-ID: <20120213192309.GG3494@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <s5hwr7qzl6g.wl%tiwai@suse.de>


[-- Attachment #1.1: Type: text/plain, Size: 3157 bytes --]

On Mon, Feb 13, 2012 at 06:40:23PM +0100, Takashi Iwai wrote:
> Mark Brown wrote:

> > With these patches I'm mainly looking for a quick and simple refactoring
> > to get rid of the duplication - once we've got rid of the duplicate
> > driver APIs then we can refactor the internals of the implementation
> > however we like but there's a pretty pressing need to fix the driver
> > API and get all the drivers doing the same thing to userspace even if
> > it's not ideal.

> Hm, then I'd say let's hold on.  Merging this half-baked stuff is
> rather confusing at this point since the use of kctl jack isn't
> targeted yet for ASoC.

> I believe what we need _now_ is to decide the policy (i.e. element
> naming rule and TLV definitions) for kctl jacks quickly.

Now that the kctl jacks are there I'm getting people asking me about it
often enough so I'd like to see it merged.

> > > In other words, if 1:1 mapping isn't needed, we don't have to create a
> > > different name string at all.  Just create "Jack Detect" controls with
> > > different indices and with corresponding TLVs.  This would be enough
> > > (could be even easier) for a machine parser.

> > That'd work I think, though I would create a new control for each
> > physical jack at least just for clarity.

> They are indeed individual ctl elements.  They just share the same
> name and are distinguished by the index numbers.  For the parser
> program, it would be even easier because it needs to look only for
> elements containing the single string.  The rest is the parse of TLVs
> of gathered elements, which would be needed no matter whether we have
> multiple name strings or not.

I think we're mostly agreeing here - what I'd like is to be able to give
each jack a descriptive name which shows up in the control name
("Headset", "Docking Station") along with "Jack" or some other keyword.
The descriptive name could be optional, but it seems nice to put it in
the control name.

> > > And, it seems that there is no standard rule defined for the id string
> > > of input-jack.  If 1:1 model is used, we'd need to define this rule.

> > The input stack doesn't have the same concept of machine parsable names
> > for things that ALSA does (honestly that's pretty unique to ALSA within
> > the kernel) - the names it users are all free form text intended to be
> > meaningful to humans only.

> Yeah, maybe.  But, if you have two headset jacks, how would you
> identify with the current jack stuff...?

You've just got the descriptive name to go on, there's no way to
directly associate it back.

> So, at this point, I can list the following policies for kctl jacks:

> A. all kctls have one name string with different indices.  Each jack
>    is distinguished by the TLV provided to each kctl.

> B. kctls are built with only a base name ("Headphone", "Mic") with
>    different indices and TLVs.

> C. kctls contain unique names ([location] base [direction] [channel])
>    optionally with TLVs

I think I prefer B here with the base name being a descriptive name
(which could often be like the above) that should be unique within the
card, even if the driver just adds numbers.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2012-02-13 19:23 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-07 19:48 [PATCH 1/2] ALSA: Use a define for the number of jack switch types Mark Brown
2012-02-07 19:48 ` [PATCH 2/2] ALSA: Integrate control based jack reporting with core jack reporting Mark Brown
2012-02-08  8:36   ` David Henningsson
2012-02-08 11:46     ` Mark Brown
2012-02-08 13:35       ` David Henningsson
2012-02-08 13:57         ` Mark Brown
2012-02-10 10:55         ` Takashi Iwai
2012-02-10 11:36           ` Mark Brown
2012-02-10 12:16             ` Takashi Iwai
2012-02-10 13:08           ` David Henningsson
2012-02-10 15:50             ` Mark Brown
2012-02-10 16:09               ` David Henningsson
2012-02-10 16:39                 ` Mark Brown
2012-02-13 13:56                   ` Takashi Iwai
2012-02-13 15:44                     ` Mark Brown
2012-02-13 17:40                       ` Takashi Iwai
2012-02-13 19:23                         ` Mark Brown [this message]
2012-02-14  7:20                         ` David Henningsson
2012-02-15  2:04                           ` Mark Brown
2012-02-22 16:52                           ` Takashi Iwai
2012-02-22 17:18                             ` Mark Brown
2012-02-22 17:34                               ` Takashi Iwai
2012-02-22 18:54                                 ` Mark Brown
2012-02-22 20:35                                   ` Takashi Iwai
2012-02-22 20:55                                     ` Mark Brown
2012-02-23  8:10                                       ` Takashi Iwai
2012-02-23  7:25                             ` David Henningsson
2012-02-14  1:29           ` Raymond Yau
2012-02-16 19:59             ` Mark Brown
2012-02-22 15:02 ` [PATCH 1/2] ALSA: Use a define for the number of jack switch types Mark Brown
2012-02-22 16:28   ` Takashi Iwai
2012-02-22 16:34     ` Mark Brown
2012-02-22 16:41       ` Takashi Iwai
2012-02-27 16:37         ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2012-03-01 17:48 [PATCH 2/2] ALSA: Integrate control based jack reporting with core jack reporting Takashi Iwai
2012-03-02  6:26 ` David Henningsson
2012-03-02  7:16   ` Takashi Iwai
2012-03-02 11:45     ` 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=20120213192309.GG3494@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=david.henningsson@canonical.com \
    --cc=patches@opensource.wolfsonmicro.com \
    --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).