aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-driver.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-07-20 08:29:43 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 21:03:02 -0400
commit32db775452818656d5fd8fd8b0f54425f5cfc177 (patch)
tree36289a03f0cea5cb247181700e62fe38a094b2ff /drivers/media/video/ivtv/ivtv-driver.c
parentd3c35acf2455fe354bdd00085511bef6bd6d52f1 (diff)
V4L/DVB (5902): Add ivtv-fb framebuffer driver.
Add the ivtv-fb framebuffer driver for cx23415 devices (currently only the Hauppauge PVR-350 cards). This makes it possible to use the On-Screen Display functionality of these cards, either for menus during MPEG playback, or as a console or X display. Signed-off-by: Kevin Thayer <nufan_wfk@yahoo.com> Signed-off-by: Chris Kennedy <c@groovy.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: John P Harvey <john.p.harvey@btinternet.com> Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-driver.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-driver.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c
index 622af634104e..81cbaf7dd51c 100644
--- a/drivers/media/video/ivtv/ivtv-driver.c
+++ b/drivers/media/video/ivtv/ivtv-driver.c
@@ -95,8 +95,14 @@ const u32 yuv_offset[4] = {
95 95
96/* Parameter declarations */ 96/* Parameter declarations */
97static int cardtype[IVTV_MAX_CARDS]; 97static int cardtype[IVTV_MAX_CARDS];
98static int tuner[IVTV_MAX_CARDS] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; 98static int tuner[IVTV_MAX_CARDS] = { -1, -1, -1, -1, -1, -1, -1, -1,
99static int radio[IVTV_MAX_CARDS] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; 99 -1, -1, -1, -1, -1, -1, -1, -1,
100 -1, -1, -1, -1, -1, -1, -1, -1,
101 -1, -1, -1, -1, -1, -1, -1, -1 };
102static int radio[IVTV_MAX_CARDS] = { -1, -1, -1, -1, -1, -1, -1, -1,
103 -1, -1, -1, -1, -1, -1, -1, -1,
104 -1, -1, -1, -1, -1, -1, -1, -1,
105 -1, -1, -1, -1, -1, -1, -1, -1 };
100 106
101static int cardtype_c = 1; 107static int cardtype_c = 1;
102static int tuner_c = 1; 108static int tuner_c = 1;
@@ -1242,8 +1248,10 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
1242 retval = -ENODEV; 1248 retval = -ENODEV;
1243 IVTV_ERR("Error %d on initialization\n", retval); 1249 IVTV_ERR("Error %d on initialization\n", retval);
1244 1250
1251 spin_lock(&ivtv_cards_lock);
1245 kfree(ivtv_cards[ivtv_cards_active]); 1252 kfree(ivtv_cards[ivtv_cards_active]);
1246 ivtv_cards[ivtv_cards_active] = NULL; 1253 ivtv_cards[ivtv_cards_active] = NULL;
1254 spin_unlock(&ivtv_cards_lock);
1247 return retval; 1255 return retval;
1248} 1256}
1249 1257
@@ -1346,6 +1354,7 @@ static void module_cleanup(void)
1346 1354
1347 pci_unregister_driver(&ivtv_pci_driver); 1355 pci_unregister_driver(&ivtv_pci_driver);
1348 1356
1357 spin_lock(&ivtv_cards_lock);
1349 for (i = 0; i < ivtv_cards_active; i++) { 1358 for (i = 0; i < ivtv_cards_active; i++) {
1350 if (ivtv_cards[i] == NULL) 1359 if (ivtv_cards[i] == NULL)
1351 continue; 1360 continue;
@@ -1354,6 +1363,7 @@ static void module_cleanup(void)
1354 } 1363 }
1355 kfree(ivtv_cards[i]); 1364 kfree(ivtv_cards[i]);
1356 } 1365 }
1366 spin_unlock(&ivtv_cards_lock);
1357} 1367}
1358 1368
1359/* Note: These symbols are exported because they are used by the ivtv-fb 1369/* Note: These symbols are exported because they are used by the ivtv-fb
@@ -1361,6 +1371,7 @@ static void module_cleanup(void)
1361EXPORT_SYMBOL(ivtv_set_irq_mask); 1371EXPORT_SYMBOL(ivtv_set_irq_mask);
1362EXPORT_SYMBOL(ivtv_cards_active); 1372EXPORT_SYMBOL(ivtv_cards_active);
1363EXPORT_SYMBOL(ivtv_cards); 1373EXPORT_SYMBOL(ivtv_cards);
1374EXPORT_SYMBOL(ivtv_cards_lock);
1364EXPORT_SYMBOL(ivtv_api); 1375EXPORT_SYMBOL(ivtv_api);
1365EXPORT_SYMBOL(ivtv_vapi); 1376EXPORT_SYMBOL(ivtv_vapi);
1366EXPORT_SYMBOL(ivtv_vapi_result); 1377EXPORT_SYMBOL(ivtv_vapi_result);