summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pwc/pwc-v4l.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-01-04 18:48:05 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-01-06 10:47:37 -0200
commit5bbe18d74f0c163090cd16bd25e252e8806a6c75 (patch)
treed9cfb7ef008861cd4fefaf90f1c47eb064068235 /drivers/media/video/pwc/pwc-v4l.c
parent795e6eb3262d3b7247ce450835eea6df6571d103 (diff)
[media] pwc: Get rid of compression module parameter
Instead of making this a module parameter, automatically fallback to higher compression settings if there is not enough bandwidth. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pwc/pwc-v4l.c')
-rw-r--r--drivers/media/video/pwc/pwc-v4l.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/video/pwc/pwc-v4l.c b/drivers/media/video/pwc/pwc-v4l.c
index 097ec582ee6..36da7d40090 100644
--- a/drivers/media/video/pwc/pwc-v4l.c
+++ b/drivers/media/video/pwc/pwc-v4l.c
@@ -469,7 +469,7 @@ static int pwc_vidioc_try_fmt(struct pwc_device *pdev, struct v4l2_format *f)
static int pwc_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *f)
{
struct pwc_device *pdev = video_drvdata(file);
- int ret, pixelformat;
+ int ret, pixelformat, compression = 0;
if (pwc_test_n_set_capt_file(pdev, file))
return -EBUSY;
@@ -497,19 +497,15 @@ static int pwc_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *f)
}
PWC_DEBUG_IOCTL("Trying to set format to: width=%d height=%d fps=%d "
- "compression=%d format=%c%c%c%c\n",
+ "format=%c%c%c%c\n",
f->fmt.pix.width, f->fmt.pix.height, pdev->vframes,
- pdev->vcompression,
(pixelformat)&255,
(pixelformat>>8)&255,
(pixelformat>>16)&255,
(pixelformat>>24)&255);
- ret = pwc_set_video_mode(pdev,
- f->fmt.pix.width,
- f->fmt.pix.height,
- pdev->vframes,
- pdev->vcompression);
+ ret = pwc_set_video_mode(pdev, f->fmt.pix.width, f->fmt.pix.height,
+ pdev->vframes, &compression);
PWC_DEBUG_IOCTL("pwc_set_video_mode(), return=%d\n", ret);