summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/cx23885/cx23885.h
diff options
context:
space:
mode:
authorHans Verkuil2015-11-30 12:59:18 +0100
committerMauro Carvalho Chehab2015-12-18 16:29:13 +0100
commite80bf856af271423bc055e895ef6141b0795ffd9 (patch)
tree589d52a2ac9a32bde59593fb897abd186bc37e28 /drivers/media/pci/cx23885/cx23885.h
parentRevert "[media] UVC: Add support for ds4 depth camera" (diff)
downloadkernel-qcow2-linux-e80bf856af271423bc055e895ef6141b0795ffd9.tar.gz
kernel-qcow2-linux-e80bf856af271423bc055e895ef6141b0795ffd9.tar.xz
kernel-qcow2-linux-e80bf856af271423bc055e895ef6141b0795ffd9.zip
[media] cx23885: fix format/crop handling
While testing the cx23885 driver with various TV standards I found a number of bugs: 1) norm_maxw() returned 768 instead of 720 for PAL formats. This should always be 720, so drop this inline function and just always use 720. 2) cropcap() was missing, so the pixelaspect was never known and qv4l2 would scale the image incorrectly. Add cropcap support. 3) cx23885_set_tvnorm() should just return 0 if the same standard was set again. If another standard is set, then reset the width/height and call set_fmt for the subdevs. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci/cx23885/cx23885.h')
-rw-r--r--drivers/media/pci/cx23885/cx23885.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/media/pci/cx23885/cx23885.h b/drivers/media/pci/cx23885/cx23885.h
index f9eb57b186fa..9a8938b1085a 100644
--- a/drivers/media/pci/cx23885/cx23885.h
+++ b/drivers/media/pci/cx23885/cx23885.h
@@ -627,11 +627,6 @@ extern int cx23885_risc_databuffer(struct pci_dev *pci,
/* ----------------------------------------------------------- */
/* tv norms */
-static inline unsigned int norm_maxw(v4l2_std_id norm)
-{
- return (norm & V4L2_STD_525_60) ? 720 : 768;
-}
-
static inline unsigned int norm_maxh(v4l2_std_id norm)
{
return (norm & V4L2_STD_525_60) ? 480 : 576;