From patchwork Thu Feb 7 15:20:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devin Heitmueller X-Patchwork-Id: 16707 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1U3TH2-0007JR-DM; Thu, 07 Feb 2013 16:20:28 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-4) with esmtp id 1U3TH0-0003zl-Bc; Thu, 07 Feb 2013 16:20:27 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758616Ab3BGPUY (ORCPT + 1 other); Thu, 7 Feb 2013 10:20:24 -0500 Received: from mail-qc0-f171.google.com ([209.85.216.171]:37016 "EHLO mail-qc0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758579Ab3BGPUX (ORCPT ); Thu, 7 Feb 2013 10:20:23 -0500 Received: by mail-qc0-f171.google.com with SMTP id d1so1008682qca.2 for ; Thu, 07 Feb 2013 07:20:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:x-gm-message-state; bh=CB9ktWHUTzhmbsd2suXOaTRBBKA1zA6tD+p4gQYYWoo=; b=a6TX+IkV/26WNHC737OwBNQGVwSeDpL3M1RXD6/IX3tuFPYWa3OhxJcKazUqATmcft /apCiVXB0U5iGqSfYQjA3qonHZJG93nj3Y5kDitEal3S+6mfCfgUxs39SESgrfBOU3Ev cnnFUQHdBdDbOwYm2c8Dj5yhQTUO6RH6reMN478l7SYm8yoXq2h9aSfCB6a6mw2anmGw hzBTtdlsVLhllLnvs3Iec5IFpC3kGJcLT82RRGcJsI1m8ZuniIZSt0oCY/oWOYu1QLSc QdMdR3vxt3YAukd8mgMIMlXJStJkiIMyuctBbxsUSHAEYS7UAL8G2Ct57Ea/TgWMmH+g N1aA== MIME-Version: 1.0 X-Received: by 10.49.132.69 with SMTP id os5mr729494qeb.28.1360250421689; Thu, 07 Feb 2013 07:20:21 -0800 (PST) Received: by 10.49.34.225 with HTTP; Thu, 7 Feb 2013 07:20:21 -0800 (PST) In-Reply-To: <201302071608.15848.hverkuil@xs4all.nl> References: <1359477193-9768-1-git-send-email-hverkuil@xs4all.nl> <201302071608.15848.hverkuil@xs4all.nl> Date: Thu, 7 Feb 2013 10:20:21 -0500 Message-ID: Subject: Re: [RFCv1 PATCH 00/20] cx231xx: v4l2-compliance fixes From: Devin Heitmueller To: Hans Verkuil Cc: linux-media@vger.kernel.org, Srinivasa Deevi , Palash.Bandyopadhyay@conexant.com X-Gm-Message-State: ALoCoQmoSohOH326DnahdXxs3a421vVhzoW/w/ID2Dm3qwqM0jHsdMz+jOahOSHztAoT52Ifa3sc Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2013.2.7.151219 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, MSGID_ADDED_BY_MTA 0.05, BODY_SIZE_3000_3999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DATE_TZ_NA 0, URI_ENDS_IN_HTML 0, WEBMAIL_SOURCE 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __FORWARDED_MSG 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILING_LIST 0, __INT_PROD_TV 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __PHISH_SPEAR_HTTP_RECEIVED 0, __PHISH_SPEAR_STRUCTURE_1 0, __PHISH_SPEAR_STRUCTURE_2 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __URI_NS , __YOUTUBE_RCVD 0' Hi Hans, On Thu, Feb 7, 2013 at 10:08 AM, Hans Verkuil wrote: > On Tue January 29 2013 17:41:29 Devin Heitmueller wrote: >> On Tue, Jan 29, 2013 at 11:32 AM, Hans Verkuil wrote: >> > I will take a closer look at the vbi support, though.. It would be nice to get >> > that working. >> >> FYI: I had the VBI support working when I submitted the driver >> upstream (at least for NTSC CC). If it doesn't work, then somebody >> broke it. > > OK, I did some more tests and it turned out to be related to the no_alt_vanc > setting in the board definitions. If it is 1, then usb_set_interface() is > never called and the endpoint is never created. > > It's unclear to me if this means that if no_alt_vanc is set, then the vbi node > should be disabled. It seems that way. > > Unfortunately, of the three cx231xx devices I have no_alt_vanc is set on two > and the third (Hauppauge EXETER) is the one where the tda18271 tuner has > issues: it always gets errors when writing to it. It used to load correctly > about 10% of the time in the past, but now I can't get it to work at all. > > Devin, I think you said once that you knew what is going on. Do you have > any code that I can try to make it work again? The following will cause the tuner to initialize properly. Unfortunately it's only half a fix because it results in the digital demod driving the AGC, which will conflict the AGC being driven by the Polaris when in analog mode. Still, it should be enough to allow you to play with the VBI support assuming you test with the baseband inputs. Devin --- cx231xx-avcore.c.orig 2013-01-17 11:47:40.000000000 -0500 +++ cx231xx-avcore.c 2013-01-24 09:02:25.833076332 -0500 @@ -2207,6 +2207,7 @@ u8 value[4] = { 0, 0, 0, 0 }; u32 tmp = 0; int status = 0; + int demod_reset_high = 0; if (dev->power_mode != mode) dev->power_mode = mode; @@ -2406,9 +2407,25 @@ msleep(PWR_SLEEP_INTERVAL); + /* For Hauppauge devices based on the ldgt3305, the 3305 will hold SDA + low from powerup until 10ms after the device is brought out of reset. + As a result, we need to *always* bring the device out of reset if + PWR_TUNER_EN is enabled (since we have a shared power plane for both + the tuner and demod). If you fail to bring the chip out of reset + *and* wait 10ms, the i2c bus will get jammed. This is a vendor + documented limitation of the lgdt3305 demodulator */ + if ((tmp & PWR_TUNER_EN) && + (dev->model == CX231XX_BOARD_HAUPPAUGE_EXETER)) { + demod_reset_high = 1; + } + /* For power saving, only enable Pwr_resetout_n when digital TV is selected. */ if (mode == POLARIS_AVMODE_DIGITAL) { + demod_reset_high = 1; + } + + if (demod_reset_high) { tmp |= PWR_RESETOUT_EN; value[0] = (u8) tmp; value[1] = (u8) (tmp >> 8);