summaryrefslogtreecommitdiff
path: root/firmware/export/uda1380.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2013-04-12 23:35:47 -0400
committerMichael Sevakis <jethead71@rockbox.org>2013-04-15 12:02:05 -0400
commit0c7b7873984e04941c9f21fa272638018fdb9a16 (patch)
treefb6afca45d2bef0a2c91732a39ffc0b965f5c557 /firmware/export/uda1380.h
parentfd9e2568908f91b5bcf7378dc28f6ec070d6027a (diff)
downloadrockbox-0c7b7873984e04941c9f21fa272638018fdb9a16.tar.gz
rockbox-0c7b7873984e04941c9f21fa272638018fdb9a16.zip
Straighten out the mad twisted state of sound.c and related areas.
This is going right in since it's long overdue. If anything is goofed, drop me a line or just tweak it yourself if you know what's wrong. :-) Make HW/SW codec interface more uniform when emulating HW functionality on SWCODEC for functions such as "audiohw_set_pitch". The firmware-to- DSP plumbing is in firmware/drivers/audiohw-swcodec.c. "sound_XXX" APIs are all in sound.c with none in DSP code any longer. Reduce number of settings definitions needed by each codec by providing defaults for common ones like balance, channels and SW tone controls. Remove need for separate SIM code and tables and add virtual codec header for hosted targets. Change-Id: I3f23702bca054fc9bda40f49824ce681bb7f777b
Diffstat (limited to 'firmware/export/uda1380.h')
-rw-r--r--firmware/export/uda1380.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/firmware/export/uda1380.h b/firmware/export/uda1380.h
index e9292cf466..a2200967dd 100644
--- a/firmware/export/uda1380.h
+++ b/firmware/export/uda1380.h
@@ -26,13 +26,18 @@
26#define VOLUME_MIN -840 26#define VOLUME_MIN -840
27#define VOLUME_MAX 0 27#define VOLUME_MAX 0
28 28
29#define AUDIOHW_CAPS (BASS_CAP | TREBLE_CAP | PRESCALER_CAP) 29#define AUDIOHW_CAPS (BASS_CAP | TREBLE_CAP | PRESCALER_CAP | \
30 30 LIN_GAIN_CAP | MIC_GAIN_CAP)
31extern int tenthdb2master(int db); 31
32extern int tenthdb2mixer(int db); 32AUDIOHW_SETTING(VOLUME, "dB", 0, 1, -85, 0, -25)
33 33AUDIOHW_SETTING(BASS, "dB", 0, 2, 0, 24, 0)
34extern void audiohw_set_master_vol(int vol_l, int vol_r); 34AUDIOHW_SETTING(TREBLE, "dB", 0, 2, 0, 6, 0)
35extern void audiohw_set_mixer_vol(int channel1, int channel2); 35#ifdef HAVE_RECORDING
36 /* (1/2) * 10 */
37AUDIOHW_SETTING(LEFT_GAIN, "dB", 1, 1,-128, 96, 0, val * 5)
38AUDIOHW_SETTING(RIGHT_GAIN, "dB", 1, 1,-128, 96, 0, val * 5)
39AUDIOHW_SETTING(MIC_GAIN, "dB", 1, 1,-128, 108, 16, val * 5)
40#endif /* HAVE_RECORDING */
36 41
37#define UDA1380_ADDR 0x30 42#define UDA1380_ADDR 0x30
38 43