Re: [PATCH 3/4] ALSA: hda - display audio call ncts callback

Takashi Iwai
2015-08-06T10:02:41Z

On Thu, 06 Aug 2015 08:52:56 +0200,
libin.yang@intel.com wrote:
>
> From: Libin Yang <libin.yang@intel.com>
>
> On some Intel platforms, display audio need set N/CTS
> manually at some TMDS frequencies.
>
> Signed-off-by: Libin Yang <libin.yang@intel.com>
> ---
> sound/pci/hda/patch_hdmi.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
> index a97db5f..4bd11ff 100644
> --- a/sound/pci/hda/patch_hdmi.c
> +++ b/sound/pci/hda/patch_hdmi.c
> @@ -1786,6 +1786,8 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
> int pin_idx = hinfo_to_pin_index(codec, hinfo);
> struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx);
> hda_nid_t pin_nid = per_pin->pin_nid;
> + struct snd_pcm_runtime *runtime = substream->runtime;
> + struct i915_audio_component *acomp = codec->bus->core.audio_component;
> bool non_pcm;
> int pinctl;
>
> @@ -1802,6 +1804,11 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
> intel_not_share_assigned_cvt(codec, pin_nid, per_pin->mux_idx);
> }
>
> + if (is_haswell_plus(codec)) {
> + if (acomp && acomp->ops && acomp->ops->set_ncts)
> + acomp->ops->set_ncts(acomp->dev, per_pin->pin_nid - 4,

Please describe more how "pin_nid - 4" is supposed to work. Also...

> + 0, runtime->rate);

... this implies that no MST support included?

Overall, it'd be appreciated if you put more information text in
changelog or comment. it series looks like a black magic to me unless
clearly explained.

thanks,

Takashi