[media] solo6x10: fix various format-related compliancy issues
authorHans Verkuil <hans.verkuil@cisco.com>
Tue, 12 Mar 2013 21:43:21 +0000 (18:43 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 25 Mar 2013 11:43:34 +0000 (08:43 -0300)
commit016afda4fb298aa2e5515048fcba0271ad6f7320
tree4c63fc3ec659da65923178aaefd6b28c7342c60e
parentc813bd3c8dce3564166e2c4f839fd36df7b0ba5d
[media] solo6x10: fix various format-related compliancy issues

- try_fmt should never return -EBUSY.
- invalid pix->field values were not mapped to a valid value.
- the priv field of struct v4l2_pix_format wasn't zeroed.
- the try_fmt error code was not checked in set_fmt.
- enum_framesizes/intervals is valid for both MJPEG and MPEG pixel formats.
- enum_frameintervals didn't check width and height and reported the
  wrong range.
- s_parm didn't set readbuffers.
- don't fail on invalid colorspace, just replace with the valid colorspace.
- bytesperline should be 0 for compressed formats.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/media/solo6x10/v4l2-enc.c
drivers/staging/media/solo6x10/v4l2.c