diff options
25 files changed, 17 insertions, 131 deletions
diff --git a/drivers/media/common/saa7146/saa7146_video.c b/drivers/media/common/saa7146/saa7146_video.c index 4c399a42e874..d16122039b0c 100644 --- a/drivers/media/common/saa7146/saa7146_video.c +++ b/drivers/media/common/saa7146/saa7146_video.c | |||
@@ -20,62 +20,52 @@ MODULE_PARM_DESC(max_memory, "maximum memory usage for capture buffers (default: | |||
20 | /* format descriptions for capture and preview */ | 20 | /* format descriptions for capture and preview */ |
21 | static struct saa7146_format formats[] = { | 21 | static struct saa7146_format formats[] = { |
22 | { | 22 | { |
23 | .name = "RGB-8 (3-3-2)", | ||
24 | .pixelformat = V4L2_PIX_FMT_RGB332, | 23 | .pixelformat = V4L2_PIX_FMT_RGB332, |
25 | .trans = RGB08_COMPOSED, | 24 | .trans = RGB08_COMPOSED, |
26 | .depth = 8, | 25 | .depth = 8, |
27 | .flags = 0, | 26 | .flags = 0, |
28 | }, { | 27 | }, { |
29 | .name = "RGB-16 (5/B-6/G-5/R)", | ||
30 | .pixelformat = V4L2_PIX_FMT_RGB565, | 28 | .pixelformat = V4L2_PIX_FMT_RGB565, |
31 | .trans = RGB16_COMPOSED, | 29 | .trans = RGB16_COMPOSED, |
32 | .depth = 16, | 30 | .depth = 16, |
33 | .flags = 0, | 31 | .flags = 0, |
34 | }, { | 32 | }, { |
35 | .name = "RGB-24 (B-G-R)", | ||
36 | .pixelformat = V4L2_PIX_FMT_BGR24, | 33 | .pixelformat = V4L2_PIX_FMT_BGR24, |
37 | .trans = RGB24_COMPOSED, | 34 | .trans = RGB24_COMPOSED, |
38 | .depth = 24, | 35 | .depth = 24, |
39 | .flags = 0, | 36 | .flags = 0, |
40 | }, { | 37 | }, { |
41 | .name = "RGB-32 (B-G-R)", | ||
42 | .pixelformat = V4L2_PIX_FMT_BGR32, | 38 | .pixelformat = V4L2_PIX_FMT_BGR32, |
43 | .trans = RGB32_COMPOSED, | 39 | .trans = RGB32_COMPOSED, |
44 | .depth = 32, | 40 | .depth = 32, |
45 | .flags = 0, | 41 | .flags = 0, |
46 | }, { | 42 | }, { |
47 | .name = "RGB-32 (R-G-B)", | ||
48 | .pixelformat = V4L2_PIX_FMT_RGB32, | 43 | .pixelformat = V4L2_PIX_FMT_RGB32, |
49 | .trans = RGB32_COMPOSED, | 44 | .trans = RGB32_COMPOSED, |
50 | .depth = 32, | 45 | .depth = 32, |
51 | .flags = 0, | 46 | .flags = 0, |
52 | .swap = 0x2, | 47 | .swap = 0x2, |
53 | }, { | 48 | }, { |
54 | .name = "Greyscale-8", | ||
55 | .pixelformat = V4L2_PIX_FMT_GREY, | 49 | .pixelformat = V4L2_PIX_FMT_GREY, |
56 | .trans = Y8, | 50 | .trans = Y8, |
57 | .depth = 8, | 51 | .depth = 8, |
58 | .flags = 0, | 52 | .flags = 0, |
59 | }, { | 53 | }, { |
60 | .name = "YUV 4:2:2 planar (Y-Cb-Cr)", | ||
61 | .pixelformat = V4L2_PIX_FMT_YUV422P, | 54 | .pixelformat = V4L2_PIX_FMT_YUV422P, |
62 | .trans = YUV422_DECOMPOSED, | 55 | .trans = YUV422_DECOMPOSED, |
63 | .depth = 16, | 56 | .depth = 16, |
64 | .flags = FORMAT_BYTE_SWAP|FORMAT_IS_PLANAR, | 57 | .flags = FORMAT_BYTE_SWAP|FORMAT_IS_PLANAR, |
65 | }, { | 58 | }, { |
66 | .name = "YVU 4:2:0 planar (Y-Cb-Cr)", | ||
67 | .pixelformat = V4L2_PIX_FMT_YVU420, | 59 | .pixelformat = V4L2_PIX_FMT_YVU420, |
68 | .trans = YUV420_DECOMPOSED, | 60 | .trans = YUV420_DECOMPOSED, |
69 | .depth = 12, | 61 | .depth = 12, |
70 | .flags = FORMAT_BYTE_SWAP|FORMAT_IS_PLANAR, | 62 | .flags = FORMAT_BYTE_SWAP|FORMAT_IS_PLANAR, |
71 | }, { | 63 | }, { |
72 | .name = "YUV 4:2:0 planar (Y-Cb-Cr)", | ||
73 | .pixelformat = V4L2_PIX_FMT_YUV420, | 64 | .pixelformat = V4L2_PIX_FMT_YUV420, |
74 | .trans = YUV420_DECOMPOSED, | 65 | .trans = YUV420_DECOMPOSED, |
75 | .depth = 12, | 66 | .depth = 12, |
76 | .flags = FORMAT_IS_PLANAR, | 67 | .flags = FORMAT_IS_PLANAR, |
77 | }, { | 68 | }, { |
78 | .name = "YUV 4:2:2 (U-Y-V-Y)", | ||
79 | .pixelformat = V4L2_PIX_FMT_UYVY, | 69 | .pixelformat = V4L2_PIX_FMT_UYVY, |
80 | .trans = YUV422_COMPOSED, | 70 | .trans = YUV422_COMPOSED, |
81 | .depth = 16, | 71 | .depth = 16, |
@@ -147,10 +137,10 @@ int saa7146_start_preview(struct saa7146_fh *fh) | |||
147 | } | 137 | } |
148 | vv->ov.win = fmt.fmt.win; | 138 | vv->ov.win = fmt.fmt.win; |
149 | 139 | ||
150 | DEB_D("%dx%d+%d+%d %s field=%s\n", | 140 | DEB_D("%dx%d+%d+%d 0x%08x field=%s\n", |
151 | vv->ov.win.w.width, vv->ov.win.w.height, | 141 | vv->ov.win.w.width, vv->ov.win.w.height, |
152 | vv->ov.win.w.left, vv->ov.win.w.top, | 142 | vv->ov.win.w.left, vv->ov.win.w.top, |
153 | vv->ov_fmt->name, v4l2_field_names[vv->ov.win.field]); | 143 | vv->ov_fmt->pixelformat, v4l2_field_names[vv->ov.win.field]); |
154 | 144 | ||
155 | if (0 != (ret = saa7146_enable_overlay(fh))) { | 145 | if (0 != (ret = saa7146_enable_overlay(fh))) { |
156 | DEB_D("enabling overlay failed: %d\n", ret); | 146 | DEB_D("enabling overlay failed: %d\n", ret); |
@@ -515,8 +505,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtd | |||
515 | { | 505 | { |
516 | if (f->index >= ARRAY_SIZE(formats)) | 506 | if (f->index >= ARRAY_SIZE(formats)) |
517 | return -EINVAL; | 507 | return -EINVAL; |
518 | strscpy((char *)f->description, formats[f->index].name, | ||
519 | sizeof(f->description)); | ||
520 | f->pixelformat = formats[f->index].pixelformat; | 508 | f->pixelformat = formats[f->index].pixelformat; |
521 | return 0; | 509 | return 0; |
522 | } | 510 | } |
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c index 612d1c0010c1..a359da7773a9 100644 --- a/drivers/media/pci/bt8xx/bttv-driver.c +++ b/drivers/media/pci/bt8xx/bttv-driver.c | |||
@@ -503,77 +503,65 @@ static const unsigned int BTTV_TVNORMS = ARRAY_SIZE(bttv_tvnorms); | |||
503 | packed pixel formats must come first */ | 503 | packed pixel formats must come first */ |
504 | static const struct bttv_format formats[] = { | 504 | static const struct bttv_format formats[] = { |
505 | { | 505 | { |
506 | .name = "8 bpp, gray", | ||
507 | .fourcc = V4L2_PIX_FMT_GREY, | 506 | .fourcc = V4L2_PIX_FMT_GREY, |
508 | .btformat = BT848_COLOR_FMT_Y8, | 507 | .btformat = BT848_COLOR_FMT_Y8, |
509 | .depth = 8, | 508 | .depth = 8, |
510 | .flags = FORMAT_FLAGS_PACKED, | 509 | .flags = FORMAT_FLAGS_PACKED, |
511 | },{ | 510 | },{ |
512 | .name = "8 bpp, dithered color", | ||
513 | .fourcc = V4L2_PIX_FMT_HI240, | 511 | .fourcc = V4L2_PIX_FMT_HI240, |
514 | .btformat = BT848_COLOR_FMT_RGB8, | 512 | .btformat = BT848_COLOR_FMT_RGB8, |
515 | .depth = 8, | 513 | .depth = 8, |
516 | .flags = FORMAT_FLAGS_PACKED | FORMAT_FLAGS_DITHER, | 514 | .flags = FORMAT_FLAGS_PACKED | FORMAT_FLAGS_DITHER, |
517 | },{ | 515 | },{ |
518 | .name = "15 bpp RGB, le", | ||
519 | .fourcc = V4L2_PIX_FMT_RGB555, | 516 | .fourcc = V4L2_PIX_FMT_RGB555, |
520 | .btformat = BT848_COLOR_FMT_RGB15, | 517 | .btformat = BT848_COLOR_FMT_RGB15, |
521 | .depth = 16, | 518 | .depth = 16, |
522 | .flags = FORMAT_FLAGS_PACKED, | 519 | .flags = FORMAT_FLAGS_PACKED, |
523 | },{ | 520 | },{ |
524 | .name = "15 bpp RGB, be", | ||
525 | .fourcc = V4L2_PIX_FMT_RGB555X, | 521 | .fourcc = V4L2_PIX_FMT_RGB555X, |
526 | .btformat = BT848_COLOR_FMT_RGB15, | 522 | .btformat = BT848_COLOR_FMT_RGB15, |
527 | .btswap = 0x03, /* byteswap */ | 523 | .btswap = 0x03, /* byteswap */ |
528 | .depth = 16, | 524 | .depth = 16, |
529 | .flags = FORMAT_FLAGS_PACKED, | 525 | .flags = FORMAT_FLAGS_PACKED, |
530 | },{ | 526 | },{ |
531 | .name = "16 bpp RGB, le", | ||
532 | .fourcc = V4L2_PIX_FMT_RGB565, | 527 | .fourcc = V4L2_PIX_FMT_RGB565, |
533 | .btformat = BT848_COLOR_FMT_RGB16, | 528 | .btformat = BT848_COLOR_FMT_RGB16, |
534 | .depth = 16, | 529 | .depth = 16, |
535 | .flags = FORMAT_FLAGS_PACKED, | 530 | .flags = FORMAT_FLAGS_PACKED, |
536 | },{ | 531 | },{ |
537 | .name = "16 bpp RGB, be", | ||
538 | .fourcc = V4L2_PIX_FMT_RGB565X, | 532 | .fourcc = V4L2_PIX_FMT_RGB565X, |
539 | .btformat = BT848_COLOR_FMT_RGB16, | 533 | .btformat = BT848_COLOR_FMT_RGB16, |
540 | .btswap = 0x03, /* byteswap */ | 534 | .btswap = 0x03, /* byteswap */ |
541 | .depth = 16, | 535 | .depth = 16, |
542 | .flags = FORMAT_FLAGS_PACKED, | 536 | .flags = FORMAT_FLAGS_PACKED, |
543 | },{ | 537 | },{ |
544 | .name = "24 bpp RGB, le", | ||
545 | .fourcc = V4L2_PIX_FMT_BGR24, | 538 | .fourcc = V4L2_PIX_FMT_BGR24, |
546 | .btformat = BT848_COLOR_FMT_RGB24, | 539 | .btformat = BT848_COLOR_FMT_RGB24, |
547 | .depth = 24, | 540 | .depth = 24, |
548 | .flags = FORMAT_FLAGS_PACKED, | 541 | .flags = FORMAT_FLAGS_PACKED, |
549 | },{ | 542 | },{ |
550 | .name = "32 bpp RGB, le", | ||
551 | .fourcc = V4L2_PIX_FMT_BGR32, | 543 | .fourcc = V4L2_PIX_FMT_BGR32, |
552 | .btformat = BT848_COLOR_FMT_RGB32, | 544 | .btformat = BT848_COLOR_FMT_RGB32, |
553 | .depth = 32, | 545 | .depth = 32, |
554 | .flags = FORMAT_FLAGS_PACKED, | 546 | .flags = FORMAT_FLAGS_PACKED, |
555 | },{ | 547 | },{ |
556 | .name = "32 bpp RGB, be", | ||
557 | .fourcc = V4L2_PIX_FMT_RGB32, | 548 | .fourcc = V4L2_PIX_FMT_RGB32, |
558 | .btformat = BT848_COLOR_FMT_RGB32, | 549 | .btformat = BT848_COLOR_FMT_RGB32, |
559 | .btswap = 0x0f, /* byte+word swap */ | 550 | .btswap = 0x0f, /* byte+word swap */ |
560 | .depth = 32, | 551 | .depth = 32, |
561 | .flags = FORMAT_FLAGS_PACKED, | 552 | .flags = FORMAT_FLAGS_PACKED, |
562 | },{ | 553 | },{ |
563 | .name = "4:2:2, packed, YUYV", | ||
564 | .fourcc = V4L2_PIX_FMT_YUYV, | 554 | .fourcc = V4L2_PIX_FMT_YUYV, |
565 | .btformat = BT848_COLOR_FMT_YUY2, | 555 | .btformat = BT848_COLOR_FMT_YUY2, |
566 | .depth = 16, | 556 | .depth = 16, |
567 | .flags = FORMAT_FLAGS_PACKED, | 557 | .flags = FORMAT_FLAGS_PACKED, |
568 | },{ | 558 | },{ |
569 | .name = "4:2:2, packed, UYVY", | ||
570 | .fourcc = V4L2_PIX_FMT_UYVY, | 559 | .fourcc = V4L2_PIX_FMT_UYVY, |
571 | .btformat = BT848_COLOR_FMT_YUY2, | 560 | .btformat = BT848_COLOR_FMT_YUY2, |
572 | .btswap = 0x03, /* byteswap */ | 561 | .btswap = 0x03, /* byteswap */ |
573 | .depth = 16, | 562 | .depth = 16, |
574 | .flags = FORMAT_FLAGS_PACKED, | 563 | .flags = FORMAT_FLAGS_PACKED, |
575 | },{ | 564 | },{ |
576 | .name = "4:2:2, planar, Y-Cb-Cr", | ||
577 | .fourcc = V4L2_PIX_FMT_YUV422P, | 565 | .fourcc = V4L2_PIX_FMT_YUV422P, |
578 | .btformat = BT848_COLOR_FMT_YCrCb422, | 566 | .btformat = BT848_COLOR_FMT_YCrCb422, |
579 | .depth = 16, | 567 | .depth = 16, |
@@ -581,7 +569,6 @@ static const struct bttv_format formats[] = { | |||
581 | .hshift = 1, | 569 | .hshift = 1, |
582 | .vshift = 0, | 570 | .vshift = 0, |
583 | },{ | 571 | },{ |
584 | .name = "4:2:0, planar, Y-Cb-Cr", | ||
585 | .fourcc = V4L2_PIX_FMT_YUV420, | 572 | .fourcc = V4L2_PIX_FMT_YUV420, |
586 | .btformat = BT848_COLOR_FMT_YCrCb422, | 573 | .btformat = BT848_COLOR_FMT_YCrCb422, |
587 | .depth = 12, | 574 | .depth = 12, |
@@ -589,7 +576,6 @@ static const struct bttv_format formats[] = { | |||
589 | .hshift = 1, | 576 | .hshift = 1, |
590 | .vshift = 1, | 577 | .vshift = 1, |
591 | },{ | 578 | },{ |
592 | .name = "4:2:0, planar, Y-Cr-Cb", | ||
593 | .fourcc = V4L2_PIX_FMT_YVU420, | 579 | .fourcc = V4L2_PIX_FMT_YVU420, |
594 | .btformat = BT848_COLOR_FMT_YCrCb422, | 580 | .btformat = BT848_COLOR_FMT_YCrCb422, |
595 | .depth = 12, | 581 | .depth = 12, |
@@ -597,7 +583,6 @@ static const struct bttv_format formats[] = { | |||
597 | .hshift = 1, | 583 | .hshift = 1, |
598 | .vshift = 1, | 584 | .vshift = 1, |
599 | },{ | 585 | },{ |
600 | .name = "4:1:1, planar, Y-Cb-Cr", | ||
601 | .fourcc = V4L2_PIX_FMT_YUV411P, | 586 | .fourcc = V4L2_PIX_FMT_YUV411P, |
602 | .btformat = BT848_COLOR_FMT_YCrCb411, | 587 | .btformat = BT848_COLOR_FMT_YCrCb411, |
603 | .depth = 12, | 588 | .depth = 12, |
@@ -605,7 +590,6 @@ static const struct bttv_format formats[] = { | |||
605 | .hshift = 2, | 590 | .hshift = 2, |
606 | .vshift = 0, | 591 | .vshift = 0, |
607 | },{ | 592 | },{ |
608 | .name = "4:1:0, planar, Y-Cb-Cr", | ||
609 | .fourcc = V4L2_PIX_FMT_YUV410, | 593 | .fourcc = V4L2_PIX_FMT_YUV410, |
610 | .btformat = BT848_COLOR_FMT_YCrCb411, | 594 | .btformat = BT848_COLOR_FMT_YCrCb411, |
611 | .depth = 9, | 595 | .depth = 9, |
@@ -613,7 +597,6 @@ static const struct bttv_format formats[] = { | |||
613 | .hshift = 2, | 597 | .hshift = 2, |
614 | .vshift = 2, | 598 | .vshift = 2, |
615 | },{ | 599 | },{ |
616 | .name = "4:1:0, planar, Y-Cr-Cb", | ||
617 | .fourcc = V4L2_PIX_FMT_YVU410, | 600 | .fourcc = V4L2_PIX_FMT_YVU410, |
618 | .btformat = BT848_COLOR_FMT_YCrCb411, | 601 | .btformat = BT848_COLOR_FMT_YCrCb411, |
619 | .depth = 9, | 602 | .depth = 9, |
@@ -621,7 +604,6 @@ static const struct bttv_format formats[] = { | |||
621 | .hshift = 2, | 604 | .hshift = 2, |
622 | .vshift = 2, | 605 | .vshift = 2, |
623 | },{ | 606 | },{ |
624 | .name = "raw scanlines", | ||
625 | .fourcc = -1, | 607 | .fourcc = -1, |
626 | .btformat = BT848_COLOR_FMT_RAW, | 608 | .btformat = BT848_COLOR_FMT_RAW, |
627 | .depth = 8, | 609 | .depth = 8, |
@@ -2500,7 +2482,6 @@ static int bttv_enum_fmt_cap_ovr(struct v4l2_fmtdesc *f) | |||
2500 | return -EINVAL; | 2482 | return -EINVAL; |
2501 | 2483 | ||
2502 | f->pixelformat = formats[i].fourcc; | 2484 | f->pixelformat = formats[i].fourcc; |
2503 | strscpy(f->description, formats[i].name, sizeof(f->description)); | ||
2504 | 2485 | ||
2505 | return i; | 2486 | return i; |
2506 | } | 2487 | } |
diff --git a/drivers/media/pci/bt8xx/bttv-risc.c b/drivers/media/pci/bt8xx/bttv-risc.c index 6b59ca337c7f..fc8708047be8 100644 --- a/drivers/media/pci/bt8xx/bttv-risc.c +++ b/drivers/media/pci/bt8xx/bttv-risc.c | |||
@@ -699,9 +699,9 @@ bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf) | |||
699 | const struct bttv_tvnorm *tvnorm = bttv_tvnorms + buf->tvnorm; | 699 | const struct bttv_tvnorm *tvnorm = bttv_tvnorms + buf->tvnorm; |
700 | struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); | 700 | struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); |
701 | 701 | ||
702 | dprintk("%d: buffer field: %s format: %s size: %dx%d\n", | 702 | dprintk("%d: buffer field: %s format: 0x%08x size: %dx%d\n", |
703 | btv->c.nr, v4l2_field_names[buf->vb.field], | 703 | btv->c.nr, v4l2_field_names[buf->vb.field], |
704 | buf->fmt->name, buf->vb.width, buf->vb.height); | 704 | buf->fmt->fourcc, buf->vb.width, buf->vb.height); |
705 | 705 | ||
706 | /* packed pixel modes */ | 706 | /* packed pixel modes */ |
707 | if (buf->fmt->flags & FORMAT_FLAGS_PACKED) { | 707 | if (buf->fmt->flags & FORMAT_FLAGS_PACKED) { |
@@ -860,9 +860,9 @@ bttv_overlay_risc(struct bttv *btv, | |||
860 | struct bttv_buffer *buf) | 860 | struct bttv_buffer *buf) |
861 | { | 861 | { |
862 | /* check interleave, bottom+top fields */ | 862 | /* check interleave, bottom+top fields */ |
863 | dprintk("%d: overlay fields: %s format: %s size: %dx%d\n", | 863 | dprintk("%d: overlay fields: %s format: 0x%08x size: %dx%d\n", |
864 | btv->c.nr, v4l2_field_names[buf->vb.field], | 864 | btv->c.nr, v4l2_field_names[buf->vb.field], |
865 | fmt->name, ov->w.width, ov->w.height); | 865 | fmt->fourcc, ov->w.width, ov->w.height); |
866 | 866 | ||
867 | /* calculate geometry */ | 867 | /* calculate geometry */ |
868 | bttv_calc_geo(btv,&buf->geo,ov->w.width,ov->w.height, | 868 | bttv_calc_geo(btv,&buf->geo,ov->w.width,ov->w.height, |
diff --git a/drivers/media/pci/bt8xx/bttvp.h b/drivers/media/pci/bt8xx/bttvp.h index b159d6ddbfcf..4abf43657846 100644 --- a/drivers/media/pci/bt8xx/bttvp.h +++ b/drivers/media/pci/bt8xx/bttvp.h | |||
@@ -99,7 +99,6 @@ struct bttv_tvnorm { | |||
99 | extern const struct bttv_tvnorm bttv_tvnorms[]; | 99 | extern const struct bttv_tvnorm bttv_tvnorms[]; |
100 | 100 | ||
101 | struct bttv_format { | 101 | struct bttv_format { |
102 | char *name; | ||
103 | int fourcc; /* video4linux 2 */ | 102 | int fourcc; /* video4linux 2 */ |
104 | int btformat; /* BT848_COLOR_FMT_* */ | 103 | int btformat; /* BT848_COLOR_FMT_* */ |
105 | int btswap; /* BT848_COLOR_CTL_* */ | 104 | int btswap; /* BT848_COLOR_CTL_* */ |
diff --git a/drivers/media/pci/cobalt/cobalt-v4l2.c b/drivers/media/pci/cobalt/cobalt-v4l2.c index 39dabd4da60f..ea96f333ee2b 100644 --- a/drivers/media/pci/cobalt/cobalt-v4l2.c +++ b/drivers/media/pci/cobalt/cobalt-v4l2.c | |||
@@ -688,15 +688,12 @@ static int cobalt_enum_fmt_vid_cap(struct file *file, void *priv_fh, | |||
688 | { | 688 | { |
689 | switch (f->index) { | 689 | switch (f->index) { |
690 | case 0: | 690 | case 0: |
691 | strscpy(f->description, "YUV 4:2:2", sizeof(f->description)); | ||
692 | f->pixelformat = V4L2_PIX_FMT_YUYV; | 691 | f->pixelformat = V4L2_PIX_FMT_YUYV; |
693 | break; | 692 | break; |
694 | case 1: | 693 | case 1: |
695 | strscpy(f->description, "RGB24", sizeof(f->description)); | ||
696 | f->pixelformat = V4L2_PIX_FMT_RGB24; | 694 | f->pixelformat = V4L2_PIX_FMT_RGB24; |
697 | break; | 695 | break; |
698 | case 2: | 696 | case 2: |
699 | strscpy(f->description, "RGB32", sizeof(f->description)); | ||
700 | f->pixelformat = V4L2_PIX_FMT_BGR32; | 697 | f->pixelformat = V4L2_PIX_FMT_BGR32; |
701 | break; | 698 | break; |
702 | default: | 699 | default: |
@@ -893,11 +890,9 @@ static int cobalt_enum_fmt_vid_out(struct file *file, void *priv_fh, | |||
893 | { | 890 | { |
894 | switch (f->index) { | 891 | switch (f->index) { |
895 | case 0: | 892 | case 0: |
896 | strscpy(f->description, "YUV 4:2:2", sizeof(f->description)); | ||
897 | f->pixelformat = V4L2_PIX_FMT_YUYV; | 893 | f->pixelformat = V4L2_PIX_FMT_YUYV; |
898 | break; | 894 | break; |
899 | case 1: | 895 | case 1: |
900 | strscpy(f->description, "RGB32", sizeof(f->description)); | ||
901 | f->pixelformat = V4L2_PIX_FMT_BGR32; | 896 | f->pixelformat = V4L2_PIX_FMT_BGR32; |
902 | break; | 897 | break; |
903 | default: | 898 | default: |
diff --git a/drivers/media/pci/cx23885/cx23885-417.c b/drivers/media/pci/cx23885/cx23885-417.c index 82f96a4091ac..2327fe612610 100644 --- a/drivers/media/pci/cx23885/cx23885-417.c +++ b/drivers/media/pci/cx23885/cx23885-417.c | |||
@@ -1339,7 +1339,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv, | |||
1339 | if (f->index != 0) | 1339 | if (f->index != 0) |
1340 | return -EINVAL; | 1340 | return -EINVAL; |
1341 | 1341 | ||
1342 | strscpy(f->description, "MPEG", sizeof(f->description)); | ||
1343 | f->pixelformat = V4L2_PIX_FMT_MPEG; | 1342 | f->pixelformat = V4L2_PIX_FMT_MPEG; |
1344 | 1343 | ||
1345 | return 0; | 1344 | return 0; |
diff --git a/drivers/media/pci/cx23885/cx23885-video.c b/drivers/media/pci/cx23885/cx23885-video.c index b254473db9a3..8098b15493de 100644 --- a/drivers/media/pci/cx23885/cx23885-video.c +++ b/drivers/media/pci/cx23885/cx23885-video.c | |||
@@ -67,7 +67,6 @@ MODULE_PARM_DESC(vid_limit, "capture memory limit in megabytes"); | |||
67 | #define FORMAT_FLAGS_PACKED 0x01 | 67 | #define FORMAT_FLAGS_PACKED 0x01 |
68 | static struct cx23885_fmt formats[] = { | 68 | static struct cx23885_fmt formats[] = { |
69 | { | 69 | { |
70 | .name = "4:2:2, packed, YUYV", | ||
71 | .fourcc = V4L2_PIX_FMT_YUYV, | 70 | .fourcc = V4L2_PIX_FMT_YUYV, |
72 | .depth = 16, | 71 | .depth = 16, |
73 | .flags = FORMAT_FLAGS_PACKED, | 72 | .flags = FORMAT_FLAGS_PACKED, |
@@ -411,9 +410,9 @@ static int buffer_prepare(struct vb2_buffer *vb) | |||
411 | default: | 410 | default: |
412 | BUG(); | 411 | BUG(); |
413 | } | 412 | } |
414 | dprintk(2, "[%p/%d] buffer_init - %dx%d %dbpp \"%s\" - dma=0x%08lx\n", | 413 | dprintk(2, "[%p/%d] buffer_init - %dx%d %dbpp 0x%08x - dma=0x%08lx\n", |
415 | buf, buf->vb.vb2_buf.index, | 414 | buf, buf->vb.vb2_buf.index, |
416 | dev->width, dev->height, dev->fmt->depth, dev->fmt->name, | 415 | dev->width, dev->height, dev->fmt->depth, dev->fmt->fourcc, |
417 | (unsigned long)buf->risc.dma); | 416 | (unsigned long)buf->risc.dma); |
418 | return 0; | 417 | return 0; |
419 | } | 418 | } |
@@ -647,8 +646,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv, | |||
647 | if (unlikely(f->index >= ARRAY_SIZE(formats))) | 646 | if (unlikely(f->index >= ARRAY_SIZE(formats))) |
648 | return -EINVAL; | 647 | return -EINVAL; |
649 | 648 | ||
650 | strscpy(f->description, formats[f->index].name, | ||
651 | sizeof(f->description)); | ||
652 | f->pixelformat = formats[f->index].fourcc; | 649 | f->pixelformat = formats[f->index].fourcc; |
653 | 650 | ||
654 | return 0; | 651 | return 0; |
diff --git a/drivers/media/pci/cx23885/cx23885.h b/drivers/media/pci/cx23885/cx23885.h index 9da66fdd5a0d..a95a2e4c6a0d 100644 --- a/drivers/media/pci/cx23885/cx23885.h +++ b/drivers/media/pci/cx23885/cx23885.h | |||
@@ -127,7 +127,6 @@ | |||
127 | V4L2_STD_PAL_60 | V4L2_STD_SECAM_L | V4L2_STD_SECAM_DK) | 127 | V4L2_STD_PAL_60 | V4L2_STD_SECAM_L | V4L2_STD_SECAM_DK) |
128 | 128 | ||
129 | struct cx23885_fmt { | 129 | struct cx23885_fmt { |
130 | char *name; | ||
131 | u32 fourcc; /* v4l2 format id */ | 130 | u32 fourcc; /* v4l2 format id */ |
132 | int depth; | 131 | int depth; |
133 | int flags; | 132 | int flags; |
diff --git a/drivers/media/pci/cx25821/cx25821-video.c b/drivers/media/pci/cx25821/cx25821-video.c index de7641170478..a10261da0db6 100644 --- a/drivers/media/pci/cx25821/cx25821-video.c +++ b/drivers/media/pci/cx25821/cx25821-video.c | |||
@@ -35,12 +35,10 @@ MODULE_PARM_DESC(irq_debug, "enable debug messages [IRQ handler]"); | |||
35 | 35 | ||
36 | static const struct cx25821_fmt formats[] = { | 36 | static const struct cx25821_fmt formats[] = { |
37 | { | 37 | { |
38 | .name = "4:1:1, packed, Y41P", | ||
39 | .fourcc = V4L2_PIX_FMT_Y41P, | 38 | .fourcc = V4L2_PIX_FMT_Y41P, |
40 | .depth = 12, | 39 | .depth = 12, |
41 | .flags = FORMAT_FLAGS_PACKED, | 40 | .flags = FORMAT_FLAGS_PACKED, |
42 | }, { | 41 | }, { |
43 | .name = "4:2:2, packed, YUYV", | ||
44 | .fourcc = V4L2_PIX_FMT_YUYV, | 42 | .fourcc = V4L2_PIX_FMT_YUYV, |
45 | .depth = 16, | 43 | .depth = 16, |
46 | .flags = FORMAT_FLAGS_PACKED, | 44 | .flags = FORMAT_FLAGS_PACKED, |
@@ -215,9 +213,9 @@ static int cx25821_buffer_prepare(struct vb2_buffer *vb) | |||
215 | break; | 213 | break; |
216 | } | 214 | } |
217 | 215 | ||
218 | dprintk(2, "[%p/%d] buffer_prep - %dx%d %dbpp \"%s\" - dma=0x%08lx\n", | 216 | dprintk(2, "[%p/%d] buffer_prep - %dx%d %dbpp 0x%08x - dma=0x%08lx\n", |
219 | buf, buf->vb.vb2_buf.index, chan->width, chan->height, | 217 | buf, buf->vb.vb2_buf.index, chan->width, chan->height, |
220 | chan->fmt->depth, chan->fmt->name, | 218 | chan->fmt->depth, chan->fmt->fourcc, |
221 | (unsigned long)buf->risc.dma); | 219 | (unsigned long)buf->risc.dma); |
222 | 220 | ||
223 | return ret; | 221 | return ret; |
@@ -311,7 +309,6 @@ static int cx25821_vidioc_enum_fmt_vid_cap(struct file *file, void *priv, | |||
311 | if (unlikely(f->index >= ARRAY_SIZE(formats))) | 309 | if (unlikely(f->index >= ARRAY_SIZE(formats))) |
312 | return -EINVAL; | 310 | return -EINVAL; |
313 | 311 | ||
314 | strscpy(f->description, formats[f->index].name, sizeof(f->description)); | ||
315 | f->pixelformat = formats[f->index].fourcc; | 312 | f->pixelformat = formats[f->index].fourcc; |
316 | 313 | ||
317 | return 0; | 314 | return 0; |
diff --git a/drivers/media/pci/cx25821/cx25821.h b/drivers/media/pci/cx25821/cx25821.h index 47dbaae78509..017307984094 100644 --- a/drivers/media/pci/cx25821/cx25821.h +++ b/drivers/media/pci/cx25821/cx25821.h | |||
@@ -83,7 +83,6 @@ | |||
83 | #define VID_CHANNEL_NUM 8 | 83 | #define VID_CHANNEL_NUM 8 |
84 | 84 | ||
85 | struct cx25821_fmt { | 85 | struct cx25821_fmt { |
86 | char *name; | ||
87 | u32 fourcc; /* v4l2 format id */ | 86 | u32 fourcc; /* v4l2 format id */ |
88 | int depth; | 87 | int depth; |
89 | int flags; | 88 | int flags; |
diff --git a/drivers/media/pci/cx88/cx88-blackbird.c b/drivers/media/pci/cx88/cx88-blackbird.c index 200d68827073..d3da7f4297af 100644 --- a/drivers/media/pci/cx88/cx88-blackbird.c +++ b/drivers/media/pci/cx88/cx88-blackbird.c | |||
@@ -805,9 +805,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv, | |||
805 | if (f->index != 0) | 805 | if (f->index != 0) |
806 | return -EINVAL; | 806 | return -EINVAL; |
807 | 807 | ||
808 | strscpy(f->description, "MPEG", sizeof(f->description)); | ||
809 | f->pixelformat = V4L2_PIX_FMT_MPEG; | 808 | f->pixelformat = V4L2_PIX_FMT_MPEG; |
810 | f->flags = V4L2_FMT_FLAG_COMPRESSED; | ||
811 | return 0; | 809 | return 0; |
812 | } | 810 | } |
813 | 811 | ||
diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c index e59a74514c7c..dcc0f02aeb70 100644 --- a/drivers/media/pci/cx88/cx88-video.c +++ b/drivers/media/pci/cx88/cx88-video.c | |||
@@ -69,62 +69,52 @@ MODULE_PARM_DESC(irq_debug, "enable debug messages [IRQ handler]"); | |||
69 | 69 | ||
70 | static const struct cx8800_fmt formats[] = { | 70 | static const struct cx8800_fmt formats[] = { |
71 | { | 71 | { |
72 | .name = "8 bpp, gray", | ||
73 | .fourcc = V4L2_PIX_FMT_GREY, | 72 | .fourcc = V4L2_PIX_FMT_GREY, |
74 | .cxformat = ColorFormatY8, | 73 | .cxformat = ColorFormatY8, |
75 | .depth = 8, | 74 | .depth = 8, |
76 | .flags = FORMAT_FLAGS_PACKED, | 75 | .flags = FORMAT_FLAGS_PACKED, |
77 | }, { | 76 | }, { |
78 | .name = "15 bpp RGB, le", | ||
79 | .fourcc = V4L2_PIX_FMT_RGB555, | 77 | .fourcc = V4L2_PIX_FMT_RGB555, |
80 | .cxformat = ColorFormatRGB15, | 78 | .cxformat = ColorFormatRGB15, |
81 | .depth = 16, | 79 | .depth = 16, |
82 | .flags = FORMAT_FLAGS_PACKED, | 80 | .flags = FORMAT_FLAGS_PACKED, |
83 | }, { | 81 | }, { |
84 | .name = "15 bpp RGB, be", | ||
85 | .fourcc = V4L2_PIX_FMT_RGB555X, | 82 | .fourcc = V4L2_PIX_FMT_RGB555X, |
86 | .cxformat = ColorFormatRGB15 | ColorFormatBSWAP, | 83 | .cxformat = ColorFormatRGB15 | ColorFormatBSWAP, |
87 | .depth = 16, | 84 | .depth = 16, |
88 | .flags = FORMAT_FLAGS_PACKED, | 85 | .flags = FORMAT_FLAGS_PACKED, |
89 | }, { | 86 | }, { |
90 | .name = "16 bpp RGB, le", | ||
91 | .fourcc = V4L2_PIX_FMT_RGB565, | 87 | .fourcc = V4L2_PIX_FMT_RGB565, |
92 | .cxformat = ColorFormatRGB16, | 88 | .cxformat = ColorFormatRGB16, |
93 | .depth = 16, | 89 | .depth = 16, |
94 | .flags = FORMAT_FLAGS_PACKED, | 90 | .flags = FORMAT_FLAGS_PACKED, |
95 | }, { | 91 | }, { |
96 | .name = "16 bpp RGB, be", | ||
97 | .fourcc = V4L2_PIX_FMT_RGB565X, | 92 | .fourcc = V4L2_PIX_FMT_RGB565X, |
98 | .cxformat = ColorFormatRGB16 | ColorFormatBSWAP, | 93 | .cxformat = ColorFormatRGB16 | ColorFormatBSWAP, |
99 | .depth = 16, | 94 | .depth = 16, |
100 | .flags = FORMAT_FLAGS_PACKED, | 95 | .flags = FORMAT_FLAGS_PACKED, |
101 | }, { | 96 | }, { |
102 | .name = "24 bpp RGB, le", | ||
103 | .fourcc = V4L2_PIX_FMT_BGR24, | 97 | .fourcc = V4L2_PIX_FMT_BGR24, |
104 | .cxformat = ColorFormatRGB24, | 98 | .cxformat = ColorFormatRGB24, |
105 | .depth = 24, | 99 | .depth = 24, |
106 | .flags = FORMAT_FLAGS_PACKED, | 100 | .flags = FORMAT_FLAGS_PACKED, |
107 | }, { | 101 | }, { |
108 | .name = "32 bpp RGB, le", | ||
109 | .fourcc = V4L2_PIX_FMT_BGR32, | 102 | .fourcc = V4L2_PIX_FMT_BGR32, |
110 | .cxformat = ColorFormatRGB32, | 103 | .cxformat = ColorFormatRGB32, |
111 | .depth = 32, | 104 | .depth = 32, |
112 | .flags = FORMAT_FLAGS_PACKED, | 105 | .flags = FORMAT_FLAGS_PACKED, |
113 | }, { | 106 | }, { |
114 | .name = "32 bpp RGB, be", | ||
115 | .fourcc = V4L2_PIX_FMT_RGB32, | 107 | .fourcc = V4L2_PIX_FMT_RGB32, |
116 | .cxformat = ColorFormatRGB32 | ColorFormatBSWAP | | 108 | .cxformat = ColorFormatRGB32 | ColorFormatBSWAP | |
117 | ColorFormatWSWAP, | 109 | ColorFormatWSWAP, |
118 | .depth = 32, | 110 | .depth = 32, |
119 | .flags = FORMAT_FLAGS_PACKED, | 111 | .flags = FORMAT_FLAGS_PACKED, |
120 | }, { | 112 | }, { |
121 | .name = "4:2:2, packed, YUYV", | ||
122 | .fourcc = V4L2_PIX_FMT_YUYV, | 113 | .fourcc = V4L2_PIX_FMT_YUYV, |
123 | .cxformat = ColorFormatYUY2, | 114 | .cxformat = ColorFormatYUY2, |
124 | .depth = 16, | 115 | .depth = 16, |
125 | .flags = FORMAT_FLAGS_PACKED, | 116 | .flags = FORMAT_FLAGS_PACKED, |
126 | }, { | 117 | }, { |
127 | .name = "4:2:2, packed, UYVY", | ||
128 | .fourcc = V4L2_PIX_FMT_UYVY, | 118 | .fourcc = V4L2_PIX_FMT_UYVY, |
129 | .cxformat = ColorFormatYUY2 | ColorFormatBSWAP, | 119 | .cxformat = ColorFormatYUY2 | ColorFormatBSWAP, |
130 | .depth = 16, | 120 | .depth = 16, |
@@ -489,9 +479,9 @@ static int buffer_prepare(struct vb2_buffer *vb) | |||
489 | break; | 479 | break; |
490 | } | 480 | } |
491 | dprintk(2, | 481 | dprintk(2, |
492 | "[%p/%d] buffer_prepare - %dx%d %dbpp \"%s\" - dma=0x%08lx\n", | 482 | "[%p/%d] %s - %dx%d %dbpp 0x%08x - dma=0x%08lx\n", |
493 | buf, buf->vb.vb2_buf.index, | 483 | buf, buf->vb.vb2_buf.index, __func__, |
494 | core->width, core->height, dev->fmt->depth, dev->fmt->name, | 484 | core->width, core->height, dev->fmt->depth, dev->fmt->fourcc, |
495 | (unsigned long)buf->risc.dma); | 485 | (unsigned long)buf->risc.dma); |
496 | return 0; | 486 | return 0; |
497 | } | 487 | } |
@@ -829,7 +819,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv, | |||
829 | if (unlikely(f->index >= ARRAY_SIZE(formats))) | 819 | if (unlikely(f->index >= ARRAY_SIZE(formats))) |
830 | return -EINVAL; | 820 | return -EINVAL; |
831 | 821 | ||
832 | strscpy(f->description, formats[f->index].name, sizeof(f->description)); | ||
833 | f->pixelformat = formats[f->index].fourcc; | 822 | f->pixelformat = formats[f->index].fourcc; |
834 | 823 | ||
835 | return 0; | 824 | return 0; |
diff --git a/drivers/media/pci/cx88/cx88.h b/drivers/media/pci/cx88/cx88.h index a70a50dc3edf..744a22328ebc 100644 --- a/drivers/media/pci/cx88/cx88.h +++ b/drivers/media/pci/cx88/cx88.h | |||
@@ -99,7 +99,6 @@ static inline unsigned int norm_maxh(v4l2_std_id norm) | |||
99 | /* static data */ | 99 | /* static data */ |
100 | 100 | ||
101 | struct cx8800_fmt { | 101 | struct cx8800_fmt { |
102 | const char *name; | ||
103 | u32 fourcc; /* v4l2 format id */ | 102 | u32 fourcc; /* v4l2 format id */ |
104 | int depth; | 103 | int depth; |
105 | int flags; | 104 | int flags; |
diff --git a/drivers/media/pci/dt3155/dt3155.c b/drivers/media/pci/dt3155/dt3155.c index b4cdda50e742..7480f0d3ad0f 100644 --- a/drivers/media/pci/dt3155/dt3155.c +++ b/drivers/media/pci/dt3155/dt3155.c | |||
@@ -306,7 +306,6 @@ static int dt3155_enum_fmt_vid_cap(struct file *filp, | |||
306 | if (f->index) | 306 | if (f->index) |
307 | return -EINVAL; | 307 | return -EINVAL; |
308 | f->pixelformat = V4L2_PIX_FMT_GREY; | 308 | f->pixelformat = V4L2_PIX_FMT_GREY; |
309 | strscpy(f->description, "8-bit Greyscale", sizeof(f->description)); | ||
310 | return 0; | 309 | return 0; |
311 | } | 310 | } |
312 | 311 | ||
diff --git a/drivers/media/pci/meye/meye.c b/drivers/media/pci/meye/meye.c index 8218810c899e..0e61c81356ef 100644 --- a/drivers/media/pci/meye/meye.c +++ b/drivers/media/pci/meye/meye.c | |||
@@ -1104,12 +1104,9 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *fh, | |||
1104 | if (f->index == 0) { | 1104 | if (f->index == 0) { |
1105 | /* standard YUV 422 capture */ | 1105 | /* standard YUV 422 capture */ |
1106 | f->flags = 0; | 1106 | f->flags = 0; |
1107 | strscpy(f->description, "YUV422", sizeof(f->description)); | ||
1108 | f->pixelformat = V4L2_PIX_FMT_YUYV; | 1107 | f->pixelformat = V4L2_PIX_FMT_YUYV; |
1109 | } else { | 1108 | } else { |
1110 | /* compressed MJPEG capture */ | 1109 | /* compressed MJPEG capture */ |
1111 | f->flags = V4L2_FMT_FLAG_COMPRESSED; | ||
1112 | strscpy(f->description, "MJPEG", sizeof(f->description)); | ||
1113 | f->pixelformat = V4L2_PIX_FMT_MJPEG; | 1110 | f->pixelformat = V4L2_PIX_FMT_MJPEG; |
1114 | } | 1111 | } |
1115 | 1112 | ||
diff --git a/drivers/media/pci/saa7134/saa7134-empress.c b/drivers/media/pci/saa7134/saa7134-empress.c index 1a41a56afec6..cb65d345fd3e 100644 --- a/drivers/media/pci/saa7134/saa7134-empress.c +++ b/drivers/media/pci/saa7134/saa7134-empress.c | |||
@@ -91,9 +91,7 @@ static int empress_enum_fmt_vid_cap(struct file *file, void *priv, | |||
91 | if (f->index != 0) | 91 | if (f->index != 0) |
92 | return -EINVAL; | 92 | return -EINVAL; |
93 | 93 | ||
94 | strscpy(f->description, "MPEG TS", sizeof(f->description)); | ||
95 | f->pixelformat = V4L2_PIX_FMT_MPEG; | 94 | f->pixelformat = V4L2_PIX_FMT_MPEG; |
96 | f->flags = V4L2_FMT_FLAG_COMPRESSED; | ||
97 | return 0; | 95 | return 0; |
98 | } | 96 | } |
99 | 97 | ||
diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c index 606df51bb636..342cabf48064 100644 --- a/drivers/media/pci/saa7134/saa7134-video.c +++ b/drivers/media/pci/saa7134/saa7134-video.c | |||
@@ -90,70 +90,58 @@ static int video_out[][9] = { | |||
90 | 90 | ||
91 | static struct saa7134_format formats[] = { | 91 | static struct saa7134_format formats[] = { |
92 | { | 92 | { |
93 | .name = "8 bpp gray", | ||
94 | .fourcc = V4L2_PIX_FMT_GREY, | 93 | .fourcc = V4L2_PIX_FMT_GREY, |
95 | .depth = 8, | 94 | .depth = 8, |
96 | .pm = 0x06, | 95 | .pm = 0x06, |
97 | },{ | 96 | },{ |
98 | .name = "15 bpp RGB, le", | ||
99 | .fourcc = V4L2_PIX_FMT_RGB555, | 97 | .fourcc = V4L2_PIX_FMT_RGB555, |
100 | .depth = 16, | 98 | .depth = 16, |
101 | .pm = 0x13 | 0x80, | 99 | .pm = 0x13 | 0x80, |
102 | },{ | 100 | },{ |
103 | .name = "15 bpp RGB, be", | ||
104 | .fourcc = V4L2_PIX_FMT_RGB555X, | 101 | .fourcc = V4L2_PIX_FMT_RGB555X, |
105 | .depth = 16, | 102 | .depth = 16, |
106 | .pm = 0x13 | 0x80, | 103 | .pm = 0x13 | 0x80, |
107 | .bswap = 1, | 104 | .bswap = 1, |
108 | },{ | 105 | },{ |
109 | .name = "16 bpp RGB, le", | ||
110 | .fourcc = V4L2_PIX_FMT_RGB565, | 106 | .fourcc = V4L2_PIX_FMT_RGB565, |
111 | .depth = 16, | 107 | .depth = 16, |
112 | .pm = 0x10 | 0x80, | 108 | .pm = 0x10 | 0x80, |
113 | },{ | 109 | },{ |
114 | .name = "16 bpp RGB, be", | ||
115 | .fourcc = V4L2_PIX_FMT_RGB565X, | 110 | .fourcc = V4L2_PIX_FMT_RGB565X, |
116 | .depth = 16, | 111 | .depth = 16, |
117 | .pm = 0x10 | 0x80, | 112 | .pm = 0x10 | 0x80, |
118 | .bswap = 1, | 113 | .bswap = 1, |
119 | },{ | 114 | },{ |
120 | .name = "24 bpp RGB, le", | ||
121 | .fourcc = V4L2_PIX_FMT_BGR24, | 115 | .fourcc = V4L2_PIX_FMT_BGR24, |
122 | .depth = 24, | 116 | .depth = 24, |
123 | .pm = 0x11, | 117 | .pm = 0x11, |
124 | },{ | 118 | },{ |
125 | .name = "24 bpp RGB, be", | ||
126 | .fourcc = V4L2_PIX_FMT_RGB24, | 119 | .fourcc = V4L2_PIX_FMT_RGB24, |
127 | .depth = 24, | 120 | .depth = 24, |
128 | .pm = 0x11, | 121 | .pm = 0x11, |
129 | .bswap = 1, | 122 | .bswap = 1, |
130 | },{ | 123 | },{ |
131 | .name = "32 bpp RGB, le", | ||
132 | .fourcc = V4L2_PIX_FMT_BGR32, | 124 | .fourcc = V4L2_PIX_FMT_BGR32, |
133 | .depth = 32, | 125 | .depth = 32, |
134 | .pm = 0x12, | 126 | .pm = 0x12, |
135 | },{ | 127 | },{ |
136 | .name = "32 bpp RGB, be", | ||
137 | .fourcc = V4L2_PIX_FMT_RGB32, | 128 | .fourcc = V4L2_PIX_FMT_RGB32, |
138 | .depth = 32, | 129 | .depth = 32, |
139 | .pm = 0x12, | 130 | .pm = 0x12, |
140 | .bswap = 1, | 131 | .bswap = 1, |
141 | .wswap = 1, | 132 | .wswap = 1, |
142 | },{ | 133 | },{ |
143 | .name = "4:2:2 packed, YUYV", | ||
144 | .fourcc = V4L2_PIX_FMT_YUYV, | 134 | .fourcc = V4L2_PIX_FMT_YUYV, |
145 | .depth = 16, | 135 | .depth = 16, |
146 | .pm = 0x00, | 136 | .pm = 0x00, |
147 | .bswap = 1, | 137 | .bswap = 1, |
148 | .yuv = 1, | 138 | .yuv = 1, |
149 | },{ | 139 | },{ |
150 | .name = "4:2:2 packed, UYVY", | ||
151 | .fourcc = V4L2_PIX_FMT_UYVY, | 140 | .fourcc = V4L2_PIX_FMT_UYVY, |
152 | .depth = 16, | 141 | .depth = 16, |
153 | .pm = 0x00, | 142 | .pm = 0x00, |
154 | .yuv = 1, | 143 | .yuv = 1, |
155 | },{ | 144 | },{ |
156 | .name = "4:2:2 planar, Y-Cb-Cr", | ||
157 | .fourcc = V4L2_PIX_FMT_YUV422P, | 145 | .fourcc = V4L2_PIX_FMT_YUV422P, |
158 | .depth = 16, | 146 | .depth = 16, |
159 | .pm = 0x09, | 147 | .pm = 0x09, |
@@ -162,7 +150,6 @@ static struct saa7134_format formats[] = { | |||
162 | .hshift = 1, | 150 | .hshift = 1, |
163 | .vshift = 0, | 151 | .vshift = 0, |
164 | },{ | 152 | },{ |
165 | .name = "4:2:0 planar, Y-Cb-Cr", | ||
166 | .fourcc = V4L2_PIX_FMT_YUV420, | 153 | .fourcc = V4L2_PIX_FMT_YUV420, |
167 | .depth = 12, | 154 | .depth = 12, |
168 | .pm = 0x0a, | 155 | .pm = 0x0a, |
@@ -171,7 +158,6 @@ static struct saa7134_format formats[] = { | |||
171 | .hshift = 1, | 158 | .hshift = 1, |
172 | .vshift = 1, | 159 | .vshift = 1, |
173 | },{ | 160 | },{ |
174 | .name = "4:2:0 planar, Y-Cb-Cr", | ||
175 | .fourcc = V4L2_PIX_FMT_YVU420, | 161 | .fourcc = V4L2_PIX_FMT_YVU420, |
176 | .depth = 12, | 162 | .depth = 12, |
177 | .pm = 0x0a, | 163 | .pm = 0x0a, |
@@ -720,10 +706,10 @@ static int start_preview(struct saa7134_dev *dev) | |||
720 | return err; | 706 | return err; |
721 | 707 | ||
722 | dev->ovfield = dev->win.field; | 708 | dev->ovfield = dev->win.field; |
723 | video_dbg("start_preview %dx%d+%d+%d %s field=%s\n", | 709 | video_dbg("%s %dx%d+%d+%d 0x%08x field=%s\n", __func__, |
724 | dev->win.w.width, dev->win.w.height, | 710 | dev->win.w.width, dev->win.w.height, |
725 | dev->win.w.left, dev->win.w.top, | 711 | dev->win.w.left, dev->win.w.top, |
726 | dev->ovfmt->name, v4l2_field_names[dev->ovfield]); | 712 | dev->ovfmt->fourcc, v4l2_field_names[dev->ovfield]); |
727 | 713 | ||
728 | /* setup window + clipping */ | 714 | /* setup window + clipping */ |
729 | set_size(dev, TASK_B, dev->win.w.width, dev->win.w.height, | 715 | set_size(dev, TASK_B, dev->win.w.width, dev->win.w.height, |
@@ -1780,9 +1766,6 @@ static int saa7134_enum_fmt_vid_cap(struct file *file, void *priv, | |||
1780 | if (f->index >= FORMATS) | 1766 | if (f->index >= FORMATS) |
1781 | return -EINVAL; | 1767 | return -EINVAL; |
1782 | 1768 | ||
1783 | strscpy(f->description, formats[f->index].name, | ||
1784 | sizeof(f->description)); | ||
1785 | |||
1786 | f->pixelformat = formats[f->index].fourcc; | 1769 | f->pixelformat = formats[f->index].fourcc; |
1787 | 1770 | ||
1788 | return 0; | 1771 | return 0; |
@@ -1799,9 +1782,6 @@ static int saa7134_enum_fmt_vid_overlay(struct file *file, void *priv, | |||
1799 | if ((f->index >= FORMATS) || formats[f->index].planar) | 1782 | if ((f->index >= FORMATS) || formats[f->index].planar) |
1800 | return -EINVAL; | 1783 | return -EINVAL; |
1801 | 1784 | ||
1802 | strscpy(f->description, formats[f->index].name, | ||
1803 | sizeof(f->description)); | ||
1804 | |||
1805 | f->pixelformat = formats[f->index].fourcc; | 1785 | f->pixelformat = formats[f->index].fourcc; |
1806 | 1786 | ||
1807 | return 0; | 1787 | return 0; |
diff --git a/drivers/media/pci/saa7134/saa7134.h b/drivers/media/pci/saa7134/saa7134.h index 6324f174c6f9..77c325e64a97 100644 --- a/drivers/media/pci/saa7134/saa7134.h +++ b/drivers/media/pci/saa7134/saa7134.h | |||
@@ -98,7 +98,6 @@ struct saa7134_tvaudio { | |||
98 | }; | 98 | }; |
99 | 99 | ||
100 | struct saa7134_format { | 100 | struct saa7134_format { |
101 | char *name; | ||
102 | unsigned int fourcc; | 101 | unsigned int fourcc; |
103 | unsigned int depth; | 102 | unsigned int depth; |
104 | unsigned int pm; | 103 | unsigned int pm; |
diff --git a/drivers/media/pci/saa7164/saa7164-encoder.c b/drivers/media/pci/saa7164/saa7164-encoder.c index 43fdaa2d32bd..3fca7257a720 100644 --- a/drivers/media/pci/saa7164/saa7164-encoder.c +++ b/drivers/media/pci/saa7164/saa7164-encoder.c | |||
@@ -503,7 +503,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv, | |||
503 | if (f->index != 0) | 503 | if (f->index != 0) |
504 | return -EINVAL; | 504 | return -EINVAL; |
505 | 505 | ||
506 | strscpy(f->description, "MPEG", sizeof(f->description)); | ||
507 | f->pixelformat = V4L2_PIX_FMT_MPEG; | 506 | f->pixelformat = V4L2_PIX_FMT_MPEG; |
508 | 507 | ||
509 | return 0; | 508 | return 0; |
diff --git a/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c b/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c index 609100a46ff8..a02f08459e14 100644 --- a/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c +++ b/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c | |||
@@ -822,25 +822,18 @@ static int solo_enc_enum_fmt_cap(struct file *file, void *priv, | |||
822 | switch (dev_type) { | 822 | switch (dev_type) { |
823 | case SOLO_DEV_6010: | 823 | case SOLO_DEV_6010: |
824 | f->pixelformat = V4L2_PIX_FMT_MPEG4; | 824 | f->pixelformat = V4L2_PIX_FMT_MPEG4; |
825 | strscpy(f->description, "MPEG-4 part 2", | ||
826 | sizeof(f->description)); | ||
827 | break; | 825 | break; |
828 | case SOLO_DEV_6110: | 826 | case SOLO_DEV_6110: |
829 | f->pixelformat = V4L2_PIX_FMT_H264; | 827 | f->pixelformat = V4L2_PIX_FMT_H264; |
830 | strscpy(f->description, "H.264", sizeof(f->description)); | ||
831 | break; | 828 | break; |
832 | } | 829 | } |
833 | break; | 830 | break; |
834 | case 1: | 831 | case 1: |
835 | f->pixelformat = V4L2_PIX_FMT_MJPEG; | 832 | f->pixelformat = V4L2_PIX_FMT_MJPEG; |
836 | strscpy(f->description, "MJPEG", sizeof(f->description)); | ||
837 | break; | 833 | break; |
838 | default: | 834 | default: |
839 | return -EINVAL; | 835 | return -EINVAL; |
840 | } | 836 | } |
841 | |||
842 | f->flags = V4L2_FMT_FLAG_COMPRESSED; | ||
843 | |||
844 | return 0; | 837 | return 0; |
845 | } | 838 | } |
846 | 839 | ||
diff --git a/drivers/media/pci/solo6x10/solo6x10-v4l2.c b/drivers/media/pci/solo6x10/solo6x10-v4l2.c index a968f75920b5..2efa539d6075 100644 --- a/drivers/media/pci/solo6x10/solo6x10-v4l2.c +++ b/drivers/media/pci/solo6x10/solo6x10-v4l2.c | |||
@@ -458,8 +458,6 @@ static int solo_enum_fmt_cap(struct file *file, void *priv, | |||
458 | return -EINVAL; | 458 | return -EINVAL; |
459 | 459 | ||
460 | f->pixelformat = V4L2_PIX_FMT_UYVY; | 460 | f->pixelformat = V4L2_PIX_FMT_UYVY; |
461 | strscpy(f->description, "UYUV 4:2:2 Packed", sizeof(f->description)); | ||
462 | |||
463 | return 0; | 461 | return 0; |
464 | } | 462 | } |
465 | 463 | ||
diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c index e52e29814378..fd3de3bb0c89 100644 --- a/drivers/media/pci/sta2x11/sta2x11_vip.c +++ b/drivers/media/pci/sta2x11/sta2x11_vip.c | |||
@@ -560,9 +560,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv, | |||
560 | if (f->index != 0) | 560 | if (f->index != 0) |
561 | return -EINVAL; | 561 | return -EINVAL; |
562 | 562 | ||
563 | strscpy(f->description, "4:2:2, packed, UYVY", sizeof(f->description)); | ||
564 | f->pixelformat = V4L2_PIX_FMT_UYVY; | 563 | f->pixelformat = V4L2_PIX_FMT_UYVY; |
565 | f->flags = 0; | ||
566 | return 0; | 564 | return 0; |
567 | } | 565 | } |
568 | 566 | ||
diff --git a/drivers/media/pci/tw68/tw68-video.c b/drivers/media/pci/tw68/tw68-video.c index 8e0952d65ad4..99e74c22d3be 100644 --- a/drivers/media/pci/tw68/tw68-video.c +++ b/drivers/media/pci/tw68/tw68-video.c | |||
@@ -34,53 +34,43 @@ | |||
34 | */ | 34 | */ |
35 | static const struct tw68_format formats[] = { | 35 | static const struct tw68_format formats[] = { |
36 | { | 36 | { |
37 | .name = "15 bpp RGB, le", | ||
38 | .fourcc = V4L2_PIX_FMT_RGB555, | 37 | .fourcc = V4L2_PIX_FMT_RGB555, |
39 | .depth = 16, | 38 | .depth = 16, |
40 | .twformat = ColorFormatRGB15, | 39 | .twformat = ColorFormatRGB15, |
41 | }, { | 40 | }, { |
42 | .name = "15 bpp RGB, be", | ||
43 | .fourcc = V4L2_PIX_FMT_RGB555X, | 41 | .fourcc = V4L2_PIX_FMT_RGB555X, |
44 | .depth = 16, | 42 | .depth = 16, |
45 | .twformat = ColorFormatRGB15 | ColorFormatBSWAP, | 43 | .twformat = ColorFormatRGB15 | ColorFormatBSWAP, |
46 | }, { | 44 | }, { |
47 | .name = "16 bpp RGB, le", | ||
48 | .fourcc = V4L2_PIX_FMT_RGB565, | 45 | .fourcc = V4L2_PIX_FMT_RGB565, |
49 | .depth = 16, | 46 | .depth = 16, |
50 | .twformat = ColorFormatRGB16, | 47 | .twformat = ColorFormatRGB16, |
51 | }, { | 48 | }, { |
52 | .name = "16 bpp RGB, be", | ||
53 | .fourcc = V4L2_PIX_FMT_RGB565X, | 49 | .fourcc = V4L2_PIX_FMT_RGB565X, |
54 | .depth = 16, | 50 | .depth = 16, |
55 | .twformat = ColorFormatRGB16 | ColorFormatBSWAP, | 51 | .twformat = ColorFormatRGB16 | ColorFormatBSWAP, |
56 | }, { | 52 | }, { |
57 | .name = "24 bpp RGB, le", | ||
58 | .fourcc = V4L2_PIX_FMT_BGR24, | 53 | .fourcc = V4L2_PIX_FMT_BGR24, |
59 | .depth = 24, | 54 | .depth = 24, |
60 | .twformat = ColorFormatRGB24, | 55 | .twformat = ColorFormatRGB24, |
61 | }, { | 56 | }, { |
62 | .name = "24 bpp RGB, be", | ||
63 | .fourcc = V4L2_PIX_FMT_RGB24, | 57 | .fourcc = V4L2_PIX_FMT_RGB24, |
64 | .depth = 24, | 58 | .depth = 24, |
65 | .twformat = ColorFormatRGB24 | ColorFormatBSWAP, | 59 | .twformat = ColorFormatRGB24 | ColorFormatBSWAP, |
66 | }, { | 60 | }, { |
67 | .name = "32 bpp RGB, le", | ||
68 | .fourcc = V4L2_PIX_FMT_BGR32, | 61 | .fourcc = V4L2_PIX_FMT_BGR32, |
69 | .depth = 32, | 62 | .depth = 32, |
70 | .twformat = ColorFormatRGB32, | 63 | .twformat = ColorFormatRGB32, |
71 | }, { | 64 | }, { |
72 | .name = "32 bpp RGB, be", | ||
73 | .fourcc = V4L2_PIX_FMT_RGB32, | 65 | .fourcc = V4L2_PIX_FMT_RGB32, |
74 | .depth = 32, | 66 | .depth = 32, |
75 | .twformat = ColorFormatRGB32 | ColorFormatBSWAP | | 67 | .twformat = ColorFormatRGB32 | ColorFormatBSWAP | |
76 | ColorFormatWSWAP, | 68 | ColorFormatWSWAP, |
77 | }, { | 69 | }, { |
78 | .name = "4:2:2 packed, YUYV", | ||
79 | .fourcc = V4L2_PIX_FMT_YUYV, | 70 | .fourcc = V4L2_PIX_FMT_YUYV, |
80 | .depth = 16, | 71 | .depth = 16, |
81 | .twformat = ColorFormatYUY2, | 72 | .twformat = ColorFormatYUY2, |
82 | }, { | 73 | }, { |
83 | .name = "4:2:2 packed, UYVY", | ||
84 | .fourcc = V4L2_PIX_FMT_UYVY, | 74 | .fourcc = V4L2_PIX_FMT_UYVY, |
85 | .depth = 16, | 75 | .depth = 16, |
86 | .twformat = ColorFormatYUY2 | ColorFormatBSWAP, | 76 | .twformat = ColorFormatYUY2 | ColorFormatBSWAP, |
@@ -774,9 +764,6 @@ static int tw68_enum_fmt_vid_cap(struct file *file, void *priv, | |||
774 | if (f->index >= FORMATS) | 764 | if (f->index >= FORMATS) |
775 | return -EINVAL; | 765 | return -EINVAL; |
776 | 766 | ||
777 | strscpy(f->description, formats[f->index].name, | ||
778 | sizeof(f->description)); | ||
779 | |||
780 | f->pixelformat = formats[f->index].fourcc; | 767 | f->pixelformat = formats[f->index].fourcc; |
781 | 768 | ||
782 | return 0; | 769 | return 0; |
diff --git a/drivers/media/pci/tw68/tw68.h b/drivers/media/pci/tw68/tw68.h index 7021290d726a..a1f422d6e600 100644 --- a/drivers/media/pci/tw68/tw68.h +++ b/drivers/media/pci/tw68/tw68.h | |||
@@ -85,7 +85,6 @@ struct tw68_tvnorm { | |||
85 | }; | 85 | }; |
86 | 86 | ||
87 | struct tw68_format { | 87 | struct tw68_format { |
88 | char *name; | ||
89 | u32 fourcc; | 88 | u32 fourcc; |
90 | u32 depth; | 89 | u32 depth; |
91 | u32 twformat; | 90 | u32 twformat; |
diff --git a/include/media/drv-intf/saa7146_vv.h b/include/media/drv-intf/saa7146_vv.h index b34d86bb0664..635805fb35e8 100644 --- a/include/media/drv-intf/saa7146_vv.h +++ b/include/media/drv-intf/saa7146_vv.h | |||
@@ -32,7 +32,6 @@ struct saa7146_video_dma { | |||
32 | #define FORMAT_IS_PLANAR 0x2 | 32 | #define FORMAT_IS_PLANAR 0x2 |
33 | 33 | ||
34 | struct saa7146_format { | 34 | struct saa7146_format { |
35 | char *name; | ||
36 | u32 pixelformat; | 35 | u32 pixelformat; |
37 | u32 trans; | 36 | u32 trans; |
38 | u8 depth; | 37 | u8 depth; |