Skip to content

Commit

Permalink
V4L/DVB (5321): Saa7134-dvb: initialize the dvb frontend in dvb_init
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Hartmut Hackmann authored and Mauro Carvalho Chehab committed Apr 27, 2007
1 parent 11f6510 commit 1c4f76a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion drivers/media/video/saa7134/saa7134-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,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;
Expand Down Expand Up @@ -1145,7 +1146,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)
Expand Down

0 comments on commit 1c4f76a

Please sign in to comment.