summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHartmut Hackmann <hartmut.hackmann@t-online.de>2007-02-04 23:23:42 +0100
committerHartmut Hackmann <hartmut.hackmann@t-online.de>2007-02-04 23:23:42 +0100
commit65ae3dd366ffdf97131db09ebdf14810206eab44 (patch)
tree0e9667de35a809a2c9970b76fc771f4d58a87eae
parent3c2d26ca7acf869621ce7c5515b28d2ec5b0adbe (diff)
downloadmediapointer-dvb-s2-65ae3dd366ffdf97131db09ebdf14810206eab44.tar.gz
mediapointer-dvb-s2-65ae3dd366ffdf97131db09ebdf14810206eab44.tar.bz2
saa7134-dvb: initialize the dvb frontend in dvb_init
From: Hartmut Hackmann <hartmut.hackmann@t-online.de> The hardware is completely initialized afterwards, especially the tda10046 has its firmware - which is also necessary in analog mode of some hybrid boards. Calling the sleep function afterwards saves power and definitely puts hybrid boards into analog mode without additional code elsewere. Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-dvb.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-dvb.c b/linux/drivers/media/video/saa7134/saa7134-dvb.c
index 542c970ac..0fd7a5efa 100644
--- a/linux/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c
@@ -938,6 +938,7 @@ static struct nxt200x_config kworldatsc110 = {
static int dvb_init(struct saa7134_dev *dev)
{
char *board_name;
+ int ret;
/* init struct videobuf_dvb */
dev->ts.nr_bufs = 32;
dev->ts.nr_packets = 32*4;
@@ -1146,7 +1147,18 @@ static int dvb_init(struct saa7134_dev *dev)
}
/* register everything else */
- return videobuf_dvb_register(&dev->dvb, THIS_MODULE, dev, &dev->pci->dev);
+ ret = videobuf_dvb_register(&dev->dvb, THIS_MODULE, dev, &dev->pci->dev);
+
+ /* this sequence is necessary to make the tda1004x load its firmware
+ * and to enter analog mode of hybrid boards
+ */
+ if (!ret) {
+ if (dev->dvb.frontend->ops.init)
+ dev->dvb.frontend->ops.init(dev->dvb.frontend);
+ if (dev->dvb.frontend->ops.sleep)
+ dev->dvb.frontend->ops.sleep(dev->dvb.frontend);
+ }
+ return ret;
}
static int dvb_fini(struct saa7134_dev *dev)