All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH 1/2] ALSA: hda - Enable i915 binding for gen3/4 HDMI/DP
Date: Thu, 31 Mar 2016 15:30:26 +0300	[thread overview]
Message-ID: <20160331123026.GN4329@intel.com> (raw)
In-Reply-To: <1459352762-28681-1-git-send-email-tiwai@suse.de>

On Wed, Mar 30, 2016 at 05:46:01PM +0200, Takashi Iwai wrote:
> This patch fills the holes and now all i915 HDMI/DP codecs are managed
> over the audio ELD notifier, finally.  The old gen3/gen4 chips have
> usually only a single pin/converter pair, and the digital port mapping
> is fixed.
> 
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
>  sound/hda/hdac_i915.c      | 11 +++++++++++
>  sound/pci/hda/patch_hdmi.c | 21 +++++++++++++++------
>  2 files changed, 26 insertions(+), 6 deletions(-)
> 
> diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c
> index d0da2508823e..c62a9f830b84 100644
> --- a/sound/hda/hdac_i915.c
> +++ b/sound/hda/hdac_i915.c
> @@ -128,6 +128,9 @@ EXPORT_SYMBOL_GPL(snd_hdac_get_display_clk);
>   * Pin Widget 4 - PORT B (port = 1 in i915 driver)
>   * Pin Widget 5 - PORT C (port = 2 in i915 driver)
>   * Pin Widget 6 - PORT D (port = 3 in i915 driver)
> + *
> + * on earlier models:
> + * Pin Widget 3 - PORT B

Hmm. ctg/elk have potentially multiple HDMI ports. Although they only
have one video DIP block so can send infoframes only to one of the ports
at a time. I wonder how this relates to the audio part, as in does the
pin widget 3 always map to the port that is getting infoframes
currently? I do have one elk with two HDMI ports here so I could do some
experiments if needed.

>   */
>  static int pin2port(struct hdac_device *codec, hda_nid_t pin_nid)
>  {
> @@ -139,6 +142,14 @@ static int pin2port(struct hdac_device *codec, hda_nid_t pin_nid)
>  	case 0x80862882: /* VLV */
>  		base_nid = 3;
>  		break;
> +	case 0x80862801: /* Bearlake */

Hmm. I wonder if this is bearlake-C or something earlier. BLC doesn't
actually exist AFAIK, and earlier bearlake is gen3 and doesn't even
support native HDMI output so not sure what this is doing here.

> +	case 0x80862802: /* Cantiga */
> +	case 0x80862803: /* Eaglelake */
> +	case 0x80862880: /* CedarTrail */

Cedartrail is some powervr atom thing. Should have nothing to do with i915.

> +	case 0x808629fb: /* Crestline HDMI */

CL is gen4 and we don't support native HDMI output on those. Strangely
enough our spec says CL/BW do support TMDS encoding on the SDVO/HDMI
ports and that CL also has the video DIP block and the HDA registers.
Not sure what to make of that really.

> +		if (WARN_ON(pin_nid != 0x03))
> +			return -1;
> +		return 1; /* only port B */
>  	default:
>  		base_nid = 4;
>  		break;
> diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
> index 4833c7bdd1e8..2a3bf1584f3b 100644
> --- a/sound/pci/hda/patch_hdmi.c
> +++ b/sound/pci/hda/patch_hdmi.c
> @@ -2286,6 +2286,15 @@ static void intel_pin_eld_notify(void *audio_ptr, int port)
>  	case 0x80862882: /* VLV */
>  		pin_nid = port + 0x03;
>  		break;
> +	case 0x80862801: /* Bearlake */
> +	case 0x80862802: /* Cantiga */
> +	case 0x80862803: /* Eaglelake */
> +	case 0x80862880: /* CedarTrail */
> +	case 0x808629fb: /* Crestline HDMI */
> +		if (WARN_ON(port != 1)) /* assume only port B */
> +			return;
> +		pin_nid = 0x03;
> +		break;
>  	default:
>  		pin_nid = port + 0x04;
>  		break;
> @@ -2424,7 +2433,7 @@ static int patch_i915_byt_hdmi(struct hda_codec *codec)
>  	return 0;
>  }
>  
> -/* Intel IronLake, SandyBridge and IvyBridge; with eld notifier */
> +/* Intel Gen3/Gen4, IronLake, SandyBridge and IvyBridge; with eld notifier */
>  static int patch_i915_cpt_hdmi(struct hda_codec *codec)
>  {
>  	struct hdmi_spec *spec;
> @@ -3627,9 +3636,9 @@ HDA_CODEC_ENTRY(0x11069f81, "VX900 HDMI/DP",	patch_via_hdmi),
>  HDA_CODEC_ENTRY(0x11069f84, "VX11 HDMI/DP",	patch_generic_hdmi),
>  HDA_CODEC_ENTRY(0x11069f85, "VX11 HDMI/DP",	patch_generic_hdmi),
>  HDA_CODEC_ENTRY(0x80860054, "IbexPeak HDMI",	patch_i915_cpt_hdmi),
> -HDA_CODEC_ENTRY(0x80862801, "Bearlake HDMI",	patch_generic_hdmi),
> -HDA_CODEC_ENTRY(0x80862802, "Cantiga HDMI",	patch_generic_hdmi),
> -HDA_CODEC_ENTRY(0x80862803, "Eaglelake HDMI",	patch_generic_hdmi),
> +HDA_CODEC_ENTRY(0x80862801, "Bearlake HDMI",	patch_i915_cpt_hdmi),
> +HDA_CODEC_ENTRY(0x80862802, "Cantiga HDMI",	patch_i915_cpt_hdmi),
> +HDA_CODEC_ENTRY(0x80862803, "Eaglelake HDMI",	patch_i915_cpt_hdmi),
>  HDA_CODEC_ENTRY(0x80862804, "IbexPeak HDMI",	patch_i915_cpt_hdmi),
>  HDA_CODEC_ENTRY(0x80862805, "CougarPoint HDMI",	patch_i915_cpt_hdmi),
>  HDA_CODEC_ENTRY(0x80862806, "PantherPoint HDMI", patch_i915_cpt_hdmi),
> @@ -3638,10 +3647,10 @@ HDA_CODEC_ENTRY(0x80862808, "Broadwell HDMI",	patch_i915_hsw_hdmi),
>  HDA_CODEC_ENTRY(0x80862809, "Skylake HDMI",	patch_i915_hsw_hdmi),
>  HDA_CODEC_ENTRY(0x8086280a, "Broxton HDMI",	patch_i915_hsw_hdmi),
>  HDA_CODEC_ENTRY(0x8086280b, "Kabylake HDMI",	patch_i915_hsw_hdmi),
> -HDA_CODEC_ENTRY(0x80862880, "CedarTrail HDMI",	patch_generic_hdmi),
> +HDA_CODEC_ENTRY(0x80862880, "CedarTrail HDMI",	patch_i915_cpt_hdmi),
>  HDA_CODEC_ENTRY(0x80862882, "Valleyview2 HDMI",	patch_i915_byt_hdmi),
>  HDA_CODEC_ENTRY(0x80862883, "Braswell HDMI",	patch_i915_byt_hdmi),
> -HDA_CODEC_ENTRY(0x808629fb, "Crestline HDMI",	patch_generic_hdmi),
> +HDA_CODEC_ENTRY(0x808629fb, "Crestline HDMI",	patch_i915_cpt_hdmi),
>  /* special ID for generic HDMI */
>  HDA_CODEC_ENTRY(HDA_CODEC_ID_GENERIC_HDMI, "Generic HDMI", patch_generic_hdmi),
>  {} /* terminator */
> -- 
> 2.7.4
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

-- 
Ville Syrjälä
Intel OTC

  parent reply	other threads:[~2016-03-31 12:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-30 15:46 [PATCH 1/2] ALSA: hda - Enable i915 binding for gen3/4 HDMI/DP Takashi Iwai
2016-03-30 15:46 ` [PATCH 2/2] ALSA: hda - Bind with i915 only when Intel graphics is present Takashi Iwai
2016-03-31 12:56   ` Ville Syrjälä
2016-03-31 12:58     ` Takashi Iwai
2016-03-31 12:30 ` Ville Syrjälä [this message]
2016-03-31 12:45   ` [PATCH 1/2] ALSA: hda - Enable i915 binding for gen3/4 HDMI/DP Takashi Iwai
2016-04-01 17:53     ` Ville Syrjälä
2016-04-01 20:21       ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160331123026.GN4329@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.