diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 12:35:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 12:35:11 -0400 |
commit | 0851668fdd97e526b2a41f794b785c204dd3d3e0 (patch) | |
tree | 4ef7c20a8be8393006c6fe9627eb29dd30877d61 /drivers/media/video/pwc/pwc-ctrl.c | |
parent | 00ebb6382b8d9c7c15b5f8ad230670d8161d38dd (diff) | |
parent | 7655e594945289b418af39f6669fea4666a7b520 (diff) |
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (505 commits)
[media] af9015: Fix max I2C message size when used with tda18271
[media] IR: initialize ir_raw_event in few more drivers
[media] Guard a divide in v4l1 compat layer
[media] imon: fix nomouse modprobe option
[media] imon: remove redundant change_protocol call
[media] imon: fix my egregious brown paper bag w/rdev/idev split
[media] cafe_ccic: Configure ov7670 correctly
[media] ov7670: allow configuration of image size, clock speed, and I/O method
[media] af9015: support for DigitalNow TinyTwin v3 [1f4d:9016]
[media] af9015: map DigitalNow TinyTwin v2 remote
[media] DigitalNow TinyTwin remote controller
[media] af9015: RC fixes and improvements
videodev2.h.xml: Update to reflect the latest changes at videodev2.h
[media] v4l: document new Bayer and monochrome pixel formats
[media] DocBook/v4l: Add missing formats used on gspca cpia1 and sn9c2028
[media] firedtv: add parameter to fake ca_system_ids in CA_INFO
[media] tm6000: fix a macro coding style issue
tm6000: Remove some ugly debug code
[media] Nova-S-Plus audio line input
[media] [RFC,1/1] V4L2: Use new CAP bits in existing RDS capable drivers
...
Diffstat (limited to 'drivers/media/video/pwc/pwc-ctrl.c')
-rw-r--r-- | drivers/media/video/pwc/pwc-ctrl.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/media/video/pwc/pwc-ctrl.c b/drivers/media/video/pwc/pwc-ctrl.c index f7f7e04cf48..6b8fbddc074 100644 --- a/drivers/media/video/pwc/pwc-ctrl.c +++ b/drivers/media/video/pwc/pwc-ctrl.c | |||
@@ -261,7 +261,7 @@ static int set_video_mode_Nala(struct pwc_device *pdev, int size, int frames) | |||
261 | PWC_DEBUG_MODULE("Failed to send video command... %d\n", ret); | 261 | PWC_DEBUG_MODULE("Failed to send video command... %d\n", ret); |
262 | return ret; | 262 | return ret; |
263 | } | 263 | } |
264 | if (pEntry->compressed && pdev->vpalette != VIDEO_PALETTE_RAW) | 264 | if (pEntry->compressed && pdev->pixfmt == V4L2_PIX_FMT_YUV420) |
265 | pwc_dec1_init(pdev->type, pdev->release, buf, pdev->decompress_data); | 265 | pwc_dec1_init(pdev->type, pdev->release, buf, pdev->decompress_data); |
266 | 266 | ||
267 | pdev->cmd_len = 3; | 267 | pdev->cmd_len = 3; |
@@ -321,7 +321,7 @@ static int set_video_mode_Timon(struct pwc_device *pdev, int size, int frames, i | |||
321 | if (ret < 0) | 321 | if (ret < 0) |
322 | return ret; | 322 | return ret; |
323 | 323 | ||
324 | if (pChoose->bandlength > 0 && pdev->vpalette != VIDEO_PALETTE_RAW) | 324 | if (pChoose->bandlength > 0 && pdev->pixfmt == V4L2_PIX_FMT_YUV420) |
325 | pwc_dec23_init(pdev, pdev->type, buf); | 325 | pwc_dec23_init(pdev, pdev->type, buf); |
326 | 326 | ||
327 | pdev->cmd_len = 13; | 327 | pdev->cmd_len = 13; |
@@ -356,7 +356,7 @@ static int set_video_mode_Kiara(struct pwc_device *pdev, int size, int frames, i | |||
356 | fps = (frames / 5) - 1; | 356 | fps = (frames / 5) - 1; |
357 | 357 | ||
358 | /* special case: VGA @ 5 fps and snapshot is raw bayer mode */ | 358 | /* special case: VGA @ 5 fps and snapshot is raw bayer mode */ |
359 | if (size == PSZ_VGA && frames == 5 && snapshot && pdev->vpalette == VIDEO_PALETTE_RAW) | 359 | if (size == PSZ_VGA && frames == 5 && snapshot && pdev->pixfmt != V4L2_PIX_FMT_YUV420) |
360 | { | 360 | { |
361 | /* Only available in case the raw palette is selected or | 361 | /* Only available in case the raw palette is selected or |
362 | we have the decompressor available. This mode is | 362 | we have the decompressor available. This mode is |
@@ -394,7 +394,7 @@ static int set_video_mode_Kiara(struct pwc_device *pdev, int size, int frames, i | |||
394 | if (ret < 0) | 394 | if (ret < 0) |
395 | return ret; | 395 | return ret; |
396 | 396 | ||
397 | if (pChoose->bandlength > 0 && pdev->vpalette != VIDEO_PALETTE_RAW) | 397 | if (pChoose->bandlength > 0 && pdev->pixfmt == V4L2_PIX_FMT_YUV420) |
398 | pwc_dec23_init(pdev, pdev->type, buf); | 398 | pwc_dec23_init(pdev, pdev->type, buf); |
399 | 399 | ||
400 | pdev->cmd_len = 12; | 400 | pdev->cmd_len = 12; |
@@ -429,7 +429,7 @@ int pwc_set_video_mode(struct pwc_device *pdev, int width, int height, int frame | |||
429 | { | 429 | { |
430 | int ret, size; | 430 | int ret, size; |
431 | 431 | ||
432 | PWC_DEBUG_FLOW("set_video_mode(%dx%d @ %d, palette %d).\n", width, height, frames, pdev->vpalette); | 432 | PWC_DEBUG_FLOW("set_video_mode(%dx%d @ %d, pixfmt %08x).\n", width, height, frames, pdev->pixfmt); |
433 | size = pwc_decode_size(pdev, width, height); | 433 | size = pwc_decode_size(pdev, width, height); |
434 | if (size < 0) { | 434 | if (size < 0) { |
435 | PWC_DEBUG_MODULE("Could not find suitable size.\n"); | 435 | PWC_DEBUG_MODULE("Could not find suitable size.\n"); |
@@ -519,13 +519,13 @@ static void pwc_set_image_buffer_size(struct pwc_device *pdev) | |||
519 | { | 519 | { |
520 | int i, factor = 0; | 520 | int i, factor = 0; |
521 | 521 | ||
522 | /* for PALETTE_YUV420P */ | 522 | /* for V4L2_PIX_FMT_YUV420 */ |
523 | switch(pdev->vpalette) | 523 | switch (pdev->pixfmt) { |
524 | { | 524 | case V4L2_PIX_FMT_YUV420: |
525 | case VIDEO_PALETTE_YUV420P: | ||
526 | factor = 6; | 525 | factor = 6; |
527 | break; | 526 | break; |
528 | case VIDEO_PALETTE_RAW: | 527 | case V4L2_PIX_FMT_PWC1: |
528 | case V4L2_PIX_FMT_PWC2: | ||
529 | factor = 6; /* can be uncompressed YUV420P */ | 529 | factor = 6; /* can be uncompressed YUV420P */ |
530 | break; | 530 | break; |
531 | } | 531 | } |