nfsd: move most of nfsfh.h to fs/nfsd
[safe/jmp/linux-2.6] / drivers / staging / cx25821 / cx25821-audio.h
1 /*
2  *  Driver for the Conexant CX25821 PCIe bridge
3  *
4  *  Copyright (C) 2009 Conexant Systems Inc.
5  *  Authors  <shu.lin@conexant.com>, <hiep.huynh@conexant.com>
6  *
7  *  This program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation; either version 2 of the License, or
10  *  (at your option) any later version.
11  *
12  *  This program is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with this program; if not, write to the Free Software
20  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21  */
22
23 #ifndef __CX25821_AUDIO_H__
24 #define __CX25821_AUDIO_H__
25
26 #define USE_RISC_NOOP               1
27 #define LINES_PER_BUFFER            15
28 #define AUDIO_LINE_SIZE             128
29
30 //Number of buffer programs to use at once.
31 #define NUMBER_OF_PROGRAMS  8
32
33 //Max size of the RISC program for a buffer. - worst case is 2 writes per line
34 // Space is also added for the 4 no-op instructions added on the end.
35
36 #ifndef USE_RISC_NOOP
37 #define MAX_BUFFER_PROGRAM_SIZE     \
38     (2*LINES_PER_BUFFER*RISC_WRITE_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE*4)
39 #endif
40
41 // MAE 12 July 2005 Try to use NOOP RISC instruction instead
42 #ifdef USE_RISC_NOOP
43 #define MAX_BUFFER_PROGRAM_SIZE     \
44     (2*LINES_PER_BUFFER*RISC_WRITE_INSTRUCTION_SIZE + RISC_NOOP_INSTRUCTION_SIZE*4)
45 #endif
46
47 //Sizes of various instructions in bytes.  Used when adding instructions.
48 #define RISC_WRITE_INSTRUCTION_SIZE 12
49 #define RISC_JUMP_INSTRUCTION_SIZE  12
50 #define RISC_SKIP_INSTRUCTION_SIZE  4
51 #define RISC_SYNC_INSTRUCTION_SIZE  4
52 #define RISC_WRITECR_INSTRUCTION_SIZE  16
53 #define RISC_NOOP_INSTRUCTION_SIZE 4
54
55 #define MAX_AUDIO_DMA_BUFFER_SIZE (MAX_BUFFER_PROGRAM_SIZE * NUMBER_OF_PROGRAMS + RISC_SYNC_INSTRUCTION_SIZE)
56
57 #endif