HD-Audio-DP-MST-audio.txt 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. To support DP MST audio, HD Audio hdmi codec driver introduces virtual pin
  2. and dynamic pcm assignment.
  3. Virtual pin is an extension of per_pin. The most difference of DP MST
  4. from legacy is that DP MST introduces device entry. Each pin can contain
  5. several device entries. Each device entry behaves as a pin.
  6. As each pin may contain several device entries and each codec may contain
  7. several pins, if we use one pcm per per_pin, there will be many PCMs.
  8. The new solution is to create a few PCMs and to dynamically bind pcm to
  9. per_pin. Driver uses spec->dyn_pcm_assign flag to indicate whether to use
  10. the new solution.
  11. PCM
  12. ===
  13. To be added
  14. Jack
  15. ====
  16. Presume:
  17. - MST must be dyn_pcm_assign, and it is acomp (for Intel scenario);
  18. - NON-MST may or may not be dyn_pcm_assign, it can be acomp or !acomp;
  19. So there are the following scenarios:
  20. a. MST (&& dyn_pcm_assign && acomp)
  21. b. NON-MST && dyn_pcm_assign && acomp
  22. c. NON-MST && !dyn_pcm_assign && !acomp
  23. Below discussion will ignore MST and NON-MST difference as it doesn't
  24. impact on jack handling too much.
  25. Driver uses struct hdmi_pcm pcm[] array in hdmi_spec and snd_jack is
  26. a member of hdmi_pcm. Each pin has one struct hdmi_pcm * pcm pointer.
  27. For !dyn_pcm_assign, per_pin->pcm will assigned to spec->pcm[n] statically.
  28. For dyn_pcm_assign, per_pin->pcm will assigned to spec->pcm[n]
  29. when monitor is hotplugged.
  30. Build Jack
  31. ----------
  32. - dyn_pcm_assign
  33. Will not use hda_jack but use snd_jack in spec->pcm_rec[pcm_idx].jack directly.
  34. - !dyn_pcm_assign
  35. Use hda_jack and assign spec->pcm_rec[pcm_idx].jack = jack->jack statically.
  36. Unsolicited Event Enabling
  37. --------------------------
  38. Enable unsolicited event if !acomp.
  39. Monitor Hotplug Event Handling
  40. ------------------------------
  41. - acomp
  42. pin_eld_notify() -> check_presence_and_report() -> hdmi_present_sense() ->
  43. sync_eld_via_acomp().
  44. Use directly snd_jack_report() on spec->pcm_rec[pcm_idx].jack for
  45. both dyn_pcm_assign and !dyn_pcm_assign
  46. - !acomp
  47. Hdmi_unsol_event() -> hdmi_intrinsic_event() -> check_presence_and_report() ->
  48. hdmi_present_sense() -> hdmi_prepsent_sense_via_verbs()
  49. Use directly snd_jack_report() on spec->pcm_rec[pcm_idx].jack for dyn_pcm_assign.
  50. Use hda_jack mechanism to handle jack events.
  51. Others to be added later
  52. ========================