summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88/cx88-video.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2005-06-08 01:28:09 +0000
committerMauro Carvalho Chehab <devnull@localhost>2005-06-08 01:28:09 +0000
commitb32a9aff0d1360cb3beb9e3c0f91c84f39b95679 (patch)
tree94b7baa93e855b05f735a89b6ff45e7035833067 /linux/drivers/media/video/cx88/cx88-video.c
parent874f203c1669f752eeb477bf980cb060b135dc13 (diff)
downloadmediapointer-dvb-s2-b32a9aff0d1360cb3beb9e3c0f91c84f39b95679.tar.gz
mediapointer-dvb-s2-b32a9aff0d1360cb3beb9e3c0f91c84f39b95679.tar.bz2
Lots of change to provide an elegant way to select radio I2C address.
It should be better tested and expanded to other *-cards.c. * cx88-cards.c, cx88-core.c, cx88-i2c.c, cx88-video.c, cx88.h, tea5767.c, tuner-core.c, tuner-simple.c, tuner.h: - Improved radio tuner support. - There is a new option to cx88 radio=xxx,xxx,xxx for radio adapters; - cx88-boards now specifies radio_type, tuner_addr and radio_addr - ADDR_UNSET macro means find default radio/video tuner
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-video.c')
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index 16a11afd2..a1e40f6f3 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-video.c,v 1.59 2005/06/03 13:31:51 mchehab Exp $
+ * $Id: cx88-video.c,v 1.60 2005/06/08 01:28:09 mchehab Exp $
*
* device driver for Conexant 2388x based TV cards
* video4linux video interface
@@ -2014,6 +2014,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
{
struct cx8800_dev *dev;
struct cx88_core *core;
+ struct tuner_addr tun_addr;
int err;
dev = kmalloc(sizeof(*dev),GFP_KERNEL);
@@ -2087,8 +2088,19 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
request_module("tuner");
if (core->tda9887_conf)
request_module("tda9887");
- if (core->tuner_type != UNSET)
- cx88_call_i2c_clients(dev->core,TUNER_SET_TYPE,&core->tuner_type);
+ if (core->radio_type != UNSET) {
+ tun_addr.v4l2_tuner = V4L2_TUNER_RADIO;
+ tun_addr.type = core->radio_type;
+ tun_addr.addr = core->radio_addr;
+ cx88_call_i2c_clients(dev->core,TUNER_SET_TYPE_ADDR, &tun_addr);
+ }
+ if (core->tuner_type != UNSET) {
+ tun_addr.v4l2_tuner = V4L2_TUNER_ANALOG_TV;
+ tun_addr.type = core->tuner_type;
+ tun_addr.addr = core->tuner_addr;
+ cx88_call_i2c_clients(dev->core,TUNER_SET_TYPE_ADDR, &tun_addr);
+ }
+
if (core->tda9887_conf)
cx88_call_i2c_clients(dev->core,TDA9887_SET_CONFIG,&core->tda9887_conf);