diff options
| author | Rob Purchase <shotofadds@rockbox.org> | 2008-01-14 22:04:48 +0000 |
|---|---|---|
| committer | Rob Purchase <shotofadds@rockbox.org> | 2008-01-14 22:04:48 +0000 |
| commit | 47ea030e2e68a51f91a2c2302b7ea4d3ee1a2a07 (patch) | |
| tree | 0a48ce653e22ec9a2673474f718217d9659e0c6b /firmware/drivers/audio | |
| parent | b30ca8ca5ab6c8ea27b8fe1f5fb38ebad09b7e62 (diff) | |
| download | rockbox-47ea030e2e68a51f91a2c2302b7ea4d3ee1a2a07.zip rockbox-47ea030e2e68a51f91a2c2302b7ea4d3ee1a2a07.tar.gz rockbox-47ea030e2e68a51f91a2c2302b7ea4d3ee1a2a07.tar.bz2 rockbox-47ea030e2e68a51f91a2c2302b7ea4d3ee1a2a07.tar.xz | |
Initial Cowon D2 commit:
* bootloader test program (basic LCD & button drivers, reads touchscreen)
* work-in-progress stubs for main build
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16090 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/audio')
| -rw-r--r-- | firmware/drivers/audio/wm8985.c | 143 |
1 files changed, 143 insertions, 0 deletions
diff --git a/firmware/drivers/audio/wm8985.c b/firmware/drivers/audio/wm8985.c new file mode 100644 index 0000000..3117b06 --- /dev/null +++ b/firmware/drivers/audio/wm8985.c @@ -0,0 +1,143 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Stubs for WM8985 audio codec, (unwisely?) based on 8975 driver. + * + * 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 "logf.h" +#include "system.h" +#include "string.h" +#include "audio.h" + +#include "wmcodec.h" +#include "audiohw.h" +#include "i2s.h" + +/* TODO: fix these values, they're copied straight from WM8975 */ +const struct sound_settings_info audiohw_settings[] = { + [SOUND_VOLUME] = {"dB", 0, 1, -74, 6, -25}, + [SOUND_BASS] = {"dB", 0, 1, -6, 9, 0}, + [SOUND_TREBLE] = {"dB", 0, 1, -6, 9, 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}, +}; + +/* convert tenth of dB volume to master volume register value */ +int tenthdb2master(int db) +{ + #warning function not implemented + + (void)db; + return 0; +} + +/* Silently enable / disable audio output */ +void audiohw_enable_output(bool enable) +{ + #warning function not implemented + + (void)enable; +} + +int audiohw_set_master_vol(int vol_l, int vol_r) +{ + #warning function not implemented + + (void)vol_l; + (void)vol_r; + return 0; +} + +int audiohw_set_lineout_vol(int vol_l, int vol_r) +{ + #warning function not implemented + + (void)vol_l; + (void)vol_r; + return 0; +} + +void audiohw_set_bass(int value) +{ + #warning function not implemented + + (void)value; +} + +void audiohw_set_treble(int value) +{ + #warning function not implemented + + (void)value; +} + +void audiohw_mute(bool mute) +{ + #warning function not implemented + + (void)mute; +} + +void audiohw_close(void) +{ + #warning function not implemented +} + +void audiohw_set_nsorder(int order) +{ + #warning function not implemented + + (void)order; +} + +/* Note: Disable output before calling this function */ +void audiohw_set_sample_rate(int sampling_control) +{ + #warning function not implemented + + (void)sampling_control; +} + +void audiohw_enable_recording(bool source_mic) +{ + #warning function not implemented + + (void)source_mic; +} + +void audiohw_disable_recording(void) +{ + #warning function not implemented +} + +void audiohw_set_recvol(int left, int right, int type) +{ + #warning function not implemented + + (void)left; + (void)right; + (void)type; +} + +void audiohw_set_monitor(bool enable) +{ + #warning function not implemented + + (void)enable; +} |