96f958b63089d1c74a6bc8fc3dc8ee71cccb2045
[firmerware] / src / driver / tlv320aic2x.c
1 /* TLV320AIC20/21/24/25/20K/24K codec driver
2  *
3  * The name "codec" is generally used for sound I/O chips that take a
4  * realtime stream of samples and map send them to speakers; and that
5  * do the opposite for microphone input.
6  *
7  * This driver has a generic part, described here, and a lower part
8  * that actually gets the generated byte patterns to and from the chip,
9  * which fits better in the actual phone implementation and/or in the
10  * DSP/CPU chip driver.
11  *
12  * The assumption made in this driver is that there is a single unit
13  * of this codec, and that its outputs are used as prescribed in the
14  * datasheet for headset in/out, handset in/out and handsfree in/out
15  * inasfar as these facilities are configured on the target phone in
16  * HAVE_xxx variables.
17  *
18  * From: Rick van Rein <rick@openfortress.nl>
19  */
20
21
22 /* Setup the sound channel to use: SOUND_NONE, _HANDSET, _HEADSET,
23  * _SPEAKER and _LINE.  When set to SOUND_NONE, the chip is in setup
24  * in configuration programming mode; in any other modes, it is setup
25  * in continuous data transfer mode.
26  */
27 void bottom_soundchannel (soundchannel_t sch) {
28         //TODO//
29 }
30
31 /* Setup the communication with the codec, initialise the chip
32  */
33 void tls320aic2x_setup_sound (void) {
34         // TODO: Setup codec communications
35         bottom_soundchannel (SOUND_NONE);
36 }