aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-10-26 15:51:47 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:00:57 -0500
commitc96dd0710685a0932c16ecc351621af3fe0cb2c7 (patch)
tree8bb88d386f402b06bc733d56ab20b9dee310beea /drivers
parente84619b17440ccca4e4db7583d126c4189b987e5 (diff)
V4L/DVB (6411): remove V4L1 from being compiled when V4L2 only is selected
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c95
-rw-r--r--drivers/media/video/bt8xx/bttvp.h1
2 files changed, 24 insertions, 72 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index cb50fde2be86..061f52ba824a 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -12,6 +12,9 @@
12 V4L1 removal from: 12 V4L1 removal from:
13 (c) 2005-2006 Nickolay V. Shmyrev <nshmyrev@yandex.ru> 13 (c) 2005-2006 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
14 14
15 Fixes to be fully V4L2 compliant by
16 (c) 2006 Mauro Carvalho Chehab <mchehab@infradead.org>
17
15 Cropping and overscan support 18 Cropping and overscan support
16 Copyright (C) 2005, 2006 Michael H. Schimek <mschimek@gmx.at> 19 Copyright (C) 2005, 2006 Michael H. Schimek <mschimek@gmx.at>
17 Sponsored by OPQ Systems AB 20 Sponsored by OPQ Systems AB
@@ -160,7 +163,7 @@ MODULE_LICENSE("GPL");
160static ssize_t show_card(struct device *cd, 163static ssize_t show_card(struct device *cd,
161 struct device_attribute *attr, char *buf) 164 struct device_attribute *attr, char *buf)
162{ 165{
163 struct video_device *vfd = to_video_device(cd); 166 struct video_device *vfd = container_of(cd, struct video_device, class_dev);
164 struct bttv *btv = dev_get_drvdata(vfd->dev); 167 struct bttv *btv = dev_get_drvdata(vfd->dev);
165 return sprintf(buf, "%d\n", btv ? btv->c.type : UNSET); 168 return sprintf(buf, "%d\n", btv ? btv->c.type : UNSET);
166} 169}
@@ -476,28 +479,24 @@ static const unsigned int BTTV_TVNORMS = ARRAY_SIZE(bttv_tvnorms);
476static const struct bttv_format bttv_formats[] = { 479static const struct bttv_format bttv_formats[] = {
477 { 480 {
478 .name = "8 bpp, gray", 481 .name = "8 bpp, gray",
479 .palette = VIDEO_PALETTE_GREY,
480 .fourcc = V4L2_PIX_FMT_GREY, 482 .fourcc = V4L2_PIX_FMT_GREY,
481 .btformat = BT848_COLOR_FMT_Y8, 483 .btformat = BT848_COLOR_FMT_Y8,
482 .depth = 8, 484 .depth = 8,
483 .flags = FORMAT_FLAGS_PACKED, 485 .flags = FORMAT_FLAGS_PACKED,
484 },{ 486 },{
485 .name = "8 bpp, dithered color", 487 .name = "8 bpp, dithered color",
486 .palette = VIDEO_PALETTE_HI240,
487 .fourcc = V4L2_PIX_FMT_HI240, 488 .fourcc = V4L2_PIX_FMT_HI240,
488 .btformat = BT848_COLOR_FMT_RGB8, 489 .btformat = BT848_COLOR_FMT_RGB8,
489 .depth = 8, 490 .depth = 8,
490 .flags = FORMAT_FLAGS_PACKED | FORMAT_FLAGS_DITHER, 491 .flags = FORMAT_FLAGS_PACKED | FORMAT_FLAGS_DITHER,
491 },{ 492 },{
492 .name = "15 bpp RGB, le", 493 .name = "15 bpp RGB, le",
493 .palette = VIDEO_PALETTE_RGB555,
494 .fourcc = V4L2_PIX_FMT_RGB555, 494 .fourcc = V4L2_PIX_FMT_RGB555,
495 .btformat = BT848_COLOR_FMT_RGB15, 495 .btformat = BT848_COLOR_FMT_RGB15,
496 .depth = 16, 496 .depth = 16,
497 .flags = FORMAT_FLAGS_PACKED, 497 .flags = FORMAT_FLAGS_PACKED,
498 },{ 498 },{
499 .name = "15 bpp RGB, be", 499 .name = "15 bpp RGB, be",
500 .palette = -1,
501 .fourcc = V4L2_PIX_FMT_RGB555X, 500 .fourcc = V4L2_PIX_FMT_RGB555X,
502 .btformat = BT848_COLOR_FMT_RGB15, 501 .btformat = BT848_COLOR_FMT_RGB15,
503 .btswap = 0x03, /* byteswap */ 502 .btswap = 0x03, /* byteswap */
@@ -505,14 +504,12 @@ static const struct bttv_format bttv_formats[] = {
505 .flags = FORMAT_FLAGS_PACKED, 504 .flags = FORMAT_FLAGS_PACKED,
506 },{ 505 },{
507 .name = "16 bpp RGB, le", 506 .name = "16 bpp RGB, le",
508 .palette = VIDEO_PALETTE_RGB565,
509 .fourcc = V4L2_PIX_FMT_RGB565, 507 .fourcc = V4L2_PIX_FMT_RGB565,
510 .btformat = BT848_COLOR_FMT_RGB16, 508 .btformat = BT848_COLOR_FMT_RGB16,
511 .depth = 16, 509 .depth = 16,
512 .flags = FORMAT_FLAGS_PACKED, 510 .flags = FORMAT_FLAGS_PACKED,
513 },{ 511 },{
514 .name = "16 bpp RGB, be", 512 .name = "16 bpp RGB, be",
515 .palette = -1,
516 .fourcc = V4L2_PIX_FMT_RGB565X, 513 .fourcc = V4L2_PIX_FMT_RGB565X,
517 .btformat = BT848_COLOR_FMT_RGB16, 514 .btformat = BT848_COLOR_FMT_RGB16,
518 .btswap = 0x03, /* byteswap */ 515 .btswap = 0x03, /* byteswap */
@@ -520,21 +517,18 @@ static const struct bttv_format bttv_formats[] = {
520 .flags = FORMAT_FLAGS_PACKED, 517 .flags = FORMAT_FLAGS_PACKED,
521 },{ 518 },{
522 .name = "24 bpp RGB, le", 519 .name = "24 bpp RGB, le",
523 .palette = VIDEO_PALETTE_RGB24,
524 .fourcc = V4L2_PIX_FMT_BGR24, 520 .fourcc = V4L2_PIX_FMT_BGR24,
525 .btformat = BT848_COLOR_FMT_RGB24, 521 .btformat = BT848_COLOR_FMT_RGB24,
526 .depth = 24, 522 .depth = 24,
527 .flags = FORMAT_FLAGS_PACKED, 523 .flags = FORMAT_FLAGS_PACKED,
528 },{ 524 },{
529 .name = "32 bpp RGB, le", 525 .name = "32 bpp RGB, le",
530 .palette = VIDEO_PALETTE_RGB32,
531 .fourcc = V4L2_PIX_FMT_BGR32, 526 .fourcc = V4L2_PIX_FMT_BGR32,
532 .btformat = BT848_COLOR_FMT_RGB32, 527 .btformat = BT848_COLOR_FMT_RGB32,
533 .depth = 32, 528 .depth = 32,
534 .flags = FORMAT_FLAGS_PACKED, 529 .flags = FORMAT_FLAGS_PACKED,
535 },{ 530 },{
536 .name = "32 bpp RGB, be", 531 .name = "32 bpp RGB, be",
537 .palette = -1,
538 .fourcc = V4L2_PIX_FMT_RGB32, 532 .fourcc = V4L2_PIX_FMT_RGB32,
539 .btformat = BT848_COLOR_FMT_RGB32, 533 .btformat = BT848_COLOR_FMT_RGB32,
540 .btswap = 0x0f, /* byte+word swap */ 534 .btswap = 0x0f, /* byte+word swap */
@@ -542,21 +536,18 @@ static const struct bttv_format bttv_formats[] = {
542 .flags = FORMAT_FLAGS_PACKED, 536 .flags = FORMAT_FLAGS_PACKED,
543 },{ 537 },{
544 .name = "4:2:2, packed, YUYV", 538 .name = "4:2:2, packed, YUYV",
545 .palette = VIDEO_PALETTE_YUV422,
546 .fourcc = V4L2_PIX_FMT_YUYV, 539 .fourcc = V4L2_PIX_FMT_YUYV,
547 .btformat = BT848_COLOR_FMT_YUY2, 540 .btformat = BT848_COLOR_FMT_YUY2,
548 .depth = 16, 541 .depth = 16,
549 .flags = FORMAT_FLAGS_PACKED, 542 .flags = FORMAT_FLAGS_PACKED,
550 },{ 543 },{
551 .name = "4:2:2, packed, YUYV", 544 .name = "4:2:2, packed, YUYV",
552 .palette = VIDEO_PALETTE_YUYV,
553 .fourcc = V4L2_PIX_FMT_YUYV, 545 .fourcc = V4L2_PIX_FMT_YUYV,
554 .btformat = BT848_COLOR_FMT_YUY2, 546 .btformat = BT848_COLOR_FMT_YUY2,
555 .depth = 16, 547 .depth = 16,
556 .flags = FORMAT_FLAGS_PACKED, 548 .flags = FORMAT_FLAGS_PACKED,
557 },{ 549 },{
558 .name = "4:2:2, packed, UYVY", 550 .name = "4:2:2, packed, UYVY",
559 .palette = VIDEO_PALETTE_UYVY,
560 .fourcc = V4L2_PIX_FMT_UYVY, 551 .fourcc = V4L2_PIX_FMT_UYVY,
561 .btformat = BT848_COLOR_FMT_YUY2, 552 .btformat = BT848_COLOR_FMT_YUY2,
562 .btswap = 0x03, /* byteswap */ 553 .btswap = 0x03, /* byteswap */
@@ -564,7 +555,6 @@ static const struct bttv_format bttv_formats[] = {
564 .flags = FORMAT_FLAGS_PACKED, 555 .flags = FORMAT_FLAGS_PACKED,
565 },{ 556 },{
566 .name = "4:2:2, planar, Y-Cb-Cr", 557 .name = "4:2:2, planar, Y-Cb-Cr",
567 .palette = VIDEO_PALETTE_YUV422P,
568 .fourcc = V4L2_PIX_FMT_YUV422P, 558 .fourcc = V4L2_PIX_FMT_YUV422P,
569 .btformat = BT848_COLOR_FMT_YCrCb422, 559 .btformat = BT848_COLOR_FMT_YCrCb422,
570 .depth = 16, 560 .depth = 16,
@@ -573,7 +563,6 @@ static const struct bttv_format bttv_formats[] = {
573 .vshift = 0, 563 .vshift = 0,
574 },{ 564 },{
575 .name = "4:2:0, planar, Y-Cb-Cr", 565 .name = "4:2:0, planar, Y-Cb-Cr",
576 .palette = VIDEO_PALETTE_YUV420P,
577 .fourcc = V4L2_PIX_FMT_YUV420, 566 .fourcc = V4L2_PIX_FMT_YUV420,
578 .btformat = BT848_COLOR_FMT_YCrCb422, 567 .btformat = BT848_COLOR_FMT_YCrCb422,
579 .depth = 12, 568 .depth = 12,
@@ -582,7 +571,6 @@ static const struct bttv_format bttv_formats[] = {
582 .vshift = 1, 571 .vshift = 1,
583 },{ 572 },{
584 .name = "4:2:0, planar, Y-Cr-Cb", 573 .name = "4:2:0, planar, Y-Cr-Cb",
585 .palette = -1,
586 .fourcc = V4L2_PIX_FMT_YVU420, 574 .fourcc = V4L2_PIX_FMT_YVU420,
587 .btformat = BT848_COLOR_FMT_YCrCb422, 575 .btformat = BT848_COLOR_FMT_YCrCb422,
588 .depth = 12, 576 .depth = 12,
@@ -591,7 +579,6 @@ static const struct bttv_format bttv_formats[] = {
591 .vshift = 1, 579 .vshift = 1,
592 },{ 580 },{
593 .name = "4:1:1, planar, Y-Cb-Cr", 581 .name = "4:1:1, planar, Y-Cb-Cr",
594 .palette = VIDEO_PALETTE_YUV411P,
595 .fourcc = V4L2_PIX_FMT_YUV411P, 582 .fourcc = V4L2_PIX_FMT_YUV411P,
596 .btformat = BT848_COLOR_FMT_YCrCb411, 583 .btformat = BT848_COLOR_FMT_YCrCb411,
597 .depth = 12, 584 .depth = 12,
@@ -600,7 +587,6 @@ static const struct bttv_format bttv_formats[] = {
600 .vshift = 0, 587 .vshift = 0,
601 },{ 588 },{
602 .name = "4:1:0, planar, Y-Cb-Cr", 589 .name = "4:1:0, planar, Y-Cb-Cr",
603 .palette = VIDEO_PALETTE_YUV410P,
604 .fourcc = V4L2_PIX_FMT_YUV410, 590 .fourcc = V4L2_PIX_FMT_YUV410,
605 .btformat = BT848_COLOR_FMT_YCrCb411, 591 .btformat = BT848_COLOR_FMT_YCrCb411,
606 .depth = 9, 592 .depth = 9,
@@ -609,7 +595,6 @@ static const struct bttv_format bttv_formats[] = {
609 .vshift = 2, 595 .vshift = 2,
610 },{ 596 },{
611 .name = "4:1:0, planar, Y-Cr-Cb", 597 .name = "4:1:0, planar, Y-Cr-Cb",
612 .palette = -1,
613 .fourcc = V4L2_PIX_FMT_YVU410, 598 .fourcc = V4L2_PIX_FMT_YVU410,
614 .btformat = BT848_COLOR_FMT_YCrCb411, 599 .btformat = BT848_COLOR_FMT_YCrCb411,
615 .depth = 9, 600 .depth = 9,
@@ -618,7 +603,6 @@ static const struct bttv_format bttv_formats[] = {
618 .vshift = 2, 603 .vshift = 2,
619 },{ 604 },{
620 .name = "raw scanlines", 605 .name = "raw scanlines",
621 .palette = VIDEO_PALETTE_RAW,
622 .fourcc = -1, 606 .fourcc = -1,
623 .btformat = BT848_COLOR_FMT_RAW, 607 .btformat = BT848_COLOR_FMT_RAW,
624 .depth = 8, 608 .depth = 8,
@@ -1450,7 +1434,6 @@ static void bttv_reinit_bt848(struct bttv *btv)
1450 1434
1451static int get_control(struct bttv *btv, struct v4l2_control *c) 1435static int get_control(struct bttv *btv, struct v4l2_control *c)
1452{ 1436{
1453 struct video_audio va;
1454 int i; 1437 int i;
1455 1438
1456 for (i = 0; i < BTTV_CTLS; i++) 1439 for (i = 0; i < BTTV_CTLS; i++)
@@ -1458,7 +1441,10 @@ static int get_control(struct bttv *btv, struct v4l2_control *c)
1458 break; 1441 break;
1459 if (i == BTTV_CTLS) 1442 if (i == BTTV_CTLS)
1460 return -EINVAL; 1443 return -EINVAL;
1444#ifdef CONFIG_VIDEO_V4L1
1461 if (btv->audio_hook && i >= 4 && i <= 8) { 1445 if (btv->audio_hook && i >= 4 && i <= 8) {
1446 struct video_audio va;
1447
1462 memset(&va,0,sizeof(va)); 1448 memset(&va,0,sizeof(va));
1463 btv->audio_hook(btv,&va,0); 1449 btv->audio_hook(btv,&va,0);
1464 switch (c->id) { 1450 switch (c->id) {
@@ -1480,6 +1466,7 @@ static int get_control(struct bttv *btv, struct v4l2_control *c)
1480 } 1466 }
1481 return 0; 1467 return 0;
1482 } 1468 }
1469#endif
1483 switch (c->id) { 1470 switch (c->id) {
1484 case V4L2_CID_BRIGHTNESS: 1471 case V4L2_CID_BRIGHTNESS:
1485 c->value = btv->bright; 1472 c->value = btv->bright;
@@ -1543,7 +1530,6 @@ static int get_control(struct bttv *btv, struct v4l2_control *c)
1543 1530
1544static int set_control(struct bttv *btv, struct v4l2_control *c) 1531static int set_control(struct bttv *btv, struct v4l2_control *c)
1545{ 1532{
1546 struct video_audio va;
1547 int i,val; 1533 int i,val;
1548 1534
1549 for (i = 0; i < BTTV_CTLS; i++) 1535 for (i = 0; i < BTTV_CTLS; i++)
@@ -1551,7 +1537,10 @@ static int set_control(struct bttv *btv, struct v4l2_control *c)
1551 break; 1537 break;
1552 if (i == BTTV_CTLS) 1538 if (i == BTTV_CTLS)
1553 return -EINVAL; 1539 return -EINVAL;
1540#ifdef CONFIG_VIDEO_V4L1
1554 if (btv->audio_hook && i >= 4 && i <= 8) { 1541 if (btv->audio_hook && i >= 4 && i <= 8) {
1542 struct video_audio va;
1543
1555 memset(&va,0,sizeof(va)); 1544 memset(&va,0,sizeof(va));
1556 btv->audio_hook(btv,&va,0); 1545 btv->audio_hook(btv,&va,0);
1557 switch (c->id) { 1546 switch (c->id) {
@@ -1581,6 +1570,7 @@ static int set_control(struct bttv *btv, struct v4l2_control *c)
1581 btv->audio_hook(btv,&va,1); 1570 btv->audio_hook(btv,&va,1);
1582 return 0; 1571 return 0;
1583 } 1572 }
1573#endif
1584 switch (c->id) { 1574 switch (c->id) {
1585 case V4L2_CID_BRIGHTNESS: 1575 case V4L2_CID_BRIGHTNESS:
1586 bt848_bright(btv,c->value); 1576 bt848_bright(btv,c->value);
@@ -1689,20 +1679,6 @@ static void bttv_field_count(struct bttv *btv)
1689} 1679}
1690 1680
1691static const struct bttv_format* 1681static const struct bttv_format*
1692format_by_palette(int palette)
1693{
1694 unsigned int i;
1695
1696 for (i = 0; i < BTTV_FORMATS; i++) {
1697 if (-1 == bttv_formats[i].palette)
1698 continue;
1699 if (bttv_formats[i].palette == palette)
1700 return bttv_formats+i;
1701 }
1702 return NULL;
1703}
1704
1705static const struct bttv_format*
1706format_by_fourcc(int fourcc) 1682format_by_fourcc(int fourcc)
1707{ 1683{
1708 unsigned int i; 1684 unsigned int i;
@@ -1915,6 +1891,7 @@ static struct videobuf_queue_ops bttv_video_qops = {
1915static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg) 1891static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
1916{ 1892{
1917 switch (cmd) { 1893 switch (cmd) {
1894#ifdef CONFIG_VIDEO_V4L1
1918 case VIDIOCGAUDIO: 1895 case VIDIOCGAUDIO:
1919 { 1896 {
1920 struct video_audio *v = arg; 1897 struct video_audio *v = arg;
@@ -1953,7 +1930,7 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
1953 mutex_unlock(&btv->lock); 1930 mutex_unlock(&btv->lock);
1954 return 0; 1931 return 0;
1955 } 1932 }
1956 1933#endif
1957 /* *** v4l2 *** ************************************************ */ 1934 /* *** v4l2 *** ************************************************ */
1958 case VIDIOC_ENUMSTD: 1935 case VIDIOC_ENUMSTD:
1959 { 1936 {
@@ -2060,6 +2037,7 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
2060 return -EINVAL; 2037 return -EINVAL;
2061 mutex_lock(&btv->lock); 2038 mutex_lock(&btv->lock);
2062 bttv_call_i2c_clients(btv, VIDIOC_S_TUNER, t); 2039 bttv_call_i2c_clients(btv, VIDIOC_S_TUNER, t);
2040#ifdef CONFIG_VIDEO_V4L1
2063 if (btv->audio_hook) { 2041 if (btv->audio_hook) {
2064 struct video_audio va; 2042 struct video_audio va;
2065 memset(&va, 0, sizeof(struct video_audio)); 2043 memset(&va, 0, sizeof(struct video_audio));
@@ -2074,6 +2052,7 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
2074 va.mode = VIDEO_SOUND_LANG2; 2052 va.mode = VIDEO_SOUND_LANG2;
2075 btv->audio_hook(btv,&va,1); 2053 btv->audio_hook(btv,&va,1);
2076 } 2054 }
2055#endif
2077 mutex_unlock(&btv->lock); 2056 mutex_unlock(&btv->lock);
2078 return 0; 2057 return 0;
2079 } 2058 }
@@ -2698,28 +2677,6 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
2698 return 0; 2677 return 0;
2699 } 2678 }
2700#endif 2679#endif
2701 case VIDIOCGVBIFMT:
2702 case VIDIOCSVBIFMT:
2703 case VIDIOCSYNC:
2704 case VIDIOCMCAPTURE:
2705 case VIDIOCCAPTURE:
2706 case VIDIOCGFBUF:
2707 case VIDIOCSFBUF:
2708 case VIDIOCGWIN:
2709 case VIDIOCSWIN:
2710 case VIDIOCGCAP:
2711 case VIDIOCGPICT:
2712 case VIDIOCSPICT:
2713 case VIDIOCGFREQ:
2714 case VIDIOCSFREQ:
2715 case VIDIOCGTUNER:
2716 case VIDIOCSTUNER:
2717 case VIDIOCGCHAN:
2718 case VIDIOCSCHAN:
2719 case VIDIOCGAUDIO:
2720 case VIDIOCSAUDIO:
2721 return v4l_compat_translate_ioctl(inode,file,cmd,arg,
2722 bttv_do_ioctl);
2723 2680
2724 /* *** v4l2 *** ************************************************ */ 2681 /* *** v4l2 *** ************************************************ */
2725 case VIDIOC_QUERYCAP: 2682 case VIDIOC_QUERYCAP:
@@ -2973,6 +2930,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
2973 return 0; 2930 return 0;
2974 } 2931 }
2975 *c = bttv_ctls[i]; 2932 *c = bttv_ctls[i];
2933#ifdef CONFIG_VIDEO_V4L1
2976 if (btv->audio_hook && i >= 4 && i <= 8) { 2934 if (btv->audio_hook && i >= 4 && i <= 8) {
2977 struct video_audio va; 2935 struct video_audio va;
2978 memset(&va,0,sizeof(va)); 2936 memset(&va,0,sizeof(va));
@@ -2996,6 +2954,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
2996 break; 2954 break;
2997 } 2955 }
2998 } 2956 }
2957#endif
2999 return 0; 2958 return 0;
3000 } 2959 }
3001 case VIDIOC_G_PARM: 2960 case VIDIOC_G_PARM:
@@ -3027,7 +2986,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
3027 t->type = V4L2_TUNER_ANALOG_TV; 2986 t->type = V4L2_TUNER_ANALOG_TV;
3028 if (btread(BT848_DSTATUS)&BT848_DSTATUS_HLOC) 2987 if (btread(BT848_DSTATUS)&BT848_DSTATUS_HLOC)
3029 t->signal = 0xffff; 2988 t->signal = 0xffff;
3030 2989#ifdef CONFIG_VIDEO_V4L1
3031 if (btv->audio_hook) { 2990 if (btv->audio_hook) {
3032 /* Hmmm ... */ 2991 /* Hmmm ... */
3033 struct video_audio va; 2992 struct video_audio va;
@@ -3045,6 +3004,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
3045 | V4L2_TUNER_SUB_LANG2; 3004 | V4L2_TUNER_SUB_LANG2;
3046 } 3005 }
3047 } 3006 }
3007#endif
3048 /* FIXME: fill capability+audmode */ 3008 /* FIXME: fill capability+audmode */
3049 mutex_unlock(&btv->lock); 3009 mutex_unlock(&btv->lock);
3050 return 0; 3010 return 0;
@@ -3196,7 +3156,8 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
3196 case VIDIOC_DBG_S_REGISTER: 3156 case VIDIOC_DBG_S_REGISTER:
3197 return bttv_common_ioctls(btv,cmd,arg); 3157 return bttv_common_ioctls(btv,cmd,arg);
3198 default: 3158 default:
3199 return -ENOIOCTLCMD; 3159 return v4l_compat_translate_ioctl(inode,file,cmd,arg,
3160 bttv_do_ioctl);
3200 } 3161 }
3201 return 0; 3162 return 0;
3202 3163
@@ -3551,17 +3512,9 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
3551 case VIDIOC_DBG_G_REGISTER: 3512 case VIDIOC_DBG_G_REGISTER:
3552 case VIDIOC_DBG_S_REGISTER: 3513 case VIDIOC_DBG_S_REGISTER:
3553 return bttv_common_ioctls(btv,cmd,arg); 3514 return bttv_common_ioctls(btv,cmd,arg);
3554 case VIDIOCGCAP: 3515 default:
3555 case VIDIOCGFREQ:
3556 case VIDIOCSFREQ:
3557 case VIDIOCGTUNER:
3558 case VIDIOCSTUNER:
3559 case VIDIOCGAUDIO:
3560 case VIDIOCSAUDIO:
3561 return v4l_compat_translate_ioctl(inode,file,cmd,arg, 3516 return v4l_compat_translate_ioctl(inode,file,cmd,arg,
3562 radio_do_ioctl); 3517 radio_do_ioctl);
3563 default:
3564 return -ENOIOCTLCMD;
3565 } 3518 }
3566 return 0; 3519 return 0;
3567} 3520}
@@ -4357,7 +4310,7 @@ static int __devinit bttv_probe(struct pci_dev *dev,
4357 btv->init.btv = btv; 4310 btv->init.btv = btv;
4358 btv->init.ov.w.width = 320; 4311 btv->init.ov.w.width = 320;
4359 btv->init.ov.w.height = 240; 4312 btv->init.ov.w.height = 240;
4360 btv->init.fmt = format_by_palette(VIDEO_PALETTE_RGB24); 4313 btv->init.fmt = format_by_fourcc(V4L2_PIX_FMT_BGR24);
4361 btv->init.width = 320; 4314 btv->init.width = 320;
4362 btv->init.height = 240; 4315 btv->init.height = 240;
4363 btv->input = 0; 4316 btv->input = 0;
diff --git a/drivers/media/video/bt8xx/bttvp.h b/drivers/media/video/bt8xx/bttvp.h
index e60e54ad173a..37b96a54f90e 100644
--- a/drivers/media/video/bt8xx/bttvp.h
+++ b/drivers/media/video/bt8xx/bttvp.h
@@ -112,7 +112,6 @@ extern const struct bttv_tvnorm bttv_tvnorms[];
112 112
113struct bttv_format { 113struct bttv_format {
114 char *name; 114 char *name;
115 int palette; /* video4linux 1 */
116 int fourcc; /* video4linux 2 */ 115 int fourcc; /* video4linux 2 */
117 int btformat; /* BT848_COLOR_FMT_* */ 116 int btformat; /* BT848_COLOR_FMT_* */
118 int btswap; /* BT848_COLOR_CTL_* */ 117 int btswap; /* BT848_COLOR_CTL_* */