Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'v4l_for_linus' into staging/for_v3.6

* v4l_for_linus: (44 commits)
[media] smia: Fix compile failures
[media] Fix VIDIOC_DQEVENT docbook entry
[media] s5p-fimc: Fix control creation function
[media] s5p-mfc: Fix checkpatch error in s5p_mfc_shm.h file
[media] s5p-mfc: Fix setting controls
[media] v4l/s5p-mfc: added image size align in VIDIOC_TRY_FMT
[media] v4l/s5p-mfc: corrected encoder v4l control definitions
[media] v4l: mem2mem_testdev: Fix race conditions in driver
[media] s5p-mfc: Bug fix of timestamp/timecode copy mechanism
[media] cxd2820r: Fix an incorrect modulation type bitmask
[media] em28xx: Show a warning if the board does not support remote controls
[media] em28xx: Add remote control support for Terratec's Cinergy HTC Stick HD
[media] USB: Staging: media: lirc: initialize spinlocks before usage
[media] Revert "[media] media: mx2_camera: Fix mbus format handling"
[media] bw-qcam: driver and pixfmt documentation fixes
[media] cx88: fix firmware load on big-endian systems
[media] cx18: support big-endian systems
[media] ivtv: fix support for big-endian systems
[media] tuner-core: return the frequency range of the correct tuner
[media] v4l2-dev.c: fix g_parm regression in determine_valid_ioctls()
...

Conflicts:
Documentation/DocBook/media/v4l/vidioc-create-bufs.xml
drivers/media/video/em28xx/em28xx-cards.c

+218 -271
+2 -2
Documentation/DocBook/media/v4l/pixfmt.xml
··· 986 986 <row id="V4L2-PIX-FMT-Y4"> 987 987 <entry><constant>V4L2_PIX_FMT_Y4</constant></entry> 988 988 <entry>'Y04 '</entry> 989 - <entry>Old 4-bit greyscale format. Only the least significant 4 bits of each byte are used, 989 + <entry>Old 4-bit greyscale format. Only the most significant 4 bits of each byte are used, 990 990 the other bits are set to 0.</entry> 991 991 </row> 992 992 <row id="V4L2-PIX-FMT-Y6"> 993 993 <entry><constant>V4L2_PIX_FMT_Y6</constant></entry> 994 994 <entry>'Y06 '</entry> 995 - <entry>Old 6-bit greyscale format. Only the least significant 6 bits of each byte are used, 995 + <entry>Old 6-bit greyscale format. Only the most significant 6 bits of each byte are used, 996 996 the other bits are set to 0.</entry> 997 997 </row> 998 998 </tbody>
+1 -1
Documentation/DocBook/media/v4l/v4l2.xml
··· 560 560 &sub-g-tuner; 561 561 &sub-log-status; 562 562 &sub-overlay; 563 + &sub-prepare-buf; 563 564 &sub-qbuf; 564 565 &sub-querybuf; 565 566 &sub-querycap; ··· 568 567 &sub-query-dv-preset; 569 568 &sub-query-dv-timings; 570 569 &sub-querystd; 571 - &sub-prepare-buf; 572 570 &sub-reqbufs; 573 571 &sub-s-hw-freq-seek; 574 572 &sub-streamon;
+1 -1
Documentation/DocBook/media/v4l/vidioc-create-bufs.xml
··· 108 108 /></entry> 109 109 </row> 110 110 <row> 111 - <entry>&v4l2-format;</entry> 111 + <entry>struct&nbsp;v4l2_format</entry> 112 112 <entry><structfield>format</structfield></entry> 113 113 <entry>Filled in by the application, preserved by the driver.</entry> 114 114 </row>
+1 -1
Documentation/DocBook/media/v4l/vidioc-dqevent.xml
··· 89 89 <row> 90 90 <entry></entry> 91 91 <entry>&v4l2-event-frame-sync;</entry> 92 - <entry><structfield>frame</structfield></entry> 92 + <entry><structfield>frame_sync</structfield></entry> 93 93 <entry>Event data for event V4L2_EVENT_FRAME_SYNC.</entry> 94 94 </row> 95 95 <row>
+2
arch/arm/plat-mxc/include/mach/mx2_cam.h
··· 23 23 #ifndef __MACH_MX2_CAM_H_ 24 24 #define __MACH_MX2_CAM_H_ 25 25 26 + #define MX2_CAMERA_SWAP16 (1 << 0) 26 27 #define MX2_CAMERA_EXT_VSYNC (1 << 1) 27 28 #define MX2_CAMERA_CCIR (1 << 2) 28 29 #define MX2_CAMERA_CCIR_INTERLACE (1 << 3) ··· 31 30 #define MX2_CAMERA_GATED_CLOCK (1 << 5) 32 31 #define MX2_CAMERA_INV_DATA (1 << 6) 33 32 #define MX2_CAMERA_PCLK_SAMPLE_RISING (1 << 7) 33 + #define MX2_CAMERA_PACK_DIR_MSB (1 << 8) 34 34 35 35 /** 36 36 * struct mx2_camera_platform_data - optional platform data for mx2_camera
+1
drivers/hid/hid-core.c
··· 1800 1800 { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM)}, 1801 1801 { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM2)}, 1802 1802 { HID_USB_DEVICE(USB_VENDOR_ID_AVERMEDIA, USB_DEVICE_ID_AVER_FM_MR800) }, 1803 + { HID_USB_DEVICE(USB_VENDOR_ID_AXENTIA, USB_DEVICE_ID_AXENTIA_FM_RADIO) }, 1803 1804 { HID_USB_DEVICE(USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD) }, 1804 1805 { HID_USB_DEVICE(USB_VENDOR_ID_CIDC, 0x0103) }, 1805 1806 { HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_RADIO_SI470X) },
+3
drivers/hid/hid-ids.h
··· 157 157 #define USB_VENDOR_ID_AVERMEDIA 0x07ca 158 158 #define USB_DEVICE_ID_AVER_FM_MR800 0xb800 159 159 160 + #define USB_VENDOR_ID_AXENTIA 0x12cf 161 + #define USB_DEVICE_ID_AXENTIA_FM_RADIO 0x7111 162 + 160 163 #define USB_VENDOR_ID_BELKIN 0x050d 161 164 #define USB_DEVICE_ID_FLIP_KVM 0x3201 162 165
+2 -2
drivers/media/dvb/frontends/cx24110.c
··· 516 516 if(cx24110_readreg(state,0x10)&0x40) { 517 517 /* the RS error counter has finished one counting window */ 518 518 cx24110_writereg(state,0x10,0x60); /* select the byer reg */ 519 - cx24110_readreg(state, 0x12) | 519 + (void)(cx24110_readreg(state, 0x12) | 520 520 (cx24110_readreg(state, 0x13) << 8) | 521 - (cx24110_readreg(state, 0x14) << 16); 521 + (cx24110_readreg(state, 0x14) << 16)); 522 522 cx24110_writereg(state,0x10,0x70); /* select the bler reg */ 523 523 state->lastbler=cx24110_readreg(state,0x12)| 524 524 (cx24110_readreg(state,0x13)<<8)|
+1 -1
drivers/media/dvb/frontends/cxd2820r_c.c
··· 121 121 if (ret) 122 122 goto error; 123 123 124 - switch ((buf[0] >> 0) & 0x03) { 124 + switch ((buf[0] >> 0) & 0x07) { 125 125 case 0: 126 126 c->modulation = QAM_16; 127 127 break;
+1 -1
drivers/media/dvb/frontends/lg2160.c
··· 126 126 127 127 lg_reg("writing %d registers...\n", len); 128 128 129 - for (i = 0; i < len - 1; i++) { 129 + for (i = 0; i < len; i++) { 130 130 ret = lg216x_write_reg(state, regs[i].reg, regs[i].val); 131 131 if (lg_fail(ret)) 132 132 return ret;
+2
drivers/media/dvb/siano/smsusb.c
··· 544 544 .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, 545 545 { USB_DEVICE(0x2040, 0xc0a0), 546 546 .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, 547 + { USB_DEVICE(0x2040, 0xf5a0), 548 + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, 547 549 { } /* Terminating entry */ 548 550 }; 549 551
+1 -1
drivers/media/radio/radio-maxiradio.c
··· 157 157 goto err_out_free_region; 158 158 159 159 dev->io = pci_resource_start(pdev, 0); 160 - if (snd_tea575x_init(&dev->tea)) { 160 + if (snd_tea575x_init(&dev->tea, THIS_MODULE)) { 161 161 printk(KERN_ERR "radio-maxiradio: Unable to detect TEA575x tuner\n"); 162 162 goto err_out_free_region; 163 163 }
+1 -1
drivers/media/radio/radio-sf16fmr2.c
··· 238 238 snprintf(fmr2->tea.bus_info, sizeof(fmr2->tea.bus_info), "%s:%s", 239 239 fmr2->is_fmd2 ? "PnP" : "ISA", dev_name(pdev)); 240 240 241 - if (snd_tea575x_init(&fmr2->tea)) { 241 + if (snd_tea575x_init(&fmr2->tea, THIS_MODULE)) { 242 242 printk(KERN_ERR "radio-sf16fmr2: Unable to detect TEA575x tuner\n"); 243 243 release_region(fmr2->io, 2); 244 244 return -ENODEV;
+2
drivers/media/radio/si470x/radio-si470x-usb.c
··· 51 51 { USB_DEVICE_AND_INTERFACE_INFO(0x1b80, 0xd700, USB_CLASS_HID, 0, 0) }, 52 52 /* Sanei Electric, Inc. FM USB Radio (sold as DealExtreme.com PCear) */ 53 53 { USB_DEVICE_AND_INTERFACE_INFO(0x10c5, 0x819a, USB_CLASS_HID, 0, 0) }, 54 + /* Axentia ALERT FM USB Receiver */ 55 + { USB_DEVICE_AND_INTERFACE_INFO(0x12cf, 0x7111, USB_CLASS_HID, 0, 0) }, 54 56 /* Terminating entry */ 55 57 { } 56 58 };
+6 -78
drivers/media/video/bt8xx/bttv-cards.c
··· 371 371 .muxsel = MUXSEL(2, 3, 1, 1), 372 372 .gpiomux = { 2, 0, 0, 0 }, 373 373 .gpiomute = 10, 374 - .needs_tvaudio = 1, 375 374 .tuner_type = UNSET, 376 375 .tuner_addr = ADDR_UNSET, 377 376 }, ··· 383 384 .muxsel = MUXSEL(2, 3, 1, 1), 384 385 .gpiomux = { 0, 1, 2, 3 }, 385 386 .gpiomute = 4, 386 - .needs_tvaudio = 1, 387 387 .tuner_type = UNSET, 388 388 .tuner_addr = ADDR_UNSET, 389 389 }, ··· 396 398 .gpiomux = { 4, 0, 2, 3 }, 397 399 .gpiomute = 1, 398 400 .no_msp34xx = 1, 399 - .needs_tvaudio = 1, 400 401 .tuner_type = TUNER_PHILIPS_NTSC, 401 402 .tuner_addr = ADDR_UNSET, 402 403 .pll = PLL_28, ··· 411 414 .gpiomask = 0, 412 415 .muxsel = MUXSEL(2, 3, 1, 1), 413 416 .gpiomux = { 0 }, 414 - .needs_tvaudio = 0, 415 417 .tuner_type = TUNER_ABSENT, 416 418 .tuner_addr = ADDR_UNSET, 417 419 }, ··· 423 427 .muxsel = MUXSEL(2, 3, 1, 0), 424 428 .gpiomux = { 0, 1, 0, 1 }, 425 429 .gpiomute = 3, 426 - .needs_tvaudio = 1, 427 430 .tuner_type = UNSET, 428 431 .tuner_addr = ADDR_UNSET, 429 432 }, ··· 435 440 .gpiomask = 0x0f, 436 441 .gpiomux = { 0x0c, 0x04, 0x08, 0x04 }, 437 442 /* 0x04 for some cards ?? */ 438 - .needs_tvaudio = 1, 439 443 .tuner_type = UNSET, 440 444 .tuner_addr = ADDR_UNSET, 441 445 .audio_mode_gpio= avermedia_tvphone_audio, ··· 448 454 .gpiomask = 0, 449 455 .muxsel = MUXSEL(2, 3, 1, 0, 0), 450 456 .gpiomux = { 0 }, 451 - .needs_tvaudio = 1, 452 457 .tuner_type = TUNER_ABSENT, 453 458 .tuner_addr = ADDR_UNSET, 454 459 }, ··· 462 469 .muxsel = MUXSEL(2, 3, 1, 1), 463 470 .gpiomux = { 0, 0xc00, 0x800, 0x400 }, 464 471 .gpiomute = 0xc00, 465 - .needs_tvaudio = 1, 466 472 .pll = PLL_28, 467 473 .tuner_type = UNSET, 468 474 .tuner_addr = ADDR_UNSET, ··· 474 482 .gpiomask = 3, 475 483 .muxsel = MUXSEL(2, 3, 1, 1), 476 484 .gpiomux = { 1, 1, 2, 3 }, 477 - .needs_tvaudio = 0, 478 485 .pll = PLL_28, 479 486 .tuner_type = TUNER_TEMIC_PAL, 480 487 .tuner_addr = ADDR_UNSET, ··· 487 496 .muxsel = MUXSEL(2, 0, 1, 1), 488 497 .gpiomux = { 0, 1, 2, 3 }, 489 498 .gpiomute = 4, 490 - .needs_tvaudio = 1, 491 499 .pll = PLL_28, 492 500 .tuner_type = UNSET, 493 501 .tuner_addr = ADDR_UNSET, ··· 500 510 .muxsel = MUXSEL(2, 3, 1, 1), 501 511 .gpiomux = { 0x20001,0x10001, 0, 0 }, 502 512 .gpiomute = 10, 503 - .needs_tvaudio = 1, 504 513 .tuner_type = UNSET, 505 514 .tuner_addr = ADDR_UNSET, 506 515 }, ··· 513 524 .gpiomask = 15, 514 525 .muxsel = MUXSEL(2, 3, 1, 1), 515 526 .gpiomux = { 13, 14, 11, 7 }, 516 - .needs_tvaudio = 1, 517 527 .tuner_type = UNSET, 518 528 .tuner_addr = ADDR_UNSET, 519 529 }, ··· 524 536 .gpiomask = 15, 525 537 .muxsel = MUXSEL(2, 3, 1, 1), 526 538 .gpiomux = { 13, 14, 11, 7 }, 527 - .needs_tvaudio = 1, 528 539 .msp34xx_alt = 1, 529 540 .pll = PLL_28, 530 541 .tuner_type = TUNER_PHILIPS_PAL, ··· 540 553 .muxsel = MUXSEL(2, 3, 1, 1), 541 554 .gpiomux = { 0, 2, 1, 3 }, /* old: {0, 1, 2, 3, 4} */ 542 555 .gpiomute = 4, 543 - .needs_tvaudio = 1, 544 556 .pll = PLL_28, 545 557 .tuner_type = UNSET, 546 558 .tuner_addr = ADDR_UNSET, ··· 553 567 .muxsel = MUXSEL(2, 3, 1, 1), 554 568 .gpiomux = { 0, 0, 1, 0 }, 555 569 .gpiomute = 10, 556 - .needs_tvaudio = 1, 557 570 .tuner_type = UNSET, 558 571 .tuner_addr = ADDR_UNSET, 559 572 }, ··· 568 583 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */ 569 584 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 }, 570 585 .gpiomute = 0x002000, 571 - .needs_tvaudio = 1, 572 586 .pll = PLL_28, 573 587 .tuner_type = UNSET, 574 588 .tuner_addr = ADDR_UNSET, ··· 581 597 .muxsel = MUXSEL(2, 3, 1, 1, 0), 582 598 .gpiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 }, 583 599 .gpiomute = 0xcfa007, 584 - .needs_tvaudio = 1, 585 600 .tuner_type = UNSET, 586 601 .tuner_addr = ADDR_UNSET, 587 602 .volume_gpio = winview_volume, ··· 594 611 .gpiomask = 0, 595 612 .muxsel = MUXSEL(2, 3, 1, 1), 596 613 .gpiomux = { 1, 0, 0, 0 }, 597 - .needs_tvaudio = 1, 598 614 .tuner_type = UNSET, 599 615 .tuner_addr = ADDR_UNSET, 600 616 }, ··· 642 660 .muxsel = MUXSEL(2, 3, 1, 1), 643 661 .gpiomux = { 0, 1, 0x800, 0x400 }, 644 662 .gpiomute = 0xc00, 645 - .needs_tvaudio = 1, 646 663 .pll = PLL_28, 647 664 .tuner_type = UNSET, 648 665 .tuner_addr = ADDR_UNSET, ··· 672 691 .muxsel = MUXSEL(2, 3, 1, 1), 673 692 .gpiomux = {0x400, 0x400, 0x400, 0x400 }, 674 693 .gpiomute = 0xc00, 675 - .needs_tvaudio = 1, 676 694 .pll = PLL_28, 677 695 .tuner_type = UNSET, 678 696 .tuner_addr = ADDR_UNSET, ··· 686 706 .muxsel = MUXSEL(2, 3, 1, 1), 687 707 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 }, 688 708 .gpiomute = 0x40000, 689 - .needs_tvaudio = 0, 690 709 .tuner_type = TUNER_PHILIPS_PAL, 691 710 .tuner_addr = ADDR_UNSET, 692 711 .audio_mode_gpio= terratv_audio, ··· 699 720 .muxsel = MUXSEL(2, 0, 1, 1), 700 721 .gpiomux = { 0, 1, 2, 3 }, 701 722 .gpiomute = 4, 702 - .needs_tvaudio = 1, 703 723 .tuner_type = UNSET, 704 724 .tuner_addr = ADDR_UNSET, 705 725 }, ··· 726 748 .muxsel = MUXSEL(2, 3, 1, 1), 727 749 .gpiomux = { 0x20000, 0x30000, 0x10000, 0x00000 }, 728 750 .gpiomute = 0x40000, 729 - .needs_tvaudio = 0, 730 751 .tuner_type = TUNER_PHILIPS_PAL, 731 752 .tuner_addr = ADDR_UNSET, 732 753 .audio_mode_gpio= terratv_audio, ··· 770 793 .gpiomask = 0, 771 794 .muxsel = MUXSEL(2, 3, 1, 0, 0), 772 795 .gpiomux = { 0 }, 773 - .needs_tvaudio = 1, 774 796 .tuner_type = TUNER_ABSENT, 775 797 .tuner_addr = ADDR_UNSET, 776 798 .muxsel_hook = PXC200_muxsel, ··· 810 834 .gpiomask = 0, 811 835 .muxsel = MUXSEL(2, 3, 1, 1), 812 836 .gpiomux = { 0 }, 813 - .needs_tvaudio = 0, 814 837 .tuner_type = TUNER_ABSENT, 815 838 .tuner_addr = ADDR_UNSET, 816 839 }, ··· 822 847 .muxsel = MUXSEL(2, 3, 1, 1), 823 848 .gpiomux = { 0x500, 0, 0x300, 0x900 }, 824 849 .gpiomute = 0x900, 825 - .needs_tvaudio = 1, 826 850 .pll = PLL_28, 827 851 .tuner_type = TUNER_PHILIPS_PAL, 828 852 .tuner_addr = ADDR_UNSET, ··· 848 874 Note: There exists another variant "Winfast 2000" with tv stereo !? 849 875 Note: eeprom only contains FF and pci subsystem id 107d:6606 850 876 */ 851 - .needs_tvaudio = 0, 852 877 .pll = PLL_28, 853 878 .has_radio = 1, 854 879 .tuner_type = TUNER_PHILIPS_PAL, /* default for now, gpio reads BFFF06 for Pal bg+dk */ ··· 907 934 .muxsel = MUXSEL(2, 3, 1, 0), 908 935 .gpiomux = { 0x551400, 0x551200, 0, 0 }, 909 936 .gpiomute = 0x551c00, 910 - .needs_tvaudio = 1, 911 937 .pll = PLL_28, 912 938 .tuner_type = TUNER_PHILIPS_PAL_I, 913 939 .tuner_addr = ADDR_UNSET, ··· 921 949 .muxsel = MUXSEL(2, 3, 1, 1), 922 950 .gpiomux = { 2, 0xd0001, 0, 0 }, 923 951 .gpiomute = 1, 924 - .needs_tvaudio = 0, 925 952 .pll = PLL_28, 926 953 .tuner_type = UNSET, 927 954 .tuner_addr = ADDR_UNSET, ··· 937 966 .gpiomux = { 4, 0, 2, 3 }, 938 967 .gpiomute = 1, 939 968 .no_msp34xx = 1, 940 - .needs_tvaudio = 1, 941 969 .tuner_type = TUNER_PHILIPS_NTSC, 942 970 .tuner_addr = ADDR_UNSET, 943 971 .pll = PLL_28, ··· 950 980 .gpiomask = 15, 951 981 .muxsel = MUXSEL(2, 3, 1, 1), 952 982 .gpiomux = { 13, 4, 11, 7 }, 953 - .needs_tvaudio = 1, 954 983 .pll = PLL_28, 955 984 .tuner_type = UNSET, 956 985 .tuner_addr = ADDR_UNSET, ··· 964 995 .gpiomask = 0, 965 996 .muxsel = MUXSEL(2, 3, 1, 1), 966 997 .gpiomux = { 0, 0, 0, 0}, 967 - .needs_tvaudio = 1, 968 998 .no_msp34xx = 1, 969 999 .pll = PLL_28, 970 1000 .tuner_type = TUNER_PHILIPS_PAL_I, ··· 1034 1066 .muxsel = MUXSEL(2, 3, 1, 1), 1035 1067 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 }, 1036 1068 .gpiomute = 0x40000, 1037 - .needs_tvaudio = 1, 1038 1069 .no_msp34xx = 1, 1039 1070 .pll = PLL_35, 1040 1071 .tuner_type = TUNER_PHILIPS_PAL_I, ··· 1051 1084 .muxsel = MUXSEL(2, 3, 1, 1), 1052 1085 .gpiomux = {2,0,0,0 }, 1053 1086 .gpiomute = 1, 1054 - .needs_tvaudio = 1, 1055 1087 .pll = PLL_28, 1056 1088 .tuner_type = UNSET, 1057 1089 .tuner_addr = ADDR_UNSET, ··· 1129 1163 MUX2 (mask 0x30000): 1130 1164 0,2,3= from MSP34xx 1131 1165 1= FM stereo Radio from Tuner */ 1132 - .needs_tvaudio = 0, 1133 1166 .pll = PLL_28, 1134 1167 .tuner_type = UNSET, 1135 1168 .tuner_addr = ADDR_UNSET, ··· 1144 1179 .muxsel = MUXSEL(2, 3, 1, 1), 1145 1180 .gpiomux = { 0, 0, 0x10, 8 }, 1146 1181 .gpiomute = 4, 1147 - .needs_tvaudio = 1, 1148 1182 .pll = PLL_28, 1149 1183 .tuner_type = TUNER_PHILIPS_PAL, 1150 1184 .tuner_addr = ADDR_UNSET, ··· 1182 1218 .muxsel = MUXSEL(2, 3, 1, 0), 1183 1219 .gpiomux = { 2, 0, 0, 0 }, 1184 1220 .gpiomute = 10, 1185 - .needs_tvaudio = 0, 1186 1221 .pll = PLL_28, 1187 1222 .tuner_type = TUNER_TEMIC_PAL, 1188 1223 .tuner_addr = ADDR_UNSET, ··· 1213 1250 .gpiomask = 0, 1214 1251 .muxsel = MUXSEL(3, 1), 1215 1252 .gpiomux = { 0 }, 1216 - .needs_tvaudio = 0, 1217 1253 .no_msp34xx = 1, 1218 1254 .pll = PLL_35, 1219 1255 .tuner_type = TUNER_ABSENT, ··· 1228 1266 .muxsel = MUXSEL(2, 3, 1, 1), 1229 1267 .gpiomux = { 0x400, 0x400, 0x400, 0x400 }, 1230 1268 .gpiomute = 0x800, 1231 - .needs_tvaudio = 1, 1232 1269 .pll = PLL_28, 1233 1270 .tuner_type = TUNER_TEMIC_4036FY5_NTSC, 1234 1271 .tuner_addr = ADDR_UNSET, ··· 1273 1312 .muxsel = MUXSEL(2, 2), 1274 1313 .gpiomux = { }, 1275 1314 .no_msp34xx = 1, 1276 - .needs_tvaudio = 0, 1277 1315 .pll = PLL_28, 1278 1316 .tuner_type = TUNER_ABSENT, 1279 1317 .tuner_addr = ADDR_UNSET, ··· 1289 1329 .muxsel = MUXSEL(2, 3, 1, 0), 1290 1330 .gpiomux = { 1, 0, 4, 4 }, 1291 1331 .gpiomute = 9, 1292 - .needs_tvaudio = 0, 1293 1332 .pll = PLL_28, 1294 1333 .tuner_type = TUNER_PHILIPS_PAL, 1295 1334 .tuner_addr = ADDR_UNSET, ··· 1338 1379 .gpiomute = 0x1800, 1339 1380 .audio_mode_gpio= fv2000s_audio, 1340 1381 .no_msp34xx = 1, 1341 - .needs_tvaudio = 1, 1342 1382 .pll = PLL_28, 1343 1383 .tuner_type = TUNER_PHILIPS_PAL, 1344 1384 .tuner_addr = ADDR_UNSET, ··· 1351 1393 .muxsel = MUXSEL(2, 3, 1, 1), 1352 1394 .gpiomux = { 0x500, 0x500, 0x300, 0x900 }, 1353 1395 .gpiomute = 0x900, 1354 - .needs_tvaudio = 1, 1355 1396 .pll = PLL_28, 1356 1397 .tuner_type = TUNER_PHILIPS_PAL, 1357 1398 .tuner_addr = ADDR_UNSET, ··· 1434 1477 .muxsel = MUXSEL(2, 3, 1, 1), 1435 1478 .gpiomux = { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */ 1436 1479 .gpiomute = 13, 1437 - .needs_tvaudio = 1, 1438 1480 .pll = PLL_28, 1439 1481 .tuner_type = TUNER_LG_PAL_I_FM, 1440 1482 .tuner_addr = ADDR_UNSET, ··· 1470 1514 .muxsel = MUXSEL(2, 3, 1, 1), 1471 1515 .gpiomux = { 0x01, 0x00, 0x03, 0x03 }, 1472 1516 .gpiomute = 0x09, 1473 - .needs_tvaudio = 1, 1474 1517 .no_msp34xx = 1, 1475 1518 .pll = PLL_28, 1476 1519 .tuner_type = TUNER_PHILIPS_PAL, ··· 1495 1540 .gpiomask = 0, 1496 1541 .muxsel = MUXSEL(2, 3, 1, 0, 0), 1497 1542 .gpiomux = { 0 }, 1498 - .needs_tvaudio = 0, 1499 1543 .tuner_type = TUNER_ABSENT, 1500 1544 .tuner_addr = ADDR_UNSET, 1501 1545 }, ··· 1521 1567 .muxsel = MUXSEL(2, 1, 1), 1522 1568 .gpiomux = { 0, 1, 2, 2 }, 1523 1569 .gpiomute = 4, 1524 - .needs_tvaudio = 0, 1525 1570 .tuner_type = TUNER_PHILIPS_PAL, 1526 1571 .tuner_addr = ADDR_UNSET, 1527 1572 .pll = PLL_28, ··· 1550 1597 .gpiomask = 0, 1551 1598 .muxsel = MUXSEL(2, 3, 1, 0), 1552 1599 .gpiomux = { 0 }, 1553 - .needs_tvaudio = 0, 1554 1600 .no_msp34xx = 1, 1555 1601 .pll = PLL_28, 1556 1602 .tuner_type = TUNER_ABSENT, ··· 1571 1619 * btwincap uses 0x80000/0x80003 1572 1620 */ 1573 1621 .gpiomute = 4, 1574 - .needs_tvaudio = 0, 1575 1622 .no_msp34xx = 1, 1576 1623 .pll = PLL_28, 1577 1624 .tuner_type = TUNER_PHILIPS_PAL, ··· 1606 1655 /* .audio_inputs= 1, */ 1607 1656 .svhs = 2, 1608 1657 .muxsel = MUXSEL(2, 0, 1, 1), 1609 - .needs_tvaudio = 1, 1610 1658 .pll = PLL_28, 1611 1659 .tuner_type = UNSET, 1612 1660 .tuner_addr = ADDR_UNSET, ··· 1825 1875 .muxsel = MUXSEL(2, 3, 1, 1), 1826 1876 .gpiomux = { 0, 1, 2, 3}, 1827 1877 .gpiomute = 4, 1828 - .needs_tvaudio = 1, 1829 1878 .tuner_type = TUNER_PHILIPS_PAL, 1830 1879 .tuner_addr = ADDR_UNSET, 1831 1880 .pll = PLL_28, ··· 1851 1902 .gpiomask = 0, 1852 1903 .muxsel = MUXSEL(2, 3), 1853 1904 .gpiomux = { 0 }, 1854 - .needs_tvaudio = 0, 1855 1905 .no_msp34xx = 1, 1856 1906 .pll = PLL_28, 1857 1907 .tuner_type = TUNER_ABSENT, ··· 1868 1920 /* Tuner, Radio, external, internal, off, on */ 1869 1921 .gpiomux = { 0x08, 0x0f, 0x0a, 0x08 }, 1870 1922 .gpiomute = 0x0f, 1871 - .needs_tvaudio = 0, 1872 1923 .no_msp34xx = 1, 1873 1924 .pll = PLL_28, 1874 1925 .tuner_type = TUNER_PHILIPS_NTSC, ··· 1883 1936 .svhs = 2, 1884 1937 .gpiomask = 0x00, 1885 1938 .muxsel = MUXSEL(2, 3, 1, 1), 1886 - .needs_tvaudio = 1, 1887 1939 .no_msp34xx = 1, 1888 1940 .pll = PLL_28, 1889 1941 .tuner_type = TUNER_PHILIPS_PAL, ··· 1980 2034 .gpiomask = 0, 1981 2035 .muxsel = MUXSEL(2, 3, 1, 0), 1982 2036 .gpiomux = { 0 }, 1983 - .needs_tvaudio = 0, 1984 2037 .no_msp34xx = 1, 1985 2038 .pll = PLL_28, 1986 2039 .tuner_type = TUNER_ABSENT, ··· 1994 2049 .gpiomask = 0x00, 1995 2050 .muxsel = MUXSEL(2, 3, 1, 0), 1996 2051 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ 1997 - .needs_tvaudio = 0, 1998 2052 .pll = PLL_28, 1999 2053 .tuner_type = TUNER_ABSENT, 2000 2054 .tuner_addr = ADDR_UNSET, ··· 2006 2062 .gpiomask = 0x00, 2007 2063 .muxsel = MUXSEL(2, 3, 1, 1), 2008 2064 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ 2009 - .needs_tvaudio = 0, 2010 2065 .pll = PLL_28, 2011 2066 .tuner_type = TUNER_ABSENT, 2012 2067 .tuner_addr = ADDR_UNSET, ··· 2022 2079 .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 0), 2023 2080 .muxsel_hook = phytec_muxsel, 2024 2081 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ 2025 - .needs_tvaudio = 1, 2026 2082 .pll = PLL_28, 2027 2083 .tuner_type = TUNER_ABSENT, 2028 2084 .tuner_addr = ADDR_UNSET, ··· 2036 2094 .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 1), 2037 2095 .muxsel_hook = phytec_muxsel, 2038 2096 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ 2039 - .needs_tvaudio = 1, 2040 2097 .pll = PLL_28, 2041 2098 .tuner_type = TUNER_ABSENT, 2042 2099 .tuner_addr = ADDR_UNSET, ··· 2059 2118 .tuner_type = TUNER_ABSENT, 2060 2119 .tuner_addr = ADDR_UNSET, 2061 2120 .svhs = NO_SVHS, /* card has no svhs */ 2062 - .needs_tvaudio = 0, 2063 2121 .no_msp34xx = 1, 2064 2122 .no_tda7432 = 1, 2065 2123 .gpiomask = 0x00, ··· 2108 2168 .gpiomask = 3, 2109 2169 .muxsel = MUXSEL(2, 3, 1, 1), 2110 2170 .gpiomux = { 1, 1, 1, 1 }, 2111 - .needs_tvaudio = 1, 2112 2171 .tuner_type = TUNER_PHILIPS_PAL, 2113 2172 .tuner_addr = ADDR_UNSET, 2114 2173 .pll = PLL_35, ··· 2149 2210 .muxsel = MUXSEL(2, 3, 1, 0), 2150 2211 .no_msp34xx = 1, 2151 2212 .no_tda7432 = 1, 2152 - .needs_tvaudio = 0, 2153 2213 .tuner_type = TUNER_ABSENT, 2154 2214 .tuner_addr = ADDR_UNSET, 2155 2215 }, ··· 2160 2222 .tuner_type = TUNER_PHILIPS_PAL, 2161 2223 .tuner_addr = ADDR_UNSET, 2162 2224 .svhs = 2, 2163 - .needs_tvaudio = 0, 2164 2225 .gpiomask = 0x68, 2165 2226 .muxsel = MUXSEL(2, 3, 1), 2166 2227 .gpiomux = { 0x68, 0x68, 0x61, 0x61 }, ··· 2178 2241 .muxsel = MUXSEL(2, 3, 1, 1), 2179 2242 .gpiomux = { 0, 1, 2, 2 }, 2180 2243 .gpiomute = 3, 2181 - .needs_tvaudio = 0, 2182 2244 .pll = PLL_28, 2183 2245 .tuner_type = TUNER_PHILIPS_PAL, 2184 2246 .tuner_addr = ADDR_UNSET, ··· 2201 2265 .muxsel = MUXSEL(2, 2, 2, 2), 2202 2266 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ 2203 2267 .pll = PLL_28, 2204 - .needs_tvaudio = 0, 2205 2268 .muxsel_hook = picolo_tetra_muxsel,/*Required as it doesn't follow the classic input selection policy*/ 2206 2269 .tuner_type = TUNER_ABSENT, 2207 2270 .tuner_addr = ADDR_UNSET, ··· 2293 2358 .muxsel = MUXSEL(2, 3, 1, 1), 2294 2359 .gpiomux = { 2, 0, 0, 0 }, 2295 2360 .gpiomute = 10, 2296 - .needs_tvaudio = 0, 2297 2361 .pll = PLL_28, 2298 2362 .tuner_type = TUNER_PHILIPS_PAL, 2299 2363 .tuner_addr = ADDR_UNSET, ··· 2339 2405 .tuner_addr = ADDR_UNSET, 2340 2406 .gpiomask = 0x008007, 2341 2407 .gpiomux = { 0, 0x000001,0,0 }, 2342 - .needs_tvaudio = 1, 2343 2408 .has_radio = 1, 2344 2409 }, 2345 2410 [BTTV_BOARD_TIBET_CS16] = { ··· 2451 2518 .muxsel = MUXSEL(2, 3, 1, 1), 2452 2519 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 }, 2453 2520 .gpiomute = 0x002000, 2454 - .needs_tvaudio = 1, 2455 2521 .pll = PLL_28, 2456 2522 .tuner_type = TUNER_YMEC_TVF66T5_B_DFF, 2457 2523 .tuner_addr = 0xc1 >>1, ··· 2466 2534 .muxsel = MUXSEL(2, 3, 1, 1), 2467 2535 .gpiomux = { 0, 1, 2, 2 }, 2468 2536 .gpiomute = 3, 2469 - .needs_tvaudio = 0, 2470 2537 .pll = PLL_28, 2471 2538 .tuner_type = TUNER_TENA_9533_DI, 2472 2539 .tuner_addr = ADDR_UNSET, ··· 2546 2615 .muxsel = MUXSEL(2, 3, 1, 1), 2547 2616 .gpiomux = { 2, 0, 0, 0 }, 2548 2617 .gpiomute = 1, 2549 - .needs_tvaudio = 1, 2550 2618 .pll = PLL_28, 2551 2619 .tuner_type = TUNER_PHILIPS_NTSC, 2552 2620 .tuner_addr = ADDR_UNSET, ··· 2644 2714 .muxsel = MUXSEL(2, 3, 1, 1), 2645 2715 .gpiomux = { 0x20001,0x10001, 0, 0 }, 2646 2716 .gpiomute = 10, 2647 - .needs_tvaudio = 1, 2648 2717 .pll = PLL_28, 2649 2718 .tuner_type = TUNER_PHILIPS_PAL_I, 2650 2719 .tuner_addr = ADDR_UNSET, ··· 2675 2746 .muxsel = MUXSEL(2, 3, 1, 1), 2676 2747 .gpiomux = { 0, 1, 2, 2 }, /* CONTVFMi */ 2677 2748 .gpiomute = 3, /* CONTVFMi */ 2678 - .needs_tvaudio = 0, 2679 2749 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, /* TCL MK3 */ 2680 2750 .tuner_addr = ADDR_UNSET, 2681 2751 .pll = PLL_28, ··· 2713 2785 .gpiomask = 0x00, 2714 2786 .muxsel = MUXSEL(0, 2, 3, 1), 2715 2787 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ 2716 - .needs_tvaudio = 0, 2717 2788 .pll = PLL_28, 2718 2789 .tuner_type = TUNER_ABSENT, 2719 2790 .tuner_addr = ADDR_UNSET, ··· 2726 2799 .gpiomask = 0x00, 2727 2800 .muxsel = MUXSEL(2, 3, 1), 2728 2801 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ 2729 - .needs_tvaudio = 0, 2730 2802 .pll = PLL_28, 2731 2803 .tuner_type = TUNER_ABSENT, 2732 2804 .tuner_addr = ADDR_UNSET, ··· 2739 2813 .gpiomask = 0x00, 2740 2814 .muxsel = MUXSEL(3, 2, 1), 2741 2815 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ 2742 - .needs_tvaudio = 0, 2743 2816 .pll = PLL_28, 2744 2817 .tuner_type = TUNER_ABSENT, 2745 2818 .tuner_addr = ADDR_UNSET, ··· 2802 2877 .gpiomask = 0, 2803 2878 .muxsel = MUXSEL(2, 3), 2804 2879 .gpiomux = { 0 }, 2805 - .needs_tvaudio = 0, 2806 2880 .no_msp34xx = 1, 2807 2881 .pll = PLL_28, 2808 2882 .tuner_type = TUNER_ABSENT, ··· 3573 3649 struct tuner_setup tun_setup; 3574 3650 3575 3651 /* Load tuner module before issuing tuner config call! */ 3576 - if (bttv_tvcards[btv->c.type].has_radio) 3652 + if (btv->has_radio) 3577 3653 v4l2_i2c_new_subdev(&btv->c.v4l2_dev, 3578 3654 &btv->c.i2c_adap, "tuner", 3579 3655 0, v4l2_i2c_tuner_addrs(ADDRS_RADIO)); ··· 3588 3664 tun_setup.type = btv->tuner_type; 3589 3665 tun_setup.addr = addr; 3590 3666 3591 - if (bttv_tvcards[btv->c.type].has_radio) 3667 + if (btv->has_radio) 3592 3668 tun_setup.mode_mask |= T_RADIO; 3593 3669 3594 3670 bttv_call_all(btv, tuner, s_type_addr, &tun_setup); ··· 3648 3724 bttv_tvcards[BTTV_BOARD_HAUPPAUGE_IMPACTVCB].name); 3649 3725 btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB; 3650 3726 } 3727 + 3728 + /* The 61334 needs the msp3410 to do the radio demod to get sound */ 3729 + if (tv.model == 61334) 3730 + btv->radio_uses_msp_demodulator = 1; 3651 3731 } 3652 3732 3653 3733 static int terratec_active_radio_upgrade(struct bttv *btv)
+5
drivers/media/video/bt8xx/bttv-driver.c
··· 1212 1212 For now this is sufficient. */ 1213 1213 switch (input) { 1214 1214 case TVAUDIO_INPUT_RADIO: 1215 + /* Some boards need the msp do to the radio demod */ 1216 + if (btv->radio_uses_msp_demodulator) { 1217 + in = MSP_INPUT_DEFAULT; 1218 + break; 1219 + } 1215 1220 in = MSP_INPUT(MSP_IN_SCART2, MSP_IN_TUNER1, 1216 1221 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART); 1217 1222 break;
-1
drivers/media/video/bt8xx/bttv.h
··· 236 236 /* i2c audio flags */ 237 237 unsigned int no_msp34xx:1; 238 238 unsigned int no_tda7432:1; 239 - unsigned int needs_tvaudio:1; 240 239 unsigned int msp34xx_alt:1; 241 240 /* Note: currently no card definition needs to mark the presence 242 241 of a RDS saa6588 chip. If this is ever needed, then add a new
+1
drivers/media/video/bt8xx/bttvp.h
··· 440 440 /* radio data/state */ 441 441 int has_radio; 442 442 int radio_user; 443 + int radio_uses_msp_demodulator; 443 444 444 445 /* miro/pinnacle + Aimslab VHX 445 446 philips matchbox (tea5757 radio tuner) support */
+37 -10
drivers/media/video/bw-qcam.c
··· 607 607 } 608 608 o = i * pixels_per_line + pixels_read + k; 609 609 if (o < len) { 610 + u8 ch = invert - buffer[k]; 610 611 got++; 611 - put_user((invert - buffer[k]) << shift, buf + o); 612 + put_user(ch << shift, buf + o); 612 613 } 613 614 } 614 615 pixels_read += bytes; ··· 649 648 struct qcam *qcam = video_drvdata(file); 650 649 651 650 strlcpy(vcap->driver, qcam->v4l2_dev.name, sizeof(vcap->driver)); 652 - strlcpy(vcap->card, "B&W Quickcam", sizeof(vcap->card)); 653 - strlcpy(vcap->bus_info, "parport", sizeof(vcap->bus_info)); 651 + strlcpy(vcap->card, "Connectix B&W Quickcam", sizeof(vcap->card)); 652 + strlcpy(vcap->bus_info, qcam->pport->name, sizeof(vcap->bus_info)); 654 653 vcap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE; 655 654 vcap->capabilities = vcap->device_caps | V4L2_CAP_DEVICE_CAPS; 656 655 return 0; ··· 689 688 pix->height = qcam->height / qcam->transfer_scale; 690 689 pix->pixelformat = (qcam->bpp == 4) ? V4L2_PIX_FMT_Y4 : V4L2_PIX_FMT_Y6; 691 690 pix->field = V4L2_FIELD_NONE; 692 - pix->bytesperline = qcam->width; 693 - pix->sizeimage = qcam->width * qcam->height; 691 + pix->bytesperline = pix->width; 692 + pix->sizeimage = pix->width * pix->height; 694 693 /* Just a guess */ 695 694 pix->colorspace = V4L2_COLORSPACE_SRGB; 696 695 return 0; ··· 758 757 "4-Bit Monochrome", V4L2_PIX_FMT_Y4, 759 758 { 0, 0, 0, 0 } 760 759 }, 761 - { 0, 0, 0, 760 + { 1, 0, 0, 762 761 "6-Bit Monochrome", V4L2_PIX_FMT_Y6, 763 762 { 0, 0, 0, 0 } 764 763 }, ··· 770 769 771 770 *fmt = formats[fmt->index]; 772 771 fmt->type = type; 772 + return 0; 773 + } 774 + 775 + static int qcam_enum_framesizes(struct file *file, void *fh, 776 + struct v4l2_frmsizeenum *fsize) 777 + { 778 + static const struct v4l2_frmsize_discrete sizes[] = { 779 + { 80, 60 }, 780 + { 160, 120 }, 781 + { 320, 240 }, 782 + }; 783 + 784 + if (fsize->index > 2) 785 + return -EINVAL; 786 + if (fsize->pixel_format != V4L2_PIX_FMT_Y4 && 787 + fsize->pixel_format != V4L2_PIX_FMT_Y6) 788 + return -EINVAL; 789 + fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE; 790 + fsize->discrete = sizes[fsize->index]; 773 791 return 0; 774 792 } 775 793 ··· 813 793 814 794 parport_release(qcam->pdev); 815 795 return len; 796 + } 797 + 798 + static unsigned int qcam_poll(struct file *filp, poll_table *wait) 799 + { 800 + return v4l2_ctrl_poll(filp, wait) | POLLIN | POLLRDNORM; 816 801 } 817 802 818 803 static int qcam_s_ctrl(struct v4l2_ctrl *ctrl) ··· 853 828 .owner = THIS_MODULE, 854 829 .open = v4l2_fh_open, 855 830 .release = v4l2_fh_release, 856 - .poll = v4l2_ctrl_poll, 831 + .poll = qcam_poll, 857 832 .unlocked_ioctl = video_ioctl2, 858 833 .read = qcam_read, 859 834 }; ··· 864 839 .vidioc_s_input = qcam_s_input, 865 840 .vidioc_enum_input = qcam_enum_input, 866 841 .vidioc_enum_fmt_vid_cap = qcam_enum_fmt_vid_cap, 842 + .vidioc_enum_framesizes = qcam_enum_framesizes, 867 843 .vidioc_g_fmt_vid_cap = qcam_g_fmt_vid_cap, 868 844 .vidioc_s_fmt_vid_cap = qcam_s_fmt_vid_cap, 869 845 .vidioc_try_fmt_vid_cap = qcam_try_fmt_vid_cap, ··· 890 864 return NULL; 891 865 892 866 v4l2_dev = &qcam->v4l2_dev; 893 - strlcpy(v4l2_dev->name, "bw-qcam", sizeof(v4l2_dev->name)); 867 + snprintf(v4l2_dev->name, sizeof(v4l2_dev->name), "bw-qcam%d", num_cams); 894 868 895 - if (v4l2_device_register(NULL, v4l2_dev) < 0) { 869 + if (v4l2_device_register(port->dev, v4l2_dev) < 0) { 896 870 v4l2_err(v4l2_dev, "Could not register v4l2_device\n"); 897 871 kfree(qcam); 898 872 return NULL; ··· 912 886 return NULL; 913 887 } 914 888 qcam->pport = port; 915 - qcam->pdev = parport_register_device(port, "bw-qcam", NULL, NULL, 889 + qcam->pdev = parport_register_device(port, v4l2_dev->name, NULL, NULL, 916 890 NULL, 0, NULL); 917 891 if (qcam->pdev == NULL) { 918 892 v4l2_err(v4l2_dev, "couldn't register for %s.\n", port->name); ··· 1001 975 return -ENODEV; 1002 976 } 1003 977 qc_calibrate(qcam); 978 + v4l2_ctrl_handler_setup(&qcam->hdl); 1004 979 1005 980 parport_release(qcam->pdev); 1006 981
+5 -5
drivers/media/video/cx18/cx18-driver.c
··· 838 838 } 839 839 840 840 CX18_DEBUG_INFO("cx%d (rev %d) at %02x:%02x.%x, " 841 - "irq: %d, latency: %d, memory: 0x%lx\n", 841 + "irq: %d, latency: %d, memory: 0x%llx\n", 842 842 cx->pci_dev->device, cx->card_rev, pci_dev->bus->number, 843 843 PCI_SLOT(pci_dev->devfn), PCI_FUNC(pci_dev->devfn), 844 - cx->pci_dev->irq, pci_latency, (unsigned long)cx->base_addr); 844 + cx->pci_dev->irq, pci_latency, (u64)cx->base_addr); 845 845 846 846 return 0; 847 847 } ··· 938 938 if (retval) 939 939 goto err; 940 940 941 - CX18_DEBUG_INFO("base addr: 0x%08x\n", cx->base_addr); 941 + CX18_DEBUG_INFO("base addr: 0x%llx\n", (u64)cx->base_addr); 942 942 943 943 /* PCI Device Setup */ 944 944 retval = cx18_setup_pci(cx, pci_dev, pci_id); ··· 946 946 goto free_workqueues; 947 947 948 948 /* map io memory */ 949 - CX18_DEBUG_INFO("attempting ioremap at 0x%08x len 0x%08x\n", 950 - cx->base_addr + CX18_MEM_OFFSET, CX18_MEM_SIZE); 949 + CX18_DEBUG_INFO("attempting ioremap at 0x%llx len 0x%08x\n", 950 + (u64)cx->base_addr + CX18_MEM_OFFSET, CX18_MEM_SIZE); 951 951 cx->enc_mem = ioremap_nocache(cx->base_addr + CX18_MEM_OFFSET, 952 952 CX18_MEM_SIZE); 953 953 if (!cx->enc_mem) {
+1 -1
drivers/media/video/cx18/cx18-driver.h
··· 622 622 unique ID. Starts at 1, so 0 can be used as 623 623 uninitialized value in the stream->id. */ 624 624 625 - u32 base_addr; 625 + resource_size_t base_addr; 626 626 627 627 u8 card_rev; 628 628 void __iomem *enc_mem, *reg_mem;
+7 -2
drivers/media/video/cx18/cx18-firmware.c
··· 164 164 165 165 apu_version = (vers[0] << 24) | (vers[4] << 16) | vers[32]; 166 166 while (offset + sizeof(seghdr) < fw->size) { 167 - /* TODO: byteswapping */ 168 - memcpy(&seghdr, src + offset / 4, sizeof(seghdr)); 167 + const u32 *shptr = src + offset / 4; 168 + 169 + seghdr.sync1 = le32_to_cpu(shptr[0]); 170 + seghdr.sync2 = le32_to_cpu(shptr[1]); 171 + seghdr.addr = le32_to_cpu(shptr[2]); 172 + seghdr.size = le32_to_cpu(shptr[3]); 173 + 169 174 offset += sizeof(seghdr); 170 175 if (seghdr.sync1 != APU_ROM_SYNC1 || 171 176 seghdr.sync2 != APU_ROM_SYNC2) {
+10 -5
drivers/media/video/cx18/cx18-mailbox.c
··· 434 434 { 435 435 u32 handle, mdl_ack_offset, mdl_ack_count; 436 436 struct cx18_mailbox *mb; 437 + int i; 437 438 438 439 mb = &order->mb; 439 440 handle = mb->args[0]; ··· 448 447 return -1; 449 448 } 450 449 451 - cx18_memcpy_fromio(cx, order->mdl_ack, cx->enc_mem + mdl_ack_offset, 452 - sizeof(struct cx18_mdl_ack) * mdl_ack_count); 450 + for (i = 0; i < sizeof(struct cx18_mdl_ack) * mdl_ack_count; i += sizeof(u32)) 451 + ((u32 *)order->mdl_ack)[i / sizeof(u32)] = 452 + cx18_readl(cx, cx->enc_mem + mdl_ack_offset + i); 453 453 454 454 if ((order->flags & CX18_F_EWO_MB_STALE) == 0) 455 455 mb_ack_irq(cx, order); ··· 540 538 struct cx18_mailbox *order_mb; 541 539 struct cx18_in_work_order *order; 542 540 int submit; 541 + int i; 543 542 544 543 switch (rpu) { 545 544 case CPU: ··· 565 562 order_mb = &order->mb; 566 563 567 564 /* mb->cmd and mb->args[0] through mb->args[2] */ 568 - cx18_memcpy_fromio(cx, &order_mb->cmd, &mb->cmd, 4 * sizeof(u32)); 565 + for (i = 0; i < 4; i++) 566 + (&order_mb->cmd)[i] = cx18_readl(cx, &mb->cmd + i); 567 + 569 568 /* mb->request and mb->ack. N.B. we want to read mb->ack last */ 570 - cx18_memcpy_fromio(cx, &order_mb->request, &mb->request, 571 - 2 * sizeof(u32)); 569 + for (i = 0; i < 2; i++) 570 + (&order_mb->request)[i] = cx18_readl(cx, &mb->request + i); 572 571 573 572 if (order_mb->request == order_mb->ack) { 574 573 CX18_DEBUG_WARN("Possibly falling behind: %s self-ack'ed our "
+1 -1
drivers/media/video/cx88/cx88-blackbird.c
··· 471 471 dprintk(1,"Loading firmware ...\n"); 472 472 dataptr = (u32*)firmware->data; 473 473 for (i = 0; i < (firmware->size >> 2); i++) { 474 - value = *dataptr; 474 + value = le32_to_cpu(*dataptr); 475 475 checksum += ~value; 476 476 memory_write(dev->core, i, value); 477 477 dataptr++;
+2
drivers/media/video/em28xx/em28xx-input.c
··· 527 527 528 528 if (dev->board.ir_codes == NULL) { 529 529 /* No remote control support */ 530 + em28xx_warn("Remote control support is not available for " 531 + "this card.\n"); 530 532 return 0; 531 533 } 532 534
+3 -1
drivers/media/video/gspca/gspca.c
··· 1653 1653 enum v4l2_buf_type buf_type) 1654 1654 { 1655 1655 struct gspca_dev *gspca_dev = video_drvdata(file); 1656 - int ret; 1656 + int i, ret; 1657 1657 1658 1658 if (buf_type != V4L2_BUF_TYPE_VIDEO_CAPTURE) 1659 1659 return -EINVAL; ··· 1678 1678 wake_up_interruptible(&gspca_dev->wq); 1679 1679 1680 1680 /* empty the transfer queues */ 1681 + for (i = 0; i < gspca_dev->nframes; i++) 1682 + gspca_dev->frame[i].v4l2_buf.flags &= ~BUF_ALL_FLAGS; 1681 1683 atomic_set(&gspca_dev->fr_q, 0); 1682 1684 atomic_set(&gspca_dev->fr_i, 0); 1683 1685 gspca_dev->fr_o = 0;
+3 -29
drivers/media/video/gspca/ov534.c
··· 96 96 static void setcontrast(struct gspca_dev *gspca_dev); 97 97 static void setgain(struct gspca_dev *gspca_dev); 98 98 static void setexposure(struct gspca_dev *gspca_dev); 99 - static int sd_setagc(struct gspca_dev *gspca_dev, __s32 val); 99 + static void setagc(struct gspca_dev *gspca_dev); 100 100 static void setawb(struct gspca_dev *gspca_dev); 101 101 static void setaec(struct gspca_dev *gspca_dev); 102 102 static void setsharpness(struct gspca_dev *gspca_dev); ··· 189 189 .step = 1, 190 190 .default_value = 1, 191 191 }, 192 - .set = sd_setagc 192 + .set_control = setagc 193 193 }, 194 194 [AWB] = { 195 195 { ··· 851 851 int i; 852 852 853 853 for (i = 0; i < 5; i++) { 854 + msleep(10); 854 855 data = ov534_reg_read(gspca_dev, OV534_REG_STATUS); 855 856 856 857 switch (data) { ··· 1243 1242 1244 1243 cam->ctrls = sd->ctrls; 1245 1244 1246 - /* the auto white balance control works only when auto gain is set */ 1247 - if (sd_ctrls[AGC].qctrl.default_value == 0) 1248 - gspca_dev->ctrl_inac |= (1 << AWB); 1249 - 1250 1245 cam->cam_mode = ov772x_mode; 1251 1246 cam->nmodes = ARRAY_SIZE(ov772x_mode); 1252 1247 ··· 1481 1484 remaining_len -= len; 1482 1485 data += len; 1483 1486 } while (remaining_len > 0); 1484 - } 1485 - 1486 - static int sd_setagc(struct gspca_dev *gspca_dev, __s32 val) 1487 - { 1488 - struct sd *sd = (struct sd *) gspca_dev; 1489 - 1490 - sd->ctrls[AGC].val = val; 1491 - 1492 - /* the auto white balance control works only 1493 - * when auto gain is set */ 1494 - if (val) { 1495 - gspca_dev->ctrl_inac &= ~(1 << AWB); 1496 - } else { 1497 - gspca_dev->ctrl_inac |= (1 << AWB); 1498 - if (sd->ctrls[AWB].val) { 1499 - sd->ctrls[AWB].val = 0; 1500 - if (gspca_dev->streaming) 1501 - setawb(gspca_dev); 1502 - } 1503 - } 1504 - if (gspca_dev->streaming) 1505 - setagc(gspca_dev); 1506 - return gspca_dev->usb_err; 1507 1487 } 1508 1488 1509 1489 static int sd_querymenu(struct gspca_dev *gspca_dev,
+1
drivers/media/video/gspca/ov534_9.c
··· 1008 1008 int i; 1009 1009 1010 1010 for (i = 0; i < 5; i++) { 1011 + msleep(10); 1011 1012 data = reg_r(gspca_dev, OV534_REG_STATUS); 1012 1013 1013 1014 switch (data) {
+1 -1
drivers/media/video/gspca/pac7311.c
··· 418 418 struct v4l2_ctrl_handler *hdl = &gspca_dev->ctrl_handler; 419 419 420 420 gspca_dev->vdev.ctrl_handler = hdl; 421 - v4l2_ctrl_handler_init(hdl, 4); 421 + v4l2_ctrl_handler_init(hdl, 5); 422 422 423 423 sd->contrast = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops, 424 424 V4L2_CID_CONTRAST, 0, 15, 1, 7);
+14 -10
drivers/media/video/gspca/sn9c20x.c
··· 1761 1761 V4L2_CID_SATURATION, 0, 255, 1, 127); 1762 1762 sd->hue = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops, 1763 1763 V4L2_CID_HUE, -180, 180, 1, 0); 1764 - v4l2_ctrl_cluster(4, &sd->brightness); 1765 1764 1766 1765 sd->gamma = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops, 1767 1766 V4L2_CID_GAMMA, 0, 255, 1, 0x10); ··· 1769 1770 V4L2_CID_BLUE_BALANCE, 0, 127, 1, 0x28); 1770 1771 sd->red = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops, 1771 1772 V4L2_CID_RED_BALANCE, 0, 127, 1, 0x28); 1772 - v4l2_ctrl_cluster(2, &sd->blue); 1773 1773 1774 1774 if (sd->sensor != SENSOR_OV9655 && sd->sensor != SENSOR_SOI968 && 1775 1775 sd->sensor != SENSOR_OV7670 && sd->sensor != SENSOR_MT9M001 && ··· 1777 1779 V4L2_CID_HFLIP, 0, 1, 1, 0); 1778 1780 sd->vflip = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops, 1779 1781 V4L2_CID_VFLIP, 0, 1, 1, 0); 1780 - v4l2_ctrl_cluster(2, &sd->hflip); 1781 1782 } 1782 1783 1783 1784 if (sd->sensor != SENSOR_SOI968 && sd->sensor != SENSOR_MT9VPRB && ··· 1791 1794 V4L2_CID_GAIN, 0, 28, 1, 0); 1792 1795 sd->autogain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops, 1793 1796 V4L2_CID_AUTOGAIN, 0, 1, 1, 1); 1797 + } 1798 + 1799 + sd->jpegqual = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops, 1800 + V4L2_CID_JPEG_COMPRESSION_QUALITY, 50, 90, 1, 80); 1801 + if (hdl->error) { 1802 + pr_err("Could not initialize controls\n"); 1803 + return hdl->error; 1804 + } 1805 + 1806 + v4l2_ctrl_cluster(4, &sd->brightness); 1807 + v4l2_ctrl_cluster(2, &sd->blue); 1808 + if (sd->hflip) 1809 + v4l2_ctrl_cluster(2, &sd->hflip); 1810 + if (sd->autogain) { 1794 1811 if (sd->sensor == SENSOR_SOI968) 1795 1812 /* this sensor doesn't have the exposure control and 1796 1813 autogain is clustered with gain instead. This works ··· 1813 1802 else 1814 1803 /* Otherwise autogain is clustered with exposure. */ 1815 1804 v4l2_ctrl_auto_cluster(2, &sd->autogain, 0, false); 1816 - } 1817 - 1818 - sd->jpegqual = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops, 1819 - V4L2_CID_JPEG_COMPRESSION_QUALITY, 50, 90, 1, 80); 1820 - if (hdl->error) { 1821 - pr_err("Could not initialize controls\n"); 1822 - return hdl->error; 1823 1805 } 1824 1806 return 0; 1825 1807 }
+1 -1
drivers/media/video/gspca/sonixj.c
··· 3120 3120 | (SENSOR_ ## sensor << 8) \ 3121 3121 | (flags) 3122 3122 static const struct usb_device_id device_table[] = { 3123 - {USB_DEVICE(0x0458, 0x7025), BS(SN9C120, MI0360)}, 3123 + {USB_DEVICE(0x0458, 0x7025), BSF(SN9C120, MI0360B, F_PDN_INV)}, 3124 3124 {USB_DEVICE(0x0458, 0x702e), BS(SN9C120, OV7660)}, 3125 3125 {USB_DEVICE(0x045e, 0x00f5), BSF(SN9C105, OV7660, F_PDN_INV)}, 3126 3126 {USB_DEVICE(0x045e, 0x00f7), BSF(SN9C105, OV7660, F_PDN_INV)},
+9 -9
drivers/media/video/ivtv/ivtv-driver.c
··· 866 866 pci_write_config_dword(pdev, 0x40, 0xffff); 867 867 868 868 IVTV_DEBUG_INFO("%d (rev %d) at %02x:%02x.%x, " 869 - "irq: %d, latency: %d, memory: 0x%lx\n", 869 + "irq: %d, latency: %d, memory: 0x%llx\n", 870 870 pdev->device, pdev->revision, pdev->bus->number, 871 871 PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn), 872 - pdev->irq, pci_latency, (unsigned long)itv->base_addr); 872 + pdev->irq, pci_latency, (u64)itv->base_addr); 873 873 874 874 return 0; 875 875 } ··· 1007 1007 itv->cxhdl.priv = itv; 1008 1008 itv->cxhdl.func = ivtv_api_func; 1009 1009 1010 - IVTV_DEBUG_INFO("base addr: 0x%08x\n", itv->base_addr); 1010 + IVTV_DEBUG_INFO("base addr: 0x%llx\n", (u64)itv->base_addr); 1011 1011 1012 1012 /* PCI Device Setup */ 1013 1013 retval = ivtv_setup_pci(itv, pdev, pci_id); ··· 1017 1017 goto free_mem; 1018 1018 1019 1019 /* map io memory */ 1020 - IVTV_DEBUG_INFO("attempting ioremap at 0x%08x len 0x%08x\n", 1021 - itv->base_addr + IVTV_ENCODER_OFFSET, IVTV_ENCODER_SIZE); 1020 + IVTV_DEBUG_INFO("attempting ioremap at 0x%llx len 0x%08x\n", 1021 + (u64)itv->base_addr + IVTV_ENCODER_OFFSET, IVTV_ENCODER_SIZE); 1022 1022 itv->enc_mem = ioremap_nocache(itv->base_addr + IVTV_ENCODER_OFFSET, 1023 1023 IVTV_ENCODER_SIZE); 1024 1024 if (!itv->enc_mem) { ··· 1034 1034 } 1035 1035 1036 1036 if (itv->has_cx23415) { 1037 - IVTV_DEBUG_INFO("attempting ioremap at 0x%08x len 0x%08x\n", 1038 - itv->base_addr + IVTV_DECODER_OFFSET, IVTV_DECODER_SIZE); 1037 + IVTV_DEBUG_INFO("attempting ioremap at 0x%llx len 0x%08x\n", 1038 + (u64)itv->base_addr + IVTV_DECODER_OFFSET, IVTV_DECODER_SIZE); 1039 1039 itv->dec_mem = ioremap_nocache(itv->base_addr + IVTV_DECODER_OFFSET, 1040 1040 IVTV_DECODER_SIZE); 1041 1041 if (!itv->dec_mem) { ··· 1056 1056 } 1057 1057 1058 1058 /* map registers memory */ 1059 - IVTV_DEBUG_INFO("attempting ioremap at 0x%08x len 0x%08x\n", 1060 - itv->base_addr + IVTV_REG_OFFSET, IVTV_REG_SIZE); 1059 + IVTV_DEBUG_INFO("attempting ioremap at 0x%llx len 0x%08x\n", 1060 + (u64)itv->base_addr + IVTV_REG_OFFSET, IVTV_REG_SIZE); 1061 1061 itv->reg_mem = 1062 1062 ioremap_nocache(itv->base_addr + IVTV_REG_OFFSET, IVTV_REG_SIZE); 1063 1063 if (!itv->reg_mem) {
+1 -1
drivers/media/video/ivtv/ivtv-driver.h
··· 622 622 struct v4l2_subdev *sd_video; /* controlling video decoder subdev */ 623 623 struct v4l2_subdev *sd_audio; /* controlling audio subdev */ 624 624 struct v4l2_subdev *sd_muxer; /* controlling audio muxer subdev */ 625 - u32 base_addr; /* PCI resource base address */ 625 + resource_size_t base_addr; /* PCI resource base address */ 626 626 volatile void __iomem *enc_mem; /* pointer to mapped encoder memory */ 627 627 volatile void __iomem *dec_mem; /* pointer to mapped decoder memory */ 628 628 volatile void __iomem *reg_mem; /* pointer to mapped registers */
+26 -24
drivers/media/video/mem2mem_testdev.c
··· 110 110 V4L2_M2M_DST = 1, 111 111 }; 112 112 113 - /* Source and destination queue data */ 114 - static struct m2mtest_q_data q_data[2]; 115 - 116 - static struct m2mtest_q_data *get_q_data(enum v4l2_buf_type type) 117 - { 118 - switch (type) { 119 - case V4L2_BUF_TYPE_VIDEO_OUTPUT: 120 - return &q_data[V4L2_M2M_SRC]; 121 - case V4L2_BUF_TYPE_VIDEO_CAPTURE: 122 - return &q_data[V4L2_M2M_DST]; 123 - default: 124 - BUG(); 125 - } 126 - return NULL; 127 - } 128 - 129 113 #define V4L2_CID_TRANS_TIME_MSEC V4L2_CID_PRIVATE_BASE 130 114 #define V4L2_CID_TRANS_NUM_BUFS (V4L2_CID_PRIVATE_BASE + 1) 131 115 ··· 182 198 int aborting; 183 199 184 200 struct v4l2_m2m_ctx *m2m_ctx; 201 + 202 + /* Source and destination queue data */ 203 + struct m2mtest_q_data q_data[2]; 185 204 }; 205 + 206 + static struct m2mtest_q_data *get_q_data(struct m2mtest_ctx *ctx, 207 + enum v4l2_buf_type type) 208 + { 209 + switch (type) { 210 + case V4L2_BUF_TYPE_VIDEO_OUTPUT: 211 + return &ctx->q_data[V4L2_M2M_SRC]; 212 + case V4L2_BUF_TYPE_VIDEO_CAPTURE: 213 + return &ctx->q_data[V4L2_M2M_DST]; 214 + default: 215 + BUG(); 216 + } 217 + return NULL; 218 + } 219 + 186 220 187 221 static struct v4l2_queryctrl *get_ctrl(int id) 188 222 { ··· 225 223 int tile_w, bytes_left; 226 224 int width, height, bytesperline; 227 225 228 - q_data = get_q_data(V4L2_BUF_TYPE_VIDEO_OUTPUT); 226 + q_data = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); 229 227 230 228 width = q_data->width; 231 229 height = q_data->height; ··· 438 436 if (!vq) 439 437 return -EINVAL; 440 438 441 - q_data = get_q_data(f->type); 439 + q_data = get_q_data(ctx, f->type); 442 440 443 441 f->fmt.pix.width = q_data->width; 444 442 f->fmt.pix.height = q_data->height; ··· 537 535 if (!vq) 538 536 return -EINVAL; 539 537 540 - q_data = get_q_data(f->type); 538 + q_data = get_q_data(ctx, f->type); 541 539 if (!q_data) 542 540 return -EINVAL; 543 541 ··· 749 747 struct m2mtest_q_data *q_data; 750 748 unsigned int size, count = *nbuffers; 751 749 752 - q_data = get_q_data(vq->type); 750 + q_data = get_q_data(ctx, vq->type); 753 751 754 752 size = q_data->width * q_data->height * q_data->fmt->depth >> 3; 755 753 ··· 777 775 778 776 dprintk(ctx->dev, "type: %d\n", vb->vb2_queue->type); 779 777 780 - q_data = get_q_data(vb->vb2_queue->type); 778 + q_data = get_q_data(ctx, vb->vb2_queue->type); 781 779 782 780 if (vb2_plane_size(vb, 0) < q_data->sizeimage) { 783 781 dprintk(ctx->dev, "%s data will not fit into plane (%lu < %lu)\n", ··· 861 859 ctx->translen = MEM2MEM_DEF_TRANSLEN; 862 860 ctx->transtime = MEM2MEM_DEF_TRANSTIME; 863 861 ctx->num_processed = 0; 862 + 863 + ctx->q_data[V4L2_M2M_SRC].fmt = &formats[0]; 864 + ctx->q_data[V4L2_M2M_DST].fmt = &formats[0]; 864 865 865 866 ctx->m2m_ctx = v4l2_m2m_ctx_init(dev->m2m_dev, ctx, &queue_init); 866 867 ··· 990 985 ret = PTR_ERR(dev->m2m_dev); 991 986 goto err_m2m; 992 987 } 993 - 994 - q_data[V4L2_M2M_SRC].fmt = &formats[0]; 995 - q_data[V4L2_M2M_DST].fmt = &formats[0]; 996 988 997 989 return 0; 998 990
+5 -47
drivers/media/video/mx2_camera.c
··· 345 345 PRP_INTR_CH2OVF, 346 346 } 347 347 }, 348 - { 349 - .in_fmt = V4L2_MBUS_FMT_UYVY8_2X8, 350 - .out_fmt = V4L2_PIX_FMT_YUV420, 351 - .cfg = { 352 - .channel = 2, 353 - .in_fmt = PRP_CNTL_DATA_IN_YUV422, 354 - .out_fmt = PRP_CNTL_CH2_OUT_YUV420, 355 - .src_pixel = 0x22000888, /* YUV422 (YUYV) */ 356 - .irq_flags = PRP_INTR_RDERR | PRP_INTR_CH2WERR | 357 - PRP_INTR_CH2FC | PRP_INTR_LBOVF | 358 - PRP_INTR_CH2OVF, 359 - } 360 - }, 361 348 }; 362 349 363 350 static struct mx2_fmt_cfg *mx27_emma_prp_get_format( ··· 971 984 struct soc_camera_host *ici = to_soc_camera_host(icd->parent); 972 985 struct mx2_camera_dev *pcdev = ici->priv; 973 986 struct v4l2_mbus_config cfg = {.type = V4L2_MBUS_PARALLEL,}; 974 - const struct soc_camera_format_xlate *xlate; 975 987 unsigned long common_flags; 976 988 int ret; 977 989 int bytesperline; ··· 1015 1029 return ret; 1016 1030 } 1017 1031 1018 - xlate = soc_camera_xlate_by_fourcc(icd, pixfmt); 1019 - if (!xlate) { 1020 - dev_warn(icd->parent, "Format %x not found\n", pixfmt); 1021 - return -EINVAL; 1022 - } 1023 - 1024 - if (xlate->code == V4L2_MBUS_FMT_YUYV8_2X8) { 1025 - csicr1 |= CSICR1_PACK_DIR; 1026 - csicr1 &= ~CSICR1_SWAP16_EN; 1027 - dev_dbg(icd->parent, "already yuyv format, don't convert\n"); 1028 - } else if (xlate->code == V4L2_MBUS_FMT_UYVY8_2X8) { 1029 - csicr1 &= ~CSICR1_PACK_DIR; 1030 - csicr1 |= CSICR1_SWAP16_EN; 1031 - dev_dbg(icd->parent, "convert uyvy mbus format into yuyv\n"); 1032 - } else { 1033 - dev_warn(icd->parent, "mbus format not supported\n"); 1034 - return -EINVAL; 1035 - } 1036 - 1037 1032 if (common_flags & V4L2_MBUS_PCLK_SAMPLE_RISING) 1038 1033 csicr1 |= CSICR1_REDGE; 1039 1034 if (common_flags & V4L2_MBUS_VSYNC_ACTIVE_HIGH) 1040 1035 csicr1 |= CSICR1_SOF_POL; 1041 1036 if (common_flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH) 1042 1037 csicr1 |= CSICR1_HSYNC_POL; 1038 + if (pcdev->platform_flags & MX2_CAMERA_SWAP16) 1039 + csicr1 |= CSICR1_SWAP16_EN; 1043 1040 if (pcdev->platform_flags & MX2_CAMERA_EXT_VSYNC) 1044 1041 csicr1 |= CSICR1_EXT_VSYNC; 1045 1042 if (pcdev->platform_flags & MX2_CAMERA_CCIR) ··· 1033 1064 csicr1 |= CSICR1_GCLK_MODE; 1034 1065 if (pcdev->platform_flags & MX2_CAMERA_INV_DATA) 1035 1066 csicr1 |= CSICR1_INV_DATA; 1067 + if (pcdev->platform_flags & MX2_CAMERA_PACK_DIR_MSB) 1068 + csicr1 |= CSICR1_PACK_DIR; 1036 1069 1037 1070 pcdev->csicr1 = csicr1; 1038 1071 ··· 1109 1138 return 0; 1110 1139 } 1111 1140 1112 - if (code == V4L2_MBUS_FMT_YUYV8_2X8 || 1113 - code == V4L2_MBUS_FMT_UYVY8_2X8) { 1141 + if (code == V4L2_MBUS_FMT_YUYV8_2X8) { 1114 1142 formats++; 1115 1143 if (xlate) { 1116 1144 /* ··· 1121 1151 xlate->code = code; 1122 1152 dev_dbg(dev, "Providing host format %s for sensor code %d\n", 1123 1153 xlate->host_fmt->name, code); 1124 - xlate++; 1125 - } 1126 - } 1127 - 1128 - if (code == V4L2_MBUS_FMT_UYVY8_2X8) { 1129 - formats++; 1130 - if (xlate) { 1131 - xlate->host_fmt = 1132 - soc_mbus_get_fmtdesc(V4L2_MBUS_FMT_YUYV8_2X8); 1133 - xlate->code = code; 1134 - dev_dbg(dev, "Providing host format %s for sensor code %d\n", 1135 - xlate->host_fmt->name, code); 1136 1154 xlate++; 1137 1155 } 1138 1156 }
+1 -1
drivers/media/video/s5p-fimc/fimc-core.c
··· 615 615 ctx->effect.type = FIMC_REG_CIIMGEFF_FIN_BYPASS; 616 616 617 617 if (!handler->error) { 618 - v4l2_ctrl_cluster(3, &ctrls->colorfx); 618 + v4l2_ctrl_cluster(2, &ctrls->colorfx); 619 619 ctrls->ready = true; 620 620 } 621 621
+5
drivers/media/video/s5p-mfc/regs-mfc.h
··· 164 164 decoded pic */ 165 165 #define S5P_FIMV_SI_DISPLAY_Y_ADR 0x2010 /* luma addr of displayed pic */ 166 166 #define S5P_FIMV_SI_DISPLAY_C_ADR 0x2014 /* chroma addrof displayed pic */ 167 + 167 168 #define S5P_FIMV_SI_CONSUMED_BYTES 0x2018 /* Consumed number of bytes to 168 169 decode a frame */ 169 170 #define S5P_FIMV_SI_DISPLAY_STATUS 0x201c /* status of decoded picture */ 171 + 172 + #define S5P_FIMV_SI_DECODE_Y_ADR 0x2024 /* luma addr of decoded pic */ 173 + #define S5P_FIMV_SI_DECODE_C_ADR 0x2028 /* chroma addrof decoded pic */ 174 + #define S5P_FIMV_SI_DECODE_STATUS 0x202c /* status of decoded picture */ 170 175 171 176 #define S5P_FIMV_SI_CH0_SB_ST_ADR 0x2044 /* start addr of stream buf */ 172 177 #define S5P_FIMV_SI_CH0_SB_FRM_SIZE 0x2048 /* size of stream buf */
+2 -2
drivers/media/video/s5p-mfc/s5p_mfc_dec.c
··· 627 627 628 628 switch (ctrl->id) { 629 629 case V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY: 630 - ctx->loop_filter_mpeg4 = ctrl->val; 630 + ctx->display_delay = ctrl->val; 631 631 break; 632 632 case V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE: 633 633 ctx->display_delay_enable = ctrl->val; 634 634 break; 635 635 case V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER: 636 - ctx->display_delay = ctrl->val; 636 + ctx->loop_filter_mpeg4 = ctrl->val; 637 637 break; 638 638 case V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE: 639 639 ctx->slice_interface = ctrl->val;
+4 -8
drivers/media/video/s5p-mfc/s5p_mfc_enc.c
··· 243 243 .minimum = V4L2_MPEG_VIDEO_H264_LEVEL_1_0, 244 244 .maximum = V4L2_MPEG_VIDEO_H264_LEVEL_4_0, 245 245 .default_value = V4L2_MPEG_VIDEO_H264_LEVEL_1_0, 246 - .menu_skip_mask = ~( 247 - (1 << V4L2_MPEG_VIDEO_H264_LEVEL_4_1) | 248 - (1 << V4L2_MPEG_VIDEO_H264_LEVEL_4_2) | 249 - (1 << V4L2_MPEG_VIDEO_H264_LEVEL_5_0) | 250 - (1 << V4L2_MPEG_VIDEO_H264_LEVEL_5_1) 251 - ), 252 246 }, 253 247 { 254 248 .id = V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL, ··· 488 494 .type = V4L2_CTRL_TYPE_MENU, 489 495 .minimum = V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED, 490 496 .maximum = V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED, 491 - .default_value = 0, 497 + .default_value = V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED, 492 498 .menu_skip_mask = 0, 493 499 }, 494 500 { ··· 528 534 .type = V4L2_CTRL_TYPE_MENU, 529 535 .minimum = V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE, 530 536 .maximum = V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE, 531 - .default_value = 0, 537 + .default_value = V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE, 532 538 .menu_skip_mask = 0, 533 539 }, 534 540 { ··· 901 907 mfc_err("failed to try output format\n"); 902 908 return -EINVAL; 903 909 } 910 + v4l_bound_align_image(&pix_fmt_mp->width, 8, 1920, 1, 911 + &pix_fmt_mp->height, 4, 1080, 1, 0); 904 912 } else { 905 913 mfc_err("invalid buf type\n"); 906 914 return -EINVAL;
+3 -1
drivers/media/video/s5p-mfc/s5p_mfc_opr.h
··· 57 57 S5P_FIMV_SI_DISPLAY_Y_ADR) << \ 58 58 MFC_OFFSET_SHIFT) 59 59 #define s5p_mfc_get_dec_y_adr() (readl(dev->regs_base + \ 60 - S5P_FIMV_SI_DISPLAY_Y_ADR) << \ 60 + S5P_FIMV_SI_DECODE_Y_ADR) << \ 61 61 MFC_OFFSET_SHIFT) 62 62 #define s5p_mfc_get_dspl_status() readl(dev->regs_base + \ 63 63 S5P_FIMV_SI_DISPLAY_STATUS) 64 + #define s5p_mfc_get_dec_status() readl(dev->regs_base + \ 65 + S5P_FIMV_SI_DECODE_STATUS) 64 66 #define s5p_mfc_get_frame_type() (readl(dev->regs_base + \ 65 67 S5P_FIMV_DECODE_FRAME_TYPE) \ 66 68 & S5P_FIMV_DECODE_FRAME_MASK)
+1 -2
drivers/media/video/s5p-mfc/s5p_mfc_shm.h
··· 13 13 #ifndef S5P_MFC_SHM_H_ 14 14 #define S5P_MFC_SHM_H_ 15 15 16 - enum MFC_SHM_OFS 17 - { 16 + enum MFC_SHM_OFS { 18 17 EXTENEDED_DECODE_STATUS = 0x00, /* D */ 19 18 SET_FRAME_TAG = 0x04, /* D */ 20 19 GET_FRAME_TAG_TOP = 0x08, /* D */
+1 -1
drivers/media/video/smiapp/Kconfig
··· 1 1 config VIDEO_SMIAPP 2 2 tristate "SMIA++/SMIA sensor support" 3 - depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API 3 + depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API && HAVE_CLK 4 4 select VIDEO_SMIAPP_PLL 5 5 ---help--- 6 6 This is a generic driver for SMIA++/SMIA camera modules.
+1
drivers/media/video/smiapp/smiapp-core.c
··· 32 32 #include <linux/gpio.h> 33 33 #include <linux/module.h> 34 34 #include <linux/regulator/consumer.h> 35 + #include <linux/slab.h> 35 36 #include <linux/v4l2-mediabus.h> 36 37 #include <media/v4l2-device.h> 37 38
+1 -1
drivers/media/video/tuner-core.c
··· 1178 1178 return 0; 1179 1179 if (vt->type == t->mode && analog_ops->get_afc) 1180 1180 vt->afc = analog_ops->get_afc(&t->fe); 1181 - if (t->mode != V4L2_TUNER_RADIO) { 1181 + if (vt->type != V4L2_TUNER_RADIO) { 1182 1182 vt->capability |= V4L2_TUNER_CAP_NORM; 1183 1183 vt->rangelow = tv_range[0] * 16; 1184 1184 vt->rangehigh = tv_range[1] * 16;
+3 -1
drivers/media/video/v4l2-dev.c
··· 656 656 SET_VALID_IOCTL(ops, VIDIOC_TRY_ENCODER_CMD, vidioc_try_encoder_cmd); 657 657 SET_VALID_IOCTL(ops, VIDIOC_DECODER_CMD, vidioc_decoder_cmd); 658 658 SET_VALID_IOCTL(ops, VIDIOC_TRY_DECODER_CMD, vidioc_try_decoder_cmd); 659 - if (ops->vidioc_g_parm || vdev->current_norm) 659 + if (ops->vidioc_g_parm || vdev->vfl_type == VFL_TYPE_GRABBER) 660 660 set_bit(_IOC_NR(VIDIOC_G_PARM), valid_ioctls); 661 661 SET_VALID_IOCTL(ops, VIDIOC_S_PARM, vidioc_s_parm); 662 662 SET_VALID_IOCTL(ops, VIDIOC_G_TUNER, vidioc_g_tuner); ··· 679 679 SET_VALID_IOCTL(ops, VIDIOC_QUERY_DV_PRESET, vidioc_query_dv_preset); 680 680 SET_VALID_IOCTL(ops, VIDIOC_S_DV_TIMINGS, vidioc_s_dv_timings); 681 681 SET_VALID_IOCTL(ops, VIDIOC_G_DV_TIMINGS, vidioc_g_dv_timings); 682 + SET_VALID_IOCTL(ops, VIDIOC_ENUM_DV_TIMINGS, vidioc_enum_dv_timings); 683 + SET_VALID_IOCTL(ops, VIDIOC_QUERY_DV_TIMINGS, vidioc_query_dv_timings); 682 684 /* yes, really vidioc_subscribe_event */ 683 685 SET_VALID_IOCTL(ops, VIDIOC_DQEVENT, vidioc_subscribe_event); 684 686 SET_VALID_IOCTL(ops, VIDIOC_SUBSCRIBE_EVENT, vidioc_subscribe_event);
+1
drivers/media/video/v4l2-ioctl.c
··· 1680 1680 break; 1681 1681 1682 1682 ret = 0; 1683 + p->parm.capture.readbuffers = 2; 1683 1684 if (ops->vidioc_g_std) 1684 1685 ret = ops->vidioc_g_std(file, fh, &std); 1685 1686 if (ret == 0)
+2 -2
drivers/media/video/vino.c
··· 2561 2561 } else if (vino_drvdata->decoder 2562 2562 && (vino_drvdata->decoder_owner == VINO_NO_CHANNEL)) { 2563 2563 int input; 2564 - int data_norm; 2564 + int data_norm = 0; 2565 2565 v4l2_std_id norm; 2566 2566 2567 2567 input = VINO_INPUT_COMPOSITE; ··· 2651 2651 } 2652 2652 2653 2653 if (vino_drvdata->decoder_owner == vcs->channel) { 2654 - int data_norm; 2654 + int data_norm = 0; 2655 2655 v4l2_std_id norm; 2656 2656 2657 2657 ret = decoder_call(video, s_routing,
+5 -1
drivers/media/video/vivi.c
··· 1149 1149 vivi_read(struct file *file, char __user *data, size_t count, loff_t *ppos) 1150 1150 { 1151 1151 struct vivi_dev *dev = video_drvdata(file); 1152 + int err; 1152 1153 1153 1154 dprintk(dev, 1, "read called\n"); 1154 - return vb2_read(&dev->vb_vidq, data, count, ppos, 1155 + mutex_lock(&dev->mutex); 1156 + err = vb2_read(&dev->vb_vidq, data, count, ppos, 1155 1157 file->f_flags & O_NONBLOCK); 1158 + mutex_unlock(&dev->mutex); 1159 + return err; 1156 1160 } 1157 1161 1158 1162 static unsigned int
+6
drivers/staging/media/lirc/lirc_serial.c
··· 129 129 130 130 static struct lirc_serial hardware[] = { 131 131 [LIRC_HOMEBREW] = { 132 + .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_HOMEBREW].lock), 132 133 .signal_pin = UART_MSR_DCD, 133 134 .signal_pin_change = UART_MSR_DDCD, 134 135 .on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR), ··· 146 145 }, 147 146 148 147 [LIRC_IRDEO] = { 148 + .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_IRDEO].lock), 149 149 .signal_pin = UART_MSR_DSR, 150 150 .signal_pin_change = UART_MSR_DDSR, 151 151 .on = UART_MCR_OUT2, ··· 158 156 }, 159 157 160 158 [LIRC_IRDEO_REMOTE] = { 159 + .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_IRDEO_REMOTE].lock), 161 160 .signal_pin = UART_MSR_DSR, 162 161 .signal_pin_change = UART_MSR_DDSR, 163 162 .on = (UART_MCR_RTS | UART_MCR_DTR | UART_MCR_OUT2), ··· 170 167 }, 171 168 172 169 [LIRC_ANIMAX] = { 170 + .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_ANIMAX].lock), 173 171 .signal_pin = UART_MSR_DCD, 174 172 .signal_pin_change = UART_MSR_DDCD, 175 173 .on = 0, ··· 181 177 }, 182 178 183 179 [LIRC_IGOR] = { 180 + .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_IGOR].lock), 184 181 .signal_pin = UART_MSR_DSR, 185 182 .signal_pin_change = UART_MSR_DDSR, 186 183 .on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR), ··· 206 201 * See also http://www.nslu2-linux.org for this device 207 202 */ 208 203 [LIRC_NSLU2] = { 204 + .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_NSLU2].lock), 209 205 .signal_pin = UART_MSR_CTS, 210 206 .signal_pin_change = UART_MSR_DCTS, 211 207 .on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR),
+3 -3
include/linux/videodev2.h
··· 2642 2642 2643 2643 /* Experimental, these three ioctls may change over the next couple of kernel 2644 2644 versions. */ 2645 - #define VIDIOC_ENUM_DV_TIMINGS _IOWR('V', 96, struct v4l2_enum_dv_timings) 2646 - #define VIDIOC_QUERY_DV_TIMINGS _IOR('V', 97, struct v4l2_dv_timings) 2647 - #define VIDIOC_DV_TIMINGS_CAP _IOWR('V', 98, struct v4l2_dv_timings_cap) 2645 + #define VIDIOC_ENUM_DV_TIMINGS _IOWR('V', 98, struct v4l2_enum_dv_timings) 2646 + #define VIDIOC_QUERY_DV_TIMINGS _IOR('V', 99, struct v4l2_dv_timings) 2647 + #define VIDIOC_DV_TIMINGS_CAP _IOWR('V', 100, struct v4l2_dv_timings_cap) 2648 2648 2649 2649 /* Reminder: when adding new ioctls please add support for them to 2650 2650 drivers/media/video/v4l2-compat-ioctl32.c as well! */
+2 -1
include/sound/tea575x-tuner.h
··· 44 44 45 45 struct snd_tea575x { 46 46 struct v4l2_device *v4l2_dev; 47 + struct v4l2_file_operations fops; 47 48 struct video_device vd; /* video device */ 48 49 int radio_nr; /* radio_nr */ 49 50 bool tea5759; /* 5759 chip is present */ ··· 63 62 int (*ext_init)(struct snd_tea575x *tea); 64 63 }; 65 64 66 - int snd_tea575x_init(struct snd_tea575x *tea); 65 + int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner); 67 66 void snd_tea575x_exit(struct snd_tea575x *tea); 68 67 69 68 #endif /* __SOUND_TEA575X_TUNER_H */
+14 -7
sound/i2c/other/tea575x-tuner.c
··· 37 37 MODULE_DESCRIPTION("Routines for control of TEA5757/5759 Philips AM/FM radio tuner chips"); 38 38 MODULE_LICENSE("GPL"); 39 39 40 - #define FREQ_LO (76U * 16000) 41 - #define FREQ_HI (108U * 16000) 40 + #define FREQ_LO ((tea->tea5759 ? 760 : 875) * 1600U) 41 + #define FREQ_HI ((tea->tea5759 ? 910 : 1080) * 1600U) 42 42 43 43 /* 44 44 * definitions ··· 120 120 return data; 121 121 } 122 122 123 - static u32 snd_tea575x_get_freq(struct snd_tea575x *tea) 123 + static u32 snd_tea575x_val_to_freq(struct snd_tea575x *tea, u32 val) 124 124 { 125 - u32 freq = snd_tea575x_read(tea) & TEA575X_BIT_FREQ_MASK; 125 + u32 freq = val & TEA575X_BIT_FREQ_MASK; 126 126 127 127 if (freq == 0) 128 128 return freq; ··· 137 137 freq -= TEA575X_FMIF; 138 138 139 139 return clamp(freq * 16, FREQ_LO, FREQ_HI); /* from kHz */ 140 + } 141 + 142 + static u32 snd_tea575x_get_freq(struct snd_tea575x *tea) 143 + { 144 + return snd_tea575x_val_to_freq(tea, snd_tea575x_read(tea)); 140 145 } 141 146 142 147 static void snd_tea575x_set_freq(struct snd_tea575x *tea) ··· 161 156 tea->val &= ~TEA575X_BIT_FREQ_MASK; 162 157 tea->val |= freq & TEA575X_BIT_FREQ_MASK; 163 158 snd_tea575x_write(tea, tea->val); 159 + tea->freq = snd_tea575x_val_to_freq(tea, tea->val); 164 160 } 165 161 166 162 /* ··· 325 319 } 326 320 327 321 static const struct v4l2_file_operations tea575x_fops = { 328 - .owner = THIS_MODULE, 329 322 .unlocked_ioctl = video_ioctl2, 330 323 .open = v4l2_fh_open, 331 324 .release = v4l2_fh_release, ··· 344 339 }; 345 340 346 341 static const struct video_device tea575x_radio = { 347 - .fops = &tea575x_fops, 348 342 .ioctl_ops = &tea575x_ioctl_ops, 349 343 .release = video_device_release_empty, 350 344 }; ··· 355 351 /* 356 352 * initialize all the tea575x chips 357 353 */ 358 - int snd_tea575x_init(struct snd_tea575x *tea) 354 + int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner) 359 355 { 360 356 int retval; 361 357 ··· 380 376 tea->vd.lock = &tea->mutex; 381 377 tea->vd.v4l2_dev = tea->v4l2_dev; 382 378 tea->vd.ctrl_handler = &tea->ctrl_handler; 379 + tea->fops = tea575x_fops; 380 + tea->fops.owner = owner; 381 + tea->vd.fops = &tea->fops; 383 382 set_bit(V4L2_FL_USE_FH_PRIO, &tea->vd.flags); 384 383 /* disable hw_freq_seek if we can't use it */ 385 384 if (tea->cannot_read_data)
+1 -1
sound/pci/es1968.c
··· 2769 2769 chip->tea.ops = &snd_es1968_tea_ops; 2770 2770 strlcpy(chip->tea.card, "SF64-PCE2", sizeof(chip->tea.card)); 2771 2771 sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci)); 2772 - if (!snd_tea575x_init(&chip->tea)) 2772 + if (!snd_tea575x_init(&chip->tea, THIS_MODULE)) 2773 2773 printk(KERN_INFO "es1968: detected TEA575x radio\n"); 2774 2774 #endif 2775 2775
+2 -2
sound/pci/fm801.c
··· 1254 1254 sprintf(chip->tea.bus_info, "PCI:%s", pci_name(pci)); 1255 1255 if ((tea575x_tuner & TUNER_TYPE_MASK) > 0 && 1256 1256 (tea575x_tuner & TUNER_TYPE_MASK) < 4) { 1257 - if (snd_tea575x_init(&chip->tea)) { 1257 + if (snd_tea575x_init(&chip->tea, THIS_MODULE)) { 1258 1258 snd_printk(KERN_ERR "TEA575x radio not found\n"); 1259 1259 snd_fm801_free(chip); 1260 1260 return -ENODEV; ··· 1263 1263 /* autodetect tuner connection */ 1264 1264 for (tea575x_tuner = 1; tea575x_tuner <= 3; tea575x_tuner++) { 1265 1265 chip->tea575x_tuner = tea575x_tuner; 1266 - if (!snd_tea575x_init(&chip->tea)) { 1266 + if (!snd_tea575x_init(&chip->tea, THIS_MODULE)) { 1267 1267 snd_printk(KERN_INFO "detected TEA575x radio type %s\n", 1268 1268 get_tea575x_gpio(chip)->name); 1269 1269 break;