diff options
author | Michael Hunold <devnull@localhost> | 2003-07-07 11:28:54 +0000 |
---|---|---|
committer | Michael Hunold <devnull@localhost> | 2003-07-07 11:28:54 +0000 |
commit | e841743cf89630b111efa5feccde7ded4d96c5f7 (patch) | |
tree | 9ecfc993bb338715e37bcce2694a41a0f5ad5b68 /linux/drivers/media/dvb | |
parent | 424b720a5ac042b07b0b1045f36c915b617ebaf1 (diff) | |
download | mediapointer-dvb-s2-e841743cf89630b111efa5feccde7ded4d96c5f7.tar.gz mediapointer-dvb-s2-e841743cf89630b111efa5feccde7ded4d96c5f7.tar.bz2 |
Make the "ext_vv_data" informations a per-device information instead
of a per-extension information. This is needed for the DVB-C cards,
which seem to have swapped field order and need to propagate some
video4linux specific stuff for the analog module to work.
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110.c | 34 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget-av.c | 15 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget-ci.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget-patch.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget.c | 1 |
5 files changed, 40 insertions, 12 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], diff --git a/linux/drivers/media/dvb/ttpci/budget-av.c b/linux/drivers/media/dvb/ttpci/budget-av.c index 36f1fa796..82816933c 100644 --- a/linux/drivers/media/dvb/ttpci/budget-av.c +++ b/linux/drivers/media/dvb/ttpci/budget-av.c @@ -170,6 +170,7 @@ static int budget_av_detach (struct saa7146_dev *dev) return err; } +static struct saa7146_ext_vv vv_data; static int budget_av_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *info) @@ -207,16 +208,22 @@ static int budget_av_attach (struct saa7146_dev* dev, dvb_delay(500); if ((err = saa7113_init (budget_av))) { - budget_av_detach(dev); + /* fixme: proper cleanup here */ + ERR(("cannot init saa7113.\n")); return err; } - saa7146_vv_init(dev); + if ( 0 != saa7146_vv_init(dev,&vv_data)) { + /* fixme: proper cleanup here */ + ERR(("cannot init vv subsystem.\n")); + return err; + } + if ((err = saa7146_register_device(&budget_av->vd, dev, "knc1", VFL_TYPE_GRABBER))) { + /* fixme: proper cleanup here */ ERR(("cannot register capture v4l2 device.\n")); - budget_av_detach(dev); return err; } @@ -347,8 +354,6 @@ static struct saa7146_extension budget_extension = { .attach = budget_av_attach, .detach = budget_av_detach, - .ext_vv_data = &vv_data, - .irq_mask = MASK_10, .irq_func = ttpci_budget_irq10_handler, }; diff --git a/linux/drivers/media/dvb/ttpci/budget-ci.c b/linux/drivers/media/dvb/ttpci/budget-ci.c index fb5347ace..62971fbc6 100644 --- a/linux/drivers/media/dvb/ttpci/budget-ci.c +++ b/linux/drivers/media/dvb/ttpci/budget-ci.c @@ -377,7 +377,6 @@ MODULE_DEVICE_TABLE(pci, pci_tbl); static struct saa7146_extension budget_extension = { .name = "budget_ci dvb\0", .flags = 0, - .ext_vv_data = NULL, .module = THIS_MODULE, .pci_tbl = &pci_tbl[0], diff --git a/linux/drivers/media/dvb/ttpci/budget-patch.c b/linux/drivers/media/dvb/ttpci/budget-patch.c index 0eb9c8eae..2673d6042 100644 --- a/linux/drivers/media/dvb/ttpci/budget-patch.c +++ b/linux/drivers/media/dvb/ttpci/budget-patch.c @@ -264,7 +264,6 @@ static void __exit budget_patch_exit(void) static struct saa7146_extension budget_extension = { .name = "budget_patch dvb\0", .flags = 0, - .ext_vv_data = NULL, .module = THIS_MODULE, .pci_tbl = pci_tbl, diff --git a/linux/drivers/media/dvb/ttpci/budget.c b/linux/drivers/media/dvb/ttpci/budget.c index d3e17a84e..f3e6a05c6 100644 --- a/linux/drivers/media/dvb/ttpci/budget.c +++ b/linux/drivers/media/dvb/ttpci/budget.c @@ -215,7 +215,6 @@ MODULE_DEVICE_TABLE(pci, pci_tbl); static struct saa7146_extension budget_extension = { .name = "budget dvb\0", .flags = 0, - .ext_vv_data = NULL, .module = THIS_MODULE, .pci_tbl = pci_tbl, |