Commit graph

31 commits

Author SHA1 Message Date
William Wilgus
45bd4c7220 Fix last of red for strmemccpy
Change-Id: I76c421d938a879e57018e3f9706edf77c03de1b5
2022-11-15 01:58:28 -05:00
Michael Sevakis
6c868dd48f Remove explicit 'enum codec_command_action' in codec API
Just use long so the compiler potentially doesn't complain about
use of other values not in the enum. It's also the type used
around the system for event ids.

Increase min codec API version.

No functional changes.

Change-Id: If4419b42912f5e4ef673adcdeb69313e503f94cc
2017-12-07 14:41:59 -05:00
Frank Gevaerts
123346b86a _BSD_SOURCE is deprecated, and we're supposed to use _DEFAULT_SOURCE now.
Change-Id: Ia051bc758c8fe4002e222511fdc6be613cdd39e7
2016-03-18 21:27:15 +01:00
Frank Gevaerts
163ca14e58 Enable buflib and core_alloc for warble.
Most of the work comes from http://gerrit.rockbox.org/r/#/c/1088/
by Thomas Jarosch.

Change-Id: Iaa673dad2388d1e44fc95ffaa14bafadc6158101
2015-01-19 21:30:03 +01:00
Michael Sevakis
5d31d3c3bc Fix last warning for Warble
Unused result warnings will have to be dealt with separately.

Change-Id: I00c45e28d4d43a5376745036e650ff8df576c2db
2014-08-30 01:50:22 -04:00
Michael Sevakis
da4938d6ee Get the last errors I hope!
Change-Id: Ia285b95480cc9ac6494b745d80892c4b1b912341
2014-08-30 01:29:18 -04:00
Thomas Martitz
68768260e8 Fix more reds.
Change-Id: I4b58dda0953b7f9799238c32b78037b0a5403c04
2014-03-03 20:26:08 +01:00
Thomas Martitz
c245de029d Fix various reds. Some includes needed fixup.
Change-Id: I4327740bae17054131feb917abdd58846c451988
2014-03-03 19:10:48 +01:00
Michael Sevakis
d37bf24d90 Enable setting of global output samplerate on certain targets.
Replaces the NATIVE_FREQUENCY constant with a configurable frequency.

The user may select 48000Hz if the hardware supports it. The default is
still 44100Hz and the minimum is 44100Hz. The setting is located in the
playback settings, under "Frequency".

"Frequency" was duplicated in english.lang for now to avoid having to
fix every .lang file for the moment and throwing everything out of sync
because of the new play_frequency feature in features.txt. The next
cleanup should combine it with the one included for recording and
generalize the ID label.

If the hardware doesn't support 48000Hz, no setting will be available.

On particular hardware where very high rates are practical and desireable,
the upper bound can be extended by patching.

The PCM mixer can be configured to play at the full hardware frequency
range. The DSP core can configure to the hardware minimum up to the
maximum playback setting (some buffers must be reserved according to
the maximum rate).

If only 44100Hz is supported or possible on a given target for playback,
using the DSP and mixer at other samperates is possible if the hardware
offers them.

Change-Id: I6023cf0c0baa8bc6292b6919b4dd3618a6a25622
Reviewed-on: http://gerrit.rockbox.org/479
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
2013-07-06 04:22:04 +02:00
Michael Sevakis
6e211ab3ac Remove dsp_callback because DSP is now library code, not app code.
Yep, nope, not necessary anymore. Just call functions directly.

Change-Id: I21dc35f8d674c2a9c8379b7cebd5613c1f05b5eb
2013-05-23 14:25:37 -04:00
Michael Sevakis
3fd25dcbed Purge the usage of DSP_SWITCH_FREQUENCY.
DSP_SWITCH_FREQUENCY has been deprecated and the same enumerated value
as DSP_SET_FREQUENCY since major DSP revisions were committed. This
task should have been performed much earlier but, oh well, do it now.

Change-Id: I3f30d651b894136a07c7e17f78fc16a7d98631ff
2013-05-05 00:48:40 -04:00
Michael Sevakis
a2d8d4293a Properly implement volume in warble. dB cut only.
Change-Id: I34b77287ba0b1a0002db3d52e893a52c50593362
2013-04-25 23:46:17 -04:00
Michael Sevakis
95e23defb0 Make fixepoint.c as a shared library (libfixedpoint.a).
Change-Id: Icc10d6e85f890c432f191233a4d64e09f00be43d
Reviewed-on: http://gerrit.rockbox.org/456
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
2013-04-26 00:11:04 +02: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
Nils Wallménius
3f61caa0cd rbcodec: abstract tdspeed buffer allocation
Move code dealing with rockbox specific buflib allocations into a
rockbox specific file and implement buffer allocation with
malloc/free for warble/stand alone lib.
Based on patch by Sean Bartell.

Change-Id: I8cb85dad5890fbd34c1bb26abbb89c0b0f6b55cf
Reviewed-on: http://gerrit.rockbox.org/144
Tested-by: Nils Wallménius <nils@rockbox.org>
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Reviewed-by: Nils Wallménius <nils@rockbox.org>
2012-05-07 10:29:07 +02:00
Michael Sevakis
dbe5e5f2df rbcodec: Hooks for target specific functions in dsp_process loop
Use them to move tick counting, yielding and coldfire macsr handling
code to a rockbox specific file.

Change-Id: Id7417dc98c08a342eba45ba56b044a276e50564b
Reviewed-on: http://gerrit.rockbox.org/229
Tested-by: Nils Wallménius <nils@rockbox.org>
Reviewed-by: Nils Wallménius <nils@rockbox.org>
2012-05-03 23:47:46 +02:00
Sean Bartell
cadb3627fc Add rbcodecplatform.h and rbcodecconfig.h.
librbcodec users must provide these two files when the library is built.
rbcodecconfig.h provides configuration #defines and basic types, and
will be included by public librbcodec headers, so it must not conflict
with the user's code. rbcodecplatform.h provides various OS functions,
and will only be included by source files and private headers. This
system is intended to provide maximum flexibility for use on embedded
systems, where no operating system headers are included. Unix systems
can just copy rbcodecconfig-example.h and rbcodecplatform-unix.h with
minimal changes.

Change-Id: I350a2274d173da391fd1ca00c4202e9760d91def
Reviewed-on: http://gerrit.rockbox.org/143
Reviewed-by: Nils Wallménius <nils@rockbox.org>
Tested-by: Nils Wallménius <nils@rockbox.org>
2012-05-03 14:49:35 +02:00
Nils Wallménius
26e5e605d2 Delete unused stub functions.
Change-Id: I886d65b60364699845475e2ea1a741aece506a8f
2012-05-02 10:42:21 +02:00
Nils Wallménius
45c5b1fe17 Delete autoconf.h file in the warble source, one less headache.
Change-Id: I83c1b523de453c45aa4df3340b9a1aa63bf321ed
2012-05-01 19:10:00 +02:00
Michael Sevakis
5f37840e31 Warble must have a call to dsp_init before setting options or using it.
Change-Id: If5cabba99baffe87002d07f11641175f539315a1
2012-04-30 01:55:32 -04:00
Michael Sevakis
56f17c4164 Make rbcodec/dsp includes more specific.
Change-Id: Idb6af40df26f5b8499a40e8b98602261ef227044
2012-04-29 17:31:30 -04:00
Michael Sevakis
d8f3e3d0d1 Get warble building again.
Change-Id: Ibdb2d9064d0e948cfb745c10a7b23de1a750d55b
2012-04-29 04:41:02 -04:00
Sean Bartell
fe3d58004c rbcodec refactoring: get_audio_base_data_type
This function has been changed to rbcodec_format_is_atomic, which
doesn't require an enum from the kernel.

Change-Id: I1d537605087fe130a9b545509d7b8a340806dbf2
Reviewed-on: http://gerrit.rockbox.org/141
Reviewed-by: Nils Wallménius <nils@rockbox.org>
Tested-by: Nils Wallménius <nils@rockbox.org>
2012-04-28 09:07:40 +02:00
Sean Bartell
f40bfc9267 Add codecs to librbcodec.
Change-Id: Id7f4717d51ed02d67cb9f9cb3c0ada4a81843f97
Reviewed-on: http://gerrit.rockbox.org/137
Reviewed-by: Nils Wallménius <nils@rockbox.org>
Tested-by: Nils Wallménius <nils@rockbox.org>
2012-04-25 22:13:20 +02:00
Thomas Martitz
83cb2e5dae Fix warble and clean up/refactor Makefile.
Change-Id: I8754ad8724e22147b98a156fecea599bdda72292
2012-03-27 00:16:09 +02:00
Sean Bartell
b5716df4cb Build librbcodec with DSP and metadata.
All associated files are moved to /lib/rbcodec.

Change-Id: I572ddd2b8a996aae1e98c081d06b1ed356dce222
2012-03-18 12:00:39 +01:00
Frank Gevaerts
534117d1e0 Re-add -DDEBUG to the warble makefile
Change-Id: I515d2299b0de39092fbae3b070bd2d6d19a43ec5
2012-03-04 16:35:43 +01:00
Frank Gevaerts
0cc6ba018e Remove standalone makefile. Use configure to build
Change-Id: Ifa4fac02100da17b16199ac63cad1f6fe569667f
2012-03-03 20:45:49 +01:00
Frank Gevaerts
8d41b23ce2 Move includes of other makefiles around to make GCCFLAGS work properly.
Change-Id: Ic6aed06298dcb668a2c0f2c09d25612437893d1b
2012-03-03 20:35:48 +01:00
Frank Gevaerts
466a7c6a40 Integrate the warble tool in the regular build system.
Only sdl app builds work properly for now.

Change-Id: I7807d42f69b8577b401e48cdc63de71e54f49217
2012-03-03 20:19:08 +01:00
Sean Bartell
26fc31ae93 Add the warble test program.
Warble uses Rockbox's codecs to play files with SDL or convert them to
WAV or raw formats. It also prints metadata and supports some of the DSP
effects. In the future, warble could be used to implement an automated
test suite for codecs, metadata, and DSP.

Change-Id: Ife1a63d2354496016277bfcbae4a9c23423ebd86
Reviewed-on: http://gerrit.rockbox.org/135
Reviewed-by: Nils Wallménius <nils@rockbox.org>
Tested-by: Nils Wallménius <nils@rockbox.org>
2012-03-03 16:41:49 +01:00