diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2013-04-12 23:35:47 -0400 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2013-04-15 12:02:05 -0400 |
commit | 0c7b7873984e04941c9f21fa272638018fdb9a16 (patch) | |
tree | fb6afca45d2bef0a2c91732a39ffc0b965f5c557 /firmware/export/imx233-codec.h | |
parent | fd9e2568908f91b5bcf7378dc28f6ec070d6027a (diff) | |
download | rockbox-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/imx233-codec.h')
-rw-r--r-- | firmware/export/imx233-codec.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/firmware/export/imx233-codec.h b/firmware/export/imx233-codec.h index 6c329ccd1a..2fbd8bde59 100644 --- a/firmware/export/imx233-codec.h +++ b/firmware/export/imx233-codec.h | |||
@@ -27,10 +27,19 @@ | |||
27 | #define VOLUME_MIN -1000 | 27 | #define VOLUME_MIN -1000 |
28 | #define VOLUME_MAX 60 | 28 | #define VOLUME_MAX 60 |
29 | 29 | ||
30 | #define AUDIOHW_CAPS (DEPTH_3D_CAP | BASS_CAP | TREBLE_CAP) | 30 | #define AUDIOHW_CAPS (DEPTH_3D_CAP | BASS_CAP | TREBLE_CAP | \ |
31 | LIN_GAIN_CAP | MIC_GAIN_CAP) | ||
31 | 32 | ||
32 | /* Work with half dB since the i.MX233 doesn't have a better resolution */ | 33 | /* Work with half dB since the i.MX233 doesn't have a better resolution */ |
33 | int tenthdb2master(int tdb); | 34 | |
34 | void audiohw_set_headphone_vol(int vol_l, int vol_r); | 35 | /* i.MX233 has half dB steps */ |
36 | AUDIOHW_SETTING(VOLUME, "dB", 0, 1,-101, 6, -25) | ||
37 | /* HAVE_SW_TONE_CONTROLS */ | ||
38 | #ifdef HAVE_RECORDING | ||
39 | AUDIOHW_SETTING(LEFT_GAIN, "dB", 1, 1, 0, 31, 23) | ||
40 | AUDIOHW_SETTING(RIGHT_GAIN, "dB", 1, 1, 0, 31, 23) | ||
41 | AUDIOHW_SETTING(MIC_GAIN, "dB", 1, 1, 0, 1, 1) | ||
42 | #endif /* HAVE_RECORDING */ | ||
43 | AUDIOHW_SETTING(DEPTH_3D, "%", 0, 1, 0, 15, 0) | ||
35 | 44 | ||
36 | #endif /* __IMX233_CODEC_H_ */ | 45 | #endif /* __IMX233_CODEC_H_ */ |