#include "rcar-vin.h"
#define RVIN_DEFAULT_FORMAT V4L2_PIX_FMT_YUYV
+#define RVIN_DEFAULT_FIELD V4L2_FIELD_NONE
/* -----------------------------------------------------------------------------
* Format Conversions
case V4L2_FIELD_INTERLACED:
break;
default:
- vin->format.field = V4L2_FIELD_NONE;
+ vin->format.field = RVIN_DEFAULT_FIELD;
break;
}
source->width = pix->width;
source->height = pix->height;
- pix->field = field;
+ if (field != V4L2_FIELD_ANY)
+ pix->field = field;
+
pix->width = width;
pix->height = height;
u32 walign;
int ret;
- /* Keep current field if no specific one is asked for */
- if (pix->field == V4L2_FIELD_ANY)
- pix->field = vin->format.field;
-
/* If requested format is not supported fallback to the default */
if (!rvin_format_from_pixel(pix->pixelformat)) {
vin_dbg(vin, "Format 0x%x not found, using default 0x%x\n",
case V4L2_FIELD_INTERLACED:
break;
default:
- pix->field = V4L2_FIELD_NONE;
+ pix->field = RVIN_DEFAULT_FIELD;
break;
}