public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: libin.yang@intel.com
Cc: alsa-devel@alsa-project.org, intel-gfx@lists.freedesktop.org
Subject: Re: [alsa-devel] [PATCH 2/4] drm/i915: implement set_ncts callback
Date: Thu, 06 Aug 2015 11:21:27 +0200	[thread overview]
Message-ID: <s5hpp30lqlk.wl-tiwai@suse.de> (raw)
In-Reply-To: <1438843977-4269-2-git-send-email-libin.yang@intel.com>

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.


Takashi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-08-06  9:21 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   ` Takashi Iwai [this message]
2015-08-07  1:50     ` [alsa-devel] " Yang, Libin
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=s5hpp30lqlk.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=libin.yang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox