Commit Graph

7 Commits

Author SHA1 Message Date
Michael Sevakis e61e9c61d0 Do some cleanup, adjustment and a couple fixes to recent sound changes.
* SOUND_x enum can be generated by audiohw_settings.h along with settings
entries and sound_val2phys.

* VOLUME_MIN and VOLUME_MAX are no longer necessary within sound.c. If
you need them, they are for target-defined purposes.

* Fix up SDL volume implementation in sdl.c. Move sim volume calculation
code to pcm-sdl.c.

* Min trigger tresholds were based upon VOLUME_MIN for some reason.
These setting have nothing to do with playback volume. Since it is no
longer present, set these at -89dB which is the minimum peak meter
sensitivity setting.

* Fix an oversight in wm8758.c. I forgot to add the dB->register
conversion to audiohw_set_volume.

Change-Id: Ie1df33f1793eee75e6793f16bc7bddd16edb7f75
2013-04-22 20:38:17 -04:00
Michael Sevakis 0c7b787398 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
2013-04-15 12:02:05 -04:00
Michael Sevakis f5a5b94686 Implement universal in-PCM-driver software volume control.
Implements double-buffered volume, balance and prescaling control in
the main PCM driver when HAVE_SW_VOLUME_CONTROL is defined ensuring
that all PCM is volume controlled and level changes are low in latency.

Supports -73 to +6 dB using a 15-bit factor so that no large-integer
math is needed.

Low-level hardware drivers do not have to implement it themselves but
parameters can be changed (currently defined in pcm-internal.h) to work
best with a particular SoC or to provide different volume ranges.

Volume and prescale calls should be made in the codec driver. It should
appear as a normal hardware interface. PCM volume calls expect .1 dB
units.

Change-Id: Idf6316a64ef4fb8abcede10707e1e6c6d01d57db
Reviewed-on: http://gerrit.rockbox.org/423
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
2013-04-11 22:55:16 +02:00
Maurus Cuelenaere 56d721fda9 Fix yellow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21098 a1c6a512-1295-4272-9138-f99709370657
2009-05-26 23:28:53 +00:00
Maurus Cuelenaere a0458dac2b Fix audio on Onda VX747
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21097 a1c6a512-1295-4272-9138-f99709370657
2009-05-26 22:57:49 +00:00
Maurus Cuelenaere 935780e426 Add support for Onda VX747 simulator (and yes, it needs a better picture)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20273 a1c6a512-1295-4272-9138-f99709370657
2009-03-09 23:32:37 +00:00
Maurus Cuelenaere 38436038a9 Ingenic Jz4740:
* Add initial RoLo support
 * Don't enable IRAM in plugins for now
 * Initial try at getting PCM working (doesn't crash anymore at least)
 * Replace hard-coded constant with #define in usb-jz4740


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20115 a1c6a512-1295-4272-9138-f99709370657
2009-02-26 21:15:40 +00:00