Lines Matching defs:fmt2
242 struct v4l2_format fmt2;
245 memset(&fmt2, 0, sizeof(fmt2));
251 fmt2.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
252 fmt2.fmt.pix.width = 10000;
253 fmt2.fmt.pix.height = 10000;
254 fmt2.fmt.pix.pixelformat = desc2.pixelformat;
255 if (0 != drv(file, VIDIOC_TRY_FMT, &fmt2))
258 *maxw = fmt2.fmt.pix.width;
259 *maxh = fmt2.fmt.pix.height;
1101 struct v4l2_format *fmt2;
1103 fmt2 = kzalloc(sizeof(*fmt2), GFP_KERNEL);
1104 if (!fmt2) {
1108 fmt2->type = V4L2_BUF_TYPE_VBI_CAPTURE;
1110 err = drv(file, VIDIOC_G_FMT, fmt2);
1115 if (fmt2->fmt.vbi.sample_format != V4L2_PIX_FMT_GREY) {
1120 fmt->samples_per_line = fmt2->fmt.vbi.samples_per_line;
1121 fmt->sampling_rate = fmt2->fmt.vbi.sampling_rate;
1123 fmt->start[0] = fmt2->fmt.vbi.start[0];
1124 fmt->count[0] = fmt2->fmt.vbi.count[0];
1125 fmt->start[1] = fmt2->fmt.vbi.start[1];
1126 fmt->count[1] = fmt2->fmt.vbi.count[1];
1127 fmt->flags = fmt2->fmt.vbi.flags & 0x03;
1129 kfree(fmt2);
1139 struct v4l2_format *fmt2 = NULL;
1146 fmt2 = kzalloc(sizeof(*fmt2), GFP_KERNEL);
1147 if (!fmt2) {
1151 fmt2->type = V4L2_BUF_TYPE_VBI_CAPTURE;
1152 fmt2->fmt.vbi.samples_per_line = fmt->samples_per_line;
1153 fmt2->fmt.vbi.sampling_rate = fmt->sampling_rate;
1154 fmt2->fmt.vbi.sample_format = V4L2_PIX_FMT_GREY;
1155 fmt2->fmt.vbi.start[0] = fmt->start[0];
1156 fmt2->fmt.vbi.count[0] = fmt->count[0];
1157 fmt2->fmt.vbi.start[1] = fmt->start[1];
1158 fmt2->fmt.vbi.count[1] = fmt->count[1];
1159 fmt2->fmt.vbi.flags = fmt->flags;
1160 err = drv(file, VIDIOC_TRY_FMT, fmt2);
1166 if (fmt2->fmt.vbi.samples_per_line != fmt->samples_per_line ||
1167 fmt2->fmt.vbi.sampling_rate != fmt->sampling_rate ||
1168 fmt2->fmt.vbi.sample_format != V4L2_PIX_FMT_GREY ||
1169 fmt2->fmt.vbi.start[0] != fmt->start[0] ||
1170 fmt2->fmt.vbi.count[0] != fmt->count[0] ||
1171 fmt2->fmt.vbi.start[1] != fmt->start[1] ||
1172 fmt2->fmt.vbi.count[1] != fmt->count[1] ||
1173 fmt2->fmt.vbi.flags != fmt->flags) {
1177 err = drv(file, VIDIOC_S_FMT, fmt2);
1181 kfree(fmt2);