diff options
author | Jie Yang <yang.jie@intel.com> | 2015-04-27 09:21:02 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-04-27 15:39:03 -0400 |
commit | 12e180a27f3e066a4ed4a446d428fd117f168beb (patch) | |
tree | 59905577f9a0e584b5b0be95d4b471692d888ab5 /Documentation/sound/alsa | |
parent | 807845e3641d3dc4c41ec84c5e576250c7218abf (diff) |
ALSA: Docs: Add documentation for Jack kcontrols
Add documentation describing Jack kcontrols and how to use them
with HD-Audio and ASoC.
Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'Documentation/sound/alsa')
-rw-r--r-- | Documentation/sound/alsa/Jack-Controls.txt | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Documentation/sound/alsa/Jack-Controls.txt b/Documentation/sound/alsa/Jack-Controls.txt new file mode 100644 index 000000000000..fe1c5e0c8555 --- /dev/null +++ b/Documentation/sound/alsa/Jack-Controls.txt | |||
@@ -0,0 +1,43 @@ | |||
1 | Why we need Jack kcontrols | ||
2 | ========================== | ||
3 | |||
4 | ALSA uses kcontrols to export audio controls(switch, volume, Mux, ...) | ||
5 | to user space. This means userspace applications like pulseaudio can | ||
6 | switch off headphones and switch on speakers when no headphones are | ||
7 | pluged in. | ||
8 | |||
9 | The old ALSA jack code only created input devices for each registered | ||
10 | jack. These jack input devices are not readable by userspace devices | ||
11 | that run as non root. | ||
12 | |||
13 | The new jack code creates embedded jack kcontrols for each jack that | ||
14 | can be read by any process. | ||
15 | |||
16 | This can be combined with UCM to allow userspace to route audio more | ||
17 | intelligently based on jack insertion or removal events. | ||
18 | |||
19 | Jack Kcontrol Internals | ||
20 | ======================= | ||
21 | |||
22 | Each jack will have a kcontrol list, so that we can create a kcontrol | ||
23 | and attach it to the jack, at jack creation stage. We can also add a | ||
24 | kcontrol to an existing jack, at anytime when required. | ||
25 | |||
26 | Those kcontrols will be freed automatically when the Jack is freed. | ||
27 | |||
28 | How to use jack kcontrols | ||
29 | ========================= | ||
30 | |||
31 | In order to keep compatibility, snd_jack_new() has been modified by | ||
32 | adding two params :- | ||
33 | |||
34 | - @initial_kctl: if true, create a kcontrol and add it to the jack | ||
35 | list. | ||
36 | - @phantom_jack: Don't create a input device for phantom jacks. | ||
37 | |||
38 | HDA jacks can set phantom_jack to true in order to create a phantom | ||
39 | jack and set initial_kctl to true to create an initial kcontrol with | ||
40 | the correct id. | ||
41 | |||
42 | ASoC jacks should set initial_kctl as false. The pin name will be | ||
43 | assigned as the jack kcontrol name. | ||