diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-08-19 17:25:47 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-08-19 17:25:47 -0400 |
commit | 49666145de54b5d6d256442bb1bec03ffae1ac76 (patch) | |
tree | b79bcaabffa18847cab31efdf798dc5740e8d73b /drivers/media/video | |
parent | bcd68373877e74d8ca5039c10dc5d699ba5dc7d0 (diff) | |
parent | 41ace1861a93f12f70ff10026fb1539fea38fcf8 (diff) |
Merge branch 'upstream-fixes' into upstream
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/Kconfig | 12 | ||||
-rw-r--r-- | drivers/media/video/Makefile | 2 | ||||
-rw-r--r-- | drivers/media/video/compat_ioctl32.c | 32 | ||||
-rw-r--r-- | drivers/media/video/cx25840/cx25840-core.c | 4 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-video.c | 4 | ||||
-rw-r--r-- | drivers/media/video/dsbr100.c | 430 | ||||
-rw-r--r-- | drivers/media/video/msp3400-kthreads.c | 4 | ||||
-rw-r--r-- | drivers/media/video/pwc/Kconfig | 2 | ||||
-rw-r--r-- | drivers/media/video/pwc/pwc-if.c | 1 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-video.c | 2 | ||||
-rw-r--r-- | drivers/media/video/tuner-types.c | 14 | ||||
-rw-r--r-- | drivers/media/video/v4l1-compat.c | 4 | ||||
-rw-r--r-- | drivers/media/video/v4l2-common.c | 6 | ||||
-rw-r--r-- | drivers/media/video/videodev.c | 2 | ||||
-rw-r--r-- | drivers/media/video/vivi.c | 4 |
15 files changed, 56 insertions, 467 deletions
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index fe56862d51e4..732bf1e7c326 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig | |||
@@ -449,18 +449,6 @@ source "drivers/media/video/pvrusb2/Kconfig" | |||
449 | 449 | ||
450 | source "drivers/media/video/em28xx/Kconfig" | 450 | source "drivers/media/video/em28xx/Kconfig" |
451 | 451 | ||
452 | config USB_DSBR | ||
453 | tristate "D-Link USB FM radio support (EXPERIMENTAL)" | ||
454 | depends on USB && VIDEO_V4L1 && EXPERIMENTAL | ||
455 | ---help--- | ||
456 | Say Y here if you want to connect this type of radio to your | ||
457 | computer's USB port. Note that the audio is not digital, and | ||
458 | you must connect the line out connector to a sound card or a | ||
459 | set of speakers. | ||
460 | |||
461 | To compile this driver as a module, choose M here: the | ||
462 | module will be called dsbr100. | ||
463 | |||
464 | source "drivers/media/video/usbvideo/Kconfig" | 452 | source "drivers/media/video/usbvideo/Kconfig" |
465 | 453 | ||
466 | source "drivers/media/video/et61x251/Kconfig" | 454 | source "drivers/media/video/et61x251/Kconfig" |
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile index 353d61cfac1b..e82e511f2a72 100644 --- a/drivers/media/video/Makefile +++ b/drivers/media/video/Makefile | |||
@@ -77,7 +77,6 @@ obj-$(CONFIG_VIDEO_UPD64083) += upd64083.o | |||
77 | obj-$(CONFIG_VIDEO_CX2341X) += cx2341x.o | 77 | obj-$(CONFIG_VIDEO_CX2341X) += cx2341x.o |
78 | 78 | ||
79 | obj-$(CONFIG_USB_DABUSB) += dabusb.o | 79 | obj-$(CONFIG_USB_DABUSB) += dabusb.o |
80 | obj-$(CONFIG_USB_DSBR) += dsbr100.o | ||
81 | obj-$(CONFIG_USB_OV511) += ov511.o | 80 | obj-$(CONFIG_USB_OV511) += ov511.o |
82 | obj-$(CONFIG_USB_SE401) += se401.o | 81 | obj-$(CONFIG_USB_SE401) += se401.o |
83 | obj-$(CONFIG_USB_STV680) += stv680.o | 82 | obj-$(CONFIG_USB_STV680) += stv680.o |
@@ -91,6 +90,7 @@ obj-$(CONFIG_USB_ZC0301) += zc0301/ | |||
91 | obj-$(CONFIG_USB_IBMCAM) += usbvideo/ | 90 | obj-$(CONFIG_USB_IBMCAM) += usbvideo/ |
92 | obj-$(CONFIG_USB_KONICAWC) += usbvideo/ | 91 | obj-$(CONFIG_USB_KONICAWC) += usbvideo/ |
93 | obj-$(CONFIG_USB_VICAM) += usbvideo/ | 92 | obj-$(CONFIG_USB_VICAM) += usbvideo/ |
93 | obj-$(CONFIG_USB_QUICKCAM_MESSENGER) += usbvideo/ | ||
94 | 94 | ||
95 | obj-$(CONFIG_VIDEO_VIVI) += vivi.o | 95 | obj-$(CONFIG_VIDEO_VIVI) += vivi.o |
96 | 96 | ||
diff --git a/drivers/media/video/compat_ioctl32.c b/drivers/media/video/compat_ioctl32.c index 9dddff42ec13..b69ee1194815 100644 --- a/drivers/media/video/compat_ioctl32.c +++ b/drivers/media/video/compat_ioctl32.c | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #ifdef CONFIG_COMPAT | 22 | #ifdef CONFIG_COMPAT |
23 | 23 | ||
24 | 24 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | |
25 | struct video_tuner32 { | 25 | struct video_tuner32 { |
26 | compat_int_t tuner; | 26 | compat_int_t tuner; |
27 | char name[32]; | 27 | char name[32]; |
@@ -107,6 +107,7 @@ struct video_window32 { | |||
107 | compat_caddr_t clips; | 107 | compat_caddr_t clips; |
108 | compat_int_t clipcount; | 108 | compat_int_t clipcount; |
109 | }; | 109 | }; |
110 | #endif | ||
110 | 111 | ||
111 | static int native_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | 112 | static int native_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
112 | { | 113 | { |
@@ -124,6 +125,7 @@ static int native_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
124 | } | 125 | } |
125 | 126 | ||
126 | 127 | ||
128 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
127 | /* You get back everything except the clips... */ | 129 | /* You get back everything except the clips... */ |
128 | static int put_video_window32(struct video_window *kp, struct video_window32 __user *up) | 130 | static int put_video_window32(struct video_window *kp, struct video_window32 __user *up) |
129 | { | 131 | { |
@@ -138,6 +140,7 @@ static int put_video_window32(struct video_window *kp, struct video_window32 __u | |||
138 | return -EFAULT; | 140 | return -EFAULT; |
139 | return 0; | 141 | return 0; |
140 | } | 142 | } |
143 | #endif | ||
141 | 144 | ||
142 | struct v4l2_clip32 | 145 | struct v4l2_clip32 |
143 | { | 146 | { |
@@ -490,6 +493,7 @@ static inline int put_v4l2_input(struct v4l2_input *kp, struct v4l2_input __user | |||
490 | return 0; | 493 | return 0; |
491 | } | 494 | } |
492 | 495 | ||
496 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
493 | struct video_code32 | 497 | struct video_code32 |
494 | { | 498 | { |
495 | char loadwhat[16]; /* name or tag of file being passed */ | 499 | char loadwhat[16]; /* name or tag of file being passed */ |
@@ -517,6 +521,8 @@ static inline int microcode32(struct video_code *kp, struct video_code32 __user | |||
517 | #define VIDIOCSFREQ32 _IOW('v',15, u32) | 521 | #define VIDIOCSFREQ32 _IOW('v',15, u32) |
518 | #define VIDIOCSMICROCODE32 _IOW('v',27, struct video_code32) | 522 | #define VIDIOCSMICROCODE32 _IOW('v',27, struct video_code32) |
519 | 523 | ||
524 | #endif | ||
525 | |||
520 | /* VIDIOC_ENUMINPUT32 is VIDIOC_ENUMINPUT minus 4 bytes of padding alignement */ | 526 | /* VIDIOC_ENUMINPUT32 is VIDIOC_ENUMINPUT minus 4 bytes of padding alignement */ |
521 | #define VIDIOC_ENUMINPUT32 VIDIOC_ENUMINPUT - _IOC(0, 0, 0, 4) | 527 | #define VIDIOC_ENUMINPUT32 VIDIOC_ENUMINPUT - _IOC(0, 0, 0, 4) |
522 | #define VIDIOC_G_FMT32 _IOWR ('V', 4, struct v4l2_format32) | 528 | #define VIDIOC_G_FMT32 _IOWR ('V', 4, struct v4l2_format32) |
@@ -537,6 +543,7 @@ static inline int microcode32(struct video_code *kp, struct video_code32 __user | |||
537 | #define VIDIOC_S_INPUT32 _IOWR ('V', 39, compat_int_t) | 543 | #define VIDIOC_S_INPUT32 _IOWR ('V', 39, compat_int_t) |
538 | #define VIDIOC_TRY_FMT32 _IOWR ('V', 64, struct v4l2_format32) | 544 | #define VIDIOC_TRY_FMT32 _IOWR ('V', 64, struct v4l2_format32) |
539 | 545 | ||
546 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
540 | enum { | 547 | enum { |
541 | MaxClips = (~0U-sizeof(struct video_window))/sizeof(struct video_clip) | 548 | MaxClips = (~0U-sizeof(struct video_window))/sizeof(struct video_clip) |
542 | }; | 549 | }; |
@@ -601,14 +608,17 @@ static int do_set_window(struct file *file, unsigned int cmd, unsigned long arg) | |||
601 | 608 | ||
602 | return native_ioctl(file, VIDIOCSWIN, (unsigned long)vw); | 609 | return native_ioctl(file, VIDIOCSWIN, (unsigned long)vw); |
603 | } | 610 | } |
611 | #endif | ||
604 | 612 | ||
605 | static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | 613 | static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
606 | { | 614 | { |
607 | union { | 615 | union { |
616 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
608 | struct video_tuner vt; | 617 | struct video_tuner vt; |
609 | struct video_buffer vb; | 618 | struct video_buffer vb; |
610 | struct video_window vw; | 619 | struct video_window vw; |
611 | struct video_code vc; | 620 | struct video_code vc; |
621 | #endif | ||
612 | struct v4l2_format v2f; | 622 | struct v4l2_format v2f; |
613 | struct v4l2_buffer v2b; | 623 | struct v4l2_buffer v2b; |
614 | struct v4l2_framebuffer v2fb; | 624 | struct v4l2_framebuffer v2fb; |
@@ -624,6 +634,7 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg | |||
624 | 634 | ||
625 | /* First, convert the command. */ | 635 | /* First, convert the command. */ |
626 | switch(cmd) { | 636 | switch(cmd) { |
637 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
627 | case VIDIOCGTUNER32: cmd = VIDIOCGTUNER; break; | 638 | case VIDIOCGTUNER32: cmd = VIDIOCGTUNER; break; |
628 | case VIDIOCSTUNER32: cmd = VIDIOCSTUNER; break; | 639 | case VIDIOCSTUNER32: cmd = VIDIOCSTUNER; break; |
629 | case VIDIOCGWIN32: cmd = VIDIOCGWIN; break; | 640 | case VIDIOCGWIN32: cmd = VIDIOCGWIN; break; |
@@ -631,6 +642,8 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg | |||
631 | case VIDIOCSFBUF32: cmd = VIDIOCSFBUF; break; | 642 | case VIDIOCSFBUF32: cmd = VIDIOCSFBUF; break; |
632 | case VIDIOCGFREQ32: cmd = VIDIOCGFREQ; break; | 643 | case VIDIOCGFREQ32: cmd = VIDIOCGFREQ; break; |
633 | case VIDIOCSFREQ32: cmd = VIDIOCSFREQ; break; | 644 | case VIDIOCSFREQ32: cmd = VIDIOCSFREQ; break; |
645 | case VIDIOCSMICROCODE32: cmd = VIDIOCSMICROCODE; break; | ||
646 | #endif | ||
634 | case VIDIOC_G_FMT32: cmd = VIDIOC_G_FMT; break; | 647 | case VIDIOC_G_FMT32: cmd = VIDIOC_G_FMT; break; |
635 | case VIDIOC_S_FMT32: cmd = VIDIOC_S_FMT; break; | 648 | case VIDIOC_S_FMT32: cmd = VIDIOC_S_FMT; break; |
636 | case VIDIOC_QUERYBUF32: cmd = VIDIOC_QUERYBUF; break; | 649 | case VIDIOC_QUERYBUF32: cmd = VIDIOC_QUERYBUF; break; |
@@ -647,10 +660,10 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg | |||
647 | case VIDIOC_G_INPUT32: cmd = VIDIOC_G_INPUT; break; | 660 | case VIDIOC_G_INPUT32: cmd = VIDIOC_G_INPUT; break; |
648 | case VIDIOC_S_INPUT32: cmd = VIDIOC_S_INPUT; break; | 661 | case VIDIOC_S_INPUT32: cmd = VIDIOC_S_INPUT; break; |
649 | case VIDIOC_TRY_FMT32: cmd = VIDIOC_TRY_FMT; break; | 662 | case VIDIOC_TRY_FMT32: cmd = VIDIOC_TRY_FMT; break; |
650 | case VIDIOCSMICROCODE32: cmd = VIDIOCSMICROCODE; break; | ||
651 | }; | 663 | }; |
652 | 664 | ||
653 | switch(cmd) { | 665 | switch(cmd) { |
666 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
654 | case VIDIOCSTUNER: | 667 | case VIDIOCSTUNER: |
655 | case VIDIOCGTUNER: | 668 | case VIDIOCGTUNER: |
656 | err = get_video_tuner32(&karg.vt, up); | 669 | err = get_video_tuner32(&karg.vt, up); |
@@ -664,6 +677,7 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg | |||
664 | break; | 677 | break; |
665 | 678 | ||
666 | case VIDIOCSFREQ: | 679 | case VIDIOCSFREQ: |
680 | #endif | ||
667 | case VIDIOC_S_INPUT: | 681 | case VIDIOC_S_INPUT: |
668 | case VIDIOC_OVERLAY: | 682 | case VIDIOC_OVERLAY: |
669 | case VIDIOC_STREAMON: | 683 | case VIDIOC_STREAMON: |
@@ -717,18 +731,21 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg | |||
717 | compatible_arg = 0; | 731 | compatible_arg = 0; |
718 | break; | 732 | break; |
719 | 733 | ||
734 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
720 | case VIDIOCGWIN: | 735 | case VIDIOCGWIN: |
721 | case VIDIOCGFBUF: | 736 | case VIDIOCGFBUF: |
722 | case VIDIOCGFREQ: | 737 | case VIDIOCGFREQ: |
738 | #endif | ||
723 | case VIDIOC_G_FBUF: | 739 | case VIDIOC_G_FBUF: |
724 | case VIDIOC_G_INPUT: | 740 | case VIDIOC_G_INPUT: |
725 | compatible_arg = 0; | 741 | compatible_arg = 0; |
742 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
726 | case VIDIOCSMICROCODE: | 743 | case VIDIOCSMICROCODE: |
727 | err = microcode32(&karg.vc, up); | 744 | err = microcode32(&karg.vc, up); |
728 | compatible_arg = 0; | 745 | compatible_arg = 0; |
729 | break; | 746 | break; |
747 | #endif | ||
730 | }; | 748 | }; |
731 | |||
732 | if(err) | 749 | if(err) |
733 | goto out; | 750 | goto out; |
734 | 751 | ||
@@ -743,6 +760,7 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg | |||
743 | } | 760 | } |
744 | if(err == 0) { | 761 | if(err == 0) { |
745 | switch(cmd) { | 762 | switch(cmd) { |
763 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
746 | case VIDIOCGTUNER: | 764 | case VIDIOCGTUNER: |
747 | err = put_video_tuner32(&karg.vt, up); | 765 | err = put_video_tuner32(&karg.vt, up); |
748 | break; | 766 | break; |
@@ -754,7 +772,7 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg | |||
754 | case VIDIOCGFBUF: | 772 | case VIDIOCGFBUF: |
755 | err = put_video_buffer32(&karg.vb, up); | 773 | err = put_video_buffer32(&karg.vb, up); |
756 | break; | 774 | break; |
757 | 775 | #endif | |
758 | case VIDIOC_G_FBUF: | 776 | case VIDIOC_G_FBUF: |
759 | err = put_v4l2_framebuffer32(&karg.v2fb, up); | 777 | err = put_v4l2_framebuffer32(&karg.v2fb, up); |
760 | break; | 778 | break; |
@@ -792,7 +810,9 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg | |||
792 | err = put_v4l2_input32(&karg.v2i, up); | 810 | err = put_v4l2_input32(&karg.v2i, up); |
793 | break; | 811 | break; |
794 | 812 | ||
813 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
795 | case VIDIOCGFREQ: | 814 | case VIDIOCGFREQ: |
815 | #endif | ||
796 | case VIDIOC_G_INPUT: | 816 | case VIDIOC_G_INPUT: |
797 | err = put_user(((u32)karg.vx), (u32 __user *)up); | 817 | err = put_user(((u32)karg.vx), (u32 __user *)up); |
798 | break; | 818 | break; |
@@ -810,6 +830,7 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) | |||
810 | return ret; | 830 | return ret; |
811 | 831 | ||
812 | switch (cmd) { | 832 | switch (cmd) { |
833 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
813 | case VIDIOCSWIN32: | 834 | case VIDIOCSWIN32: |
814 | ret = do_set_window(file, cmd, arg); | 835 | ret = do_set_window(file, cmd, arg); |
815 | break; | 836 | break; |
@@ -820,6 +841,7 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) | |||
820 | case VIDIOCSFBUF32: | 841 | case VIDIOCSFBUF32: |
821 | case VIDIOCGFREQ32: | 842 | case VIDIOCGFREQ32: |
822 | case VIDIOCSFREQ32: | 843 | case VIDIOCSFREQ32: |
844 | #endif | ||
823 | case VIDIOC_QUERYCAP: | 845 | case VIDIOC_QUERYCAP: |
824 | case VIDIOC_ENUM_FMT: | 846 | case VIDIOC_ENUM_FMT: |
825 | case VIDIOC_G_FMT32: | 847 | case VIDIOC_G_FMT32: |
@@ -851,6 +873,7 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) | |||
851 | ret = do_video_ioctl(file, cmd, arg); | 873 | ret = do_video_ioctl(file, cmd, arg); |
852 | break; | 874 | break; |
853 | 875 | ||
876 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
854 | /* Little v, the video4linux ioctls (conflict?) */ | 877 | /* Little v, the video4linux ioctls (conflict?) */ |
855 | case VIDIOCGCAP: | 878 | case VIDIOCGCAP: |
856 | case VIDIOCGCHAN: | 879 | case VIDIOCGCHAN: |
@@ -879,6 +902,7 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) | |||
879 | case _IOR('v' , BASE_VIDIOCPRIVATE+7, int): | 902 | case _IOR('v' , BASE_VIDIOCPRIVATE+7, int): |
880 | ret = native_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); | 903 | ret = native_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); |
881 | break; | 904 | break; |
905 | #endif | ||
882 | default: | 906 | default: |
883 | v4l_print_ioctl("compat_ioctl32", cmd); | 907 | v4l_print_ioctl("compat_ioctl32", cmd); |
884 | } | 908 | } |
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index 5c2036b40ea1..7bb7589a07c3 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c | |||
@@ -104,8 +104,8 @@ u32 cx25840_read4(struct i2c_client * client, u16 addr) | |||
104 | if (i2c_master_recv(client, buffer, 4) < 4) | 104 | if (i2c_master_recv(client, buffer, 4) < 4) |
105 | return 0; | 105 | return 0; |
106 | 106 | ||
107 | return (buffer[0] << 24) | (buffer[1] << 16) | | 107 | return (buffer[3] << 24) | (buffer[2] << 16) | |
108 | (buffer[2] << 8) | buffer[3]; | 108 | (buffer[1] << 8) | buffer[0]; |
109 | } | 109 | } |
110 | 110 | ||
111 | int cx25840_and_or(struct i2c_client *client, u16 addr, unsigned and_mask, | 111 | int cx25840_and_or(struct i2c_client *client, u16 addr, unsigned and_mask, |
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index 547cdbdb644d..94c92bacc342 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c | |||
@@ -1225,7 +1225,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file, | |||
1225 | struct v4l2_format *f = arg; | 1225 | struct v4l2_format *f = arg; |
1226 | return cx8800_try_fmt(dev,fh,f); | 1226 | return cx8800_try_fmt(dev,fh,f); |
1227 | } | 1227 | } |
1228 | #ifdef CONFIG_V4L1_COMPAT | 1228 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
1229 | /* --- streaming capture ------------------------------------- */ | 1229 | /* --- streaming capture ------------------------------------- */ |
1230 | case VIDIOCGMBUF: | 1230 | case VIDIOCGMBUF: |
1231 | { | 1231 | { |
@@ -1584,7 +1584,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file, | |||
1584 | *id = 0; | 1584 | *id = 0; |
1585 | return 0; | 1585 | return 0; |
1586 | } | 1586 | } |
1587 | #ifdef CONFIG_V4L1_COMPAT | 1587 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
1588 | case VIDIOCSTUNER: | 1588 | case VIDIOCSTUNER: |
1589 | { | 1589 | { |
1590 | struct video_tuner *v = arg; | 1590 | struct video_tuner *v = arg; |
diff --git a/drivers/media/video/dsbr100.c b/drivers/media/video/dsbr100.c deleted file mode 100644 index f7e33f9ee8e9..000000000000 --- a/drivers/media/video/dsbr100.c +++ /dev/null | |||
@@ -1,430 +0,0 @@ | |||
1 | /* A driver for the D-Link DSB-R100 USB radio. The R100 plugs | ||
2 | into both the USB and an analog audio input, so this thing | ||
3 | only deals with initialisation and frequency setting, the | ||
4 | audio data has to be handled by a sound driver. | ||
5 | |||
6 | Major issue: I can't find out where the device reports the signal | ||
7 | strength, and indeed the windows software appearantly just looks | ||
8 | at the stereo indicator as well. So, scanning will only find | ||
9 | stereo stations. Sad, but I can't help it. | ||
10 | |||
11 | Also, the windows program sends oodles of messages over to the | ||
12 | device, and I couldn't figure out their meaning. My suspicion | ||
13 | is that they don't have any:-) | ||
14 | |||
15 | You might find some interesting stuff about this module at | ||
16 | http://unimut.fsk.uni-heidelberg.de/unimut/demi/dsbr | ||
17 | |||
18 | Copyright (c) 2000 Markus Demleitner <msdemlei@cl.uni-heidelberg.de> | ||
19 | |||
20 | This program is free software; you can redistribute it and/or modify | ||
21 | it under the terms of the GNU General Public License as published by | ||
22 | the Free Software Foundation; either version 2 of the License, or | ||
23 | (at your option) any later version. | ||
24 | |||
25 | This program is distributed in the hope that it will be useful, | ||
26 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
27 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
28 | GNU General Public License for more details. | ||
29 | |||
30 | You should have received a copy of the GNU General Public License | ||
31 | along with this program; if not, write to the Free Software | ||
32 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
33 | |||
34 | History: | ||
35 | |||
36 | Version 0.40: | ||
37 | Markus: Updates for 2.6.x kernels, code layout changes, name sanitizing | ||
38 | |||
39 | Version 0.30: | ||
40 | Markus: Updates for 2.5.x kernel and more ISO compliant source | ||
41 | |||
42 | Version 0.25: | ||
43 | PSL and Markus: Cleanup, radio now doesn't stop on device close | ||
44 | |||
45 | Version 0.24: | ||
46 | Markus: Hope I got these silly VIDEO_TUNER_LOW issues finally | ||
47 | right. Some minor cleanup, improved standalone compilation | ||
48 | |||
49 | Version 0.23: | ||
50 | Markus: Sign extension bug fixed by declaring transfer_buffer unsigned | ||
51 | |||
52 | Version 0.22: | ||
53 | Markus: Some (brown bag) cleanup in what VIDIOCSTUNER returns, | ||
54 | thanks to Mike Cox for pointing the problem out. | ||
55 | |||
56 | Version 0.21: | ||
57 | Markus: Minor cleanup, warnings if something goes wrong, lame attempt | ||
58 | to adhere to Documentation/CodingStyle | ||
59 | |||
60 | Version 0.2: | ||
61 | Brad Hards <bradh@dynamite.com.au>: Fixes to make it work as non-module | ||
62 | Markus: Copyright clarification | ||
63 | |||
64 | Version 0.01: Markus: initial release | ||
65 | |||
66 | */ | ||
67 | |||
68 | |||
69 | #include <linux/kernel.h> | ||
70 | #include <linux/module.h> | ||
71 | #include <linux/init.h> | ||
72 | #include <linux/slab.h> | ||
73 | #include <linux/input.h> | ||
74 | #include <linux/videodev.h> | ||
75 | #include <media/v4l2-common.h> | ||
76 | #include <linux/usb.h> | ||
77 | #include <linux/smp_lock.h> | ||
78 | |||
79 | /* | ||
80 | * Version Information | ||
81 | */ | ||
82 | #define DRIVER_VERSION "v0.40" | ||
83 | #define DRIVER_AUTHOR "Markus Demleitner <msdemlei@tucana.harvard.edu>" | ||
84 | #define DRIVER_DESC "D-Link DSB-R100 USB FM radio driver" | ||
85 | |||
86 | #define DSB100_VENDOR 0x04b4 | ||
87 | #define DSB100_PRODUCT 0x1002 | ||
88 | |||
89 | /* Commands the device appears to understand */ | ||
90 | #define DSB100_TUNE 1 | ||
91 | #define DSB100_ONOFF 2 | ||
92 | |||
93 | #define TB_LEN 16 | ||
94 | |||
95 | /* Frequency limits in MHz -- these are European values. For Japanese | ||
96 | devices, that would be 76 and 91. */ | ||
97 | #define FREQ_MIN 87.5 | ||
98 | #define FREQ_MAX 108.0 | ||
99 | #define FREQ_MUL 16000 | ||
100 | |||
101 | |||
102 | static int usb_dsbr100_probe(struct usb_interface *intf, | ||
103 | const struct usb_device_id *id); | ||
104 | static void usb_dsbr100_disconnect(struct usb_interface *intf); | ||
105 | static int usb_dsbr100_ioctl(struct inode *inode, struct file *file, | ||
106 | unsigned int cmd, unsigned long arg); | ||
107 | static int usb_dsbr100_open(struct inode *inode, struct file *file); | ||
108 | static int usb_dsbr100_close(struct inode *inode, struct file *file); | ||
109 | |||
110 | static int radio_nr = -1; | ||
111 | module_param(radio_nr, int, 0); | ||
112 | |||
113 | /* Data for one (physical) device */ | ||
114 | typedef struct { | ||
115 | struct usb_device *usbdev; | ||
116 | struct video_device *videodev; | ||
117 | unsigned char transfer_buffer[TB_LEN]; | ||
118 | int curfreq; | ||
119 | int stereo; | ||
120 | int users; | ||
121 | int removed; | ||
122 | } dsbr100_device; | ||
123 | |||
124 | |||
125 | /* File system interface */ | ||
126 | static struct file_operations usb_dsbr100_fops = { | ||
127 | .owner = THIS_MODULE, | ||
128 | .open = usb_dsbr100_open, | ||
129 | .release = usb_dsbr100_close, | ||
130 | .ioctl = usb_dsbr100_ioctl, | ||
131 | .compat_ioctl = v4l_compat_ioctl32, | ||
132 | .llseek = no_llseek, | ||
133 | }; | ||
134 | |||
135 | /* V4L interface */ | ||
136 | static struct video_device dsbr100_videodev_template= | ||
137 | { | ||
138 | .owner = THIS_MODULE, | ||
139 | .name = "D-Link DSB-R 100", | ||
140 | .type = VID_TYPE_TUNER, | ||
141 | .hardware = VID_HARDWARE_AZTECH, | ||
142 | .fops = &usb_dsbr100_fops, | ||
143 | .release = video_device_release, | ||
144 | }; | ||
145 | |||
146 | static struct usb_device_id usb_dsbr100_device_table [] = { | ||
147 | { USB_DEVICE(DSB100_VENDOR, DSB100_PRODUCT) }, | ||
148 | { } /* Terminating entry */ | ||
149 | }; | ||
150 | |||
151 | MODULE_DEVICE_TABLE (usb, usb_dsbr100_device_table); | ||
152 | |||
153 | /* USB subsystem interface */ | ||
154 | static struct usb_driver usb_dsbr100_driver = { | ||
155 | .name = "dsbr100", | ||
156 | .probe = usb_dsbr100_probe, | ||
157 | .disconnect = usb_dsbr100_disconnect, | ||
158 | .id_table = usb_dsbr100_device_table, | ||
159 | }; | ||
160 | |||
161 | /* Low-level device interface begins here */ | ||
162 | |||
163 | /* switch on radio */ | ||
164 | static int dsbr100_start(dsbr100_device *radio) | ||
165 | { | ||
166 | if (usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0), | ||
167 | USB_REQ_GET_STATUS, | ||
168 | USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, | ||
169 | 0x00, 0xC7, radio->transfer_buffer, 8, 300)<0 || | ||
170 | usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0), | ||
171 | DSB100_ONOFF, | ||
172 | USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, | ||
173 | 0x01, 0x00, radio->transfer_buffer, 8, 300)<0) | ||
174 | return -1; | ||
175 | return (radio->transfer_buffer)[0]; | ||
176 | } | ||
177 | |||
178 | |||
179 | /* switch off radio */ | ||
180 | static int dsbr100_stop(dsbr100_device *radio) | ||
181 | { | ||
182 | if (usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0), | ||
183 | USB_REQ_GET_STATUS, | ||
184 | USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, | ||
185 | 0x16, 0x1C, radio->transfer_buffer, 8, 300)<0 || | ||
186 | usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0), | ||
187 | DSB100_ONOFF, | ||
188 | USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, | ||
189 | 0x00, 0x00, radio->transfer_buffer, 8, 300)<0) | ||
190 | return -1; | ||
191 | return (radio->transfer_buffer)[0]; | ||
192 | } | ||
193 | |||
194 | /* set a frequency, freq is defined by v4l's TUNER_LOW, i.e. 1/16th kHz */ | ||
195 | static int dsbr100_setfreq(dsbr100_device *radio, int freq) | ||
196 | { | ||
197 | freq = (freq/16*80)/1000+856; | ||
198 | if (usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0), | ||
199 | DSB100_TUNE, | ||
200 | USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, | ||
201 | (freq>>8)&0x00ff, freq&0xff, | ||
202 | radio->transfer_buffer, 8, 300)<0 || | ||
203 | usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0), | ||
204 | USB_REQ_GET_STATUS, | ||
205 | USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, | ||
206 | 0x96, 0xB7, radio->transfer_buffer, 8, 300)<0 || | ||
207 | usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0), | ||
208 | USB_REQ_GET_STATUS, | ||
209 | USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, | ||
210 | 0x00, 0x24, radio->transfer_buffer, 8, 300)<0) { | ||
211 | radio->stereo = -1; | ||
212 | return -1; | ||
213 | } | ||
214 | radio->stereo = ! ((radio->transfer_buffer)[0]&0x01); | ||
215 | return (radio->transfer_buffer)[0]; | ||
216 | } | ||
217 | |||
218 | /* return the device status. This is, in effect, just whether it | ||
219 | sees a stereo signal or not. Pity. */ | ||
220 | static void dsbr100_getstat(dsbr100_device *radio) | ||
221 | { | ||
222 | if (usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0), | ||
223 | USB_REQ_GET_STATUS, | ||
224 | USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, | ||
225 | 0x00 , 0x24, radio->transfer_buffer, 8, 300)<0) | ||
226 | radio->stereo = -1; | ||
227 | else | ||
228 | radio->stereo = ! (radio->transfer_buffer[0]&0x01); | ||
229 | } | ||
230 | |||
231 | |||
232 | /* USB subsystem interface begins here */ | ||
233 | |||
234 | /* check if the device is present and register with v4l and | ||
235 | usb if it is */ | ||
236 | static int usb_dsbr100_probe(struct usb_interface *intf, | ||
237 | const struct usb_device_id *id) | ||
238 | { | ||
239 | dsbr100_device *radio; | ||
240 | |||
241 | if (!(radio = kmalloc(sizeof(dsbr100_device), GFP_KERNEL))) | ||
242 | return -ENOMEM; | ||
243 | if (!(radio->videodev = video_device_alloc())) { | ||
244 | kfree(radio); | ||
245 | return -ENOMEM; | ||
246 | } | ||
247 | memcpy(radio->videodev, &dsbr100_videodev_template, | ||
248 | sizeof(dsbr100_videodev_template)); | ||
249 | radio->removed = 0; | ||
250 | radio->users = 0; | ||
251 | radio->usbdev = interface_to_usbdev(intf); | ||
252 | radio->curfreq = FREQ_MIN*FREQ_MUL; | ||
253 | video_set_drvdata(radio->videodev, radio); | ||
254 | if (video_register_device(radio->videodev, VFL_TYPE_RADIO, | ||
255 | radio_nr)) { | ||
256 | warn("Could not register video device"); | ||
257 | video_device_release(radio->videodev); | ||
258 | kfree(radio); | ||
259 | return -EIO; | ||
260 | } | ||
261 | usb_set_intfdata(intf, radio); | ||
262 | return 0; | ||
263 | } | ||
264 | |||
265 | /* handle unplugging of the device, release data structures | ||
266 | if nothing keeps us from doing it. If something is still | ||
267 | keeping us busy, the release callback of v4l will take care | ||
268 | of releasing it. stv680.c does not relase its private | ||
269 | data, so I don't do this here either. Checking out the | ||
270 | code I'd expect I better did that, but if there's a memory | ||
271 | leak here it's tiny (~50 bytes per disconnect) */ | ||
272 | static void usb_dsbr100_disconnect(struct usb_interface *intf) | ||
273 | { | ||
274 | dsbr100_device *radio = usb_get_intfdata(intf); | ||
275 | |||
276 | usb_set_intfdata (intf, NULL); | ||
277 | if (radio) { | ||
278 | video_unregister_device(radio->videodev); | ||
279 | radio->videodev = NULL; | ||
280 | if (radio->users) { | ||
281 | kfree(radio); | ||
282 | } else { | ||
283 | radio->removed = 1; | ||
284 | } | ||
285 | } | ||
286 | } | ||
287 | |||
288 | |||
289 | /* Video for Linux interface */ | ||
290 | |||
291 | static int usb_dsbr100_do_ioctl(struct inode *inode, struct file *file, | ||
292 | unsigned int cmd, void *arg) | ||
293 | { | ||
294 | dsbr100_device *radio=video_get_drvdata(video_devdata(file)); | ||
295 | |||
296 | if (!radio) | ||
297 | return -EIO; | ||
298 | |||
299 | switch(cmd) { | ||
300 | case VIDIOCGCAP: { | ||
301 | struct video_capability *v = arg; | ||
302 | |||
303 | memset(v, 0, sizeof(*v)); | ||
304 | v->type = VID_TYPE_TUNER; | ||
305 | v->channels = 1; | ||
306 | v->audios = 1; | ||
307 | strcpy(v->name, "D-Link R-100 USB FM Radio"); | ||
308 | return 0; | ||
309 | } | ||
310 | case VIDIOCGTUNER: { | ||
311 | struct video_tuner *v = arg; | ||
312 | |||
313 | dsbr100_getstat(radio); | ||
314 | if(v->tuner) /* Only 1 tuner */ | ||
315 | return -EINVAL; | ||
316 | v->rangelow = FREQ_MIN*FREQ_MUL; | ||
317 | v->rangehigh = FREQ_MAX*FREQ_MUL; | ||
318 | v->flags = VIDEO_TUNER_LOW; | ||
319 | v->mode = VIDEO_MODE_AUTO; | ||
320 | v->signal = radio->stereo*0x7000; | ||
321 | /* Don't know how to get signal strength */ | ||
322 | v->flags |= VIDEO_TUNER_STEREO_ON*radio->stereo; | ||
323 | strcpy(v->name, "DSB R-100"); | ||
324 | return 0; | ||
325 | } | ||
326 | case VIDIOCSTUNER: { | ||
327 | struct video_tuner *v = arg; | ||
328 | |||
329 | if(v->tuner!=0) | ||
330 | return -EINVAL; | ||
331 | /* Only 1 tuner so no setting needed ! */ | ||
332 | return 0; | ||
333 | } | ||
334 | case VIDIOCGFREQ: { | ||
335 | int *freq = arg; | ||
336 | |||
337 | if (radio->curfreq==-1) | ||
338 | return -EINVAL; | ||
339 | *freq = radio->curfreq; | ||
340 | return 0; | ||
341 | } | ||
342 | case VIDIOCSFREQ: { | ||
343 | int *freq = arg; | ||
344 | |||
345 | radio->curfreq = *freq; | ||
346 | if (dsbr100_setfreq(radio, radio->curfreq)==-1) | ||
347 | warn("Set frequency failed"); | ||
348 | return 0; | ||
349 | } | ||
350 | case VIDIOCGAUDIO: { | ||
351 | struct video_audio *v = arg; | ||
352 | |||
353 | memset(v, 0, sizeof(*v)); | ||
354 | v->flags |= VIDEO_AUDIO_MUTABLE; | ||
355 | v->mode = VIDEO_SOUND_STEREO; | ||
356 | v->volume = 1; | ||
357 | v->step = 1; | ||
358 | strcpy(v->name, "Radio"); | ||
359 | return 0; | ||
360 | } | ||
361 | case VIDIOCSAUDIO: { | ||
362 | struct video_audio *v = arg; | ||
363 | |||
364 | if (v->audio) | ||
365 | return -EINVAL; | ||
366 | if (v->flags&VIDEO_AUDIO_MUTE) { | ||
367 | if (dsbr100_stop(radio)==-1) | ||
368 | warn("Radio did not respond properly"); | ||
369 | } | ||
370 | else | ||
371 | if (dsbr100_start(radio)==-1) | ||
372 | warn("Radio did not respond properly"); | ||
373 | return 0; | ||
374 | } | ||
375 | default: | ||
376 | return -ENOIOCTLCMD; | ||
377 | } | ||
378 | } | ||
379 | |||
380 | static int usb_dsbr100_ioctl(struct inode *inode, struct file *file, | ||
381 | unsigned int cmd, unsigned long arg) | ||
382 | { | ||
383 | return video_usercopy(inode, file, cmd, arg, usb_dsbr100_do_ioctl); | ||
384 | } | ||
385 | |||
386 | static int usb_dsbr100_open(struct inode *inode, struct file *file) | ||
387 | { | ||
388 | dsbr100_device *radio=video_get_drvdata(video_devdata(file)); | ||
389 | |||
390 | radio->users = 1; | ||
391 | if (dsbr100_start(radio)<0) { | ||
392 | warn("Radio did not start up properly"); | ||
393 | radio->users = 0; | ||
394 | return -EIO; | ||
395 | } | ||
396 | dsbr100_setfreq(radio, radio->curfreq); | ||
397 | return 0; | ||
398 | } | ||
399 | |||
400 | static int usb_dsbr100_close(struct inode *inode, struct file *file) | ||
401 | { | ||
402 | dsbr100_device *radio=video_get_drvdata(video_devdata(file)); | ||
403 | |||
404 | if (!radio) | ||
405 | return -ENODEV; | ||
406 | radio->users = 0; | ||
407 | if (radio->removed) { | ||
408 | kfree(radio); | ||
409 | } | ||
410 | return 0; | ||
411 | } | ||
412 | |||
413 | static int __init dsbr100_init(void) | ||
414 | { | ||
415 | int retval = usb_register(&usb_dsbr100_driver); | ||
416 | info(DRIVER_VERSION ":" DRIVER_DESC); | ||
417 | return retval; | ||
418 | } | ||
419 | |||
420 | static void __exit dsbr100_exit(void) | ||
421 | { | ||
422 | usb_deregister(&usb_dsbr100_driver); | ||
423 | } | ||
424 | |||
425 | module_init (dsbr100_init); | ||
426 | module_exit (dsbr100_exit); | ||
427 | |||
428 | MODULE_AUTHOR( DRIVER_AUTHOR ); | ||
429 | MODULE_DESCRIPTION( DRIVER_DESC ); | ||
430 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/media/video/msp3400-kthreads.c b/drivers/media/video/msp3400-kthreads.c index f2fd9195b3ac..ed02ff811388 100644 --- a/drivers/media/video/msp3400-kthreads.c +++ b/drivers/media/video/msp3400-kthreads.c | |||
@@ -961,10 +961,10 @@ int msp34xxg_thread(void *data) | |||
961 | /* setup the chip*/ | 961 | /* setup the chip*/ |
962 | msp34xxg_reset(client); | 962 | msp34xxg_reset(client); |
963 | state->std = state->radio ? 0x40 : msp_standard; | 963 | state->std = state->radio ? 0x40 : msp_standard; |
964 | if (state->std != 1) | ||
965 | goto unmute; | ||
966 | /* start autodetect */ | 964 | /* start autodetect */ |
967 | msp_write_dem(client, 0x20, state->std); | 965 | msp_write_dem(client, 0x20, state->std); |
966 | if (state->std != 1) | ||
967 | goto unmute; | ||
968 | 968 | ||
969 | /* watch autodetect */ | 969 | /* watch autodetect */ |
970 | v4l_dbg(1, msp_debug, client, "started autodetect, waiting for result\n"); | 970 | v4l_dbg(1, msp_debug, client, "started autodetect, waiting for result\n"); |
diff --git a/drivers/media/video/pwc/Kconfig b/drivers/media/video/pwc/Kconfig index 697145e0bf15..8fdf7101d3bf 100644 --- a/drivers/media/video/pwc/Kconfig +++ b/drivers/media/video/pwc/Kconfig | |||
@@ -30,7 +30,7 @@ config USB_PWC | |||
30 | 30 | ||
31 | config USB_PWC_DEBUG | 31 | config USB_PWC_DEBUG |
32 | bool "USB Philips Cameras verbose debug" | 32 | bool "USB Philips Cameras verbose debug" |
33 | depends USB_PWC | 33 | depends on USB_PWC |
34 | help | 34 | help |
35 | Say Y here in order to have the pwc driver generate verbose debugging | 35 | Say Y here in order to have the pwc driver generate verbose debugging |
36 | messages. | 36 | messages. |
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index 47d0d83a0264..d4703944df9c 100644 --- a/drivers/media/video/pwc/pwc-if.c +++ b/drivers/media/video/pwc/pwc-if.c | |||
@@ -160,6 +160,7 @@ static struct file_operations pwc_fops = { | |||
160 | .poll = pwc_video_poll, | 160 | .poll = pwc_video_poll, |
161 | .mmap = pwc_video_mmap, | 161 | .mmap = pwc_video_mmap, |
162 | .ioctl = pwc_video_ioctl, | 162 | .ioctl = pwc_video_ioctl, |
163 | .compat_ioctl = v4l_compat_ioctl32, | ||
163 | .llseek = no_llseek, | 164 | .llseek = no_llseek, |
164 | }; | 165 | }; |
165 | static struct video_device pwc_template = { | 166 | static struct video_device pwc_template = { |
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index 8656f2400e18..2c171af9a9f2 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c | |||
@@ -2087,7 +2087,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file, | |||
2087 | struct v4l2_format *f = arg; | 2087 | struct v4l2_format *f = arg; |
2088 | return saa7134_try_fmt(dev,fh,f); | 2088 | return saa7134_try_fmt(dev,fh,f); |
2089 | } | 2089 | } |
2090 | #ifdef CONFIG_V4L1_COMPAT | 2090 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
2091 | case VIDIOCGMBUF: | 2091 | case VIDIOCGMBUF: |
2092 | { | 2092 | { |
2093 | struct video_mbuf *mbuf = arg; | 2093 | struct video_mbuf *mbuf = arg; |
diff --git a/drivers/media/video/tuner-types.c b/drivers/media/video/tuner-types.c index a167e17c6dcd..d7eadc2c298d 100644 --- a/drivers/media/video/tuner-types.c +++ b/drivers/media/video/tuner-types.c | |||
@@ -1027,10 +1027,11 @@ static struct tuner_params tuner_tnf_5335mf_params[] = { | |||
1027 | /* 70-79 */ | 1027 | /* 70-79 */ |
1028 | /* ------------ TUNER_SAMSUNG_TCPN_2121P30A - Samsung NTSC ------------ */ | 1028 | /* ------------ TUNER_SAMSUNG_TCPN_2121P30A - Samsung NTSC ------------ */ |
1029 | 1029 | ||
1030 | /* '+ 4' turns on the Low Noise Amplifier */ | ||
1030 | static struct tuner_range tuner_samsung_tcpn_2121p30a_ntsc_ranges[] = { | 1031 | static struct tuner_range tuner_samsung_tcpn_2121p30a_ntsc_ranges[] = { |
1031 | { 16 * 130.00 /*MHz*/, 0xce, 0x01, }, | 1032 | { 16 * 130.00 /*MHz*/, 0xce, 0x01 + 4, }, |
1032 | { 16 * 364.50 /*MHz*/, 0xce, 0x02, }, | 1033 | { 16 * 364.50 /*MHz*/, 0xce, 0x02 + 4, }, |
1033 | { 16 * 999.99 , 0xce, 0x08, }, | 1034 | { 16 * 999.99 , 0xce, 0x08 + 4, }, |
1034 | }; | 1035 | }; |
1035 | 1036 | ||
1036 | static struct tuner_params tuner_samsung_tcpn_2121p30a_params[] = { | 1037 | static struct tuner_params tuner_samsung_tcpn_2121p30a_params[] = { |
@@ -1060,10 +1061,11 @@ static struct tuner_params tuner_thomson_fe6600_params[] = { | |||
1060 | 1061 | ||
1061 | /* ------------ TUNER_SAMSUNG_TCPG_6121P30A - Samsung PAL ------------ */ | 1062 | /* ------------ TUNER_SAMSUNG_TCPG_6121P30A - Samsung PAL ------------ */ |
1062 | 1063 | ||
1064 | /* '+ 4' turns on the Low Noise Amplifier */ | ||
1063 | static struct tuner_range tuner_samsung_tcpg_6121p30a_pal_ranges[] = { | 1065 | static struct tuner_range tuner_samsung_tcpg_6121p30a_pal_ranges[] = { |
1064 | { 16 * 146.25 /*MHz*/, 0xce, 0x01, }, | 1066 | { 16 * 146.25 /*MHz*/, 0xce, 0x01 + 4, }, |
1065 | { 16 * 428.50 /*MHz*/, 0xce, 0x02, }, | 1067 | { 16 * 428.50 /*MHz*/, 0xce, 0x02 + 4, }, |
1066 | { 16 * 999.99 , 0xce, 0x08, }, | 1068 | { 16 * 999.99 , 0xce, 0x08 + 4, }, |
1067 | }; | 1069 | }; |
1068 | 1070 | ||
1069 | static struct tuner_params tuner_samsung_tcpg_6121p30a_params[] = { | 1071 | static struct tuner_params tuner_samsung_tcpg_6121p30a_params[] = { |
diff --git a/drivers/media/video/v4l1-compat.c b/drivers/media/video/v4l1-compat.c index d83a2c84d233..d7c3fcbc80f7 100644 --- a/drivers/media/video/v4l1-compat.c +++ b/drivers/media/video/v4l1-compat.c | |||
@@ -599,6 +599,10 @@ v4l_compat_translate_ioctl(struct inode *inode, | |||
599 | dprintk("VIDIOCGPICT / VIDIOC_G_FMT: %d\n",err); | 599 | dprintk("VIDIOCGPICT / VIDIOC_G_FMT: %d\n",err); |
600 | break; | 600 | break; |
601 | } | 601 | } |
602 | |||
603 | pict->depth = ((fmt2->fmt.pix.bytesperline<<3) | ||
604 | + (fmt2->fmt.pix.width-1) ) | ||
605 | /fmt2->fmt.pix.width; | ||
602 | pict->palette = pixelformat_to_palette( | 606 | pict->palette = pixelformat_to_palette( |
603 | fmt2->fmt.pix.pixelformat); | 607 | fmt2->fmt.pix.pixelformat); |
604 | break; | 608 | break; |
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index 2ecbeffb559e..8d972ffdaf98 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c | |||
@@ -202,7 +202,7 @@ static char *v4l2_memory_names[] = { | |||
202 | /* ------------------------------------------------------------------ */ | 202 | /* ------------------------------------------------------------------ */ |
203 | /* debug help functions */ | 203 | /* debug help functions */ |
204 | 204 | ||
205 | #ifdef CONFIG_V4L1_COMPAT | 205 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
206 | static const char *v4l1_ioctls[] = { | 206 | static const char *v4l1_ioctls[] = { |
207 | [_IOC_NR(VIDIOCGCAP)] = "VIDIOCGCAP", | 207 | [_IOC_NR(VIDIOCGCAP)] = "VIDIOCGCAP", |
208 | [_IOC_NR(VIDIOCGCHAN)] = "VIDIOCGCHAN", | 208 | [_IOC_NR(VIDIOCGCHAN)] = "VIDIOCGCHAN", |
@@ -301,7 +301,7 @@ static const char *v4l2_ioctls[] = { | |||
301 | #define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls) | 301 | #define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls) |
302 | 302 | ||
303 | static const char *v4l2_int_ioctls[] = { | 303 | static const char *v4l2_int_ioctls[] = { |
304 | #ifdef CONFIG_V4L1_COMPAT | 304 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
305 | [_IOC_NR(DECODER_GET_CAPABILITIES)] = "DECODER_GET_CAPABILITIES", | 305 | [_IOC_NR(DECODER_GET_CAPABILITIES)] = "DECODER_GET_CAPABILITIES", |
306 | [_IOC_NR(DECODER_GET_STATUS)] = "DECODER_GET_STATUS", | 306 | [_IOC_NR(DECODER_GET_STATUS)] = "DECODER_GET_STATUS", |
307 | [_IOC_NR(DECODER_SET_NORM)] = "DECODER_SET_NORM", | 307 | [_IOC_NR(DECODER_SET_NORM)] = "DECODER_SET_NORM", |
@@ -367,7 +367,7 @@ void v4l_printk_ioctl(unsigned int cmd) | |||
367 | (_IOC_NR(cmd) < V4L2_INT_IOCTLS) ? | 367 | (_IOC_NR(cmd) < V4L2_INT_IOCTLS) ? |
368 | v4l2_int_ioctls[_IOC_NR(cmd)] : "UNKNOWN", dir, cmd); | 368 | v4l2_int_ioctls[_IOC_NR(cmd)] : "UNKNOWN", dir, cmd); |
369 | break; | 369 | break; |
370 | #ifdef CONFIG_V4L1_COMPAT | 370 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
371 | case 'v': | 371 | case 'v': |
372 | printk("v4l1 ioctl %s, dir=%s (0x%08x)\n", | 372 | printk("v4l1 ioctl %s, dir=%s (0x%08x)\n", |
373 | (_IOC_NR(cmd) < V4L1_IOCTLS) ? | 373 | (_IOC_NR(cmd) < V4L1_IOCTLS) ? |
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c index 0fc90cd393f6..88bf2af2a0e7 100644 --- a/drivers/media/video/videodev.c +++ b/drivers/media/video/videodev.c | |||
@@ -760,7 +760,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, | |||
760 | ret=vfd->vidioc_overlay(file, fh, *i); | 760 | ret=vfd->vidioc_overlay(file, fh, *i); |
761 | break; | 761 | break; |
762 | } | 762 | } |
763 | #ifdef CONFIG_V4L1_COMPAT | 763 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
764 | /* --- streaming capture ------------------------------------- */ | 764 | /* --- streaming capture ------------------------------------- */ |
765 | case VIDIOCGMBUF: | 765 | case VIDIOCGMBUF: |
766 | { | 766 | { |
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index 38bd0c1018c2..841884af0cc0 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c | |||
@@ -986,7 +986,7 @@ static int vidioc_dqbuf (struct file *file, void *priv, struct v4l2_buffer *p) | |||
986 | file->f_flags & O_NONBLOCK)); | 986 | file->f_flags & O_NONBLOCK)); |
987 | } | 987 | } |
988 | 988 | ||
989 | #ifdef CONFIG_V4L1_COMPAT | 989 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
990 | static int vidiocgmbuf (struct file *file, void *priv, struct video_mbuf *mbuf) | 990 | static int vidiocgmbuf (struct file *file, void *priv, struct video_mbuf *mbuf) |
991 | { | 991 | { |
992 | struct vivi_fh *fh=priv; | 992 | struct vivi_fh *fh=priv; |
@@ -1328,7 +1328,7 @@ static struct video_device vivi = { | |||
1328 | .vidioc_s_ctrl = vidioc_s_ctrl, | 1328 | .vidioc_s_ctrl = vidioc_s_ctrl, |
1329 | .vidioc_streamon = vidioc_streamon, | 1329 | .vidioc_streamon = vidioc_streamon, |
1330 | .vidioc_streamoff = vidioc_streamoff, | 1330 | .vidioc_streamoff = vidioc_streamoff, |
1331 | #ifdef CONFIG_V4L1_COMPAT | 1331 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
1332 | .vidiocgmbuf = vidiocgmbuf, | 1332 | .vidiocgmbuf = vidiocgmbuf, |
1333 | #endif | 1333 | #endif |
1334 | .tvnorms = tvnorms, | 1334 | .tvnorms = tvnorms, |