From: Jie Yang <yang.jie@intel.com>
To: tiwai@suse.de
Cc: alsa-devel@alsa-project.org, broonie@kernel.org,
tanu.kaskinen@linux.intel.com, liam.r.girdwood@intel.com
Subject: [PATCH v10 7/7] ALSA: Docs: Add documentation for Jack kcontrols
Date: Mon, 27 Apr 2015 21:21:02 +0800 [thread overview]
Message-ID: <1430140862-17207-8-git-send-email-yang.jie@intel.com> (raw)
In-Reply-To: <1430140862-17207-1-git-send-email-yang.jie@intel.com>
Add documentation describing Jack kcontrols and how to use them
with HD-Audio and ASoC.
Signed-off-by: Jie Yang <yang.jie@intel.com>
---
Documentation/sound/alsa/Jack-Controls.txt | 43 ++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
create mode 100644 Documentation/sound/alsa/Jack-Controls.txt
diff --git a/Documentation/sound/alsa/Jack-Controls.txt b/Documentation/sound/alsa/Jack-Controls.txt
new file mode 100644
index 0000000..fe1c5e0
--- /dev/null
+++ b/Documentation/sound/alsa/Jack-Controls.txt
@@ -0,0 +1,43 @@
+Why we need Jack kcontrols
+==========================
+
+ALSA uses kcontrols to export audio controls(switch, volume, Mux, ...)
+to user space. This means userspace applications like pulseaudio can
+switch off headphones and switch on speakers when no headphones are
+pluged in.
+
+The old ALSA jack code only created input devices for each registered
+jack. These jack input devices are not readable by userspace devices
+that run as non root.
+
+The new jack code creates embedded jack kcontrols for each jack that
+can be read by any process.
+
+This can be combined with UCM to allow userspace to route audio more
+intelligently based on jack insertion or removal events.
+
+Jack Kcontrol Internals
+=======================
+
+Each jack will have a kcontrol list, so that we can create a kcontrol
+and attach it to the jack, at jack creation stage. We can also add a
+kcontrol to an existing jack, at anytime when required.
+
+Those kcontrols will be freed automatically when the Jack is freed.
+
+How to use jack kcontrols
+=========================
+
+In order to keep compatibility, snd_jack_new() has been modified by
+adding two params :-
+
+ - @initial_kctl: if true, create a kcontrol and add it to the jack
+ list.
+ - @phantom_jack: Don't create a input device for phantom jacks.
+
+HDA jacks can set phantom_jack to true in order to create a phantom
+jack and set initial_kctl to true to create an initial kcontrol with
+the correct id.
+
+ASoC jacks should set initial_kctl as false. The pin name will be
+assigned as the jack kcontrol name.
--
1.9.1
next prev parent reply other threads:[~2015-04-27 13:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-27 13:20 [PATCH v10 0/7] ALSA: jack: Refactoring for jack kctls Jie Yang
2015-04-27 13:20 ` [PATCH v10 1/7] ALSA: jack: implement kctl creating for jack devices Jie Yang
2015-04-27 13:20 ` [PATCH v10 2/7] ALSA: Jack: handle jack embedded kcontrol creating within ctljack Jie Yang
2015-04-27 13:20 ` [PATCH v10 3/7] ALSA: jack: extend snd_jack_new to support phantom jack Jie Yang
2015-04-27 13:20 ` [PATCH v10 4/7] ALSA: hda - Update to use the new jack kctls method Jie Yang
2015-04-27 13:21 ` [PATCH v10 5/7] ASoC: jack: create kctls according to jack pins info Jie Yang
2015-04-27 13:21 ` [PATCH v10 6/7] ALSA: jack: remove exporting ctljack functions Jie Yang
2015-04-27 13:21 ` Jie Yang [this message]
2015-04-28 6:51 ` [PATCH v10 0/7] ALSA: jack: Refactoring for jack kctls 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=1430140862-17207-8-git-send-email-yang.jie@intel.com \
--to=yang.jie@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=liam.r.girdwood@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox