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