]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/staging/cx25821/cx25821-audio-upstream.h
V4L/DVB (12730): Add conexant cx25821 driver
[karo-tx-linux.git] / drivers / staging / cx25821 / cx25821-audio-upstream.h
1 /*\r
2  *  Driver for the Conexant CX25821 PCIe bridge\r
3  *\r
4  *  Copyright (C) 2009 Conexant Systems Inc. \r
5  *  Authors  <hiep.huynh@conexant.com>, <shu.lin@conexant.com>\r
6  *\r
7  *  This program is free software; you can redistribute it and/or modify\r
8  *  it under the terms of the GNU General Public License as published by\r
9  *  the Free Software Foundation; either version 2 of the License, or\r
10  *  (at your option) any later version.\r
11  *\r
12  *  This program is distributed in the hope that it will be useful,\r
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
15  *\r
16  *  GNU General Public License for more details.\r
17  *\r
18  *  You should have received a copy of the GNU General Public License\r
19  *  along with this program; if not, write to the Free Software\r
20  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
21  */\r
22 \r
23 #include <linux/mutex.h>\r
24 #include <linux/workqueue.h>\r
25 \r
26 \r
27 #define NUM_AUDIO_PROGS       8\r
28 #define NUM_AUDIO_FRAMES      8\r
29 #define END_OF_FILE           0\r
30 #define IN_PROGRESS           1\r
31 #define RESET_STATUS          -1\r
32 #define FIFO_DISABLE          0\r
33 #define FIFO_ENABLE           1\r
34 #define NUM_NO_OPS            4\r
35 \r
36 \r
37 #define RISC_READ_INSTRUCTION_SIZE      12\r
38 #define RISC_JUMP_INSTRUCTION_SIZE      12\r
39 #define RISC_WRITECR_INSTRUCTION_SIZE   16\r
40 #define RISC_SYNC_INSTRUCTION_SIZE      4\r
41 #define DWORD_SIZE                      4\r
42 #define AUDIO_SYNC_LINE                 4\r
43 \r
44 \r
45 #define LINES_PER_AUDIO_BUFFER      15\r
46 #define AUDIO_LINE_SIZE             128\r
47 #define AUDIO_DATA_BUF_SZ           (AUDIO_LINE_SIZE * LINES_PER_AUDIO_BUFFER)\r
48 \r
49 #define USE_RISC_NOOP_AUDIO   1\r
50 \r
51 #ifdef USE_RISC_NOOP_AUDIO                \r
52 #define AUDIO_RISC_DMA_BUF_SIZE    ( LINES_PER_AUDIO_BUFFER*RISC_READ_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE + NUM_NO_OPS*DWORD_SIZE + RISC_JUMP_INSTRUCTION_SIZE)\r
53 #endif\r
54 \r
55 \r
56 #ifndef USE_RISC_NOOP_AUDIO\r
57 #define AUDIO_RISC_DMA_BUF_SIZE    ( LINES_PER_AUDIO_BUFFER*RISC_READ_INSTRUCTION_SIZE + RISC_WRITECR_INSTRUCTION_SIZE + RISC_JUMP_INSTRUCTION_SIZE)\r
58 #endif\r
59 \r
60 static int _line_size;        \r
61 char * _defaultAudioName = "/root/audioGOOD.wav";   \r
62     \r