summaryrefslogtreecommitdiff
path: root/components/codec-wm9711/wm9711.h
blob: 52b3c5a99c5553341950af1b5c54ce5cc1b3b6c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/* ----------------------------------------------------------------------------
 *         ATMEL Microcontroller Software Support 
 * ----------------------------------------------------------------------------
 * Copyright (c) 2009, Atmel Corporation
 *
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * - Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the disclaimer below.
 *
 * Atmel's name may not be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
 * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * ----------------------------------------------------------------------------
 */


#ifndef AC97_WM9711_H
#define AC97_WM9711_H

//------------------------------------------------------------------------------
//         External constants
//------------------------------------------------------------------------------
#define WM9711_CMD(cmd, data) (((cmd << 16) & AT91C_AC97C_CADDR) | data)


#define WM9711_RESET              0x00

#define WM9711_LRVOLUME           0x02

#define WM9711_HPVOLUME           0x04

#define WM9711_MONOVOLUME         0x06

#define WM9711_DACTONECTL         0x08

#define WM9711_PCBEEPINPUT        0x0A

#define WM9711_PHONEVOLUME        0x0C

#define WM9711_MICVOLUME          0x0E

#define WM9711_LINEINVOLUME       0x10

#define WM9711_AUXDACVOLUME       0x12

#define WM9711_SIDETONEVOLUME     0x14

#define WM9711_OUT3VOLUME         0x16

#define WM9711_DACVOLUME          0x18

#define WM9711_RECORDSEL          0x1A

#define WM9711_RECORDGAIN         0x1C

#define WM9711_GENERALPURPOSE     0x20

#define WM9711_DAC3DCTL           0x22

#define WM9711_POWERDOWN          0x24

#define WM9711_POWERDOWNCTL       0x26

#define WM9711_EXAUDIOID          0x28

#define WM9711_EXAUDIOCTL         0x2A

#define WM9711_DACSAMPLERATE      0x2C

#define WM9711_AUXDACSAMPLERATE   0x2E

#define WM9711_ADCSAMPLERATE      0x32

#define WM9711_SPDIFCTL           0x3A

#define WM9711_PINCONFIG          0x4C

#define WM9711_PINPOL             0x4E

#define WM9711_PINSTICKY          0x50

#define WM9711_PINWAKEUP          0x52

#define WM9711_PINSTATUS          0x54

#define WM9711_PINASSIGNMENT      0x56

#define WM9711_PINFUNCTIONS       0x58

#define WM9711_VENDORRESERVED1    0x5A

#define WM9711_FUNCTIONCTL        0x5C

#define WM9711_VENDORRESERVED2    0x5E

#define WM9711_ALCCTL             0x60

#define WM9711_NOISECTL           0x62

#define WM9711_AUXDACINPUT        0x64

#define WM9711_VENDOR_ID1         0x7C		           // Vendor 1

#define WM9711_VENDOR_ID2         0x7E             // Vendor 2

#define WM9711_ID_1	              0x574D           //ASCII "W" "M"

#define WM9711_ID_2	              0x4C12           //ASCII "L" number "12"

#endif //#ifndef AC97_WM9711_H
personal git repositories of Harald Welte. Your mileage may vary