Simplify my previous commit and taking the chance to mention that it should have...
[Rockbox.git] / firmware / export / wm8731l.h
blobf0f63c909a49de413b9a141d26b4091d533ef8f2
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2005 by Dave Chapman
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef _WM8731L_H
21 #define _WM8731L_H
23 /* volume/balance/treble/bass interdependency */
24 #define VOLUME_MIN -730
25 #define VOLUME_MAX 60
27 extern int tenthdb2master(int db);
28 extern int tenthdb2mixer(int db);
30 extern void audiohw_reset(void);
31 extern void audiohw_enable_output(bool enable);
32 extern int audiohw_set_master_vol(int vol_l, int vol_r);
33 extern int audiohw_set_mixer_vol(int channel1, int channel2);
34 extern void audiohw_set_bass(int value);
35 extern void audiohw_set_treble(int value);
36 extern void audiohw_set_nsorder(int order);
37 extern void audiohw_set_sample_rate(int sampling_control);
39 extern void audiohw_enable_recording(bool source_mic);
40 extern void audiohw_disable_recording(void);
41 extern void audiohw_set_recvol(int left, int right, int type);
42 extern void audiohw_set_monitor(int enable);
44 /* Register addresses */
45 #define LINVOL 0x00
46 #define RINVOL 0x01
47 #define LOUTVOL 0x02
48 #define ROUTVOL 0x03
49 #define AAPCTRL 0x04 /* Analog audio path control */
50 #define DACCTRL 0x05
51 #define PWRMGMT 0x06
52 #define AINTFCE 0x07
53 #define SAMPCTRL 0x08
54 #define ACTIVECTRL 0x09
55 #define RESET 0x0f
57 /* Register settings for the supported samplerates: */
58 #define WM8731L_8000HZ 0x4d
59 #define WM8731L_32000HZ 0x59
60 #define WM8731L_44100HZ 0x63
61 #define WM8731L_48000HZ 0x41
62 #define WM8731L_88200HZ 0x7f
63 #define WM8731L_96000HZ 0x5d
65 #endif /* _WM8975_H */