Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: David Henningsson <david.henningsson@canonical.com>
To: "Jie, Yang" <yang.jie@intel.com>,
	Tanu Kaskinen <tanu.kaskinen@linux.intel.com>,
	Takashi Iwai <tiwai@suse.de>
Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"Girdwood, Liam R" <liam.r.girdwood@intel.com>
Subject: Re: [PATCH v2 1/2] ALSA: jack: create jack kcontrols for every jack input device
Date: Thu, 26 Mar 2015 07:42:14 +0100	[thread overview]
Message-ID: <5513AA46.2080804@canonical.com> (raw)
In-Reply-To: <E7B1D079BA13FB44A978CC8F69C7D6A901BDD854@SHSMSX101.ccr.corp.intel.com>



On 2015-03-25 14:53, Jie, Yang wrote:
>
> Thank you for comprehensive summarizing, David.
> Can you help give more description as below?
>
> ~Keyon
>
>> -----Original Message-----
>> From: David Henningsson [mailto:david.henningsson@canonical.com]
>> Sent: Monday, March 23, 2015 7:51 PM
>> To: Tanu Kaskinen; Takashi Iwai
>> Cc: Jie, Yang; perex@perex.cz; broonie@kernel.org; alsa-devel@alsa-
>> project.org; Girdwood, Liam R; Liam Girdwood
>> Subject: Re: [PATCH v2 1/2] ALSA: jack: create jack kcontrols for every jack
>> input device
>>
>>
>>
>> On 2015-03-23 11:56, Tanu Kaskinen wrote:
>>> One thing that is unclear for me is that how are those jacks
>>> represented that support any of headsets/headphones/microphones, but
>>> don't provide information about which device type has been plugged in.
>>
>> For headphone or headset, independent switches:
>>
>>    * "Headphone Jack"
>>    * "Headset Mic Jack"
> [Keyon] here for the most common headset jack
> (SND_JACK_HEADPHONE | SND_JACK_MICROPHONE), we should create
> two independent kctls/switches--"Headphone Jack" + "Headset Mic Jack",
> right?
>
> so, is it possible that there is only "Mic Jack" in this case? I mean that
> only input(no output, no physical headphone/speaker jack) jack exist.
>
> If yes, then we may need change "Headset Mic Jack" to "Mic Jack"?

I'm not sure I understand your question - of course there are input only 
jacks, but they would then be SND_JACK_MICROPHONE only, and also 
labelled "Mic Jack". But that's not a headset jack, that's a microphone 
jack.

>> For headphone or headset, one hw switch only:
> [Keyon] I am sorry I am not familiar with the jack HW circuit. What "one
> hw switch only" here means? Does it means that -- for headset Jack, the
> status(connected/disconnected) of HP pin is always exactly same with
> that of Mic pin?

There is only one jack detection input from HW. Regardless of whether 
you plug in headphone or a headset, the HW switch would detect "plugged 
in". When the jack is unplugged, the HW switch would detect "unplugged".

The HW cannot tell us whether you plugged in a headphone or headset.

>>    * "Headphone Jack"
>>    * "Headset Mic Phantom Jack"
> [Keyon] for Headset of this type, do we need create only "Headset Mic
> Phantom Jack" kctl, or "Headphone Jack" kctl is also needed?

We need both kctls.

>> Headphone or mic, one hw switch:
> [Keyon]I am fresh about this kind of hw jack, it should use different
> segment of the plug, seems we don't need check the actual connected
> status at the jack creation stage, just creating "Headphone Mic Jack"
> should works, right?

It is not very common. It was used on some Asus netbooks a while ago. 
But yes, we should just create a "Headphone Mic Jack".

>>
>>    * "Headphone Mic Jack"
>>
>> Headphone, headset, or mic, one hw switch only:
> [Keyon] how many kctls should we create for this?
>>
>>    * "Headphone Mic Jack"
>>    * "Headset Mic Phantom Jack"

Same as today, two: "Headphone Mic Jack" and "Headset Mic Phantom Jack".

>> Headphone, headset, or mic, one switch for hp/mic and the other for the
>> headset mic:
> [Keyon] I can't imagine how this works, it's too messy for me. :(
>>
>>    * "Headphone Mic Jack"
>>    * "Headset Mic Jack"

Nothing plugged in:
   "Headphone Mic Jack" = false, "Headset Mic Jack" = false
Headphones plugged in:
   "Headphone Mic Jack" = true, "Headset Mic Jack" = false
Headset plugged in:
   "Headphone Mic Jack" = true, "Headset Mic Jack" = true
Mic plugged in:
   "Headphone Mic Jack" = true, "Headset Mic Jack" = false

As you can see, "Headphones" and "Mic" results in the same output, hence 
userspace needs to ask the user if (s)he plugged in a headphone or mic.

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

  parent reply	other threads:[~2015-03-26  6:42 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-20  8:55 [PATCH v2 0/2] ALSA: jack: Refactoring for jack kctls Jie Yang
2015-03-20  8:55 ` Jie Yang
2015-03-20  8:55 ` [PATCH v2 1/2] ALSA: jack: create jack kcontrols for every jack input device Jie Yang
2015-03-20  9:27   ` Takashi Iwai
2015-03-20  9:29     ` Takashi Iwai
2015-03-20 12:22     ` Jie, Yang
2015-03-20 12:26       ` Takashi Iwai
2015-03-20 12:50         ` Jie, Yang
2015-03-20 13:21           ` Takashi Iwai
2015-03-20 13:49             ` Jie, Yang
2015-03-20 14:18               ` Takashi Iwai
2015-03-23 10:56                 ` Tanu Kaskinen
2015-03-23 11:51                   ` David Henningsson
2015-03-23 11:59                     ` Takashi Iwai
2015-03-23 16:41                     ` Mark Brown
2015-03-24  6:50                       ` David Henningsson
2015-03-24 17:57                         ` Mark Brown
2015-03-25  0:48                           ` Raymond Yau
2015-03-25  2:14                         ` Raymond Yau
2015-03-25 13:53                     ` Jie, Yang
2015-03-25 16:13                       ` Raymond Yau
2015-03-26  6:42                       ` David Henningsson [this message]
2015-03-26  8:29                         ` Jie, Yang
2015-03-26  9:05                           ` David Henningsson
2015-03-26 12:39                             ` Jie, Yang
2015-03-27  0:39                               ` Raymond Yau
2015-03-27  2:13                                 ` Jie, Yang
2015-03-26 12:43                             ` Jie, Yang
2015-03-27  6:50                               ` David Henningsson
2015-03-27  7:45                                 ` Jie, Yang
2015-03-27  8:01                                   ` David Henningsson
2015-03-27  9:11                                     ` Jie, Yang
2015-03-30  7:27                                       ` David Henningsson
2015-03-26  2:34                     ` Raymond Yau
2015-03-25  7:53                   ` Jie, Yang
2015-03-25  9:27                     ` Tanu Kaskinen
2015-03-25 14:13                       ` Jie, Yang
2015-03-28  6:09           ` Raymond Yau
2015-03-20 10:30   ` Raymond Yau
2015-03-20  8:55 ` [PATCH v2 2/2] ALSA: hda - Remove jack kctls Jie Yang

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=5513AA46.2080804@canonical.com \
    --to=david.henningsson@canonical.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=liam.r.girdwood@intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=tanu.kaskinen@linux.intel.com \
    --cc=tiwai@suse.de \
    --cc=yang.jie@intel.com \
    /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