Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb

* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
V4L/DVB (5023): Fix compilation on ppc32 architecture
V4L/DVB (5071): Tveeprom: autodetect LG TAPC G701D as tuner type 37
V4L/DVB (5069): Fix bttv and friends on 64bit machines with lots of memory
V4L/DVB (5033): MSI TV@nywhere Plus fixes
V4L/DVB (5029): Ks0127 status flags
V4L/DVB (5024): Fix quickcam communicator driver for big endian architectures
V4L/DVB (5021): Cx88xx: Fix lockup on suspend
V4L/DVB (5020): Fix: disable interrupts while at KM_BOUNCE_READ
V4L/DVB (5019): Fix the frame->grabstate update in read() entry point.

+43 -27
+2
drivers/media/video/cx88/cx88-tvaudio.c
··· 38 38 #include <linux/module.h> 39 39 #include <linux/moduleparam.h> 40 40 #include <linux/errno.h> 41 + #include <linux/freezer.h> 41 42 #include <linux/kernel.h> 42 43 #include <linux/slab.h> 43 44 #include <linux/mm.h> ··· 962 961 msleep_interruptible(1000); 963 962 if (kthread_should_stop()) 964 963 break; 964 + try_to_freeze(); 965 965 966 966 /* just monitor the audio status for now ... */ 967 967 memset(&t, 0, sizeof(t));
+4 -4
drivers/media/video/ks0127.c
··· 712 712 *iarg = 0; 713 713 status = ks0127_read(ks, KS_STAT); 714 714 if (!(status & 0x20)) /* NOVID not set */ 715 - *iarg = (*iarg & DECODER_STATUS_GOOD); 715 + *iarg = (*iarg | DECODER_STATUS_GOOD); 716 716 if ((status & 0x01)) /* CLOCK set */ 717 - *iarg = (*iarg & DECODER_STATUS_COLOR); 717 + *iarg = (*iarg | DECODER_STATUS_COLOR); 718 718 if ((status & 0x08)) /* PALDET set */ 719 - *iarg = (*iarg & DECODER_STATUS_PAL); 719 + *iarg = (*iarg | DECODER_STATUS_PAL); 720 720 else 721 - *iarg = (*iarg & DECODER_STATUS_NTSC); 721 + *iarg = (*iarg | DECODER_STATUS_NTSC); 722 722 break; 723 723 724 724 //Catch any unknown command
+10 -4
drivers/media/video/saa7134/saa7134-cards.c
··· 2570 2570 .radio_type = UNSET, 2571 2571 .tuner_addr = ADDR_UNSET, 2572 2572 .radio_addr = ADDR_UNSET, 2573 + .gpiomask = 1 << 21, 2573 2574 .inputs = {{ 2574 2575 .name = name_tv, 2575 2576 .vmux = 1, ··· 2579 2578 },{ 2580 2579 .name = name_comp1, 2581 2580 .vmux = 3, 2582 - .amux = LINE1, 2581 + .amux = LINE2, /* unconfirmed, taken from Philips driver */ 2582 + },{ 2583 + .name = name_comp2, 2584 + .vmux = 0, /* untested, Composite over S-Video */ 2585 + .amux = LINE2, 2583 2586 },{ 2584 2587 .name = name_svideo, 2585 - .vmux = 0, 2586 - .amux = LINE1, 2588 + .vmux = 8, 2589 + .amux = LINE2, 2587 2590 }}, 2588 2591 .radio = { 2589 2592 .name = name_radio, 2590 - .amux = LINE1, 2593 + .amux = TV, 2594 + .gpio = 0x0200000, 2591 2595 }, 2592 2596 }, 2593 2597 [SAA7134_BOARD_CINERGY250PCI] = {
+1 -1
drivers/media/video/tveeprom.c
··· 184 184 { TUNER_ABSENT, "Thompson DTT757"}, 185 185 /* 80-89 */ 186 186 { TUNER_ABSENT, "Philips FQ1216LME MK3"}, 187 - { TUNER_ABSENT, "LG TAPC G701D"}, 187 + { TUNER_LG_PAL_NEW_TAPC, "LG TAPC G701D"}, 188 188 { TUNER_LG_NTSC_NEW_TAPC, "LG TAPC H791F"}, 189 189 { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MB 3"}, 190 190 { TUNER_LG_PAL_NEW_TAPC, "TCL 2002MI 3"},
-14
drivers/media/video/usbvideo/quickcam_messenger.h
··· 35 35 }; 36 36 37 37 struct bayL0 { 38 - #ifdef __BIG_ENDIAN 39 - u8 r; 40 - u8 g; 41 - #elif __LITTLE_ENDIAN 42 38 u8 g; 43 39 u8 r; 44 - #else 45 - #error not byte order defined 46 - #endif 47 40 }; 48 41 49 42 struct bayL1 { 50 - #ifdef __BIG_ENDIAN 51 - u8 g; 52 - u8 b; 53 - #elif __LITTLE_ENDIAN 54 43 u8 b; 55 44 u8 g; 56 - #else 57 - #error not byte order defined 58 - #endif 59 45 }; 60 46 61 47 struct cam_size {
+1 -2
drivers/media/video/usbvision/usbvision-video.c
··· 1080 1080 int noblock = file->f_flags & O_NONBLOCK; 1081 1081 unsigned long lock_flags; 1082 1082 1083 - int frmx = -1; 1084 1083 int ret,i; 1085 1084 struct usbvision_frame *frame; 1086 1085 ··· 1154 1155 frame->bytes_read = 0; 1155 1156 1156 1157 /* Mark it as available to be used again. */ 1157 - usbvision->frame[frmx].grabstate = FrameState_Unused; 1158 + frame->grabstate = FrameState_Unused; 1158 1159 /* } */ 1159 1160 1160 1161 return count;
+8 -1
drivers/media/video/v4l2-common.c
··· 90 90 char *v4l2_norm_to_name(v4l2_std_id id) 91 91 { 92 92 char *name; 93 + u32 myid = id; 93 94 94 - switch (id) { 95 + /* HACK: ppc32 architecture doesn't have __ucmpdi2 function to handle 96 + 64 bit comparations. So, on that architecture, with some gcc variants, 97 + compilation fails. Currently, the max value is 30bit wide. 98 + */ 99 + BUG_ON(myid != id); 100 + 101 + switch (myid) { 95 102 case V4L2_STD_PAL: 96 103 name="PAL"; break; 97 104 case V4L2_STD_PAL_BG:
+1 -1
drivers/media/video/video-buf.c
··· 1229 1229 vaddr,vma->vm_start,vma->vm_end); 1230 1230 if (vaddr > vma->vm_end) 1231 1231 return NOPAGE_SIGBUS; 1232 - page = alloc_page(GFP_USER); 1232 + page = alloc_page(GFP_USER | __GFP_DMA32); 1233 1233 if (!page) 1234 1234 return NOPAGE_OOM; 1235 1235 clear_user_page(page_address(page), vaddr, page);
+7
drivers/media/video/vivi.c
··· 270 270 char *p,*s,*basep; 271 271 struct page *pg; 272 272 u8 chr,r,g,b,color; 273 + unsigned long flags; 274 + spinlock_t spinlock; 275 + 276 + spin_lock_init(&spinlock); 273 277 274 278 /* Get first addr pointed to pixel position */ 275 279 oldpg=get_addr_pos(pos,pages,to_addr); 276 280 pg=pfn_to_page(sg_dma_address(to_addr[oldpg].sg) >> PAGE_SHIFT); 281 + spin_lock_irqsave(&spinlock,flags); 277 282 basep = kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[oldpg].sg->offset; 278 283 279 284 /* We will just duplicate the second pixel at the packet */ ··· 381 376 382 377 end: 383 378 kunmap_atomic(basep, KM_BOUNCE_READ); 379 + spin_unlock_irqrestore(&spinlock,flags); 380 + 384 381 } 385 382 static void vivi_fillbuff(struct vivi_dev *dev,struct vivi_buffer *buf) 386 383 {
+9
include/linux/videodev2.h
··· 662 662 #define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000) 663 663 #define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000) 664 664 665 + /* FIXME: 666 + Although std_id is 64 bits, there is an issue on PPC32 architecture that 667 + makes switch(__u64) to break. So, there's a hack on v4l2-common.c rounding 668 + this value to 32 bits. 669 + As, currently, the max value is for V4L2_STD_ATSC_16_VSB (30 bits wide), 670 + it should work fine. However, if needed to add more than two standards, 671 + v4l2-common.c should be fixed. 672 + */ 673 + 665 674 /* some merged standards */ 666 675 #define V4L2_STD_MN (V4L2_STD_PAL_M|V4L2_STD_PAL_N|V4L2_STD_PAL_Nc|V4L2_STD_NTSC) 667 676 #define V4L2_STD_B (V4L2_STD_PAL_B|V4L2_STD_PAL_B1|V4L2_STD_SECAM_B)