Commit Graph

12 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
2dd1f37a10 Fix f5a5b94 errors. Employ SW volume for select targets on SIM.
Onda VX747 sim was missing a limits #define; #include limits.h in
pcm_sw_volume.h.

Simply use the software volume control for the SIM volume control
rather than the SDL volume control when the target would have it
natively.

Change-Id: I8e924a2ff1b410f602452d2ea9b691efb82c931e
2013-04-11 19:00:23 -04:00
Michael Sevakis
cd8e11b463 Tweak some PCM drivers for less typecasting with the data pointer.
Yeah, sizeof (void) here with GCC is 1. If something has a problem
with that, we'll set it straight.

Change-Id: I9ad3eee75dd440f6404a04a501d1533c8bc18ba9
2012-03-04 08:52:50 -05:00
Michael Sevakis
286a4c5caa Revise the PCM callback system after adding multichannel audio.
Additional status callback is added to pcm_play/rec_data instead of
using a special function to set it. Status includes DMA error
reporting to the status callback. Playback and recording callback
become more alike except playback uses "const void **addr" (because
the data should not be altered) and recording  uses "void **addr".
"const" is put in place throughout where appropriate.

Most changes are fairly trivial. One that should be checked in
particular because it isn't so much is telechips, if anyone cares to
bother. PP5002 is not so trivial either but that tested as working.

Change-Id: I4928d69b3b3be7fb93e259f81635232df9bd1df2
Reviewed-on: http://gerrit.rockbox.org/166
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
2012-03-03 07:23:38 +01:00
Michael Sevakis
4db3e89652 Shuffle some functions around so that interfacing with playback.c in particular isn't required. Though playback does finish the audio init, pcm doesn't care who does it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30403 a1c6a512-1295-4272-9138-f99709370657
2011-09-01 12:15:43 +00:00
Michael Sevakis
a2b6703a36 Commit FS#12150 - Fully-functional audio mixer - and finally whip old limitations about playback of voice and other sounds when paused. Channels are independent in state and amplitude. Fade on stop/pause is handled by the channel's volume control rather than global volume which means it now works from anywhere. Opens up the possibility of plugin sounds during music playback by merely adding an additional channel enum. If any PCM drivers were not properly modified, see one of the last comments in the task for a description of the simple change that is expected. Some params are tunable in firmware/export/pcm-mixer.h as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30097 a1c6a512-1295-4272-9138-f99709370657
2011-06-29 06:37:04 +00:00
Rafaël Carré
b6caf99e1f sim: add spdif_measure_frequency() stub for HAVE_SPDIF_IN
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27281 a1c6a512-1295-4272-9138-f99709370657
2010-07-04 13:50:16 +00:00
Rafaël Carré
3982f1e932 Simulator: build recording code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27280 a1c6a512-1295-4272-9138-f99709370657
2010-07-04 13:37:52 +00:00
Michael Sevakis
1f5b9434da Cleanup r26253 red and yellow.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26254 a1c6a512-1295-4272-9138-f99709370657
2010-05-24 16:57:48 +00:00
Michael Sevakis
d56999890f Make PCM->driver interface about as simple as it will get. Registered callback, zero data, alignment and stops are handled entirely inside pcm.c; driver merely calls fixed pcm.c callback. Remove pcm_record_more and do it just like playback; the original reason behind it isn't very practical in general. Everything checks out on supported targets. There wer some compat changes I can't check out on many unsupoorted but if there's a problem it will be a minor oops. Plugins become incompatible due to recording tweak-- full update. Sorted API.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26253 a1c6a512-1295-4272-9138-f99709370657
2010-05-24 16:42:32 +00:00
Thomas Martitz
86e19dd65d Restore changes of r25809 that got lost in the target tree movement and fix simulator build on cygwin.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26120 a1c6a512-1295-4272-9138-f99709370657
2010-05-17 21:43:06 +00:00
Thomas Martitz
3d0cee8abb - Move uisimulator/sdl/*.[ch] into the target tree, under firmware/target/hosted/sdl, uisdl.c is split up across button-sdl.c and system-sdl.c.
- Refactor the program startup. main() is now in main.c like on target, and the implicit application thread will now act as our main thread (previously a separate one was created for this in thread initialization).

This is part of Rockbox as an application and is the first step to make an application port from the uisimulator. In a further step the sim bits from the sdl build will be separated out.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26065 a1c6a512-1295-4272-9138-f99709370657
2010-05-15 21:02:47 +00:00