Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32db7754 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

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: default avatarKevin Thayer <nufan_wfk@yahoo.com>
Signed-off-by: default avatarChris Kennedy <c@groovy.org>
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarJohn P Harvey <john.p.harvey@btinternet.com>
Signed-off-by: default avatarIan Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent d3c35acf
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -25,3 +25,19 @@ config VIDEO_IVTV

	  To compile this driver as a module, choose M here: the
	  module will be called ivtv.

config VIDEO_IVTV_FB
	tristate "Conexant cx23415 framebuffer support"
	depends on VIDEO_IVTV && FB && EXPERIMENTAL
	select FB_CFB_FILLRECT
	select FB_CFB_COPYAREA
	select FB_CFB_IMAGEBLIT
	---help---
	  This is a framebuffer driver for the Conexant cx23415 MPEG
	  encoder/decoder.

	  This is used in the Hauppauge PVR-350 card. There is a driver
	  homepage at <http://www.ivtvdriver.org>.

	  To compile this driver as a module, choose M here: the
	  module will be called ivtv-fb.
+1 −0
Original line number Diff line number Diff line
@@ -5,3 +5,4 @@ ivtv-objs := ivtv-audio.o ivtv-cards.o ivtv-controls.o \
		   ivtv-vbi.o ivtv-video.o ivtv-yuv.o

obj-$(CONFIG_VIDEO_IVTV) += ivtv.o
obj-$(CONFIG_VIDEO_IVTV_FB) += ivtv-fb.o
+13 −2
Original line number Diff line number Diff line
@@ -95,8 +95,14 @@ const u32 yuv_offset[4] = {

/* Parameter declarations */
static int cardtype[IVTV_MAX_CARDS];
static int tuner[IVTV_MAX_CARDS] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
static int radio[IVTV_MAX_CARDS] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
static int tuner[IVTV_MAX_CARDS] = { -1, -1, -1, -1, -1, -1, -1, -1,
				     -1, -1, -1, -1, -1, -1, -1, -1,
				     -1, -1, -1, -1, -1, -1, -1, -1,
				     -1, -1, -1, -1, -1, -1, -1, -1 };
static int radio[IVTV_MAX_CARDS] = { -1, -1, -1, -1, -1, -1, -1, -1,
				     -1, -1, -1, -1, -1, -1, -1, -1,
				     -1, -1, -1, -1, -1, -1, -1, -1,
				     -1, -1, -1, -1, -1, -1, -1, -1 };

static int cardtype_c = 1;
static int tuner_c = 1;
@@ -1242,8 +1248,10 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
		retval = -ENODEV;
	IVTV_ERR("Error %d on initialization\n", retval);

	spin_lock(&ivtv_cards_lock);
	kfree(ivtv_cards[ivtv_cards_active]);
	ivtv_cards[ivtv_cards_active] = NULL;
	spin_unlock(&ivtv_cards_lock);
	return retval;
}

@@ -1346,6 +1354,7 @@ static void module_cleanup(void)

	pci_unregister_driver(&ivtv_pci_driver);

	spin_lock(&ivtv_cards_lock);
	for (i = 0; i < ivtv_cards_active; i++) {
		if (ivtv_cards[i] == NULL)
			continue;
@@ -1354,6 +1363,7 @@ static void module_cleanup(void)
		}
		kfree(ivtv_cards[i]);
	}
	spin_unlock(&ivtv_cards_lock);
}

/* Note: These symbols are exported because they are used by the ivtv-fb
@@ -1361,6 +1371,7 @@ static void module_cleanup(void)
EXPORT_SYMBOL(ivtv_set_irq_mask);
EXPORT_SYMBOL(ivtv_cards_active);
EXPORT_SYMBOL(ivtv_cards);
EXPORT_SYMBOL(ivtv_cards_lock);
EXPORT_SYMBOL(ivtv_api);
EXPORT_SYMBOL(ivtv_vapi);
EXPORT_SYMBOL(ivtv_vapi_result);
+3 −23
Original line number Diff line number Diff line
@@ -89,11 +89,9 @@

extern const u32 yuv_offset[4];

/* Maximum ivtv driver instances.
   Based on 6 PVR500s each with two PVR15s...
   TODO: make this dynamic. I believe it is only a global in order to support
    ivtv-fb. There must be a better way to do that. */
#define IVTV_MAX_CARDS 12
/* Maximum ivtv driver instances. Some people have a huge number of
   capture cards, so set this to a high value. */
#define IVTV_MAX_CARDS 32

/* Supported cards */
#define IVTV_CARD_PVR_250 	      0	/* WinTV PVR 250 */
@@ -303,28 +301,10 @@ extern const u32 yuv_offset[4];
#define IVTV_DEBUG_HI_DEC(fmt, args...)   IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_DEC, "dec", fmt , ## args)
#define IVTV_DEBUG_HI_YUV(fmt, args...)   IVTV_DEBUG_HIGH_VOL(IVTV_DBGFLG_YUV, "yuv", fmt , ## args)

#define IVTV_FB_DEBUG(x, type, fmt, args...) \
	do { \
		if ((x) & ivtv_debug) \
			printk(KERN_INFO "ivtv%d-fb " type ": " fmt, itv->num , ## args); \
	} while (0)
#define IVTV_FB_DEBUG_WARN(fmt, args...)  IVTV_FB_DEBUG(IVTV_DBGFLG_WARN, "warning", fmt , ## args)
#define IVTV_FB_DEBUG_INFO(fmt, args...)  IVTV_FB_DEBUG(IVTV_DBGFLG_INFO, "info", fmt , ## args)
#define IVTV_FB_DEBUG_API(fmt, args...)   IVTV_FB_DEBUG(IVTV_DBGFLG_API, "api", fmt , ## args)
#define IVTV_FB_DEBUG_DMA(fmt, args...)   IVTV_FB_DEBUG(IVTV_DBGFLG_DMA, "dma", fmt , ## args)
#define IVTV_FB_DEBUG_IOCTL(fmt, args...) IVTV_FB_DEBUG(IVTV_DBGFLG_IOCTL, "ioctl", fmt , ## args)
#define IVTV_FB_DEBUG_I2C(fmt, args...)   IVTV_FB_DEBUG(IVTV_DBGFLG_I2C, "i2c", fmt , ## args)
#define IVTV_FB_DEBUG_IRQ(fmt, args...)   IVTV_FB_DEBUG(IVTV_DBGFLG_IRQ, "irq", fmt , ## args)
#define IVTV_FB_DEBUG_DEC(fmt, args...)   IVTV_FB_DEBUG(IVTV_DBGFLG_DEC, "dec", fmt , ## args)
#define IVTV_FB_DEBUG_YUV(fmt, args...)   IVTV_FB_DEBUG(IVTV_DBGFLG_YUV, "yuv", fmt , ## args)

/* Standard kernel messages */
#define IVTV_ERR(fmt, args...)      printk(KERN_ERR  "ivtv%d: " fmt, itv->num , ## args)
#define IVTV_WARN(fmt, args...)     printk(KERN_WARNING "ivtv%d: " fmt, itv->num , ## args)
#define IVTV_INFO(fmt, args...)     printk(KERN_INFO "ivtv%d: " fmt, itv->num , ## args)
#define IVTV_FB_ERR(fmt, args...)   printk(KERN_ERR  "ivtv%d-fb: " fmt, itv->num , ## args)
#define IVTV_FB_WARN(fmt, args...)  printk(KERN_WARNING  "ivtv%d-fb: " fmt, itv->num , ## args)
#define IVTV_FB_INFO(fmt, args...)  printk(KERN_INFO "ivtv%d-fb: " fmt, itv->num , ## args)

/* Values for IVTV_API_DEC_PLAYBACK_SPEED mpeg_frame_type_mask parameter: */
#define MPEG_FRAME_TYPE_IFRAME 1
+1215 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading