From patchwork Tue Mar 30 06:02:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitri Belimov X-Patchwork-Id: 3058 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Tue, 30 Mar 2010 07:00:46 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra with IMAP (fetchmail-6.3.6) for (single-drop); Tue, 30 Mar 2010 04:02:44 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1NwVRN-0001Ru-W9; Tue, 30 Mar 2010 07:00:46 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754767Ab0C3HAo (ORCPT + 1 other); Tue, 30 Mar 2010 03:00:44 -0400 Received: from mail-ew0-f220.google.com ([209.85.219.220]:42559 "EHLO mail-ew0-f220.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754690Ab0C3HAo (ORCPT ); Tue, 30 Mar 2010 03:00:44 -0400 Received: by ewy20 with SMTP id 20so1048710ewy.1 for ; Tue, 30 Mar 2010 00:00:42 -0700 (PDT) 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=sCM0UWzjTjtB5AFRRX1GBOdz5wgN+zZ/LV9WCaAwJSY=; b=ir3weVuasAZzVLmvaRkVwe/TuUe4L4MEXtL+Na4VxPuchhcsju4OIyG+B2gsROmZcH CJHwDvZuCMQ1np4U5vddVfA7F6h7o/zpgyiIBvCuEJc+psDwDDLmhSWGQZMqNQrODXMY 74Sc3N5cwlszgLkmabZCEcoVTMmB14SqwxM9E= 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=XnzLztOuJY7ziDv5FbHCfuggX9pAzi66CMUqTgIlwYhxh576wKr0Ijm3tBs5zdOh5Y 6VKiYA2IFTsTUZUv06x/erq7EVfoSD350qoEVAfco8t5Mo5/07erir3QrTT1NMKj60eU HCUSoyGnqFskPZvZKbeoSRX5Xndtq2qMiSpWo= Received: by 10.213.44.72 with SMTP id z8mr3187335ebe.81.1269932442480; Tue, 30 Mar 2010 00:00:42 -0700 (PDT) Received: from glory.loctelecom.ru (ns2.openhardware.ru [84.19.183.172]) by mx.google.com with ESMTPS id 16sm2770426ewy.7.2010.03.30.00.00.40 (version=SSLv3 cipher=RC4-MD5); Tue, 30 Mar 2010 00:00:41 -0700 (PDT) Date: Tue, 30 Mar 2010 16:02:17 +1000 From: Dmitri Belimov To: linux-media@vger.kernel.org, Mauro Carvalho Chehab Subject: [PATCH] Fix default state Beholder H6 tuner. Message-ID: <20100330160217.52e26a33@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 The hybrid tuner FMD1216MEX_MK3 after cold start has disabled IF. This tuner has internal I2C switch. This switch switch I2C bus between DVB-T and IF part. Default state is DVB-T. When module saa7134 is load it can't find IF tda9887 and disable analog TV mode. This patch set internal I2C switch of the tuner to IF by send special value to the tuner as for receive analog TV from low band. It can be usefule for other cards. I didn't set configure a tuner by a tuner model because this tuner can has different I2C address. May be we can do it later after discuss for more robust support a tuners. Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov With my best regards, Dmitry. diff -r 1ef0265456c8 linux/drivers/media/video/saa7134/saa7134-cards.c --- a/linux/drivers/media/video/saa7134/saa7134-cards.c Fri Mar 26 00:54:18 2010 -0300 +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c Sun Mar 28 08:21:10 2010 -0400 @@ -7450,6 +7450,21 @@ } break; } + case SAA7134_BOARD_BEHOLD_H6: + { + u8 data[] = { 0x09, 0x9f, 0x86, 0x11}; + struct i2c_msg msg = {.addr = 0x61, .flags = 0, .buf = data, + .len = sizeof(data)}; + + /* The tuner TUNER_PHILIPS_FMD1216MEX_MK3 after hardware */ + /* start has disabled IF and enabled DVB-T. When saa7134 */ + /* scan I2C devices it not detect IF tda9887 and can`t */ + /* watch TV without software reboot. For solve this problem */ + /* switch the tuner to analog TV mode manually. */ + if (i2c_transfer(&dev->i2c_adap, &msg, 1) != 1) + printk(KERN_WARNING + "%s: Unable to enable IF of the tuner.\n", + dev->name); + break; + } } /* switch() */ /* initialize tuner */ Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov