On Mon, 24 Aug 2015 14:53:19 +0200, Ville Syrjälä wrote: > > On Mon, Aug 24, 2015 at 02:38:14AM +0000, Yang, Libin wrote: > > > -----Original Message----- > > > From: Ville Syrjälä [mailto:ville.syrjala@xxxxxxxxxxxxxxx] > > > Sent: Friday, August 21, 2015 11:14 PM > > > To: Yang, Libin > > > Cc: alsa-devel@xxxxxxxxxxxxxxxx; tiwai@xxxxxxx; intel- > > > gfx@xxxxxxxxxxxxxxxxxxxxx; daniel.vetter@xxxxxxxx; > > > jani.nikula@xxxxxxxxxxxxxxx > > > Subject: Re: [PATCH v5 2/4] drm/i915: implement > > > sync_audio_rate callback > > > > > > On Tue, Aug 18, 2015 at 02:51:52PM +0800, libin.yang@xxxxxxxxx > > > wrote: > > > > From: Libin Yang <libin.yang@xxxxxxxxx> > > > > > > > > HDMI 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@xxxxxxxxx> > > > > --- > > > > drivers/gpu/drm/i915/intel_audio.c | 119 > > > +++++++++++++++++++++++++++++++++++++ > > > > 1 file changed, 119 insertions(+) > > > > > > > > diff --git a/drivers/gpu/drm/i915/intel_audio.c > > > b/drivers/gpu/drm/i915/intel_audio.c > > > > index dc32cf4..96b97be 100644 > > > > --- a/drivers/gpu/drm/i915/intel_audio.c > > > > +++ b/drivers/gpu/drm/i915/intel_audio.c > > > > @@ -68,6 +68,31 @@ static const struct { > > > > { 148500, AUD_CONFIG_PIXEL_CLOCK_HDMI_148500 }, > > > > }; > > > > > > > > +/* HDMI N/CTS table */ > > > > +#define TMDS_297M 297000 > > > > +#define TMDS_296M DIV_ROUND_UP(297000 * 1000, 1001) > > > > > > I don't really like the defines. > > > > I agree it's not a good name. Do you have some suggestions? > > I'd probably just have used raw numbers myself. It's quite unsafe. You can easily overlook, e.g. 29700 instead of 297000. Takashi _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx