Lines Matching refs:dma_q

165 				 struct cx231xx_dmaqueue *dma_q,  in buffer_filled()  argument
170 buf->vb.sequence = dma_q->sequence++; in buffer_filled()
225 static inline void get_next_buf(struct cx231xx_dmaqueue *dma_q, in get_next_buf() argument
229 container_of(dma_q, struct cx231xx_video_mode, vidq); in get_next_buf()
234 if (list_empty(&dma_q->active)) { in get_next_buf()
245 *buf = list_entry(dma_q->active.next, struct cx231xx_buffer, list); in get_next_buf()
264 struct cx231xx_dmaqueue *dma_q = urb->context; in cx231xx_isoc_copy() local
306 if (dma_q->is_partial_line) { in cx231xx_isoc_copy()
308 sav_eav = dma_q->last_sav; in cx231xx_isoc_copy()
314 dma_q->partial_buf, in cx231xx_isoc_copy()
322 bytes_parsed += cx231xx_get_video_line(dev, dma_q, in cx231xx_isoc_copy()
344 dma_q, sav_eav, /* SAV/EAV */ in cx231xx_isoc_copy()
352 memcpy(dma_q->partial_buf, p_buffer + buffer_size - 4, 4); in cx231xx_isoc_copy()
361 struct cx231xx_dmaqueue *dma_q = urb->context; in cx231xx_bulk_copy() local
385 if (dma_q->is_partial_line) { in cx231xx_bulk_copy()
387 sav_eav = dma_q->last_sav; in cx231xx_bulk_copy()
393 dma_q->partial_buf, in cx231xx_bulk_copy()
401 bytes_parsed += cx231xx_get_video_line(dev, dma_q, in cx231xx_bulk_copy()
423 dma_q, sav_eav, /* SAV/EAV */ in cx231xx_bulk_copy()
431 memcpy(dma_q->partial_buf, p_buffer + buffer_size - 4, 4); in cx231xx_bulk_copy()
498 struct cx231xx_dmaqueue *dma_q, u8 sav_eav, in cx231xx_get_video_line() argument
534 dma_q->last_sav = sav_eav; in cx231xx_get_video_line()
536 bytes_copied = cx231xx_copy_video_line(dev, dma_q, p_buffer, in cx231xx_get_video_line()
543 struct cx231xx_dmaqueue *dma_q, u8 *p_line, in cx231xx_copy_video_line() argument
550 if (dma_q->current_field != field_number) in cx231xx_copy_video_line()
551 cx231xx_reset_video_buffer(dev, dma_q); in cx231xx_copy_video_line()
560 dma_q->current_field = field_number; in cx231xx_copy_video_line()
562 bytes_to_copy = dma_q->bytes_left_in_line; in cx231xx_copy_video_line()
566 if (dma_q->lines_completed >= dma_q->lines_per_field) { in cx231xx_copy_video_line()
567 dma_q->bytes_left_in_line -= bytes_to_copy; in cx231xx_copy_video_line()
568 dma_q->is_partial_line = (dma_q->bytes_left_in_line == 0) ? in cx231xx_copy_video_line()
573 dma_q->is_partial_line = 1; in cx231xx_copy_video_line()
578 dma_q->bytes_left_in_line -= bytes_to_copy; in cx231xx_copy_video_line()
579 dma_q->is_partial_line = (dma_q->bytes_left_in_line == 0) in cx231xx_copy_video_line()
585 cx231xx_do_copy(dev, dma_q, p_line, bytes_to_copy); in cx231xx_copy_video_line()
587 dma_q->pos += bytes_to_copy; in cx231xx_copy_video_line()
588 dma_q->bytes_left_in_line -= bytes_to_copy; in cx231xx_copy_video_line()
590 if (dma_q->bytes_left_in_line == 0) { in cx231xx_copy_video_line()
591 dma_q->bytes_left_in_line = _line_size; in cx231xx_copy_video_line()
592 dma_q->lines_completed++; in cx231xx_copy_video_line()
593 dma_q->is_partial_line = 0; in cx231xx_copy_video_line()
595 if (cx231xx_is_buffer_done(dev, dma_q) && buf) { in cx231xx_copy_video_line()
596 buffer_filled(dev, dma_q, buf); in cx231xx_copy_video_line()
598 dma_q->pos = 0; in cx231xx_copy_video_line()
600 dma_q->lines_completed = 0; in cx231xx_copy_video_line()
608 struct cx231xx_dmaqueue *dma_q) in cx231xx_reset_video_buffer() argument
613 if (dma_q->current_field == 1) { in cx231xx_reset_video_buffer()
614 if (dma_q->lines_completed >= dma_q->lines_per_field) in cx231xx_reset_video_buffer()
615 dma_q->field1_done = 1; in cx231xx_reset_video_buffer()
617 dma_q->field1_done = 0; in cx231xx_reset_video_buffer()
627 get_next_buf(dma_q, &buf); in cx231xx_reset_video_buffer()
629 dma_q->pos = 0; in cx231xx_reset_video_buffer()
630 dma_q->field1_done = 0; in cx231xx_reset_video_buffer()
631 dma_q->current_field = -1; in cx231xx_reset_video_buffer()
635 dma_q->bytes_left_in_line = dev->width << 1; in cx231xx_reset_video_buffer()
636 dma_q->lines_completed = 0; in cx231xx_reset_video_buffer()
639 int cx231xx_do_copy(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q, in cx231xx_do_copy() argument
659 current_line_bytes_copied = _line_size - dma_q->bytes_left_in_line; in cx231xx_do_copy()
662 offset = (dma_q->current_field == 1) ? 0 : _line_size; in cx231xx_do_copy()
668 startwrite += (dma_q->lines_completed * _line_size * 2); in cx231xx_do_copy()
673 lencopy = dma_q->bytes_left_in_line > bytes_to_copy ? in cx231xx_do_copy()
674 bytes_to_copy : dma_q->bytes_left_in_line; in cx231xx_do_copy()
696 u8 cx231xx_is_buffer_done(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q) in cx231xx_is_buffer_done() argument
701 buffer_complete = ((dma_q->current_field == 2) && in cx231xx_is_buffer_done()
702 (dma_q->lines_completed >= dma_q->lines_per_field) && in cx231xx_is_buffer_done()
703 dma_q->field1_done); in cx231xx_is_buffer_done()