diff options
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-video.c | 41 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-oss.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/tda9887.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/video-buf.c | 5 | ||||
-rw-r--r-- | linux/include/linux/videodev2.h | 7 |
5 files changed, 36 insertions, 23 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 261200228..7d416d44a 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -194,8 +194,13 @@ static struct cx8800_tvnorm tvnorms[] = { .cxiformat = VideoFormatPAL60, .cxoformat = 0x181f0008, },{ - .name = "SECAM", - .id = V4L2_STD_SECAM, + .name = "SECAM-L", + .id = V4L2_STD_SECAM_L, + .cxiformat = VideoFormatSECAM, + .cxoformat = 0x181f0008, + },{ + .name = "SECAM-DK", + .id = V4L2_STD_SECAM_DK, .cxiformat = VideoFormatSECAM, .cxoformat = 0x181f0008, } @@ -483,26 +488,28 @@ static int set_tvaudio(struct cx8800_dev *dev) if (CX88_VMUX_TELEVISION != INPUT(dev->input)->type) return 0; - switch (dev->tvnorm->id) { - case V4L2_STD_PAL_BG: + if (V4L2_STD_PAL_BG & dev->tvnorm->id) { dev->tvaudio = nicam ? WW_NICAM_BGDKL : WW_A2_BG; - break; - case V4L2_STD_PAL_DK: + + } else if (V4L2_STD_PAL_DK & dev->tvnorm->id) { dev->tvaudio = nicam ? WW_NICAM_BGDKL : WW_A2_DK; - break; - case V4L2_STD_PAL_I: + + } else if (V4L2_STD_PAL_I & dev->tvnorm->id) { dev->tvaudio = WW_NICAM_I; - break; - case V4L2_STD_SECAM: - dev->tvaudio = WW_SYSTEM_L_AM; /* FIXME: fr != ru */ - break; - case V4L2_STD_NTSC_M: + + } else if (V4L2_STD_SECAM_L & dev->tvnorm->id) { + dev->tvaudio = WW_SYSTEM_L_AM; + + } else if (V4L2_STD_SECAM_DK & dev->tvnorm->id) { + dev->tvaudio = WW_A2_DK; + + } else if (V4L2_STD_NTSC_M & dev->tvnorm->id) { dev->tvaudio = WW_BTSC; - break; - case V4L2_STD_NTSC_M_JP: + + } else if (V4L2_STD_NTSC_M_JP & dev->tvnorm->id) { dev->tvaudio = WW_EIAJ; - break; - default: + + } else { dprintk(1,"tvaudio support needs work for this tv norm [%s], sorry\n", dev->tvnorm->name); dev->tvaudio = 0; diff --git a/linux/drivers/media/video/saa7134/saa7134-oss.c b/linux/drivers/media/video/saa7134/saa7134-oss.c index 4df45c67b..b069a1fcd 100644 --- a/linux/drivers/media/video/saa7134/saa7134-oss.c +++ b/linux/drivers/media/video/saa7134/saa7134-oss.c @@ -173,7 +173,7 @@ static int dsp_rec_start(struct saa7134_dev *dev) fmt |= (2 << 4); if (!sign) fmt |= 0x04; - saa_writel(0x588 >> 2, dev->oss.blksize); + saa_writel(0x588 >> 2, dev->oss.blksize -4); saa_writel(0x58c >> 2, 0x543210 | (fmt << 24)); break; } diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c index f71b1c17f..b543de305 100644 --- a/linux/drivers/media/video/tda9887.c +++ b/linux/drivers/media/video/tda9887.c @@ -178,7 +178,7 @@ static struct tvnorm tvnorms[] = { .e = ( cAudioIF_6_5 | cVideoIF_38_90 ), },{ - .std = V4L2_STD_SECAM_D | V4L2_STD_SECAM_K, + .std = V4L2_STD_SECAM_DK, .name = "SECAM-DK", .b = ( cNegativeFmTV ), .c = ( cDeemphasisON | @@ -457,7 +457,7 @@ static int tda9887_fixup_std(struct tda9887 *t) case 'k': case 'K': dprintk("insmod fixup: SECAM => SECAM-DK\n"); - t->std = V4L2_STD_SECAM_D | V4L2_STD_SECAM_K; + t->std = V4L2_STD_SECAM_DK; break; case 'l': case 'L': diff --git a/linux/drivers/media/video/video-buf.c b/linux/drivers/media/video/video-buf.c index d8df80232..8d143fa65 100644 --- a/linux/drivers/media/video/video-buf.c +++ b/linux/drivers/media/video/video-buf.c @@ -546,6 +546,11 @@ videobuf_reqbufs(struct file *file, struct videobuf_queue *q, req->memory != V4L2_MEMORY_OVERLAY) return -EINVAL; + if (q->streaming) + return -EBUSY; + if (!list_empty(&q->stream)) + return -EBUSY; + down(&q->lock); count = req->count; if (count > VIDEO_MAX_FRAME) diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h index 05d2f893d..ab8727d92 100644 --- a/linux/include/linux/videodev2.h +++ b/linux/include/linux/videodev2.h @@ -530,12 +530,13 @@ typedef __u64 v4l2_std_id; V4L2_STD_PAL_I) #define V4L2_STD_NTSC (V4L2_STD_NTSC_M |\ V4L2_STD_NTSC_M_JP) +#define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D |\ + V4L2_STD_SECAM_K |\ + V4L2_STD_SECAM_K1) #define V4L2_STD_SECAM (V4L2_STD_SECAM_B |\ - V4L2_STD_SECAM_D |\ V4L2_STD_SECAM_G |\ V4L2_STD_SECAM_H |\ - V4L2_STD_SECAM_K |\ - V4L2_STD_SECAM_K1 |\ + V4L2_STD_SECAM_DK |\ V4L2_STD_SECAM_L) #define V4L2_STD_525_60 (V4L2_STD_PAL_M |\ |