dp-mst.rst 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. =======================
  2. HD-Audio DP-MST Support
  3. =======================
  4. To support DP MST audio, HD Audio hdmi codec driver introduces virtual pin
  5. and dynamic pcm assignment.
  6. Virtual pin is an extension of per_pin. The most difference of DP MST
  7. from legacy is that DP MST introduces device entry. Each pin can contain
  8. several device entries. Each device entry behaves as a pin.
  9. As each pin may contain several device entries and each codec may contain
  10. several pins, if we use one pcm per per_pin, there will be many PCMs.
  11. The new solution is to create a few PCMs and to dynamically bind pcm to
  12. per_pin. Driver uses spec->dyn_pcm_assign flag to indicate whether to use
  13. the new solution.
  14. PCM
  15. ===
  16. To be added
  17. Pin Initialization
  18. ==================
  19. Each pin may have several device entries (virtual pins). On Intel platform,
  20. the device entries number is dynamically changed. If DP MST hub is connected,
  21. it is in DP MST mode, and the device entries number is 3. Otherwise, the
  22. device entries number is 1.
  23. To simplify the implementation, all the device entries will be initialized
  24. when bootup no matter whether it is in DP MST mode or not.
  25. Connection list
  26. ===============
  27. DP MST reuses connection list code. The code can be reused because
  28. device entries on the same pin have the same connection list.
  29. This means DP MST gets the device entry connection list without the
  30. device entry setting.
  31. Jack
  32. ====
  33. Presume:
  34. - MST must be dyn_pcm_assign, and it is acomp (for Intel scenario);
  35. - NON-MST may or may not be dyn_pcm_assign, it can be acomp or !acomp;
  36. So there are the following scenarios:
  37. a. MST (&& dyn_pcm_assign && acomp)
  38. b. NON-MST && dyn_pcm_assign && acomp
  39. c. NON-MST && !dyn_pcm_assign && !acomp
  40. Below discussion will ignore MST and NON-MST difference as it doesn't
  41. impact on jack handling too much.
  42. Driver uses struct hdmi_pcm pcm[] array in hdmi_spec and snd_jack is
  43. a member of hdmi_pcm. Each pin has one struct hdmi_pcm * pcm pointer.
  44. For !dyn_pcm_assign, per_pin->pcm will assigned to spec->pcm[n] statically.
  45. For dyn_pcm_assign, per_pin->pcm will assigned to spec->pcm[n]
  46. when monitor is hotplugged.
  47. Build Jack
  48. ----------
  49. - dyn_pcm_assign
  50. Will not use hda_jack but use snd_jack in spec->pcm_rec[pcm_idx].jack directly.
  51. - !dyn_pcm_assign
  52. Use hda_jack and assign spec->pcm_rec[pcm_idx].jack = jack->jack statically.
  53. Unsolicited Event Enabling
  54. --------------------------
  55. Enable unsolicited event if !acomp.
  56. Monitor Hotplug Event Handling
  57. ------------------------------
  58. - acomp
  59. pin_eld_notify() -> check_presence_and_report() -> hdmi_present_sense() ->
  60. sync_eld_via_acomp().
  61. Use directly snd_jack_report() on spec->pcm_rec[pcm_idx].jack for
  62. both dyn_pcm_assign and !dyn_pcm_assign
  63. - !acomp
  64. hdmi_unsol_event() -> hdmi_intrinsic_event() -> check_presence_and_report() ->
  65. hdmi_present_sense() -> hdmi_prepsent_sense_via_verbs()
  66. Use directly snd_jack_report() on spec->pcm_rec[pcm_idx].jack for dyn_pcm_assign.
  67. Use hda_jack mechanism to handle jack events.
  68. Others to be added later
  69. ========================