Lines Matching refs:cnt
132 unsigned int *cnt; in pvr2_buffer_remove() local
138 cnt = &sp->i_count; in pvr2_buffer_remove()
143 cnt = &sp->q_count; in pvr2_buffer_remove()
148 cnt = &sp->r_count; in pvr2_buffer_remove()
156 (*cnt)--; in pvr2_buffer_remove()
161 pvr2_buffer_state_decode(bp->state),*bcnt,*cnt); in pvr2_buffer_remove()
300 static int pvr2_stream_buffer_count(struct pvr2_stream *sp,unsigned int cnt) in pvr2_stream_buffer_count() argument
306 if (cnt == sp->buffer_total_count) return 0; in pvr2_stream_buffer_count()
313 cnt-sp->buffer_total_count); in pvr2_stream_buffer_count()
315 scnt = cnt & ~0x1f; in pvr2_stream_buffer_count()
316 if (cnt > scnt) scnt += 0x20; in pvr2_stream_buffer_count()
318 if (cnt > sp->buffer_total_count) { in pvr2_stream_buffer_count()
331 while (sp->buffer_total_count < cnt) { in pvr2_stream_buffer_count()
345 while (sp->buffer_total_count > cnt) { in pvr2_stream_buffer_count()
372 unsigned int cnt; in pvr2_stream_achieve_buffer_count() local
385 cnt = 0; in pvr2_stream_achieve_buffer_count()
386 while ((sp->buffer_total_count - cnt) > sp->buffer_target_count) { in pvr2_stream_achieve_buffer_count()
387 bp = sp->buffers[sp->buffer_total_count - (cnt + 1)]; in pvr2_stream_achieve_buffer_count()
389 cnt++; in pvr2_stream_achieve_buffer_count()
391 if (cnt) { in pvr2_stream_achieve_buffer_count()
392 pvr2_stream_buffer_count(sp,sp->buffer_total_count - cnt); in pvr2_stream_achieve_buffer_count()
553 int pvr2_stream_set_buffer_count(struct pvr2_stream *sp,unsigned int cnt) in pvr2_stream_set_buffer_count() argument
556 if (sp->buffer_target_count == cnt) return 0; in pvr2_stream_set_buffer_count()
558 sp->buffer_target_count = cnt; in pvr2_stream_set_buffer_count()
643 int pvr2_buffer_set_buffer(struct pvr2_buffer *bp,void *ptr,unsigned int cnt) in pvr2_buffer_set_buffer() argument
657 bp->max_count = cnt; in pvr2_buffer_set_buffer()