From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751170AbbIEIbo (ORCPT ); Sat, 5 Sep 2015 04:31:44 -0400 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:51922 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750893AbbIEIb1 (ORCPT ); Sat, 5 Sep 2015 04:31:27 -0400 Date: Sat, 5 Sep 2015 09:31:08 +0100 From: Russell King - ARM Linux To: Doug Anderson Cc: "open list:ARM/Rockchip SoC..." , alsa-devel@alsa-project.org, "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Philipp Zabel , Andy Yan , Yakir Yang , Fabio Estevam , Mark Brown , Takashi Iwai , Jaroslav Kysela , Sascha Hauer , Jon Nettleton , David Airlie Subject: Re: [PATCH 6/9] drm: bridge/dw_hdmi: adjust pixel clock values in N calculation Message-ID: <20150905083107.GK21084@n2100.arm.linux.org.uk> References: <20150808160936.GN7557@n2100.arm.linux.org.uk> <20150904212401.GI21084@n2100.arm.linux.org.uk> <20150905002733.GJ21084@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 04, 2015 at 07:03:11PM -0700, Doug Anderson wrote: > AKA: just replace your entire "compute_n" function with: > > return (128 * freq) / 1000; > > ...and it's 100% simpler _and_ gets you a (marginally) better rate > (assuming you really have 22.175000). If it was just about a > 32000.222 vs 32000 I'd not be saying anything right now. It's about > adding complexity. No. It doesn't work for all cases. Do the calculations for every sample rate in those tables in the HDMI spec, and you'll find out why. -- FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.