From: "Yang, Libin" <libin.yang@intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Subject: Re: [alsa-devel] [PATCH 2/4] drm/i915: implement set_ncts callback
Date: Fri, 7 Aug 2015 01:50:25 +0000 [thread overview]
Message-ID: <96A12704CE18D347B625EE2D4A099D196CFB68@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <s5hpp30lqlk.wl-tiwai@suse.de>
Hi Takashi,
> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai@suse.de]
> Sent: Thursday, August 06, 2015 5:21 PM
> To: Yang, Libin
> Cc: alsa-devel@alsa-project.org; intel-gfx@lists.freedesktop.org; Lin,
> Mengdong
> Subject: Re: [alsa-devel] [PATCH 2/4] drm/i915: implement set_ncts
> callback
>
> On Thu, 06 Aug 2015 08:52:55 +0200,
> libin.yang@intel.com wrote:
> >
> > From: Libin Yang <libin.yang@intel.com>
> >
> > Display audio may not work at some frequencies
> > with the HW provided N/CTS.
> >
> > This patch sets the proper N value for the
> > given audio sample rate at the impacted frequencies.
> > At other frequencies, it will use the N/CTS value
> > which HW provides.
> >
> > Signed-off-by: Libin Yang <libin.yang@intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_reg.h | 2 +
> > drivers/gpu/drm/i915/intel_audio.c | 93
> ++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 95 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_reg.h
> b/drivers/gpu/drm/i915/i915_reg.h
> > index 3a77678..0b1cd72 100644
> > --- a/drivers/gpu/drm/i915/i915_reg.h
> > +++ b/drivers/gpu/drm/i915/i915_reg.h
> > @@ -7010,6 +7010,8 @@ enum skl_disp_power_wells {
> > _HSW_AUD_MISC_CTRL_A, \
> > _HSW_AUD_MISC_CTRL_B)
> >
> > +#define HSW_AUD_PIPE_CONN_SEL_CTRL 0x650ac
> > +
> > #define _HSW_AUD_DIP_ELD_CTRL_ST_A 0x650b4
> > #define _HSW_AUD_DIP_ELD_CTRL_ST_B 0x651b4
> > #define HSW_AUD_DIP_ELD_CTRL(pipe) _PIPE(pipe, \
> > diff --git a/drivers/gpu/drm/i915/intel_audio.c
> b/drivers/gpu/drm/i915/intel_audio.c
> > index dc32cf4..f1148cd 100644
> > --- a/drivers/gpu/drm/i915/intel_audio.c
> > +++ b/drivers/gpu/drm/i915/intel_audio.c
> > @@ -68,6 +68,28 @@ static const struct {
> > { 148500, AUD_CONFIG_PIXEL_CLOCK_HDMI_148500 },
> > };
> >
> > +static const struct {
> > + int sample_rate;
> > + int clock;
> > + int n;
> > + int cts;
> > +} aud_ncts[] = {
> > + { 44100, DIV_ROUND_UP(297000 * 1000, 1001), 4459, 234375 },
> > + { 44100, 297000, 4704, 247500 },
>
> As these two clock values are referred repeatedly in other places,
> it'd be better to define constants.
Do you mean use Macro such as:
#define 297MHZ 297000
#define 296MHZ DIV_ROUND_UP(297000 * 1000, 1001)
>
>
> Takashi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-08-07 1:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-06 6:52 [PATCH 1/4] drm/i915: Add audio set_ncts callback libin.yang
2015-08-06 6:52 ` [PATCH 2/4] drm/i915: implement " libin.yang
2015-08-06 9:21 ` [alsa-devel] " Takashi Iwai
2015-08-07 1:50 ` Yang, Libin [this message]
2015-08-06 6:52 ` [PATCH 3/4] ALSA: hda - display audio call ncts callback libin.yang
2015-08-06 10:02 ` Takashi Iwai
2015-08-07 1:42 ` Yang, Libin
2015-08-07 3:04 ` [alsa-devel] " Raymond Yau
2015-08-10 3:15 ` Yang, Libin
2015-08-10 4:23 ` Raymond Yau
2015-08-11 2:30 ` Yang, Libin
2015-08-06 6:52 ` [PATCH 4/4] drm/i915: set proper N/CTS in modeset libin.yang
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=96A12704CE18D347B625EE2D4A099D196CFB68@SHSMSX103.ccr.corp.intel.com \
--to=libin.yang@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=intel-gfx@lists.freedesktop.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.