Lines Matching refs:ubuf
33 struct saa7164_user_buffer *ubuf; in saa7164_vbi_buffers_dealloc() local
47 ubuf = list_entry(p, struct saa7164_user_buffer, list); in saa7164_vbi_buffers_dealloc()
49 saa7164_buffer_dealloc_user(ubuf); in saa7164_vbi_buffers_dealloc()
54 ubuf = list_entry(l, struct saa7164_user_buffer, list); in saa7164_vbi_buffers_dealloc()
56 saa7164_buffer_dealloc_user(ubuf); in saa7164_vbi_buffers_dealloc()
70 struct saa7164_user_buffer *ubuf; in saa7164_vbi_buffers_alloc() local
124 ubuf = saa7164_buffer_alloc_user(dev, len); in saa7164_vbi_buffers_alloc()
125 if (ubuf) { in saa7164_vbi_buffers_alloc()
127 list_add_tail(&ubuf->list, &port->list_buf_free.list); in saa7164_vbi_buffers_alloc()
274 struct saa7164_user_buffer *ubuf; in saa7164_vbi_stop_streaming() local
298 ubuf = list_entry(c, struct saa7164_user_buffer, list); in saa7164_vbi_stop_streaming()
299 ubuf->pos = 0; in saa7164_vbi_stop_streaming()
300 list_move_tail(&ubuf->list, &port->list_buf_free.list); in saa7164_vbi_stop_streaming()
465 struct saa7164_user_buffer *ubuf = NULL; in saa7164_vbi_next_buf() local
471 ubuf = list_first_entry(&port->list_buf_used.list, in saa7164_vbi_next_buf()
475 crc = crc32(0, ubuf->data, ubuf->actual_size); in saa7164_vbi_next_buf()
476 if (crc != ubuf->crc) { in saa7164_vbi_next_buf()
479 ubuf, ubuf->crc, crc); in saa7164_vbi_next_buf()
486 dprintk(DBGLVL_VBI, "%s() returns %p\n", __func__, ubuf); in saa7164_vbi_next_buf()
488 return ubuf; in saa7164_vbi_next_buf()
496 struct saa7164_user_buffer *ubuf = NULL; in fops_read() local
538 ubuf = saa7164_vbi_next_buf(port); in fops_read()
540 while ((count > 0) && ubuf) { in fops_read()
543 rem = ubuf->actual_size - ubuf->pos; in fops_read()
546 p = ubuf->data + ubuf->pos; in fops_read()
550 __func__, (int)count, cnt, rem, ubuf, ubuf->pos); in fops_read()
561 ubuf->pos += cnt; in fops_read()
566 if (ubuf->pos > ubuf->actual_size) in fops_read()
569 if (ubuf->pos == ubuf->actual_size) { in fops_read()
574 ubuf->pos = 0; in fops_read()
577 list_move_tail(&ubuf->list, &port->list_buf_free.list); in fops_read()
587 ubuf = saa7164_vbi_next_buf(port); in fops_read()
591 if (!ret && !ubuf) { in fops_read()