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