diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2008-04-27 10:30:54 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2008-04-27 10:30:54 +0000 |
commit | 27fac88548366f57c32931ed4d7c7dfc5b4f1627 (patch) | |
tree | e45132b551ce39a44a6fefa31e85971cea6df47e /firmware/drivers | |
parent | fec6af659f809d47f6e750975289e220908396fe (diff) | |
download | rockbox-27fac88548366f57c32931ed4d7c7dfc5b4f1627.tar.gz rockbox-27fac88548366f57c32931ed4d7c7dfc5b4f1627.zip |
Gigabeat S: Implement i2c driver - transmit works but no testing of receiving which will get a chance later. Add some seeds for codec driver. Correct a few #defines.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17254 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/audio/wm8978.c | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/firmware/drivers/audio/wm8978.c b/firmware/drivers/audio/wm8978.c new file mode 100644 index 0000000000..01f3d331bb --- /dev/null +++ b/firmware/drivers/audio/wm8978.c | |||
@@ -0,0 +1,60 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2008 by Michael Sevakis | ||
11 | * | ||
12 | * Driver for WM8978 audio codec | ||
13 | * | ||
14 | * All files in this archive are subject to the GNU General Public License. | ||
15 | * See the file COPYING in the source tree root for full license agreement. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #include "config.h" | ||
22 | #include "system.h" | ||
23 | #include "audiohw.h" | ||
24 | #include "wmcodec.h" | ||
25 | #include "audio.h" | ||
26 | |||
27 | const struct sound_settings_info audiohw_settings[] = { | ||
28 | [SOUND_VOLUME] = {"dB", 0, 1, -58, 6, -25}, | ||
29 | [SOUND_BASS] = {"dB", 0, 1, -12, 12, 0}, | ||
30 | [SOUND_TREBLE] = {"dB", 0, 1, -12, 12, 0}, | ||
31 | [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0}, | ||
32 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, | ||
33 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, | ||
34 | [SOUND_LEFT_GAIN] = {"dB", 1, 1,-128, 96, 0}, | ||
35 | [SOUND_RIGHT_GAIN] = {"dB", 1, 1,-128, 96, 0}, | ||
36 | [SOUND_MIC_GAIN] = {"dB", 1, 1,-128, 108, 16}, | ||
37 | #if 0 | ||
38 | [SOUND_BASS_CUTOFF] = {"", 0, 1, 1, 4, 1}, | ||
39 | [SOUND_TREBLE_CUTOFF] = {"", 0, 1, 1, 4, 1}, | ||
40 | #endif | ||
41 | }; | ||
42 | |||
43 | void audiohw_preinit(void) | ||
44 | { | ||
45 | wmcodec_write(WM8978_SOFTWARE_RESET, 0); | ||
46 | } | ||
47 | |||
48 | void audiohw_postinit(void) | ||
49 | { | ||
50 | sleep(HZ); | ||
51 | } | ||
52 | |||
53 | void audiohw_close(void) | ||
54 | { | ||
55 | } | ||
56 | |||
57 | void audiohw_mute(bool mute) | ||
58 | { | ||
59 | (void)mute; | ||
60 | } | ||