tms320av110reg.h revision 1.1 1 /* $NetBSD: tms320av110reg.h,v 1.1 1997/10/16 23:58:10 is Exp $ */
2
3 /*-
4 * Copyright (c) 1997 Ignatios Souvatzis. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of the author nor the names of contributors
15 * may be used to endorse or promote products derived from this software
16 * without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 */
30
31 /*
32 * Definitions for access to the TMS320AV110AV mpeg audio decoder.
33 * Based on the TMS320AV110 data sheet.
34 *
35 * Currently, only minimum support for audio output. For audio/video
36 * synchronization, more is needed.
37 */
38
39 #ifndef _TMS320AV110_REG_H_
40 #define _TMS320AV110_REG_H_
41
42 /* symbolic registers and values */
43
44 #define TAV_ANC 0x06 /* RO, 4 bytes */
45 #define TAV_ANC_AV 0x6c /* RO */
46 #define TAV_ATTEN_L 0x1e
47 #define TAV_ATTEN_R 0x20
48 #define TAV_AUD_ID 0x22
49 #define TAV_AUD_ID_EN 0x24
50
51 #define TAV_BALE_LIM 0x68 /* 2 bytes */
52 #define TAV_BALF_LIM 0x6A /* 2 bytes */
53 #define TAV_BUFF 0x12 /* RO, 2 bytes */
54
55 #define TAV_CRC_ECM 0x2a
56 #define TAV_ECM_IGNORE 0 /* same for SYNC */
57 #define TAV_ECM_MUTE 1
58 #define TAV_ECM_REPEAT 2
59 #define TAV_ECM_SKIP 3
60
61 #define TAV_DATAIN 0x18 /* WO */
62 #define TAV_DIF 0x6f
63
64 #define TAV_DMPH 0x46
65 #define TAV_DRAM_EXT 0x3e /* RO */
66 #define TAV_DRAM_SIZE(ext) ((ext) ? 131072 : 256)
67 #define TAV_DRAM_HSIZE(ext) ((ext) ? 65536 : 128)
68
69 #define TAV_FREE_FORM 0x14 /* RW, 11 bit */
70
71 #define TAV_HEADER 0x5e /* RO, 4 bytes */
72
73 #define TAV_INTR 0x1a /* RO, 2 bytes */
74 #define TAV_INTR_EN 0x1c /* RW, 2 bytes */
75 #define TAV_INTR_SYNCCHANGE 0x0001
76 #define TAV_INTR_HEADERVALID 0x0002
77 #define TAV_INTR_PTSVALID 0x0004
78 #define TAV_INTR_LOWWATER 0x0008
79 #define TAV_INTR_HIGHWATER 0x0010
80 #define TAV_INTR_CRCERROR 0x0020
81 #define TAV_INTR_ANCILLARY_VALID 0x0040
82 #define TAV_INTR_ANCILLARY_FULL 0x0080
83 #define TAV_INTR_PCM_OUTPUT_UNDERFLOW 0x0100
84 #define TAV_INTR_SAMPLING_FREQ_CHANGE 0x0200
85 #define TAV_INTR_DEEMPH_CHANGE 0x0400
86 #define TAV_INTR_SRC_DETECT 0x0800
87
88 #define TAV_IRC 0x78 /* RO, 33 bit */
89 #define TAV_IRC_CNT 0x54 /* RO, 33 bit */
90 #define TAV_IRC_LOAD 0x7e
91
92 #define TAV_LATENCY 0x3c
93 #define TAV_MUTE 0x30
94
95 #define TAV_PCM_DIV 0x6e
96 #define TAV_PCM_18 0x16
97 #define TAV_PCM_FS 0x44 /* RO */
98 #define TAV_PCM_ORD 0x38
99
100 #define TAV_PLAY 0x2e
101 #define TAV_PTS 0x62 /* RO, 33 bits */
102 #define TAV_REPEAT 0x34
103 #define TAV_RESET 0x40
104 #define TAV_RESTART 0x42
105
106 #define TAV_SRC 0x72 /* RO, 33 bits */
107 #define TAV_SIN_EN 0x70
108 #define TAV_SKIP 0x32
109
110 #define TAV_STR_SEL 0x36
111 #define TAV_STR_SEL_MPEG_AUDIO_STREAM 0
112 #define TAV_STR_SEL_MPEG_AUDIO_PACKETS 1
113 #define TAV_STR_SEL_MPEG_SYSTEM_STREAM 2
114 #define TAV_STR_SEL_AUDIO_BYPASS 3
115
116 #define TAV_SYNC_ECM 0x2c /* see CRC_ECM */
117
118 #define TAV_SYNC_ST 0x28 /* 0..3 */
119 #define TAV_SYNC_ST_UNLOCKED 0
120 #define TAV_SYNC_ST_ATTEMPTING 2
121 #define TAV_SYNC_ST_LOCKED 3
122
123 #define TAV_VERSION 0x6d
124
125 #endif /* _TMS320AV110_REG_H_ */
126