All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitri Belimov <d.belimov@gmail.com>
To: linux-media@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: [PATCH] Fix default state Beholder H6 tuner.
Date: Tue, 30 Mar 2010 16:02:17 +1000	[thread overview]
Message-ID: <20100330160217.52e26a33@glory.loctelecom.ru> (raw)

[-- Attachment #1: Type: text/plain, Size: 1712 bytes --]

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.

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 <d.belimov@gmail.com>

With my best regards, Dmitry.

[-- Attachment #2: behold_h6.patch --]
[-- Type: text/x-patch, Size: 1078 bytes --]

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 <d.belimov@gmail.com>

             reply	other threads:[~2010-03-30  7:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-30  6:02 Dmitri Belimov [this message]
2010-03-30  9:54 ` [PATCH] Fix default state Beholder H6 tuner hermann pitton
2010-03-31  3:14   ` Dmitri Belimov
2010-04-01  0:31     ` hermann pitton
2010-04-01  4:33       ` Dmitri Belimov
2010-04-09  3:19         ` Mauro Carvalho Chehab
2010-04-12  4:50           ` Dmitri Belimov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100330160217.52e26a33@glory.loctelecom.ru \
    --to=d.belimov@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.