]>
Commit | Line | Data |
---|---|---|
c942fddf | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
1a9fc855 MCC |
2 | /* |
3 | * Driver for the Conexant CX25821 PCIe bridge | |
4 | * | |
5 | * Copyright (C) 2009 Conexant Systems Inc. | |
6 | * Authors <shu.lin@conexant.com>, <hiep.huynh@conexant.com> | |
1a9fc855 MCC |
7 | */ |
8 | ||
9 | #ifndef __CX25821_AUDIO_H__ | |
10 | #define __CX25821_AUDIO_H__ | |
11 | ||
8e249581 LF |
12 | #define USE_RISC_NOOP 1 |
13 | #define LINES_PER_BUFFER 15 | |
14 | #define AUDIO_LINE_SIZE 128 | |
1a9fc855 | 15 | |
6d8c2ba1 | 16 | /* Number of buffer programs to use at once. */ |
8e249581 | 17 | #define NUMBER_OF_PROGRAMS 8 |
1a9fc855 | 18 | |
6d8c2ba1 | 19 | /* |
e4115bb2 RP |
20 | * Max size of the RISC program for a buffer. - worst case is 2 writes per line |
21 | * Space is also added for the 4 no-op instructions added on the end. | |
22 | */ | |
1a9fc855 | 23 | #ifndef USE_RISC_NOOP |
6f1f0e85 LF |
24 | #define MAX_BUFFER_PROGRAM_SIZE \ |
25 | (2 * LINES_PER_BUFFER * RISC_WRITE_INSTRUCTION_SIZE + \ | |
26 | RISC_WRITECR_INSTRUCTION_SIZE * 4) | |
1a9fc855 MCC |
27 | #endif |
28 | ||
6d8c2ba1 | 29 | /* MAE 12 July 2005 Try to use NOOP RISC instruction instead */ |
1a9fc855 | 30 | #ifdef USE_RISC_NOOP |
6f1f0e85 LF |
31 | #define MAX_BUFFER_PROGRAM_SIZE \ |
32 | (2 * LINES_PER_BUFFER * RISC_WRITE_INSTRUCTION_SIZE + \ | |
33 | RISC_NOOP_INSTRUCTION_SIZE * 4) | |
1a9fc855 MCC |
34 | #endif |
35 | ||
6d8c2ba1 | 36 | /* Sizes of various instructions in bytes. Used when adding instructions. */ |
6f1f0e85 LF |
37 | #define RISC_WRITE_INSTRUCTION_SIZE 12 |
38 | #define RISC_JUMP_INSTRUCTION_SIZE 12 | |
39 | #define RISC_SKIP_INSTRUCTION_SIZE 4 | |
40 | #define RISC_SYNC_INSTRUCTION_SIZE 4 | |
41 | #define RISC_WRITECR_INSTRUCTION_SIZE 16 | |
42 | #define RISC_NOOP_INSTRUCTION_SIZE 4 | |
43 | ||
44 | #define MAX_AUDIO_DMA_BUFFER_SIZE \ | |
45 | (MAX_BUFFER_PROGRAM_SIZE * NUMBER_OF_PROGRAMS + \ | |
46 | RISC_SYNC_INSTRUCTION_SIZE) | |
1a9fc855 MCC |
47 | |
48 | #endif |