0001 =======================
0002 HD-Audio DP-MST Support
0003 =======================
0004
0005 To support DP MST audio, HD Audio hdmi codec driver introduces virtual pin
0006 and dynamic pcm assignment.
0007
0008 Virtual pin is an extension of per_pin. The most difference of DP MST
0009 from legacy is that DP MST introduces device entry. Each pin can contain
0010 several device entries. Each device entry behaves as a pin.
0011
0012 As each pin may contain several device entries and each codec may contain
0013 several pins, if we use one pcm per per_pin, there will be many PCMs.
0014 The new solution is to create a few PCMs and to dynamically bind pcm to
0015 per_pin. Driver uses spec->dyn_pcm_assign flag to indicate whether to use
0016 the new solution.
0017
0018 PCM
0019 ===
0020 To be added
0021
0022 Pin Initialization
0023 ==================
0024 Each pin may have several device entries (virtual pins). On Intel platform,
0025 the device entries number is dynamically changed. If DP MST hub is connected,
0026 it is in DP MST mode, and the device entries number is 3. Otherwise, the
0027 device entries number is 1.
0028
0029 To simplify the implementation, all the device entries will be initialized
0030 when bootup no matter whether it is in DP MST mode or not.
0031
0032 Connection list
0033 ===============
0034 DP MST reuses connection list code. The code can be reused because
0035 device entries on the same pin have the same connection list.
0036
0037 This means DP MST gets the device entry connection list without the
0038 device entry setting.
0039
0040 Jack
0041 ====
0042
0043 Presume:
0044 - MST must be dyn_pcm_assign, and it is acomp (for Intel scenario);
0045 - NON-MST may or may not be dyn_pcm_assign, it can be acomp or !acomp;
0046
0047 So there are the following scenarios:
0048 a. MST (&& dyn_pcm_assign && acomp)
0049 b. NON-MST && dyn_pcm_assign && acomp
0050 c. NON-MST && !dyn_pcm_assign && !acomp
0051
0052 Below discussion will ignore MST and NON-MST difference as it doesn't
0053 impact on jack handling too much.
0054
0055 Driver uses struct hdmi_pcm pcm[] array in hdmi_spec and snd_jack is
0056 a member of hdmi_pcm. Each pin has one struct hdmi_pcm * pcm pointer.
0057
0058 For !dyn_pcm_assign, per_pin->pcm will assigned to spec->pcm[n] statically.
0059
0060 For dyn_pcm_assign, per_pin->pcm will assigned to spec->pcm[n]
0061 when monitor is hotplugged.
0062
0063
0064 Build Jack
0065 ----------
0066
0067 - dyn_pcm_assign
0068
0069 Will not use hda_jack but use snd_jack in spec->pcm_rec[pcm_idx].jack directly.
0070
0071 - !dyn_pcm_assign
0072
0073 Use hda_jack and assign spec->pcm_rec[pcm_idx].jack = jack->jack statically.
0074
0075
0076 Unsolicited Event Enabling
0077 --------------------------
0078 Enable unsolicited event if !acomp.
0079
0080
0081 Monitor Hotplug Event Handling
0082 ------------------------------
0083 - acomp
0084
0085 pin_eld_notify() -> check_presence_and_report() -> hdmi_present_sense() ->
0086 sync_eld_via_acomp().
0087
0088 Use directly snd_jack_report() on spec->pcm_rec[pcm_idx].jack for
0089 both dyn_pcm_assign and !dyn_pcm_assign
0090
0091 - !acomp
0092
0093 hdmi_unsol_event() -> hdmi_intrinsic_event() -> check_presence_and_report() ->
0094 hdmi_present_sense() -> hdmi_prepsent_sense_via_verbs()
0095
0096 Use directly snd_jack_report() on spec->pcm_rec[pcm_idx].jack for dyn_pcm_assign.
0097 Use hda_jack mechanism to handle jack events.
0098
0099
0100 Others to be added later
0101 ========================