All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liam Girdwood <liam.r.girdwood@linux.intel.com>
To: Raymond Yau <superquad.vortex2@gmail.com>
Cc: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>,
	Takashi Iwai <tiwai@suse.de>,
	ALSA Development Mailing List <alsa-devel@alsa-project.org>,
	Mark Brown <broonie@kernel.org>,
	Arun Raghavan <arun@accosted.net>, Han Lu <han.lu@intel.com>,
	Dylan Reid <dgreid@chromium.org>
Subject: Re: Separate input and output jacks for one UCM device?
Date: Mon, 06 Apr 2015 10:26:33 +0100	[thread overview]
Message-ID: <1428312393.2616.19.camel@loki> (raw)
In-Reply-To: <CAN8cciaYWDECp0cP+E0i-rMbfJKn=WiEZXe0YvS9q48MmB89Ng@mail.gmail.com>

On Sat, 2015-04-04 at 13:39 +0800, Raymond Yau wrote:
> > >> >
> > >> > I've added a few others on the CC that would be interested.
> > >> >
> > >> > > My understanding is that a UCM device can represent a thing
> that has
> > >> > > both input and output (I don't particularly like that, but
> it's too late
> > >> > > to complain).
> > >> >
> > >> > Yes, but it can also represent simplex devices too e.g.
> > >> > "Headset-Speakers" and "Headset-Mic". There are not any hard
> rules here,
> > >> > but most examples are using duplex devices as historically UCM
> came from
> > >> > the phone ecosystem use cases.
> > >> >
> > >> > > How likely do you think that there are or there will be
> > >> > > some drivers that expose separate input and output jack
> kcontrols for a
> > >> > > headset jack, to differentiate between
> headphones/headset/microphone? My
> > >> > > understanding is that jack kcontrols store only booleans, so
> there's no
> > >> > > way to distinguish between headphones and a headset with just
> one kcontrol.
> > >> > >
> > >> >
> > >> > This sounds like we need to extend the jack kcontrol so that we
> can
> > >> > differentiate between Headphones and Headset unless the
> kcontrol naming
> > >> > was intended to differentiate and define the jack type ?
> > >>
> > >> I guess it's now clear that all jack kcontrols will be booleans,
> and
> > >> headset jacks will require two jack kcontrols.
> > >>
> > >> > > The current UCM "spec" doesn't support specifying multiple
> kcontrols,
> > >> > > since there's only one "JackControl" value. (Perhaps the
> "JackDev" value
> > >> > > suffers from this problem too, but I don't know if jack input
> devices
> > >> > > already support reporting the state separately for input and
> output.)
> > >> > >
> > >> >
> > >> > I think in this case we could define simplex UCM devices and
> attach a
> > >> > JackControl value to each device.
> > >>
> > >> So is your preference that UCM configuration authors are forced
> to
> > >> define simplex devices to deal with headset jacks, rather than
> using
> > >> duplex devices and defining "PlaybackJackControl" and
> > >> "CaptureJackControl" separately? (I don't personally mind either
> way.)
> > >
> > > I don't really mind either, but what's easier for audio servers
> like
> > > pulseaudio that will be the main UCM clients ? I guess that
> pulseaudio,
> > > CRAS, and other audio servers probably deal with simplex PCM
> streams
> > > internally so mapping to simplex jacks/devices might be better ?
> >
> > There is an advantage to having a separate device for the headphone
> and mic
> > even if they are connected to the same jack.  The user can enable
> one and not
> > the other, most commonly to use the headphones but record from the
> built-in mic,
> > ignoring the headset mic.  Because of this we require all ChromeOS
> devices to
> > support separate reporting and selection of headphone/mic on the
> headset jack.
> > There is always one UCM device and one user-visible i/o node per
> jack.
> >
> > >
> 
> How do these kind of jack handle by UCM ?
> 
> http://www.dell.com/support/home/us/en/19/product-support/product/inspiron-15-3537/manuals
> 
> 6 Headset port Connect a headphone, a microphone, or a headphone and
> microphone combo (headset).
> 

UCM is not really needed for this device as Pulseaudio handles the
standardised HDA jacks and routing (there is nothing stopping a UCM
config being defined though). So for each input/output endpoint above
you would list it's jack kcontrol in the endpoint device section. e.g.
sound server reads jack input and type, checks UCM config and matches
the device before setting routing according to UCM device.

UCM is mainly needed for non HDA devices that have different jack pins,
volume controls and routing controls. Sound servers have no way of
guessing the correct mixers and volume controls to use for non HDA
devices as they are all very different HW. 

Liam

  reply	other threads:[~2015-04-06  9:26 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-18 19:41 Separate input and output jacks for one UCM device? Tanu Kaskinen
2015-03-19  9:15 ` Liam Girdwood
2015-03-19 14:09   ` Takashi Iwai
2015-03-19 14:19     ` Mark Brown
2015-03-19 14:22     ` Jie, Yang
2015-03-19 14:34       ` Takashi Iwai
2015-03-19 14:31     ` Jie, Yang
2015-03-19 14:37       ` Takashi Iwai
2015-03-19 14:42         ` Mark Brown
2015-03-19 14:51           ` Takashi Iwai
2015-03-19 15:18             ` Mark Brown
2015-03-19 15:28               ` Takashi Iwai
2015-03-19 15:45                 ` Mark Brown
2015-03-20  4:03                 ` Raymond Yau
2015-03-31 16:49   ` Tanu Kaskinen
2015-04-01 12:27     ` Liam Girdwood
2015-04-01 16:56       ` Tanu Kaskinen
2015-04-01 23:24       ` Raymond Yau
2015-04-02  6:39         ` Liam Girdwood
2015-04-02 15:28       ` Dylan Reid
2015-04-04  5:39         ` Raymond Yau
2015-04-06  9:26           ` Liam Girdwood [this message]
2015-04-07  3:00             ` Raymond Yau
2015-04-08  1:29             ` Raymond Yau
2015-04-07 20:37         ` Tanu Kaskinen
2015-04-15 15:39           ` Tanu Kaskinen
2015-04-15 16:10             ` Dylan Reid
2015-04-16  8:31               ` Tanu Kaskinen

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=1428312393.2616.19.camel@loki \
    --to=liam.r.girdwood@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=arun@accosted.net \
    --cc=broonie@kernel.org \
    --cc=dgreid@chromium.org \
    --cc=han.lu@intel.com \
    --cc=superquad.vortex2@gmail.com \
    --cc=tanu.kaskinen@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.