3 Copyright 1996,2002 Gregory D. Hager, Alfred A. Rizzi, Noah J. Cowan,
4 Jason Lapenta, Scott Smedley
6 This file is part of the DT3155 Device Driver.
8 The DT3155 Device Driver is free software; you can redistribute it
9 and/or modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2 of the
11 License, or (at your option) any later version.
13 The DT3155 Device Driver is distributed in the hope that it will be
14 useful, but WITHOUT ANY WARRANTY; without even the implied warranty
15 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with the DT3155 Device Driver; if not, write to the Free
20 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26 Date Programmer Description of changes made
27 -------------------------------------------------------------------
29 24-Jul-2002 SS GPL licence.
30 26-Oct-2009 SS Porting to 2.6.30 kernel.
39 /**********************************
40 * User functions for buffering
41 **********************************/
44 * Initialize the buffering system.
45 * This should be called prior to enabling interrupts
47 u32
dt3155_setup_buffers(u32
*allocatorAddr
);
50 * Get the next frame of data if it is ready.
51 * Returns zero if no data is ready. If there is data but the user has a
52 * locked buffer, it will unlock that buffer and return it to the free list.
54 int dt3155_get_ready_buffer(struct dt3155_fbuffer
*fb
);
57 * Return a locked buffer to the free list.
59 void dt3155_release_locked_buffer(struct dt3155_fbuffer
*fb
);
62 * Flush the buffer system.
64 int dt3155_flush(struct dt3155_fbuffer
*fb
);
66 /**********************************
67 * Simple array based que struct
68 **********************************/
70 bool are_empty_buffers(struct dt3155_fbuffer
*fb
);
71 void push_empty(struct dt3155_fbuffer
*fb
, int index
);
73 int pop_empty(struct dt3155_fbuffer
*fb
);
75 bool is_ready_buf_empty(struct dt3155_fbuffer
*fb
);
76 bool is_ready_buf_full(struct dt3155_fbuffer
*fb
);
78 void push_ready(struct dt3155_fbuffer
*fb
, int index
);
79 int pop_ready(struct dt3155_fbuffer
*fb
);
81 void printques(struct dt3155_fbuffer
*fb
);