summaryrefslogtreecommitdiff
path: root/firmware/drivers/audio/tlv320.c
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2007-05-22 15:56:05 +0000
committerChristian Gmeiner <christian.gmeiner@gmail.com>2007-05-22 15:56:05 +0000
commitcdbf33adf719a54221f4f5aac4b15b0dfe54d24d (patch)
tree9a3a38da744860df4fc2ffd591f848fd02b4094b /firmware/drivers/audio/tlv320.c
parente7075db2a76425051b2ecfdd14f14b07384c7e08 (diff)
downloadrockbox-cdbf33adf719a54221f4f5aac4b15b0dfe54d24d.tar.gz
rockbox-cdbf33adf719a54221f4f5aac4b15b0dfe54d24d.zip
* move audio settings into audio codec drivers
* add mas35xx driver for all mas35xx targets. Later mas35xx code from sound.c will move to this new driver git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13464 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/audio/tlv320.c')
-rw-r--r--firmware/drivers/audio/tlv320.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/firmware/drivers/audio/tlv320.c b/firmware/drivers/audio/tlv320.c
index 90587fc23a..95945883bf 100644
--- a/firmware/drivers/audio/tlv320.c
+++ b/firmware/drivers/audio/tlv320.c
@@ -24,6 +24,19 @@
24#include "i2c-coldfire.h" 24#include "i2c-coldfire.h"
25#include "tlv320.h" 25#include "tlv320.h"
26 26
27const struct sound_settings_info audiohw_settings[] = {
28 [SOUND_VOLUME] = {"dB", 0, 1, -73, 6, -20},
29 /* HAVE_SW_TONE_CONTROLS */
30 [SOUND_BASS] = {"dB", 0, 1, -24, 24, 0},
31 [SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0},
32 [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0},
33 [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0},
34 [SOUND_STEREO_WIDTH] = {"%", 0, 1, 0, 255, 100},
35 [SOUND_LEFT_GAIN] = {"dB", 1, 1, 0, 31, 23},
36 [SOUND_RIGHT_GAIN] = {"dB", 1, 1, 0, 31, 23},
37 [SOUND_MIC_GAIN] = {"dB", 1, 1, 0, 1, 1},
38};
39
27/* convert tenth of dB volume (-840..0) to master volume register value */ 40/* convert tenth of dB volume (-840..0) to master volume register value */
28int tenthdb2master(int db) 41int tenthdb2master(int db)
29{ 42{