diff options
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-core.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-core.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index f515f879125..c647dcb20a5 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.c | |||
@@ -621,10 +621,19 @@ int em28xx_capture_start(struct em28xx *dev, int start) | |||
621 | return rc; | 621 | return rc; |
622 | } | 622 | } |
623 | 623 | ||
624 | int em28xx_outfmt_set_yuv422(struct em28xx *dev) | 624 | int em28xx_set_outfmt(struct em28xx *dev) |
625 | { | 625 | { |
626 | em28xx_write_reg(dev, EM28XX_R27_OUTFMT, 0x34); | 626 | int ret; |
627 | em28xx_write_reg(dev, EM28XX_R10_VINMODE, 0x10); | 627 | |
628 | ret = em28xx_write_reg_bits(dev, EM28XX_R27_OUTFMT, | ||
629 | dev->format->reg | 0x20, 0x3f); | ||
630 | if (ret < 0) | ||
631 | return ret; | ||
632 | |||
633 | ret = em28xx_write_reg(dev, EM28XX_R10_VINMODE, 0x10); | ||
634 | if (ret < 0) | ||
635 | return ret; | ||
636 | |||
628 | return em28xx_write_reg(dev, EM28XX_R11_VINCTRL, 0x11); | 637 | return em28xx_write_reg(dev, EM28XX_R11_VINCTRL, 0x11); |
629 | } | 638 | } |
630 | 639 | ||
@@ -686,7 +695,7 @@ int em28xx_resolution_set(struct em28xx *dev) | |||
686 | width = norm_maxw(dev); | 695 | width = norm_maxw(dev); |
687 | height = norm_maxh(dev) >> 1; | 696 | height = norm_maxh(dev) >> 1; |
688 | 697 | ||
689 | em28xx_outfmt_set_yuv422(dev); | 698 | em28xx_set_outfmt(dev); |
690 | em28xx_accumulator_set(dev, 1, (width - 4) >> 2, 1, (height - 4) >> 2); | 699 | em28xx_accumulator_set(dev, 1, (width - 4) >> 2, 1, (height - 4) >> 2); |
691 | em28xx_capture_area_set(dev, 0, 0, width >> 2, height >> 2); | 700 | em28xx_capture_area_set(dev, 0, 0, width >> 2, height >> 2); |
692 | return em28xx_scaler_set(dev, dev->hscale, dev->vscale); | 701 | return em28xx_scaler_set(dev, dev->hscale, dev->vscale); |