diff options
author | Frank Schaefer <fschaefer.oss@googlemail.com> | 2013-03-26 12:38:39 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-28 16:49:49 -0400 |
commit | c8c39796c484fc6f4e45d8d71f3cf55e9ab27e6c (patch) | |
tree | 48290510b2f4d71a2d8c79c5509f4a5b05ed9fb6 /drivers/media/usb | |
parent | e507e0e513c41ccfc68d6f619faa212f97c88ddb (diff) |
[media] em28xx: make em28xx_set_outfmt() working with EM25xx family bridges
Streaming doesn't work with the EM2765 if bit 5 of the output format register
0x27 is set.
It's actually not clear if really has to be set for the other chips, but for
now let's keep it to avoid regressions and add a comment to the code.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-core.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-core.c b/drivers/media/usb/em28xx/em28xx-core.c index b2dcb3d1342d..575a46a18e1f 100644 --- a/drivers/media/usb/em28xx/em28xx-core.c +++ b/drivers/media/usb/em28xx/em28xx-core.c | |||
@@ -697,12 +697,23 @@ int em28xx_vbi_supported(struct em28xx *dev) | |||
697 | int em28xx_set_outfmt(struct em28xx *dev) | 697 | int em28xx_set_outfmt(struct em28xx *dev) |
698 | { | 698 | { |
699 | int ret; | 699 | int ret; |
700 | u8 vinctrl; | 700 | u8 fmt, vinctrl; |
701 | 701 | ||
702 | ret = em28xx_write_reg_bits(dev, EM28XX_R27_OUTFMT, | 702 | fmt = dev->format->reg; |
703 | dev->format->reg | 0x20, 0xff); | 703 | if (!dev->is_em25xx) |
704 | fmt |= 0x20; | ||
705 | /* | ||
706 | * NOTE: it's not clear if this is really needed ! | ||
707 | * The datasheets say bit 5 is a reserved bit and devices seem to work | ||
708 | * fine without it. But the Windows driver sets it for em2710/50+em28xx | ||
709 | * devices and we've always been setting it, too. | ||
710 | * | ||
711 | * em2765 (em25xx, em276x/7x/8x) devices do NOT work with this bit set, | ||
712 | * it's likely used for an additional (compressed ?) format there. | ||
713 | */ | ||
714 | ret = em28xx_write_reg(dev, EM28XX_R27_OUTFMT, fmt); | ||
704 | if (ret < 0) | 715 | if (ret < 0) |
705 | return ret; | 716 | return ret; |
706 | 717 | ||
707 | ret = em28xx_write_reg(dev, EM28XX_R10_VINMODE, dev->vinmode); | 718 | ret = em28xx_write_reg(dev, EM28XX_R10_VINMODE, dev->vinmode); |
708 | if (ret < 0) | 719 | if (ret < 0) |