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) |
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 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2008 by Michael Sevakis + * + * Driver for WM8978 audio codec + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#include "config.h" +#include "system.h" +#include "audiohw.h" +#include "wmcodec.h" +#include "audio.h" + +const struct sound_settings_info audiohw_settings[] = { + [SOUND_VOLUME] = {"dB", 0, 1, -58, 6, -25}, + [SOUND_BASS] = {"dB", 0, 1, -12, 12, 0}, + [SOUND_TREBLE] = {"dB", 0, 1, -12, 12, 0}, + [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0}, + [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, + [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, + [SOUND_LEFT_GAIN] = {"dB", 1, 1,-128, 96, 0}, + [SOUND_RIGHT_GAIN] = {"dB", 1, 1,-128, 96, 0}, + [SOUND_MIC_GAIN] = {"dB", 1, 1,-128, 108, 16}, +#if 0 + [SOUND_BASS_CUTOFF] = {"", 0, 1, 1, 4, 1}, + [SOUND_TREBLE_CUTOFF] = {"", 0, 1, 1, 4, 1}, +#endif +}; + +void audiohw_preinit(void) +{ + wmcodec_write(WM8978_SOFTWARE_RESET, 0); +} + +void audiohw_postinit(void) +{ + sleep(HZ); +} + +void audiohw_close(void) +{ +} + +void audiohw_mute(bool mute) +{ + (void)mute; +} |