1======================= 2HD-Audio DP-MST Support 3======================= 4 5To support DP MST audio, HD Audio hdmi codec driver introduces virtual pin 6and dynamic pcm assignment. 7 8Virtual pin is an extension of per_pin. The most difference of DP MST 9from legacy is that DP MST introduces device entry. Each pin can contain 10several device entries. Each device entry behaves as a pin. 11 12As each pin may contain several device entries and each codec may contain 13several 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 to 15per_pin. Driver uses spec->dyn_pcm_assign flag to indicate whether to use 16the new solution. 17 18PCM 19=== 20To be added 21 22 23Jack 24==== 25 26Presume: 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 30So 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 35Below discussion will ignore MST and NON-MST difference as it doesn't 36impact on jack handling too much. 37 38Driver uses struct hdmi_pcm pcm[] array in hdmi_spec and snd_jack is 39a member of hdmi_pcm. Each pin has one struct hdmi_pcm * pcm pointer. 40 41For !dyn_pcm_assign, per_pin->pcm will assigned to spec->pcm[n] statically. 42 43For dyn_pcm_assign, per_pin->pcm will assigned to spec->pcm[n] 44when monitor is hotplugged. 45 46 47Build 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 59Unsolicited Event Enabling 60-------------------------- 61Enable unsolicited event if !acomp. 62 63 64Monitor 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 83Others to be added later 84======================== 85