diff options
Diffstat (limited to 'drivers/media/video/cx18/cx18-queue.h')
-rw-r--r-- | drivers/media/video/cx18/cx18-queue.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/drivers/media/video/cx18/cx18-queue.h b/drivers/media/video/cx18/cx18-queue.h index 7f93bb13c09f..456cec3bc28f 100644 --- a/drivers/media/video/cx18/cx18-queue.h +++ b/drivers/media/video/cx18/cx18-queue.h | |||
@@ -4,6 +4,7 @@ | |||
4 | * Derived from ivtv-queue.h | 4 | * Derived from ivtv-queue.h |
5 | * | 5 | * |
6 | * Copyright (C) 2007 Hans Verkuil <hverkuil@xs4all.nl> | 6 | * Copyright (C) 2007 Hans Verkuil <hverkuil@xs4all.nl> |
7 | * Copyright (C) 2008 Andy Walls <awalls@radix.net> | ||
7 | * | 8 | * |
8 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by | 10 | * it under the terms of the GNU General Public License as published by |
@@ -42,11 +43,26 @@ static inline void cx18_buf_sync_for_device(struct cx18_stream *s, | |||
42 | void cx18_buf_swap(struct cx18_buffer *buf); | 43 | void cx18_buf_swap(struct cx18_buffer *buf); |
43 | 44 | ||
44 | /* cx18_queue utility functions */ | 45 | /* cx18_queue utility functions */ |
46 | struct cx18_queue *_cx18_enqueue(struct cx18_stream *s, struct cx18_buffer *buf, | ||
47 | struct cx18_queue *q, int to_front); | ||
48 | |||
49 | static inline | ||
50 | struct cx18_queue *cx18_enqueue(struct cx18_stream *s, struct cx18_buffer *buf, | ||
51 | struct cx18_queue *q) | ||
52 | { | ||
53 | return _cx18_enqueue(s, buf, q, 0); /* FIFO */ | ||
54 | } | ||
55 | |||
56 | static inline | ||
57 | struct cx18_queue *cx18_push(struct cx18_stream *s, struct cx18_buffer *buf, | ||
58 | struct cx18_queue *q) | ||
59 | { | ||
60 | return _cx18_enqueue(s, buf, q, 1); /* LIFO */ | ||
61 | } | ||
62 | |||
45 | void cx18_queue_init(struct cx18_queue *q); | 63 | void cx18_queue_init(struct cx18_queue *q); |
46 | void cx18_enqueue(struct cx18_stream *s, struct cx18_buffer *buf, | ||
47 | struct cx18_queue *q); | ||
48 | struct cx18_buffer *cx18_dequeue(struct cx18_stream *s, struct cx18_queue *q); | 64 | struct cx18_buffer *cx18_dequeue(struct cx18_stream *s, struct cx18_queue *q); |
49 | struct cx18_buffer *cx18_queue_get_buf_irq(struct cx18_stream *s, u32 id, | 65 | struct cx18_buffer *cx18_queue_get_buf(struct cx18_stream *s, u32 id, |
50 | u32 bytesused); | 66 | u32 bytesused); |
51 | void cx18_flush_queues(struct cx18_stream *s); | 67 | void cx18_flush_queues(struct cx18_stream *s); |
52 | 68 | ||