All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: alsa-devel@alsa-project.org,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	intel-gfx@lists.freedesktop.org, broonie@kernel.org
Subject: Re: [RFC PATCH 4/5] drm: i915: add DisplayPort amp unmute for LPE audio mode
Date: Fri, 27 Jan 2017 15:42:56 +0100	[thread overview]
Message-ID: <s5hvat0ftsf.wl-tiwai@suse.de> (raw)
In-Reply-To: <20170127143547.GZ31595@intel.com>

On Fri, 27 Jan 2017 15:35:47 +0100,
Ville Syrjälä wrote:
> 
> On Fri, Jan 27, 2017 at 03:17:34PM +0200, Ville Syrjälä wrote:
> > On Fri, Jan 27, 2017 at 12:08:58PM +0200, Jani Nikula wrote:
> > > On Thu, 26 Jan 2017, Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> wrote:
> > > > Enable chicken bit on LPE mode setup and unmute amp on
> > > > notification
> > > >
> > > > FIXME: should these two phases done somewhere else?
> > > >
> > > > Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> > > > ---
> > > >  drivers/gpu/drm/i915/i915_reg.h        | 12 ++++++++++++
> > > >  drivers/gpu/drm/i915/intel_lpe_audio.c | 27 +++++++++++++++++++++++++++
> > > >  2 files changed, 39 insertions(+)
> > > >
> > > > diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> > > > index a9ffc8d..ee90f64 100644
> > > > --- a/drivers/gpu/drm/i915/i915_reg.h
> > > > +++ b/drivers/gpu/drm/i915/i915_reg.h
> > > > @@ -2061,6 +2061,18 @@ enum skl_disp_power_wells {
> > > >  #define I915_HDMI_LPE_AUDIO_BASE	(VLV_DISPLAY_BASE + 0x65000)
> > > >  #define I915_HDMI_LPE_AUDIO_SIZE	0x1000
> > > >  
> > > > +/* DisplayPort Audio w/ LPE */
> > > > +#define CHICKEN_BIT_DBG_ENABLE		(1 << 0)
> > > > +#define AMP_UNMUTE		        (1 << 1)
> > 
> > That should be called AMP_MUTE I think,
> > 
> > > 
> > > The convention is to define registers first and the contents/bits for
> > > each register immedialy below. For groups of registers (like
> > > PORT_EN_B/C/D below) define all registers first and bits immediately
> > > below. (But note that the chicken register is not part of the group.)
> > > 
> > > > +#define AUD_CHICKEN_BIT_REG		0x62F38
> > 
> > Spec calls this AUD_CHICKENBIT_REG. Might as well follow it to the
> > letter.
> > 
> > > > +#define AUD_PORT_EN_B_DBG		0x62F20
> > > > +#define AUD_PORT_EN_C_DBG		0x62F28
> > > > +#define AUD_PORT_EN_D_DBG		0x62F2C
> > 
> > These match the spec. But to match the standard i915 convention they
> > should be called _AUD_PORT_EN_B_DBG etc. Same forthe chicken bit
> > register.
> 
> Actually they just match one version of the spec I had lying around.
> Another versions says:
> 
> AUD_PORT_EN_B_DBG 0x62F20
> AUD_PORT_EN_C_DBG 0x62F30
> AUD_PORT_EN_D_DBG 0x62F34

That's it!  Now finally I can hear the audio from DP3 with the
additional patch below.


thanks,

Takashi

---
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index ee90f64b89e8..5c577d242078 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -2066,8 +2066,8 @@ enum skl_disp_power_wells {
 #define AMP_UNMUTE		        (1 << 1)
 #define AUD_CHICKEN_BIT_REG		0x62F38
 #define AUD_PORT_EN_B_DBG		0x62F20
-#define AUD_PORT_EN_C_DBG		0x62F28
-#define AUD_PORT_EN_D_DBG		0x62F2C
+#define AUD_PORT_EN_C_DBG		0x62F30
+#define AUD_PORT_EN_D_DBG		0x62F34
 #define VLV_AUD_CHICKEN_BIT_REG		_MMIO(VLV_DISPLAY_BASE + AUD_CHICKEN_BIT_REG)
 #define VLV_AUD_PORT_EN_B_DBG		_MMIO(VLV_DISPLAY_BASE + AUD_PORT_EN_B_DBG)
 #define VLV_AUD_PORT_EN_C_DBG		_MMIO(VLV_DISPLAY_BASE + AUD_PORT_EN_C_DBG)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-01-27 14:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26 20:05 [RFC PATCH 0/5] DisplayPort Audio on Cherrytrail Pierre-Louis Bossart
2017-01-26 20:05 ` [RFC PATCH 1/5] drm: i915: add DP support in LPE audio mode Pierre-Louis Bossart
2017-01-26 20:05 ` [RFC PATCH 2/5] ALSA: x86: intel_hdmi: add definitions and logic for DP audio Pierre-Louis Bossart
2017-01-26 20:05 ` [RFC PATCH 3/5] ALSA: x86: intel_hdmi: set config bitfields for DP mode Pierre-Louis Bossart
2017-01-26 20:05 ` [RFC PATCH 4/5] drm: i915: add DisplayPort amp unmute for LPE audio mode Pierre-Louis Bossart
2017-01-27 10:08   ` Jani Nikula
2017-01-27 13:17     ` Ville Syrjälä
2017-01-27 13:51       ` Jani Nikula
2017-01-27 13:55         ` Ville Syrjälä
2017-01-27 14:35       ` Ville Syrjälä
2017-01-27 14:42         ` Takashi Iwai [this message]
2017-01-27 14:55           ` Pierre-Louis Bossart
2017-01-27 15:46             ` Ville Syrjälä
2017-01-27 14:47       ` Pierre-Louis Bossart
2017-01-27 15:17         ` Ville Syrjälä
2017-01-26 20:05 ` [RFC PATCH 5/5] ALSA: x86: hdmi: hack to enable DP audio on CHT Pierre-Louis Bossart
2017-01-27  0:24 ` ✗ Fi.CI.BAT: failure for DisplayPort Audio on Cherrytrail Patchwork
2017-01-27 10:26 ` [RFC PATCH 0/5] " 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=s5hvat0ftsf.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /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.