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
125
126
127
|
/*
* ==========================================================================
* Texas Instruments OMAP(TM) Platform Firmware
* (c) Copyright 2009, Texas Instruments Incorporated. All Rights Reserved.
*
* Use of this firmware is controlled by the terms and conditions found
* in the license agreement under which this firmware has been supplied.
* ==========================================================================
*/
void abe_init_subroutine_table(void);
/*
* Register Programming Examples
*
* 1. Power on sequence
*
* The modules HSLDO, NCP, LSLDO, LPPLL are enabled/disabled automatically by the TWL6040 power state machine after pin AUDPWRON transitions from 0 ' 1. No register writes are necessary.
*
* For the purposes of test it is possible to bypass the power state machine and manually enable these modules in the same order as described in Fig 2-XX. This can be done after VIO comes up and I2C register writes are possible.
*
* The manual sequence could be as follows
* LDOCTL = 0x04 (Enable HSLDO)
* NCPCTL = 0x03 (Enable NCP in auto mode)
* LDOCTL = 0x05 (Enable LSLDO)
* LPPLLCTL = 0x09 (Enable LPPLL with output frequency = 19.2MHz)
*
* Please see Fig 2-64 for details on details to be maintained between successive I2C register writes.
*
* Further if the system MCLK is active the HPPLL could be enabled instead of the LPPLL.
* (a) For a square wave where slicer is not required
* HPPLLCTL = 0x11 (Select HPPLL output, Enable HPPLL)
* (a) For a sine wave where slicer is required
* HPPLLCTL = 0x19 (Select HPPLL output, Enable Slicer, Enable HPPLL)
*
*/
/*
* 2. Setting up a stereo UPLINK path through MICAMPL, MICAMPR input amplifiers
* AMICBCTL = 0x10
* MICGAIN = 0x0F (Gain to 24 dB for L and R)
* HPPLLCTL = 0x19 (Select HPPLL output, Enable Slicer, Enable HPPLL)
* MICLCTL = 0x0D (Select MMIC input, Enable ADC)
* MICRCTL = 0x0D (Select SMIC input, Enable ADC)
*
*/
/*
* 3. Setting up a stereo headset MP3 playback DNLINK path
* Please see section 2.3.1.1 for details
*
* (b) HP
* HSGAIN = 0x22 (-4 dB gain on L and R amplifiers)
* HSLCTL = 0x01 (Enable HSDAC L, HP mode)
* HSRCTL = 0x01 (Enable HSDAC R, HP mode)
* Wait 80us
* HSLCTL = 0x05 (Enable HSLDRV, HP mode)
* HSRCTL = 0x05 (Enable HSRDRV, HP mode)
* Wait 2ms
* HSLCTL = 0x25 (Close HSDACL switch)
* HSRCTL = 0x25 (Close HSDACR switch)
*
*/
/*
* (a) LP
* HSGAIN = 0x22 (-4 dB gain on L and R amplifiers)
* HSLCTL = 0x03 (Enable HSDAC L, LP mode)
* HSRCTL = 0x03 (Enable HSDAC R, LP mode)
* Wait 80us
* HSLCTL = 0x0F (Enable HSLDRV, LP mode)
* HSRCTL = 0x0F (Enable HSRDRV, LP mode)
* Wait 2ms
* HSLCTL = 0x2F (Close HSDACL switch)
* HSRCTL = 0x2F (Close HSDACR switch)
*
*/
/*
* 4. Setting up a stereo FM playback path on headset
* (a) HP
* LINEGAIN = 0x1B (0dB gain on L and R inputs)
* MICLCTL = 0x02 (Enable Left LINEAMP)
* MICRCTL = 0x02 (Enable Right LINEAMP)
* HSGAIN = 0x22 (-4 dB gain on L and R amplifiers)
* HSLCTL = 0x04 (Enable HSLDRV in HP mode)
* HSRCTL = 0x04 (Enable HSRDRV in HP mode)
* Wait 2ms
* HSLCTL = 0x44 (Close FMLOOP switch)
* HSRCTL = 0x44 (Close FMLOOP switch)
*
*
*/
/*
* (b) LP
* LINEGAIN = 0x1B (0dB gain on L and R inputs)
* MICLCTL = 0x02 (Enable Left LINEAMP)
* MICRCTL = 0x02 (Enable Right LINEAMP)
* HSGAIN = 0x22 (-4 dB gain on L and R amplifiers)
* HSLCTL = 0x0C (Enable HSLDRV in LP mode)
* HSRCTL = 0x0C (Enable HSRDRV in LP mode)
* Wait 2ms
* HSLCTL = 0x4C (Close FMLOOP switch)
* HSRCTL = 0x4C (Close FMLOOP switch)
*
*/
/*
* 5. Setting up a handset call
*
* UPLINK
*
* AMICBCTL = 0x10
* MICGAIN = 0x0F (Gain to 24 dB for L and R)
* HPPLLCTL = 0x19 (Select HPPLL output, Enable Slicer, Enable HPPLL)
* MICLCTL = 0x0D (Select MMIC input, Enable ADC)
* MICRCTL = 0x0D (Select SMIC input, Enable ADC)
*
* DNLINK
*
* HSLCTL = 0x01 (Enable HSDACL, HP mode)
* Wait 80us
* EARCTL = 0x03 (Enable EAR, Gain = min, by default enabling EAR connects HSDACL output to EAR)
*
*/
|