Searched refs:cibuf (Results 1 - 3 of 3) sorted by relevance

/linux-4.4.14/drivers/media/pci/ttpci/
H A Dav7110_ca.c75 void ci_get_data(struct dvb_ringbuffer *cibuf, u8 *data, int len) ci_get_data() argument
77 if (dvb_ringbuffer_free(cibuf) < len + 2) ci_get_data()
80 DVB_RINGBUFFER_WRITE_BYTE(cibuf, len >> 8); ci_get_data()
81 DVB_RINGBUFFER_WRITE_BYTE(cibuf, len & 0xff); ci_get_data()
82 dvb_ringbuffer_write(cibuf, data, len); ci_get_data()
83 wake_up_interruptible(&cibuf->queue); ci_get_data()
124 static int ci_ll_reset(struct dvb_ringbuffer *cibuf, struct file *file, ci_ll_reset() argument
136 if (dvb_ringbuffer_free(cibuf) < len) ci_ll_reset()
142 dvb_ringbuffer_write(cibuf, msg, 8); ci_ll_reset()
150 static ssize_t ci_ll_write(struct dvb_ringbuffer *cibuf, struct file *file, ci_ll_write() argument
169 free = dvb_ringbuffer_free(cibuf); ci_ll_write()
175 if (wait_event_interruptible(cibuf->queue, ci_ll_write()
176 (dvb_ringbuffer_free(cibuf) >= count + 2))) ci_ll_write()
180 DVB_RINGBUFFER_WRITE_BYTE(cibuf, count >> 8); ci_ll_write()
181 DVB_RINGBUFFER_WRITE_BYTE(cibuf, count & 0xff); ci_ll_write()
183 res = dvb_ringbuffer_write(cibuf, page, count); ci_ll_write()
189 static ssize_t ci_ll_read(struct dvb_ringbuffer *cibuf, struct file *file, ci_ll_read() argument
196 if (!cibuf->data || !count) ci_ll_read()
198 if (non_blocking && (dvb_ringbuffer_empty(cibuf))) ci_ll_read()
200 if (wait_event_interruptible(cibuf->queue, ci_ll_read()
201 !dvb_ringbuffer_empty(cibuf))) ci_ll_read()
203 avail = dvb_ringbuffer_avail(cibuf); ci_ll_read()
206 len = DVB_RINGBUFFER_PEEK(cibuf, 0) << 8; ci_ll_read()
207 len |= DVB_RINGBUFFER_PEEK(cibuf, 1); ci_ll_read()
210 DVB_RINGBUFFER_SKIP(cibuf, 2); ci_ll_read()
212 return dvb_ringbuffer_read_user(cibuf, buf, len); ci_ll_read()
H A Dav7110_ca.h7 extern void ci_get_data(struct dvb_ringbuffer *cibuf, u8 *data, int len);
H A Dav7110.c572 struct dvb_ringbuffer *cibuf = &av7110->ci_wbuffer; gpioirq() local
574 avail = dvb_ringbuffer_avail(cibuf); gpioirq()
581 len = DVB_RINGBUFFER_PEEK(cibuf, 0) << 8; gpioirq()
582 len |= DVB_RINGBUFFER_PEEK(cibuf, 1); gpioirq()
589 DVB_RINGBUFFER_SKIP(cibuf, 2); gpioirq()
591 dvb_ringbuffer_read(cibuf, av7110->debi_virt, len); gpioirq()
598 wake_up(&cibuf->queue); gpioirq()

Completed in 248 milliseconds