From: Takashi Iwai Date: Thu, 10 Nov 2016 16:41:45 +0000 (+0100) Subject: ALSA: doc: ReSTize HD-Audio-DP-MST-audio.txt X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=76ab4e15158c677141e8b8ff5f0295166f474553;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ALSA: doc: ReSTize HD-Audio-DP-MST-audio.txt A simple conversion from a plain text file. Put to hd-audio subdirectory. Signed-off-by: Takashi Iwai --- diff --git a/Documentation/sound/alsa/HD-Audio-DP-MST-audio.txt b/Documentation/sound/alsa/HD-Audio-DP-MST-audio.txt deleted file mode 100644 index 82744ac3513d..000000000000 --- a/Documentation/sound/alsa/HD-Audio-DP-MST-audio.txt +++ /dev/null @@ -1,74 +0,0 @@ -To support DP MST audio, HD Audio hdmi codec driver introduces virtual pin -and dynamic pcm assignment. - -Virtual pin is an extension of per_pin. The most difference of DP MST -from legacy is that DP MST introduces device entry. Each pin can contain -several device entries. Each device entry behaves as a pin. - -As each pin may contain several device entries and each codec may contain -several pins, if we use one pcm per per_pin, there will be many PCMs. -The new solution is to create a few PCMs and to dynamically bind pcm to -per_pin. Driver uses spec->dyn_pcm_assign flag to indicate whether to use -the new solution. - -PCM -=== -To be added - - -Jack -==== - -Presume: - - MST must be dyn_pcm_assign, and it is acomp (for Intel scenario); - - NON-MST may or may not be dyn_pcm_assign, it can be acomp or !acomp; - -So there are the following scenarios: - a. MST (&& dyn_pcm_assign && acomp) - b. NON-MST && dyn_pcm_assign && acomp - c. NON-MST && !dyn_pcm_assign && !acomp - -Below discussion will ignore MST and NON-MST difference as it doesn't -impact on jack handling too much. - -Driver uses struct hdmi_pcm pcm[] array in hdmi_spec and snd_jack is -a member of hdmi_pcm. Each pin has one struct hdmi_pcm * pcm pointer. - -For !dyn_pcm_assign, per_pin->pcm will assigned to spec->pcm[n] statically. - -For dyn_pcm_assign, per_pin->pcm will assigned to spec->pcm[n] -when monitor is hotplugged. - - -Build Jack ----------- - -- dyn_pcm_assign -Will not use hda_jack but use snd_jack in spec->pcm_rec[pcm_idx].jack directly. - -- !dyn_pcm_assign -Use hda_jack and assign spec->pcm_rec[pcm_idx].jack = jack->jack statically. - - -Unsolicited Event Enabling --------------------------- -Enable unsolicited event if !acomp. - - -Monitor Hotplug Event Handling ------------------------------- -- acomp -pin_eld_notify() -> check_presence_and_report() -> hdmi_present_sense() -> -sync_eld_via_acomp(). -Use directly snd_jack_report() on spec->pcm_rec[pcm_idx].jack for -both dyn_pcm_assign and !dyn_pcm_assign - -- !acomp -Hdmi_unsol_event() -> hdmi_intrinsic_event() -> check_presence_and_report() -> -hdmi_present_sense() -> hdmi_prepsent_sense_via_verbs() -Use directly snd_jack_report() on spec->pcm_rec[pcm_idx].jack for dyn_pcm_assign. -Use hda_jack mechanism to handle jack events. - - -Others to be added later -======================== diff --git a/Documentation/sound/hd-audio/dp-mst.rst b/Documentation/sound/hd-audio/dp-mst.rst new file mode 100644 index 000000000000..58b72437e6c3 --- /dev/null +++ b/Documentation/sound/hd-audio/dp-mst.rst @@ -0,0 +1,84 @@ +======================= +HD-Audio DP-MST Support +======================= + +To support DP MST audio, HD Audio hdmi codec driver introduces virtual pin +and dynamic pcm assignment. + +Virtual pin is an extension of per_pin. The most difference of DP MST +from legacy is that DP MST introduces device entry. Each pin can contain +several device entries. Each device entry behaves as a pin. + +As each pin may contain several device entries and each codec may contain +several pins, if we use one pcm per per_pin, there will be many PCMs. +The new solution is to create a few PCMs and to dynamically bind pcm to +per_pin. Driver uses spec->dyn_pcm_assign flag to indicate whether to use +the new solution. + +PCM +=== +To be added + + +Jack +==== + +Presume: + - MST must be dyn_pcm_assign, and it is acomp (for Intel scenario); + - NON-MST may or may not be dyn_pcm_assign, it can be acomp or !acomp; + +So there are the following scenarios: + a. MST (&& dyn_pcm_assign && acomp) + b. NON-MST && dyn_pcm_assign && acomp + c. NON-MST && !dyn_pcm_assign && !acomp + +Below discussion will ignore MST and NON-MST difference as it doesn't +impact on jack handling too much. + +Driver uses struct hdmi_pcm pcm[] array in hdmi_spec and snd_jack is +a member of hdmi_pcm. Each pin has one struct hdmi_pcm * pcm pointer. + +For !dyn_pcm_assign, per_pin->pcm will assigned to spec->pcm[n] statically. + +For dyn_pcm_assign, per_pin->pcm will assigned to spec->pcm[n] +when monitor is hotplugged. + + +Build Jack +---------- + +- dyn_pcm_assign + + Will not use hda_jack but use snd_jack in spec->pcm_rec[pcm_idx].jack directly. + +- !dyn_pcm_assign + + Use hda_jack and assign spec->pcm_rec[pcm_idx].jack = jack->jack statically. + + +Unsolicited Event Enabling +-------------------------- +Enable unsolicited event if !acomp. + + +Monitor Hotplug Event Handling +------------------------------ +- acomp + + pin_eld_notify() -> check_presence_and_report() -> hdmi_present_sense() -> + sync_eld_via_acomp(). + + Use directly snd_jack_report() on spec->pcm_rec[pcm_idx].jack for + both dyn_pcm_assign and !dyn_pcm_assign + +- !acomp + + hdmi_unsol_event() -> hdmi_intrinsic_event() -> check_presence_and_report() -> + hdmi_present_sense() -> hdmi_prepsent_sense_via_verbs() + + Use directly snd_jack_report() on spec->pcm_rec[pcm_idx].jack for dyn_pcm_assign. + Use hda_jack mechanism to handle jack events. + + +Others to be added later +======================== diff --git a/Documentation/sound/hd-audio/index.rst b/Documentation/sound/hd-audio/index.rst index c6efd55a219f..f8a72ffffe66 100644 --- a/Documentation/sound/hd-audio/index.rst +++ b/Documentation/sound/hd-audio/index.rst @@ -7,3 +7,4 @@ HD-Audio notes models controls + dp-mst