diff options
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/av7110.c')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110.c | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c index 941ea7c78..2a6f2be9e 100644 --- a/linux/drivers/media/dvb/ttpci/av7110.c +++ b/linux/drivers/media/dvb/ttpci/av7110.c @@ -4328,6 +4328,9 @@ struct saa7146_extension_ioctls ioctls[] = { { 0, 0 } }; +static struct saa7146_ext_vv av7110_vv_data_st; +static struct saa7146_ext_vv av7110_vv_data_c; + static int av7110_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *pci_ext) { struct av7110 *av7110 = NULL; @@ -4345,7 +4348,16 @@ static int av7110_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_ DEB_EE(("dev: %p, av7110: %p\n",dev,av7110)); - if (saa7146_vv_init(dev)) { + /* special case DVB-C: these cards have an analog tuner + plus need some special handling, so we have separate + saa7146_ext_vv data for these... */ + if (dev->pci->subsystem_vendor == 0x110a) { + ret = saa7146_vv_init(dev, &av7110_vv_data_c); + } else { + ret = saa7146_vv_init(dev, &av7110_vv_data_st); + } + + if ( 0 != ret) { ERR(("cannot init capture device. skipping.\n")); kfree(av7110); return -1; @@ -4690,10 +4702,10 @@ static int std_callback(struct saa7146_dev* dev, struct saa7146_standard *std) } -static struct saa7146_ext_vv av7110_vv_data = { +static struct saa7146_ext_vv av7110_vv_data_st = { .inputs = 1, .audios = 1, - .capabilities = V4L2_CAP_TUNER, + .capabilities = 0, .flags = SAA7146_EXT_SWAP_ODD_EVEN, .stds = &standard[0], @@ -4704,9 +4716,23 @@ static struct saa7146_ext_vv av7110_vv_data = { .ioctl = av7110_ioctl, }; +static struct saa7146_ext_vv av7110_vv_data_c = { + .inputs = 1, + .audios = 1, + .capabilities = V4L2_CAP_TUNER, + .flags = 0, + + .stds = &standard[0], + .num_stds = sizeof(standard)/sizeof(struct saa7146_standard), + .std_callback = &std_callback, + + .ioctls = &ioctls[0], + .ioctl = av7110_ioctl, +}; + + static struct saa7146_extension av7110_extension = { .name = "dvb\0", - .ext_vv_data = &av7110_vv_data, .module = THIS_MODULE, .pci_tbl = &pci_tbl[0], |