From patchwork Sun Jul 24 12:57:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 1002972 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6OCvXLg022829 for ; Sun, 24 Jul 2011 12:57:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752697Ab1GXM5b (ORCPT ); Sun, 24 Jul 2011 08:57:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55420 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752693Ab1GXM5a (ORCPT ); Sun, 24 Jul 2011 08:57:30 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6OCvSeA021633 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 24 Jul 2011 08:57:28 -0400 Received: from [10.11.9.195] (vpn-9-195.rdu.redhat.com [10.11.9.195]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p6OCvPmE023405; Sun, 24 Jul 2011 08:57:26 -0400 Message-ID: <4E2C16B5.5010703@redhat.com> Date: Sun, 24 Jul 2011 09:57:25 -0300 From: Mauro Carvalho Chehab User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Devin Heitmueller CC: Linux Media Mailing List , Gerd Hoffmann , Sri Deevi , Palash Bandyopadhyay Subject: Re: [PATCH] Fix regression introduced which broke the Hauppauge USBLive 2 References: In-Reply-To: X-Enigmail-Version: 1.2 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sun, 24 Jul 2011 12:57:33 +0000 (UTC) Hi Devin, Em 23-07-2011 22:17, Devin Heitmueller escreveu: > The following patch addresses the regression introduced in the cx231xx > driver which stopped the Hauppauge USBLive2 from working. > > Confirmed working by both myself and the user who reported the issue > on the KernelLabs blog (Robert DeLuca). > > cx231xx: Fix regression introduced which broke the Hauppauge USBLive 2 > > From: Devin Heitmueller > > At some point during refactoring of the cx231xx driver, the USBLive 2 device > became broken. This patch results in the device working again. > > Thanks to Robert DeLuca for sponsoring this work. > > Signed-off-by: Devin Heitmueller > Cc: Robert DeLuca > > diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c > b/drivers/media/video/cx231xx/cx231xx-cards.c > index 4b22afe..d02c63a 100644 > --- a/drivers/media/video/cx231xx/cx231xx-cards.c > +++ b/drivers/media/video/cx231xx/cx231xx-cards.c > @@ -387,6 +387,7 @@ struct cx231xx_board cx231xx_boards[] = { > .norm = V4L2_STD_NTSC, > .no_alt_vanc = 1, > .external_av = 1, > + .dont_use_port_3 = 1, > .input = {{ > .type = CX231XX_VMUX_COMPOSITE1, > .vmux = CX231XX_VIN_2_1, I proposed the same fix sometime ago, when Gerd reported this issue for me. His feedback was that this partially fixed the issue, but he reported that he also needed to increase the set_power_mode delay from 5 to 50 ms in order to fully initialize the cx231xx hardware, as on the enclosed patch. It seems he tested with vanilla Fedora kernel. So, I suspect that HZ may be affecting this driver as well. As you know, if HZ is configured with 100, the minimum msleep() delay will be 10. so, instead of waiting for 5ms, it will wait for 10ms for the device to powerup. It would be great to configure HZ with 1000 and see the differences with and without Gerd's patch. Cheers, Mauro. - From a83a7574e07b48b1c6a222d833a7fa0a67133b5c Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 16 Dec 2010 17:39:17 +0100 Subject: [PATCH] cx231xx: raise delay after powerup. Wait a bit longer after power up so the chips have enougth time to come up before we try talking to them via i2c. Signed-off-by: Gerd Hoffmann --- drivers/media/video/cx231xx/cx231xx-avcore.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/cx231xx/cx231xx-avcore.c b/drivers/media/video/cx231xx/cx231xx-avcore.c index cf50faf..cf412cd 100644 --- a/drivers/media/video/cx231xx/cx231xx-avcore.c +++ b/drivers/media/video/cx231xx/cx231xx-avcore.c @@ -2412,7 +2412,7 @@ int cx231xx_set_power_mode(struct cx231xx *dev, enum AV_MODE mode) break; } - msleep(PWR_SLEEP_INTERVAL); + msleep(PWR_SLEEP_INTERVAL * 10); /* For power saving, only enable Pwr_resetout_n when digital TV is selected. */