Browse Source

V4L/DVB: vivi: clean up and a major overhaul

- Clean up the code
- Use the kernel's built-in vga8x16 font instead of our own.
- Drop exclusive open: now multiple users can open the device as per the V4L2 spec.
- Move the format description to the vivi device instead of keeping it in the file
  handle. Again as per the spec.
- Streamline and simplify the drawing code. It is now easy to add text on top of
  the colorbar pattern.
- Upgrade the max resolution to 1920x1200.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil 15 years ago
parent
commit
730947bc14
3 changed files with 286 additions and 795 deletions
  1. 1 0
      drivers/media/video/Kconfig
  2. 0 407
      drivers/media/video/font.h
  3. 285 388
      drivers/media/video/vivi.c

+ 1 - 0
drivers/media/video/Kconfig

@@ -543,6 +543,7 @@ config VIDEO_DAVINCI_VPIF
 config VIDEO_VIVI
 	tristate "Virtual Video Driver"
 	depends on VIDEO_DEV && VIDEO_V4L2 && !SPARC32 && !SPARC64
+	select FONT_8x16
 	select VIDEOBUF_VMALLOC
 	default n
 	---help---

+ 0 - 407
drivers/media/video/font.h

@@ -1,407 +0,0 @@
-static unsigned char rom8x16_bits[] = {
-/* Character 0 (0x30):
-   ht=16, width=8
-   +--------+
-   |        |
-   |        |
-   | *****  |
-   |**   ** |
-   |**   ** |
-   |**  *** |
-   |** **** |
-   |**** ** |
-   |***  ** |
-   |**   ** |
-   |**   ** |
-   | *****  |
-   |        |
-   |        |
-   |        |
-   |        |
-   +--------+ */
-0x00,
-0x00,
-0x7c,
-0xc6,
-0xc6,
-0xce,
-0xde,
-0xf6,
-0xe6,
-0xc6,
-0xc6,
-0x7c,
-0x00,
-0x00,
-0x00,
-0x00,
-
-/* Character 1 (0x31):
-   ht=16, width=8
-   +--------+
-   |        |
-   |        |
-   |   **   |
-   | ****   |
-   |   **   |
-   |   **   |
-   |   **   |
-   |   **   |
-   |   **   |
-   |   **   |
-   |   **   |
-   | ****** |
-   |        |
-   |        |
-   |        |
-   |        |
-   +--------+ */
-0x00,
-0x00,
-0x18,
-0x78,
-0x18,
-0x18,
-0x18,
-0x18,
-0x18,
-0x18,
-0x18,
-0x7e,
-0x00,
-0x00,
-0x00,
-0x00,
-
-/* Character 2 (0x32):
-   ht=16, width=8
-   +--------+
-   |        |
-   |        |
-   | *****  |
-   |**   ** |
-   |**   ** |
-   |     ** |
-   |    **  |
-   |   **   |
-   |  **    |
-   | **     |
-   |**   ** |
-   |******* |
-   |        |
-   |        |
-   |        |
-   |        |
-   +--------+ */
-0x00,
-0x00,
-0x7c,
-0xc6,
-0xc6,
-0x06,
-0x0c,
-0x18,
-0x30,
-0x60,
-0xc6,
-0xfe,
-0x00,
-0x00,
-0x00,
-0x00,
-
-/* Character 3 (0x33):
-   ht=16, width=8
-   +--------+
-   |        |
-   |        |
-   | *****  |
-   |**   ** |
-   |     ** |
-   |     ** |
-   |  ****  |
-   |     ** |
-   |     ** |
-   |     ** |
-   |**   ** |
-   | *****  |
-   |        |
-   |        |
-   |        |
-   |        |
-   +--------+ */
-0x00,
-0x00,
-0x7c,
-0xc6,
-0x06,
-0x06,
-0x3c,
-0x06,
-0x06,
-0x06,
-0xc6,
-0x7c,
-0x00,
-0x00,
-0x00,
-0x00,
-
-/* Character 4 (0x34):
-   ht=16, width=8
-   +--------+
-   |        |
-   |        |
-   |    **  |
-   |   ***  |
-   |  ****  |
-   | ** **  |
-   |**  **  |
-   |**  **  |
-   |******* |
-   |    **  |
-   |    **  |
-   |   **** |
-   |        |
-   |        |
-   |        |
-   |        |
-   +--------+ */
-0x00,
-0x00,
-0x0c,
-0x1c,
-0x3c,
-0x6c,
-0xcc,
-0xcc,
-0xfe,
-0x0c,
-0x0c,
-0x1e,
-0x00,
-0x00,
-0x00,
-0x00,
-
-/* Character 5 (0x35):
-   ht=16, width=8
-   +--------+
-   |        |
-   |        |
-   |******* |
-   |**      |
-   |**      |
-   |**      |
-   |******  |
-   |     ** |
-   |     ** |
-   |     ** |
-   |**   ** |
-   | *****  |
-   |        |
-   |        |
-   |        |
-   |        |
-   +--------+ */
-0x00,
-0x00,
-0xfe,
-0xc0,
-0xc0,
-0xc0,
-0xfc,
-0x06,
-0x06,
-0x06,
-0xc6,
-0x7c,
-0x00,
-0x00,
-0x00,
-0x00,
-
-/* Character 6 (0x36):
-   ht=16, width=8
-   +--------+
-   |        |
-   |        |
-   | *****  |
-   |**   ** |
-   |**      |
-   |**      |
-   |******  |
-   |**   ** |
-   |**   ** |
-   |**   ** |
-   |**   ** |
-   | *****  |
-   |        |
-   |        |
-   |        |
-   |        |
-   +--------+ */
-0x00,
-0x00,
-0x7c,
-0xc6,
-0xc0,
-0xc0,
-0xfc,
-0xc6,
-0xc6,
-0xc6,
-0xc6,
-0x7c,
-0x00,
-0x00,
-0x00,
-0x00,
-
-/* Character 7 (0x37):
-   ht=16, width=8
-   +--------+
-   |        |
-   |        |
-   |******* |
-   |**   ** |
-   |     ** |
-   |    **  |
-   |   **   |
-   |  **    |
-   |  **    |
-   |  **    |
-   |  **    |
-   |  **    |
-   |        |
-   |        |
-   |        |
-   |        |
-   +--------+ */
-0x00,
-0x00,
-0xfe,
-0xc6,
-0x06,
-0x0c,
-0x18,
-0x30,
-0x30,
-0x30,
-0x30,
-0x30,
-0x00,
-0x00,
-0x00,
-0x00,
-
-/* Character 8 (0x38):
-   ht=16, width=8
-   +--------+
-   |        |
-   |        |
-   | *****  |
-   |**   ** |
-   |**   ** |
-   |**   ** |
-   | *****  |
-   |**   ** |
-   |**   ** |
-   |**   ** |
-   |**   ** |
-   | *****  |
-   |        |
-   |        |
-   |        |
-   |        |
-   +--------+ */
-0x00,
-0x00,
-0x7c,
-0xc6,
-0xc6,
-0xc6,
-0x7c,
-0xc6,
-0xc6,
-0xc6,
-0xc6,
-0x7c,
-0x00,
-0x00,
-0x00,
-0x00,
-
-/* Character 9 (0x39):
-   ht=16, width=8
-   +--------+
-   |        |
-   |        |
-   | *****  |
-   |**   ** |
-   |**   ** |
-   |**   ** |
-   |**   ** |
-   | ****** |
-   |     ** |
-   |     ** |
-   |**   ** |
-   | *****  |
-   |        |
-   |        |
-   |        |
-   |        |
-   +--------+ */
-0x00,
-0x00,
-0x7c,
-0xc6,
-0xc6,
-0xc6,
-0xc6,
-0x7e,
-0x06,
-0x06,
-0xc6,
-0x7c,
-0x00,
-0x00,
-0x00,
-0x00,
-/* Character : (0x3a):
-   ht=16, width=8
-   +--------+
-   |        |
-   |        |
-   |        |
-   |        |
-   |        |
-   |    **  |
-   |    **  |
-   |        |
-   |        |
-   |    **  |
-   |    **  |
-   |        |
-   |        |
-   |        |
-   |        |
-   |        |
-   +--------+ */
-0x00,
-0x00,
-0x00,
-0x00,
-0x00,
-0x0c,
-0x0c,
-0x00,
-0x00,
-0x0c,
-0x0c,
-0x00,
-0x00,
-0x00,
-0x00,
-0x00,
-};

File diff suppressed because it is too large
+ 285 - 388
drivers/media/video/vivi.c


Some files were not shown because too many files changed in this diff