brintos

brintos / linux-shallow public Read only

0
0
Text · 3.0 KiB · 1617459 Raw
102 lines · plain
1=======================2HD-Audio DP-MST Support3=======================4 5To support DP MST audio, HD Audio hdmi codec driver introduces virtual pin6and dynamic pcm assignment.7 8Virtual pin is an extension of per_pin. The most difference of DP MST9from legacy is that DP MST introduces device entry. Each pin can contain10several device entries. Each device entry behaves as a pin.11 12As each pin may contain several device entries and each codec may contain13several pins, if we use one pcm per per_pin, there will be many PCMs.14The new solution is to create a few PCMs and to dynamically bind pcm to15per_pin. Driver uses spec->dyn_pcm_assign flag to indicate whether to use16the new solution.17 18PCM19===20To be added21 22Pin Initialization23==================24Each pin may have several device entries (virtual pins). On Intel platform,25the device entries number is dynamically changed. If DP MST hub is connected,26it is in DP MST mode, and the device entries number is 3. Otherwise, the27device entries number is 1.28 29To simplify the implementation, all the device entries will be initialized30when bootup no matter whether it is in DP MST mode or not.31 32Connection list33===============34DP MST reuses connection list code. The code can be reused because35device entries on the same pin have the same connection list.36 37This means DP MST gets the device entry connection list without the38device entry setting.39 40Jack41====42 43Presume:44 - MST must be dyn_pcm_assign, and it is acomp (for Intel scenario);45 - NON-MST may or may not be dyn_pcm_assign, it can be acomp or !acomp;46 47So there are the following scenarios:48 a. MST (&& dyn_pcm_assign && acomp)49 b. NON-MST && dyn_pcm_assign && acomp50 c. NON-MST && !dyn_pcm_assign && !acomp51 52Below discussion will ignore MST and NON-MST difference as it doesn't53impact on jack handling too much.54 55Driver uses struct hdmi_pcm pcm[] array in hdmi_spec and snd_jack is56a member of hdmi_pcm. Each pin has one struct hdmi_pcm * pcm pointer.57 58For !dyn_pcm_assign, per_pin->pcm will assigned to spec->pcm[n] statically.59 60For dyn_pcm_assign, per_pin->pcm will assigned to spec->pcm[n]61when monitor is hotplugged.62 63 64Build Jack65----------66 67- dyn_pcm_assign68 69  Will not use hda_jack but use snd_jack in spec->pcm_rec[pcm_idx].jack directly.70 71- !dyn_pcm_assign72 73  Use hda_jack and assign spec->pcm_rec[pcm_idx].jack = jack->jack statically.74 75 76Unsolicited Event Enabling77--------------------------78Enable unsolicited event if !acomp.79 80 81Monitor Hotplug Event Handling82------------------------------83- acomp84 85  pin_eld_notify() -> check_presence_and_report() -> hdmi_present_sense() ->86  sync_eld_via_acomp().87 88  Use directly snd_jack_report() on spec->pcm_rec[pcm_idx].jack for89  both dyn_pcm_assign and !dyn_pcm_assign90 91- !acomp92 93  hdmi_unsol_event() -> hdmi_intrinsic_event() -> check_presence_and_report() ->94  hdmi_present_sense() -> hdmi_prepsent_sense_via_verbs()95 96  Use directly snd_jack_report() on spec->pcm_rec[pcm_idx].jack for dyn_pcm_assign.97  Use hda_jack mechanism to handle jack events.98 99 100Others to be added later101========================102