Lines Matching refs:mdl

174 	struct cx18_mdl *mdl;
187 while ((mdl = cx18_dequeue(s_vbi,
190 cx18_process_vbi_data(cx, mdl,
192 cx18_stream_put_mdl_fw(s_vbi, mdl);
195 mdl = &cx->vbi.sliced_mpeg_mdl;
196 if (mdl->readpos != mdl->bytesused)
197 return mdl;
201 mdl = cx18_dequeue(s, &s->q_full);
202 if (mdl) {
204 &mdl->m_flags))
205 return mdl;
208 cx18_mdl_swap(mdl);
211 cx18_process_vbi_data(cx, mdl, s->type);
213 return mdl;
246 struct cx18_mdl *mdl = &cx->vbi.sliced_mpeg_mdl;
254 mdl->curr_buf = NULL;
255 mdl->bytesused = cx->vbi.sliced_mpeg_size[idx];
256 mdl->readpos = 0;
364 struct cx18_mdl *mdl, char __user *ubuf, size_t ucount)
370 if (mdl->curr_buf == NULL)
371 mdl->curr_buf = list_first_entry(&mdl->buf_list,
374 if (list_entry_is_past_end(mdl->curr_buf, &mdl->buf_list, list)) {
380 mdl->readpos = mdl->bytesused;
384 list_for_each_entry_from(mdl->curr_buf, &mdl->buf_list, list) {
386 if (mdl->curr_buf->readpos >= mdl->curr_buf->bytesused)
389 rc = cx18_copy_buf_to_user(s, mdl->curr_buf, ubuf + tot_written,
393 mdl->readpos += rc;
398 mdl->curr_buf->readpos < mdl->curr_buf->bytesused ||
399 mdl->readpos >= mdl->bytesused) /* MDL buffers drained */
426 struct cx18_mdl *mdl;
429 mdl = cx18_get_mdl(s, non_block, &rc);
431 if (mdl == NULL) {
445 rc = cx18_copy_mdl_to_user(s, mdl, ubuf + tot_written,
448 if (mdl != &cx->vbi.sliced_mpeg_mdl) {
449 if (mdl->readpos == mdl->bytesused)
450 cx18_stream_put_mdl_fw(s, mdl);
452 cx18_push(s, mdl, &s->q_full);
453 } else if (mdl->readpos == mdl->bytesused) {
458 cx->vbi_data_inserted += mdl->bytesused;