CX18_DEBUG_HI_FILE("Encoder poll\n");
poll_wait(filp, &s->waitq, wait);
- if (s->q_full.length || s->q_io.length)
+ if (s->q_full.buffers || s->q_io.buffers)
return POLLIN | POLLRDNORM;
if (eof)
return POLLHUP;
{
INIT_LIST_HEAD(&q->list);
q->buffers = 0;
- q->length = 0;
q->bytesused = 0;
}
spin_lock_irqsave(&s->qlock, flags);
list_add_tail(&buf->list, &q->list);
q->buffers++;
- q->length += s->buf_size;
q->bytesused += buf->bytesused - buf->readpos;
spin_unlock_irqrestore(&s->qlock, flags);
}
buf = list_entry(q->list.next, struct cx18_buffer, list);
list_del_init(q->list.next);
q->buffers--;
- q->length -= s->buf_size;
q->bytesused -= buf->bytesused - buf->readpos;
}
spin_unlock_irqrestore(&s->qlock, flags);
they are not moved to the full queue */
if (s->type != CX18_ENC_STREAM_TYPE_TS) {
s->q_free.buffers--;
- s->q_free.length -= s->buf_size;
s->q_full.buffers++;
- s->q_full.length += s->buf_size;
s->q_full.bytesused += buf->bytesused;
list_move_tail(&buf->list, &s->q_full.list);
}
list_move_tail(q->list.next, &s->q_free.list);
buf->bytesused = buf->readpos = buf->b_flags = 0;
s->q_free.buffers++;
- s->q_free.length += s->buf_size;
}
cx18_queue_init(q);
spin_unlock_irqrestore(&s->qlock, flags);