From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754764AbaKRSAv (ORCPT ); Tue, 18 Nov 2014 13:00:51 -0500 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:54071 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753627AbaKRSAt (ORCPT ); Tue, 18 Nov 2014 13:00:49 -0500 Date: Tue, 18 Nov 2014 18:00:37 +0000 From: Russell King - ARM Linux To: Andrew Jackson Cc: Dave Airlie , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , Liviu Dudau , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH] drm/i2c: tda998x: Allow for different audio sample rates Message-ID: <20141118180036.GC4042@n2100.arm.linux.org.uk> References: <546B8452.6030701@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <546B8452.6030701@arm.com> 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 Tue, Nov 18, 2014 at 05:39:30PM +0000, Andrew Jackson wrote: > On HDMI, the audio data are carried across the HDMI link which is > driven by the TDMS clock. The TDMS clock is dependent on the video pixel > rate. > > This patch sets the denominator (Cycle Time Stamp) appropriately > allowing the driver to send audio to a wider range of HDMI sinks > (i.e. monitors). This is actually pointless, because we don't use "manual" CTS mode. If the clocks for the video and audio are coherent, then you can program both the N and CTS values to allow the sink to properly recover the synchronous audio clock. However, in most cases, the audio and video clocks are not coherent, and since the recovered audio clock has to match the source audio clock, the only way this can be done is by the TDA998x (or in fact other HDMI encoder) to measure the audio clock rate and generate the CTS value itself. This is the mode we drive the TDA998x - so the programmed CTS value is irrelevant. See the HDMI spec, section 7.2 for a discussion about this, especially non-coherent clocks. -- FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up according to speedtest.net. From mboxrd@z Thu Jan 1 00:00:00 1970 From: linux@arm.linux.org.uk (Russell King - ARM Linux) Date: Tue, 18 Nov 2014 18:00:37 +0000 Subject: [PATCH] drm/i2c: tda998x: Allow for different audio sample rates In-Reply-To: <546B8452.6030701@arm.com> References: <546B8452.6030701@arm.com> Message-ID: <20141118180036.GC4042@n2100.arm.linux.org.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tue, Nov 18, 2014 at 05:39:30PM +0000, Andrew Jackson wrote: > On HDMI, the audio data are carried across the HDMI link which is > driven by the TDMS clock. The TDMS clock is dependent on the video pixel > rate. > > This patch sets the denominator (Cycle Time Stamp) appropriately > allowing the driver to send audio to a wider range of HDMI sinks > (i.e. monitors). This is actually pointless, because we don't use "manual" CTS mode. If the clocks for the video and audio are coherent, then you can program both the N and CTS values to allow the sink to properly recover the synchronous audio clock. However, in most cases, the audio and video clocks are not coherent, and since the recovered audio clock has to match the source audio clock, the only way this can be done is by the TDA998x (or in fact other HDMI encoder) to measure the audio clock rate and generate the CTS value itself. This is the mode we drive the TDA998x - so the programmed CTS value is irrelevant. See the HDMI spec, section 7.2 for a discussion about this, especially non-coherent clocks. -- FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up according to speedtest.net. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King - ARM Linux Subject: Re: [PATCH] drm/i2c: tda998x: Allow for different audio sample rates Date: Tue, 18 Nov 2014 18:00:37 +0000 Message-ID: <20141118180036.GC4042@n2100.arm.linux.org.uk> References: <546B8452.6030701@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Received: from pandora.arm.linux.org.uk (pandora.arm.linux.org.uk [78.32.30.218]) by gabe.freedesktop.org (Postfix) with ESMTP id E5A2D6E563 for ; Tue, 18 Nov 2014 10:00:47 -0800 (PST) Content-Disposition: inline In-Reply-To: <546B8452.6030701@arm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Andrew Jackson Cc: "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" List-Id: dri-devel@lists.freedesktop.org T24gVHVlLCBOb3YgMTgsIDIwMTQgYXQgMDU6Mzk6MzBQTSArMDAwMCwgQW5kcmV3IEphY2tzb24g d3JvdGU6Cj4gT24gSERNSSwgdGhlIGF1ZGlvIGRhdGEgYXJlIGNhcnJpZWQgYWNyb3NzIHRoZSBI RE1JIGxpbmsgd2hpY2ggaXMKPiBkcml2ZW4gYnkgdGhlIFRETVMgY2xvY2suIFRoZSBURE1TIGNs b2NrIGlzIGRlcGVuZGVudCBvbiB0aGUgdmlkZW8gcGl4ZWwKPiByYXRlLgo+IAo+IFRoaXMgcGF0 Y2ggc2V0cyB0aGUgZGVub21pbmF0b3IgKEN5Y2xlIFRpbWUgU3RhbXApIGFwcHJvcHJpYXRlbHkK PiBhbGxvd2luZyB0aGUgZHJpdmVyIHRvIHNlbmQgYXVkaW8gdG8gYSB3aWRlciByYW5nZSBvZiBI RE1JIHNpbmtzCj4gKGkuZS4gbW9uaXRvcnMpLgoKVGhpcyBpcyBhY3R1YWxseSBwb2ludGxlc3Ms IGJlY2F1c2Ugd2UgZG9uJ3QgdXNlICJtYW51YWwiIENUUyBtb2RlLgoKSWYgdGhlIGNsb2NrcyBm b3IgdGhlIHZpZGVvIGFuZCBhdWRpbyBhcmUgY29oZXJlbnQsIHRoZW4geW91IGNhbiBwcm9ncmFt CmJvdGggdGhlIE4gYW5kIENUUyB2YWx1ZXMgdG8gYWxsb3cgdGhlIHNpbmsgdG8gcHJvcGVybHkg cmVjb3ZlciB0aGUKc3luY2hyb25vdXMgYXVkaW8gY2xvY2suCgpIb3dldmVyLCBpbiBtb3N0IGNh c2VzLCB0aGUgYXVkaW8gYW5kIHZpZGVvIGNsb2NrcyBhcmUgbm90IGNvaGVyZW50L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