1
2
3
4
5
6
7
8
9 #ifndef __CX25821_AUDIO_H__
10 #define __CX25821_AUDIO_H__
11
12 #define USE_RISC_NOOP 1
13 #define LINES_PER_BUFFER 15
14 #define AUDIO_LINE_SIZE 128
15
16
17 #define NUMBER_OF_PROGRAMS 8
18
19
20
21
22
23 #ifndef USE_RISC_NOOP
24 #define MAX_BUFFER_PROGRAM_SIZE \
25 (2 * LINES_PER_BUFFER * RISC_WRITE_INSTRUCTION_SIZE + \
26 RISC_WRITECR_INSTRUCTION_SIZE * 4)
27 #endif
28
29
30 #ifdef USE_RISC_NOOP
31 #define MAX_BUFFER_PROGRAM_SIZE \
32 (2 * LINES_PER_BUFFER * RISC_WRITE_INSTRUCTION_SIZE + \
33 RISC_NOOP_INSTRUCTION_SIZE * 4)
34 #endif
35
36
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)
47
48 #endif