summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/video/cx88/cx88-tvaudio.c4
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-video.c20
2 files changed, 15 insertions, 9 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-tvaudio.c b/linux/drivers/media/video/cx88/cx88-tvaudio.c
index 1686f3a79..24f00c356 100644
--- a/linux/drivers/media/video/cx88/cx88-tvaudio.c
+++ b/linux/drivers/media/video/cx88/cx88-tvaudio.c
@@ -520,6 +520,8 @@ void cx88_get_stereo(struct cx8800_dev *dev, struct v4l2_tuner *t)
switch (dev->tvaudio) {
case WW_A2_BG:
+ case WW_A2_DK:
+ case WW_A2_M:
if (1 == pilot) {
/* stereo */
t->rxsubchans = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO;
@@ -551,6 +553,8 @@ void cx88_set_stereo(struct cx8800_dev *dev, u32 mode)
switch (dev->tvaudio) {
case WW_A2_BG:
+ case WW_A2_DK:
+ case WW_A2_M:
switch (mode) {
case V4L2_TUNER_MODE_MONO:
case V4L2_TUNER_MODE_LANG1:
diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c
index 4876b0b7d..f30caa051 100644
--- a/linux/drivers/media/video/saa7134/saa7134-video.c
+++ b/linux/drivers/media/video/saa7134/saa7134-video.c
@@ -593,11 +593,11 @@ static void set_size(struct saa7134_dev *dev, int task,
saa_writeb(SAA7134_VIDEO_V_STOP1(task), v_stop & 0xff);
saa_writeb(SAA7134_VIDEO_V_STOP2(task), v_stop >> 8);
- prescale = dev->crop_defrect.width / width;
+ prescale = dev->crop_current.width / width;
if (0 == prescale)
prescale = 1;
- xscale = 1024 * dev->crop_defrect.width / prescale / width;
- yscale = 512 * div * dev->crop_defrect.height / height;
+ xscale = 1024 * dev->crop_current.width / prescale / width;
+ yscale = 512 * div * dev->crop_current.height / height;
dprintk("prescale=%d xscale=%d yscale=%d\n",prescale,xscale,yscale);
set_h_prescale(dev,task,prescale);
saa_writeb(SAA7134_H_SCALE_INC1(task), xscale & 0xff);
@@ -909,10 +909,12 @@ static int buffer_prepare(struct file *file, struct videobuf_buffer *vb,
/* sanity checks */
if (NULL == fh->fmt)
return -EINVAL;
- if (fh->width < 48 ||
- fh->height < 32 ||
- fh->width > dev->crop_current.width ||
- fh->height > dev->crop_current.height)
+ if (fh->width < 48 ||
+ fh->height < 32 ||
+ fh->width/4 > dev->crop_current.width ||
+ fh->height/4 > dev->crop_current.height ||
+ fh->width > dev->crop_bounds.width ||
+ fh->height > dev->crop_bounds.height)
return -EINVAL;
size = (fh->width * fh->height * fh->fmt->depth) >> 3;
if (0 != buf->vb.baddr && buf->vb.bsize < size)
@@ -1409,8 +1411,8 @@ int saa7134_try_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
return -EINVAL;
field = f->fmt.pix.field;
- maxw = dev->crop_current.width;
- maxh = dev->crop_current.height;
+ maxw = min(dev->crop_current.width*4, dev->crop_bounds.width);
+ maxh = min(dev->crop_current.height*4, dev->crop_bounds.height);
if (V4L2_FIELD_ANY == field) {
field = (f->fmt.pix.height > maxh/2)