Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
[sfrench/cifs-2.6.git] / Documentation / sound / hd-audio / dp-mst.rst
1 =======================
2 HD-Audio DP-MST Support
3 =======================
4
5 To support DP MST audio, HD Audio hdmi codec driver introduces virtual pin
6 and dynamic pcm assignment.
7
8 Virtual pin is an extension of per_pin. The most difference of DP MST
9 from legacy is that DP MST introduces device entry. Each pin can contain
10 several device entries. Each device entry behaves as a pin.
11
12 As each pin may contain several device entries and each codec may contain
13 several pins, if we use one pcm per per_pin, there will be many PCMs.
14 The new solution is to create a few PCMs and to dynamically bind pcm to
15 per_pin. Driver uses spec->dyn_pcm_assign flag to indicate whether to use
16 the new solution.
17
18 PCM
19 ===
20 To be added
21
22
23 Jack
24 ====
25
26 Presume:
27  - MST must be dyn_pcm_assign, and it is acomp (for Intel scenario);
28  - NON-MST may or may not be dyn_pcm_assign, it can be acomp or !acomp;
29
30 So there are the following scenarios:
31  a. MST (&& dyn_pcm_assign && acomp)
32  b. NON-MST && dyn_pcm_assign && acomp
33  c. NON-MST && !dyn_pcm_assign && !acomp
34
35 Below discussion will ignore MST and NON-MST difference as it doesn't
36 impact on jack handling too much.
37
38 Driver uses struct hdmi_pcm pcm[] array in hdmi_spec and snd_jack is
39 a member of hdmi_pcm. Each pin has one struct hdmi_pcm * pcm pointer.
40
41 For !dyn_pcm_assign, per_pin->pcm will assigned to spec->pcm[n] statically.
42
43 For dyn_pcm_assign, per_pin->pcm will assigned to spec->pcm[n]
44 when monitor is hotplugged.
45
46
47 Build Jack
48 ----------
49
50 - dyn_pcm_assign
51
52   Will not use hda_jack but use snd_jack in spec->pcm_rec[pcm_idx].jack directly.
53
54 - !dyn_pcm_assign
55
56   Use hda_jack and assign spec->pcm_rec[pcm_idx].jack = jack->jack statically.
57
58
59 Unsolicited Event Enabling
60 --------------------------
61 Enable unsolicited event if !acomp.
62
63
64 Monitor Hotplug Event Handling
65 ------------------------------
66 - acomp
67
68   pin_eld_notify() -> check_presence_and_report() -> hdmi_present_sense() ->
69   sync_eld_via_acomp().
70
71   Use directly snd_jack_report() on spec->pcm_rec[pcm_idx].jack for
72   both dyn_pcm_assign and !dyn_pcm_assign
73
74 - !acomp
75
76   hdmi_unsol_event() -> hdmi_intrinsic_event() -> check_presence_and_report() ->
77   hdmi_present_sense() -> hdmi_prepsent_sense_via_verbs()
78
79   Use directly snd_jack_report() on spec->pcm_rec[pcm_idx].jack for dyn_pcm_assign.
80   Use hda_jack mechanism to handle jack events.
81
82
83 Others to be added later
84 ========================