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: broonie@kernel.org, alsa-devel@alsa-project.org,
	liam.r.girdwood@intel.com
Subject: Re: [PATCH v4 0/5] ALSA: jack: Refactoring for jack kctls
Date: Wed, 08 Apr 2015 09:49:55 +0200	[thread overview]
Message-ID: <5524DDA3.5000109@canonical.com> (raw)
In-Reply-To: <s5htwwr6pjx.wl-tiwai@suse.de>



On 2015-04-08 09:34, Takashi Iwai wrote:
> At Wed, 08 Apr 2015 09:20:56 +0200,
> David Henningsson wrote:
>>
>>
>>
>> On 2015-04-07 18:06, Takashi Iwai wrote:
>>> This would work, yes.  But, I have some uneasy feeling, something not
>>> well digested...
>>>
>>> Ideally, we want a single API for representing both input and kctl
>>> jacks.
>>
>> Maybe this is somewhat my fault for steering Yang in that direction. But
>> the requirements are somewhat different.
>>
>> HDA has the phantom jacks, and the exact naming for each kctl requirements.
>> ASoC has the combination/button requirements, i e one jack can represent
>> more than one kctl.
>>
>> The phantom jack requirement means that the snd_kctl_jack_new API cannot
>> be removed straight away; we could move it to be internal to HDA (it's
>> not much code anyway), but I don't see a need for that.
>>
>> But the HDA code can be moved around to look like this:
>>
>>      if (phantom_jack) {
>>         snd_kctl_jack_new();
>>      }
>>      else {
>>         snd_jack_new();
>>         snd_jack_add_new_kctls();
>>      }
>>
>> Now the HDA looks more like the ASoC variant. Yang, what do you think
>> about that? That would make the API simpler, wouldn't it?
>
> Well, what I thought was rather to allow snd_jack_new() creating a
> phantom jack, too, with some flag.  When a phantom flag is set, it
> creates no input jack device but only kctl jacks.

Yes, that sounds even better - that would make it easy for non-HDA 
drivers to create phantom jacks too, if they want.


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

  reply	other threads:[~2015-04-08  7:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-03 12:07 [PATCH v4 0/5] ALSA: jack: Refactoring for jack kctls Jie Yang
2015-04-03 12:07 ` [PATCH v4 1/5] ALSA: jack: create jack kcontrols for every jack input Jie Yang
2015-04-03 12:07 ` [PATCH v4 2/5] ALSA: jack: add a parameter to pass kctl for snd_jack_new Jie Yang
2015-04-03 12:07 ` [PATCH v4 3/5] ALSA: hda - Update to use the new jack kctls method Jie Yang
2015-04-03 12:07 ` [PATCH v4 4/5] ASoC: jack: create kctls according to jack pins info Jie Yang
2015-04-03 12:07 ` [PATCH v4 5/5] ALSA: jack: remove export snd_kctl_jack_new() Jie Yang
2015-04-06 16:11 ` [PATCH v4 0/5] ALSA: jack: Refactoring for jack kctls Mark Brown
2015-04-07 16:06 ` Takashi Iwai
2015-04-08  2:53   ` Jie, Yang
2015-04-08  4:39   ` Raymond Yau
2015-04-08  7:20   ` David Henningsson
2015-04-08  7:34     ` Takashi Iwai
2015-04-08  7:49       ` David Henningsson [this message]
2015-04-08  7:59     ` Jie, Yang
2015-04-08  8:27       ` David Henningsson
2015-04-08  9:18         ` Jie, Yang
2015-04-08  9:22           ` Takashi Iwai
2015-04-08 14:14             ` Jie, Yang
2015-04-08 14:29               ` Takashi Iwai
2015-04-08 18:47               ` David Henningsson
2015-04-08 18:55                 ` 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=5524DDA3.5000109@canonical.com \
    --to=david.henningsson@canonical.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=liam.r.girdwood@intel.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