aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-09-10 11:01:19 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-10 12:45:55 -0400
commit8a905162e038367503bac732bf1e3e01c19158b9 (patch)
treebf72a91df67baf47560812ceb756d1a19eb289c7 /drivers/media
parentc663155c3db58d1fff43a105eb5a0e9147ec2a6b (diff)
V4L/DVB (4605): Fixes an issue with V4L1 and make headers-install
V4L1 support should be disabled when no CONFIG_VIDEO_V4L1_COMPAT is defined, to allow checking for broken V4L2 ports. This is very important during the migration phase for V4L2 API. However, userspace apps should be capable of using both APIs, since they need to test at runtime, via VIDIOCGCAP ioctl, if V4L1 is supported. So, when __KERNEL__ is not defined, those ioctls and corresponding structs should be visible. This patch also removes the obsolete defines HAVE_V4L1 and HAVE_V4L2, that where causing some confusion, and were replaced by CONFIG_VIDEO_V4L1_COMPAT and CONFIG_VIDEO_V4L2. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/Kconfig2
-rw-r--r--drivers/media/video/zoran.h2
-rw-r--r--drivers/media/video/zoran_driver.c22
3 files changed, 13 insertions, 13 deletions
diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index ef52e6da01ed..ed4aa4e7912c 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -53,7 +53,7 @@ config VIDEO_V4L1_COMPAT
53 If you are unsure as to whether this is required, answer Y. 53 If you are unsure as to whether this is required, answer Y.
54 54
55config VIDEO_V4L2 55config VIDEO_V4L2
56 tristate 56 bool
57 default y 57 default y
58 58
59source "drivers/media/video/Kconfig" 59source "drivers/media/video/Kconfig"
diff --git a/drivers/media/video/zoran.h b/drivers/media/video/zoran.h
index ffcda95ed9d4..8fb4a3414e0a 100644
--- a/drivers/media/video/zoran.h
+++ b/drivers/media/video/zoran.h
@@ -267,7 +267,7 @@ struct zoran_v4l_settings {
267}; 267};
268 268
269/* whoops, this one is undeclared if !v4l2 */ 269/* whoops, this one is undeclared if !v4l2 */
270#ifndef HAVE_V4L2 270#ifndef CONFIG_VIDEO_V4L2
271struct v4l2_jpegcompression { 271struct v4l2_jpegcompression {
272 int quality; 272 int quality;
273 int APPn; 273 int APPn;
diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c
index d9a5876eb386..5f90db27892b 100644
--- a/drivers/media/video/zoran_driver.c
+++ b/drivers/media/video/zoran_driver.c
@@ -86,7 +86,7 @@
86#include "zoran_device.h" 86#include "zoran_device.h"
87#include "zoran_card.h" 87#include "zoran_card.h"
88 88
89#ifdef HAVE_V4L2 89#ifdef CONFIG_VIDEO_V4L2
90 /* we declare some card type definitions here, they mean 90 /* we declare some card type definitions here, they mean
91 * the same as the v4l1 ZORAN_VID_TYPE above, except it's v4l2 */ 91 * the same as the v4l1 ZORAN_VID_TYPE above, except it's v4l2 */
92#define ZORAN_V4L2_VID_FLAGS ( \ 92#define ZORAN_V4L2_VID_FLAGS ( \
@@ -103,7 +103,7 @@ const struct zoran_format zoran_formats[] = {
103 { 103 {
104 .name = "15-bit RGB", 104 .name = "15-bit RGB",
105 .palette = VIDEO_PALETTE_RGB555, 105 .palette = VIDEO_PALETTE_RGB555,
106#ifdef HAVE_V4L2 106#ifdef CONFIG_VIDEO_V4L2
107#ifdef __LITTLE_ENDIAN 107#ifdef __LITTLE_ENDIAN
108 .fourcc = V4L2_PIX_FMT_RGB555, 108 .fourcc = V4L2_PIX_FMT_RGB555,
109#else 109#else
@@ -117,7 +117,7 @@ const struct zoran_format zoran_formats[] = {
117 }, { 117 }, {
118 .name = "16-bit RGB", 118 .name = "16-bit RGB",
119 .palette = VIDEO_PALETTE_RGB565, 119 .palette = VIDEO_PALETTE_RGB565,
120#ifdef HAVE_V4L2 120#ifdef CONFIG_VIDEO_V4L2
121#ifdef __LITTLE_ENDIAN 121#ifdef __LITTLE_ENDIAN
122 .fourcc = V4L2_PIX_FMT_RGB565, 122 .fourcc = V4L2_PIX_FMT_RGB565,
123#else 123#else
@@ -131,7 +131,7 @@ const struct zoran_format zoran_formats[] = {
131 }, { 131 }, {
132 .name = "24-bit RGB", 132 .name = "24-bit RGB",
133 .palette = VIDEO_PALETTE_RGB24, 133 .palette = VIDEO_PALETTE_RGB24,
134#ifdef HAVE_V4L2 134#ifdef CONFIG_VIDEO_V4L2
135#ifdef __LITTLE_ENDIAN 135#ifdef __LITTLE_ENDIAN
136 .fourcc = V4L2_PIX_FMT_BGR24, 136 .fourcc = V4L2_PIX_FMT_BGR24,
137#else 137#else
@@ -145,7 +145,7 @@ const struct zoran_format zoran_formats[] = {
145 }, { 145 }, {
146 .name = "32-bit RGB", 146 .name = "32-bit RGB",
147 .palette = VIDEO_PALETTE_RGB32, 147 .palette = VIDEO_PALETTE_RGB32,
148#ifdef HAVE_V4L2 148#ifdef CONFIG_VIDEO_V4L2
149#ifdef __LITTLE_ENDIAN 149#ifdef __LITTLE_ENDIAN
150 .fourcc = V4L2_PIX_FMT_BGR32, 150 .fourcc = V4L2_PIX_FMT_BGR32,
151#else 151#else
@@ -159,7 +159,7 @@ const struct zoran_format zoran_formats[] = {
159 }, { 159 }, {
160 .name = "4:2:2, packed, YUYV", 160 .name = "4:2:2, packed, YUYV",
161 .palette = VIDEO_PALETTE_YUV422, 161 .palette = VIDEO_PALETTE_YUV422,
162#ifdef HAVE_V4L2 162#ifdef CONFIG_VIDEO_V4L2
163 .fourcc = V4L2_PIX_FMT_YUYV, 163 .fourcc = V4L2_PIX_FMT_YUYV,
164 .colorspace = V4L2_COLORSPACE_SMPTE170M, 164 .colorspace = V4L2_COLORSPACE_SMPTE170M,
165#endif 165#endif
@@ -169,7 +169,7 @@ const struct zoran_format zoran_formats[] = {
169 }, { 169 }, {
170 .name = "Hardware-encoded Motion-JPEG", 170 .name = "Hardware-encoded Motion-JPEG",
171 .palette = -1, 171 .palette = -1,
172#ifdef HAVE_V4L2 172#ifdef CONFIG_VIDEO_V4L2
173 .fourcc = V4L2_PIX_FMT_MJPEG, 173 .fourcc = V4L2_PIX_FMT_MJPEG,
174 .colorspace = V4L2_COLORSPACE_SMPTE170M, 174 .colorspace = V4L2_COLORSPACE_SMPTE170M,
175#endif 175#endif
@@ -210,7 +210,7 @@ static int lock_norm = 0; /* 1=Don't change TV standard (norm) */
210module_param(lock_norm, int, 0); 210module_param(lock_norm, int, 0);
211MODULE_PARM_DESC(lock_norm, "Users can't change norm"); 211MODULE_PARM_DESC(lock_norm, "Users can't change norm");
212 212
213#ifdef HAVE_V4L2 213#ifdef CONFIG_VIDEO_V4L2
214 /* small helper function for calculating buffersizes for v4l2 214 /* small helper function for calculating buffersizes for v4l2
215 * we calculate the nearest higher power-of-two, which 215 * we calculate the nearest higher power-of-two, which
216 * will be the recommended buffersize */ 216 * will be the recommended buffersize */
@@ -1761,7 +1761,7 @@ setup_overlay (struct file *file,
1761 return wait_grab_pending(zr); 1761 return wait_grab_pending(zr);
1762} 1762}
1763 1763
1764#ifdef HAVE_V4L2 1764#ifdef CONFIG_VIDEO_V4L2
1765 /* get the status of a buffer in the clients buffer queue */ 1765 /* get the status of a buffer in the clients buffer queue */
1766static int 1766static int
1767zoran_v4l2_buffer_status (struct file *file, 1767zoran_v4l2_buffer_status (struct file *file,
@@ -2676,7 +2676,7 @@ zoran_do_ioctl (struct inode *inode,
2676 } 2676 }
2677 break; 2677 break;
2678 2678
2679#ifdef HAVE_V4L2 2679#ifdef CONFIG_VIDEO_V4L2
2680 2680
2681 /* The new video4linux2 capture interface - much nicer than video4linux1, since 2681 /* The new video4linux2 capture interface - much nicer than video4linux1, since
2682 * it allows for integrating the JPEG capturing calls inside standard v4l2 2682 * it allows for integrating the JPEG capturing calls inside standard v4l2
@@ -4689,7 +4689,7 @@ static struct file_operations zoran_fops = {
4689struct video_device zoran_template __devinitdata = { 4689struct video_device zoran_template __devinitdata = {
4690 .name = ZORAN_NAME, 4690 .name = ZORAN_NAME,
4691 .type = ZORAN_VID_TYPE, 4691 .type = ZORAN_VID_TYPE,
4692#ifdef HAVE_V4L2 4692#ifdef CONFIG_VIDEO_V4L2
4693 .type2 = ZORAN_V4L2_VID_FLAGS, 4693 .type2 = ZORAN_V4L2_VID_FLAGS,
4694#endif 4694#endif
4695 .hardware = ZORAN_HARDWARE, 4695 .hardware = ZORAN_HARDWARE,