Lines Matching refs:bt656
179 struct cxusb_bt656_params *bt656,
189 if (bt656->line == 0 || firstfield == firstfield_code)
192 if (bt656->fmode == LINE_SAMPLES) {
194 bt656->linesamples;
198 firstfield ? '1' : '2', bt656->line);
200 if (bt656->buf && remsamples > 0) {
201 memset(bt656->buf, 0, remsamples);
202 bt656->buf += remsamples;
207 bt656->line, remsamples,
211 bt656->line++;
214 remlines = maxlines - bt656->line;
215 if (bt656->buf && remlines > 0) {
216 memset(bt656->buf, 0, remlines * maxlinesamples);
217 bt656->buf += remlines * maxlinesamples;
229 struct cxusb_bt656_params *bt656,
245 bt656->pos);
247 bt656->linesamples = 0;
248 bt656->fmode = LINE_SAMPLES;
251 bt656->pos);
253 bt656->fmode = VBI_SAMPLES;
258 struct cxusb_bt656_params *bt656,
270 bt656->line, bt656->pos);
272 remsamples = maxlinesamples - bt656->linesamples;
273 if (bt656->buf && remsamples > 0) {
274 memset(bt656->buf, 0, remsamples);
275 bt656->buf += remsamples;
279 firstfield ? '1' : '2', bt656->line, remsamples,
283 bt656->fmode = START_SEARCH;
284 bt656->line++;
288 struct cxusb_bt656_params *bt656,
296 bt656->pos);
298 bt656->fmode = START_SEARCH;
303 struct cxusb_bt656_params *bt656,
309 if (bt656->fmode == START_SEARCH) {
310 cxusb_medion_cf_refc_start_sch(dvbdev, bt656, firstfield, buf);
311 } else if (bt656->fmode == LINE_SAMPLES) {
312 cxusb_medion_cf_refc_line_smpl(dvbdev, bt656, firstfield,
315 } else if (bt656->fmode == VBI_SAMPLES) {
316 cxusb_medion_cf_refc_vbi_smpl(dvbdev, bt656, buf);
325 struct cxusb_bt656_params *bt656,
333 if (!cxusb_auxbuf_copy(auxbuf, bt656->pos + 1, buf, tocheck))
338 bt656->pos += (1 + idx);
343 bt656->line, bt656->pos);
345 bt656->linesamples = 0;
346 bt656->fmode = LINE_SAMPLES;
351 static void cxusb_medion_cs_line_smpl(struct cxusb_bt656_params *bt656,
355 if (bt656->buf)
356 *(bt656->buf++) = val;
358 bt656->linesamples++;
359 bt656->pos++;
361 if (bt656->linesamples >= maxlinesamples) {
362 bt656->fmode = START_SEARCH;
363 bt656->line++;
369 struct cxusb_bt656_params *bt656,
373 if (bt656->fmode == START_SEARCH && bt656->line > 0)
374 return cxusb_medion_cs_start_sch(dvbdev, auxbuf, bt656,
376 else if (bt656->fmode == LINE_SAMPLES)
377 cxusb_medion_cs_line_smpl(bt656, maxlinesamples, val);
379 bt656->pos++;
386 struct cxusb_bt656_params *bt656,
391 while (bt656->line < maxlines) {
394 if (!cxusb_auxbuf_copy(auxbuf, bt656->pos, &val, 1))
401 if (!cxusb_auxbuf_copy(auxbuf, bt656->pos + 1,
412 bt656,
419 if (cxusb_medion_cf_ref_code(dvbdev, bt656,
424 bt656->pos += 4;
430 if (!cxusb_medion_copy_samples(dvbdev, auxbuf, bt656,
435 if (bt656->line < maxlines) {
438 bt656->pos, bt656->line);
449 struct cxusb_bt656_params *bt656 = &cxdev->bt656;
455 if (bt656->mode == NEW_FRAME) {
467 if (bt656->mode == NEW_FRAME || reset) {
469 bt656->pos = 0;
470 bt656->mode = FIRST_FIELD;
471 bt656->fmode = START_SEARCH;
472 bt656->line = 0;
476 bt656->buf = vb2_plane_vaddr(&cxdev->vbuf->vb2.vb2_buf,
481 if (bt656->mode == FIRST_FIELD) {
482 if (!cxusb_medion_copy_field(dvbdev, &cxdev->auxbuf, bt656,
493 bt656->mode = SECOND_FIELD;
494 bt656->fmode = START_SEARCH;
495 bt656->line = 0;
498 if (bt656->mode == SECOND_FIELD) {
499 if (!cxusb_medion_copy_field(dvbdev, &cxdev->auxbuf, bt656,
504 cxusb_auxbuf_head_trim(dvbdev, &cxdev->auxbuf, bt656->pos);
506 bt656->mode = NEW_FRAME;
519 cxdev->bt656.buf = NULL;
683 cxdev->bt656.buf = NULL;
865 cxdev->bt656.mode = NEW_FRAME;
866 cxdev->bt656.buf = NULL;