From patchwork Fri Jan 8 09:38:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitri Belimov X-Patchwork-Id: 2419 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Fri, 08 Jan 2010 09:33:51 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra with IMAP (fetchmail-6.3.6) for (single-drop); Sat, 09 Jan 2010 17:02:01 -0200 (BRST) Received: from vger.kernel.org ([209.132.180.67]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1NTBE6-0000as-SO; Fri, 08 Jan 2010 09:33:51 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751660Ab0AHJdl (ORCPT + 1 other); Fri, 8 Jan 2010 04:33:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751482Ab0AHJdk (ORCPT ); Fri, 8 Jan 2010 04:33:40 -0500 Received: from ey-out-2122.google.com ([74.125.78.24]:56619 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752775Ab0AHJda (ORCPT ); Fri, 8 Jan 2010 04:33:30 -0500 Received: by ey-out-2122.google.com with SMTP id 22so1168457eye.19 for ; Fri, 08 Jan 2010 01:33:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:x-mailer:mime-version:content-type; bh=s3aZ+wB4BAV8Q4Jv44fliULZwAFd2ZOMMOOkJL44CR8=; b=GsbnRoUSb6ca/Vg0A/3cmZkF9Q/BA8del7KB1R+CB8HCVUpcR561Tsw+GYj9KFEXh+ nZYiec033I1ezSKUaXjJ8Vum9rHbXXleuTZeMfm0CYjoBVmGzV/RriJ+tIVYfAD+L2Ci +aX9yo19l6YFTlQExtbG0taxCOhbyDzlg1yQQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:x-mailer:mime-version:content-type; b=O/I9senvJ4dvCZzDbq9b7GGD7gJ6m4AcXESa3Dnhz3XXE54OT+GCuencXEWrW/iI7C Hq/hF6uEmBiESVdb2B5v0u3v2grb44AO0V9owR2W3l31QUuHykKq2492uv1iPvDHbarX mucq7GH4X6qh37h525JU3Q4C2QGnWlUfi+G+k= Received: by 10.213.48.75 with SMTP id q11mr21577186ebf.84.1262943209134; Fri, 08 Jan 2010 01:33:29 -0800 (PST) Received: from glory.loctelecom.ru ([83.234.170.10]) by mx.google.com with ESMTPS id 14sm15840151ewy.11.2010.01.08.01.33.27 (version=SSLv3 cipher=RC4-MD5); Fri, 08 Jan 2010 01:33:28 -0800 (PST) Date: Fri, 8 Jan 2010 18:38:28 +0900 From: Dmitri Belimov To: linux-media@vger.kernel.org, video4linux-list@redhat.com Subject: [PATCH] DVB-T regression fix for saa7134 cards Message-ID: <20100108183828.4f86cd3c@glory.loctelecom.ru> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.16.1; i486-pc-linux-gnu) Mime-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hi Some customers has problem with quality of DVB-T https://bugs.launchpad.net/ubuntu/+source/linux/+bug/446575 After this patch http://patchwork.kernel.org/patch/23345/ This is patch for fix regression with DVB-T. Tested with many people. Signed-off-by: Alexey Osipov Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov With my best regards, Dmitry. diff -u ./saa7134.orig/saa7134-core.c ./saa7134/saa7134-core.c --- ./saa7134.orig/saa7134-core.c 2009-09-10 05:13:59.000000000 +0700 +++ ./saa7134/saa7134-core.c 2010-01-07 13:01:11.000000000 +0600 @@ -420,19 +420,6 @@ ctrl |= SAA7134_MAIN_CTRL_TE5; irq |= SAA7134_IRQ1_INTE_RA2_1 | SAA7134_IRQ1_INTE_RA2_0; - - /* dma: setup channel 5 (= TS) */ - - saa_writeb(SAA7134_TS_DMA0, (dev->ts.nr_packets - 1) & 0xff); - saa_writeb(SAA7134_TS_DMA1, - ((dev->ts.nr_packets - 1) >> 8) & 0xff); - /* TSNOPIT=0, TSCOLAP=0 */ - saa_writeb(SAA7134_TS_DMA2, - (((dev->ts.nr_packets - 1) >> 16) & 0x3f) | 0x00); - saa_writel(SAA7134_RS_PITCH(5), TS_PACKET_SIZE); - saa_writel(SAA7134_RS_CONTROL(5), SAA7134_RS_CONTROL_BURST_16 | - SAA7134_RS_CONTROL_ME | - (dev->ts.pt_ts.dma >> 12)); } /* set task conditions + field handling */ diff -u ./saa7134.orig/saa7134-ts.c ./saa7134/saa7134-ts.c --- ./saa7134.orig/saa7134-ts.c 2009-09-10 05:13:59.000000000 +0700 +++ ./saa7134/saa7134-ts.c 2010-01-07 13:03:29.000000000 +0600 @@ -249,7 +249,20 @@ dprintk("TS start\n"); BUG_ON(dev->ts_started); + + /* dma: setup channel 5 (= TS) */ + saa_writeb(SAA7134_TS_DMA0, (dev->ts.nr_packets - 1) & 0xff); + saa_writeb(SAA7134_TS_DMA1, + ((dev->ts.nr_packets - 1) >> 8) & 0xff); + /* TSNOPIT=0, TSCOLAP=0 */ + saa_writeb(SAA7134_TS_DMA2, + (((dev->ts.nr_packets - 1) >> 16) & 0x3f) | 0x00); + saa_writel(SAA7134_RS_PITCH(5), TS_PACKET_SIZE); + saa_writel(SAA7134_RS_CONTROL(5), SAA7134_RS_CONTROL_BURST_16 | + SAA7134_RS_CONTROL_ME | + (dev->ts.pt_ts.dma >> 12)); + /* reset hardware TS buffers */ saa_writeb(SAA7134_TS_SERIAL1, 0x00); saa_writeb(SAA7134_TS_SERIAL1, 0x03); saa_writeb(SAA7134_TS_SERIAL1, 0x00); Signed-off-by: Alexey Osipov Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov