Commit Graph

675 Commits

Author SHA1 Message Date
Jonathan Gordon
1eb17dc9f4 EQ settings: Rework the settings to clean up the config file.
Instead of 3 cfg lines per eq band there is now a single line
for each:
<config name>: <cutoff/center freq>, <q>, <gain>

In addition, the config value names make a bit more sense.

The old settings are still readable but config.cfg and any new
settings files will be written with the new config values. (The
old settings will be removed completly sometime after the next
stable release).

Also a slight rework of the advanced EQ menu UI

Change-Id: I9008658d36ded442a5f2f825916df42a3934cbef
Reviewed-on: http://gerrit.rockbox.org/394
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2013-02-09 13:05:32 +01:00
Frank Gevaerts
18f0ba003c Revert 64d048be. It breaks h300.
HAVE_USB_CHARGING_ENABLE is not only used for software usb, so checking
for HAVE_USBSTACK is wrong.

Change-Id: I422796b517c262f33f35623e992434219e288424
2012-12-26 18:01:19 +01:00
Frank Gevaerts
64d048be2b Make code that depends on HAVE_USB_CHARGING_ENABLE check HAVE_USBSTACK.
This fixes building without HAVE_USBSTACK

Change-Id: If8fec87a3ed4de583864ed2bab69be1f2ad8ac52
2012-12-26 17:52:15 +01:00
Richard Quirk
71f70112b2 Add set_sleeptimer_duration function in minutes
Make set_sleep_timer a static function and only call
set_sleeptimer_duration externally, which is always called with minutes
values.

Change-Id: I985308bf014e354f91c47a0b2bf62f4f5a591919
Reviewed-on: http://gerrit.rockbox.org/327
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2012-10-06 11:59:13 +02:00
Bertrik Sikken
afc96087f8 New crossfeed algorithm for Rockbox: "Meier" crossfeed
Emulates the basic "Meier" crossfeed (2 capacitors, 3 resistors)
as discussed in
http://www.meier-audio.homepage.t-online.de/passivefilter.htm

This crossfeed blends a bit of low-pass filtered L signal into
the R signal (and vice versa) while adding about 300 us delay
to the crossfed-signal. A difference with the crossfeed already
present in rockbox, is that this algorithm keeps the total
spectrum flat (the one currently in rockbox accentuates
low-frequency signals, making it sound a bit muffled).

This implementation is quite lightweight, just 3 multiplies per
left-right pair of samples. Has a default C implementation and
optimized assembly versions for ARM and Coldfire.

The crossfeed effect is quite subtle and is noticeable mostly
one albums that have very strong left-right separation (e.g.
one instrument only on the left, another only on the right).

In the user interface, the new crossfeed option appears as
"Meier" and is not configureable. The existing crossfeed is
renamed to "Custom" as it allows itself to be customised.

There is no entry for the user manual yet.

Change-Id: Iaa100616fe0fcd7e16f08cdb9a7f41501973eee1
2012-05-28 11:34:15 +02:00
Nils Wallménius
d29a11b7a8 Rename HAVE_PITCHSCREEN to HAVE_PITCHCONTROL
Also move the definition to config.h

Change-Id: I36bb5020c5e06b2344292bc05e8c13ccc7a6a1ff
Reviewed-on: http://gerrit.rockbox.org/234
Reviewed-by: Nils Wallménius <nils@rockbox.org>
2012-05-09 14:32:38 +02:00
Michael Sevakis
57a20d2d63 Make DSP's replaygain independent of global_settings.
Moves replaygain definitions to lib/rbcodec/dsp/dsp_misc.h.
Intermediate functions in misc.c handle any adjustment and calling
the rbcodec APIs.

Change-Id: I9f03561bca9aedd13760cf19c4e19aa3c68e7024
Reviewed-on: http://gerrit.rockbox.org/140
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
2012-04-30 22:47:37 +02:00
Michael Sevakis
56f17c4164 Make rbcodec/dsp includes more specific.
Change-Id: Idb6af40df26f5b8499a40e8b98602261ef227044
2012-04-29 17:31:30 -04:00
Michael Sevakis
c9bcbe202d Fundamentally rewrite much of the audio DSP.
Creates a standard buffer passing, local data passing and messaging
system for processing stages. Stages can be moved to their own source
files to reduce clutter and ease assimilation of new ones. dsp.c
becomes dsp_core.c which supports an engine and framework for effects.

Formats and change notifications are passed along with the buffer so
that they arrive at the correct time at each stage in the chain
regardless of the internal delays of a particular one.

Removes restrictions on the number of samples that can be processed at
a time and it pays attention to destination buffer size restrictions
without having to limit input count, which also allows pcmbuf to
remain fuller and safely set its own buffer limits as it sees fit.
There is no longer a need to query input/output counts given a certain
number of input samples; just give it the sizes of the source and
destination buffers.

Works in harmony with stages that are not deterministic in terms of
sample input/output ratio (like both resamplers but most notably
the timestretch). As a result it fixes quirks with timestretch hanging
up with certain settings and it now operates properly throughout its
full settings range.
Change-Id: Ib206ec78f6f6c79259c5af9009fe021d68be9734
Reviewed-on: http://gerrit.rockbox.org/200
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
2012-04-29 10:00:56 +02:00
Sean Bartell
a6dea9e13d rbcodec refactoring: dsp_set_eq_coefs
dsp_set_eq_coefs now has parameters for the band settings, so it doesn't
need to access global_settings.

Change-Id: I29ac19fc353b15a79cb25f0e45132aef0881e4c9
Reviewed-on: http://gerrit.rockbox.org/138
Reviewed-by: Nils Wallménius <nils@rockbox.org>
2012-04-27 16:33:27 +02:00
Michael Sevakis
0842d7f7e1 Consolidate compressor settings into a struct.
Doing that makes things cleaner for later on.

Change-Id: I4e279aa57ace16a348acc0fc09059592325ec95f
2012-04-26 17:19:16 -04:00
Nick Peskett
3074b64025 Moved initial checking of sleeptimer_on_startup from root_menu.c to settings.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31439 a1c6a512-1295-4272-9138-f99709370657
2011-12-26 09:57:55 +00:00
Nick Peskett
5dba771d63 Option to restart running sleep timer on keypress.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31437 a1c6a512-1295-4272-9138-f99709370657
2011-12-26 09:30:25 +00:00
Jonathan Gordon
d66592bad1 Be less smart about when to reload skins as it caused more problems than it was worth. If any theme setting is loading from a .cfg reload all skins. Fixes FS#12410
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31081 a1c6a512-1295-4272-9138-f99709370657
2011-11-28 10:58:15 +00:00
Fred Bauer
fdfc88f38b Rename global_settings member glyphs to glyphs_to_cache and add descriptive comment.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31032 a1c6a512-1295-4272-9138-f99709370657
2011-11-20 15:41:17 +00:00
Fred Bauer
ea7a89606c FS#12293 Global default glyph setting in System > Limits > Glyphs To Cache. Defaults to 250. This saves a lot of RAM while still allowing non-English users to have adequate glyph coverage.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31031 a1c6a512-1295-4272-9138-f99709370657
2011-11-19 23:34:26 +00:00
Jonathan Gordon
f19f3efb07 Redo r30826 (and hopefully not reintroduce font issues) which cleans up the font API. FONT_UI is deprecated, use screens[screen].getuifont() instead (and .setuifont() to set it after a font has been loaded)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30932 a1c6a512-1295-4272-9138-f99709370657
2011-11-08 10:09:33 +00:00
Fred Bauer
e299eb3ea3 Add functions font_set_ui() and font_get_ui(). The font returned by FONT_UI used to be fixed at zero but since buflib-fonts (r30589) can be different, depending on the order of loads and unloads. Fixes broken behavoir in virtual keyboard (FS#12336), lyrics player (FS#12306), and hopefully, FS#12337
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30826 a1c6a512-1295-4272-9138-f99709370657
2011-10-22 17:13:33 +00:00
Björn Stenberg
0942e2a0f7 Changed the FOR_NB_SCREENS macro to always be a for loop that declares its own loop variable. This removes the need to declare this variable in the outer scope.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657
2011-10-15 19:35:02 +00:00
Jeffrey Goode
a604345ae1 Clean up compressor setting code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30715 a1c6a512-1295-4272-9138-f99709370657
2011-10-05 04:44:56 +00:00
Jonathan Gordon
aa0f4a4bbe FS#12273 - use buflib for font storage. thanks to the testers :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30589 a1c6a512-1295-4272-9138-f99709370657
2011-09-24 13:19:34 +00:00
Jonathan Gordon
8997321777 Remove duplicated code to search for a setting by its cfg name
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30428 a1c6a512-1295-4272-9138-f99709370657
2011-09-04 13:17:09 +00:00
Björn Stenberg
e50cc0e3d7 Listen to and follow external Android volume changes. (Based on FS#11914 by Maurus Cuelenaere)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29586 a1c6a512-1295-4272-9138-f99709370657
2011-03-14 12:25:48 +00:00
Jonathan Gordon
485ff79584 Add an ability to set a setting to a specific value with a touchscreen action.
example: %T(0,0,20,12, setting_set, repeat, off)
That will set the repeat mode to "off" when it is pressed.
"setting_set" is the action name
"repeat" is the name of the setting in the config files
"off" is the value to set it to (same values as the legal values in the config files)

Not all settings are supported, outright unsupported settings will fail to parse. Some settings might not work too well if they don't apply instantly (Any that work well int he quickscreen should work well here)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29483 a1c6a512-1295-4272-9138-f99709370657
2011-03-01 12:31:03 +00:00
Thomas Martitz
044de86d81 Fix FS#11904, filename generation was lacking a slash.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29140 a1c6a512-1295-4272-9138-f99709370657
2011-01-26 07:46:02 +00:00
Alexander Levin
0ce42df073 Don't load the colours file if it's set to '' (partial fix for FS#11847)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28949 a1c6a512-1295-4272-9138-f99709370657
2011-01-02 22:44:15 +00:00
Alexander Levin
a6b611a6d6 Don't load the keyboard layout '-.kbd' (partial fix for FS#11847)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28948 a1c6a512-1295-4272-9138-f99709370657
2011-01-02 22:41:35 +00:00
Thomas Martitz
2c2416094f Get rid of get_user_file_path and do the path handling in wrappers for open() and friends.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28752 a1c6a512-1295-4272-9138-f99709370657
2010-12-06 22:26:31 +00:00
Jonathan Gordon
e4bd9e3774 Fix FS#11648 - loading a .cfg doesnt automatically save the new config, caused by r28120. This fix will only save the new config loaded from the browsers, not during boot
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28201 a1c6a512-1295-4272-9138-f99709370657
2010-10-03 05:43:36 +00:00
Marcin Bukat
93c50d4770 Remove the call to settings_save() from settings_load_config() as it seems unneeded any more and causes unecessary writes on every startup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28120 a1c6a512-1295-4272-9138-f99709370657
2010-09-20 13:34:21 +00:00
Frank Gevaerts
f366090562 Make disabling HAVE_PITCHSCREEN actually work without breaking the build
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28102 a1c6a512-1295-4272-9138-f99709370657
2010-09-17 20:28:47 +00:00
Thomas Martitz
24424bab2a Fix reds. The battery_capacity setting is used even for fixed-battery targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27976 a1c6a512-1295-4272-9138-f99709370657
2010-09-01 23:49:28 +00:00
Thomas Martitz
f05cdc46f2 Android: don't compile powermgmt-sim.c
Instead implement a bit of battery monitoring. Currently it only fetches the battery level (in %) every 30s,
but it could do more like battery status, charger connected, voltage...
Theoretically, we could also exit/quit after some time of inactivity too
(perhaps not a bad idea since Rockbox puts a slight but still non-zero CPU load even if doing nothing).

Ironically, Rockbox is now the only way to get the exact battery level (at least I haven't found anything yet) on my phone :-)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27974 a1c6a512-1295-4272-9138-f99709370657
2010-09-01 23:36:15 +00:00
Thomas Martitz
458b55dac6 One more get_user_file_path() fix. Don't store the user dir in config.cfg and
pretent the file (fonts, wps, etc.)was in the installation dir (it'll still be loaded from the user dir).
This way the behavior is the same for files in the installation dir and in the user config dir.

This is needed because we historically only store the basename of the file at runtime and don't
support writing these to config.cfg if they're outside of the rockbox dir.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27720 a1c6a512-1295-4272-9138-f99709370657
2010-08-05 14:31:00 +00:00
Thomas Martitz
850efead04 A few post-fixes to the get_user_file_path() commit.
Remove unneeded restriction from set_file that prevented filename settings to
work if they were outside of ROCKBOX_DIR.
Add the get_user_file_path() call to a few further places where it was
forgotten.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27667 a1c6a512-1295-4272-9138-f99709370657
2010-08-02 19:13:22 +00:00
Thomas Martitz
9c0b2479f7 Rockbox as an application: add get_user_file_path().
For RaaA it evaluates user paths at runtime. For everything but codecs/plugins it will give the path under $HOME/.config/rockbox.org if write access is needed or if the file/folder in question exists there (otherwise it gives /usr/local/share/rockbox).
This allows for installing themes under $HOME as well as having config.cfg and other important files there while installing the application (and default themes) under /usr/local.

On the DAPs it's a no-op, returing /.rockbox directly.

Not converted to use get_user_file_path() are plugins themselves, because RaaA doesn't build plugins yet.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27656 a1c6a512-1295-4272-9138-f99709370657
2010-08-01 16:15:27 +00:00
Thomas Martitz
f69e995bda Fix potential buffer overflow.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27568 a1c6a512-1295-4272-9138-f99709370657
2010-07-26 00:06:06 +00:00
Thomas Martitz
a3e6a865df Rewrite set_file() to be smaller and better readable, and a comment describing what it does.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27567 a1c6a512-1295-4272-9138-f99709370657
2010-07-25 22:45:57 +00:00
Thomas Martitz
1828a753a8 Use MAX_PATH for array used for filename.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27547 a1c6a512-1295-4272-9138-f99709370657
2010-07-25 14:29:06 +00:00
Thomas Martitz
35e8b1429a Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with #if (CONFIG_PLATFORM & PLATFORM_HOSTED) (or equivalently).
The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR).
The new define is to (de-)select code to compile on hosted platforms generally.

Should be no functional change to targets or the simulator.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
2010-06-21 16:53:00 +00:00
Michael Sparmann
9092f7aa45 Don't leak a file handle if nvram.bin is <8 bytes in size
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27011 a1c6a512-1295-4272-9138-f99709370657
2010-06-21 12:34:28 +00:00
Nils Wallménius
042adbba61 Remove the jump scroll settings since they don't do anything, drop the relevant lang ids too
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26575 a1c6a512-1295-4272-9138-f99709370657
2010-06-05 11:59:43 +00:00
Rafaël Carré
5d236b2bfd Generate C file / header for svn version string
It's now easier to force rebuild of files depending on the svn revision

version.c/version.h are generated once with new tools/genversion.sh
Changes in the VCS are still not auto detected, so you'll have to remove
builddir/version.* if you want to change the string in your binaries

APPSVERSION is now called RBVERSION and is defined in the generated
header instead of being defined by the Makefiles
appsversion is now called rbversion (the plugin api number didn't change
since old modules are still binary compatible)

Change some bootloaders to use knwon-at-buildtime RBVERSION instead of
"%s" + rbversion

You'll need to run make clean to regenerate dependencies after the
removal of apps/version.h

To build binaries with a different version string, hand-edit
tools/version.sh or tools/genversion.sh (which calls the former)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26320 a1c6a512-1295-4272-9138-f99709370657
2010-05-27 09:41:46 +00:00
Michael Sevakis
80d0d15ca9 Gigabeat S: Fully enable access to hardware tone controls and 3-D effect feature. Under the hood, it's designated a hardware equalizer since it is one. Implement code framework for hardware EQ in general. Menu aspect is well abstracted and so the UI and strings can be changed around if taste doesn't quite suit. So far the emphasis is distinction of the UI labelling from the software EQ so that it's clear the settings are for a different thing.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26051 a1c6a512-1295-4272-9138-f99709370657
2010-05-15 13:09:45 +00:00
Thomas Martitz
50a6ca39ad Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes).
This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 21:04:40 +00:00
Thomas Martitz
0a1d7c28b7 Make open() posix compliant api-wise. A few calls (those with O_CREAT) need the additional optional mode parameter so add it. Impact for the core is almost zero, as open() is a wrapper macro for the real open function which doesn't take the variable parameter.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25844 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 17:35:13 +00:00
Jeffrey Goode
e53ede9b2b Fix someone elses yellow and red
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25434 a1c6a512-1295-4272-9138-f99709370657
2010-04-02 01:41:51 +00:00
Torne Wuff
52e528e057 Boot charting support.
Select (B)ootchart in advanced options in configure, and logf will record timings for various stages of boot, for performance comparisons. Format logged is:
BC:>function_name,123,80
where 123 is the line number, 80 is the number of ticks since boot. This can be loaded as CSV into a spreadsheet.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25426 a1c6a512-1295-4272-9138-f99709370657
2010-04-01 16:27:21 +00:00
Teruaki Kawashima
70f6e62769 fix cutoff of f2/f3_rec_screen in the recording screen.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25046 a1c6a512-1295-4272-9138-f99709370657
2010-03-06 15:02:22 +00:00
Magnus Holmgren
a14f4acb0c Restore the 'read_disk' flag for settings_apply that was removed in r24922. It is still needed to prevent uncessary disk I/O for fonts etc. Should fix FS#11071 (I haven't tested it on a HD-based player).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25042 a1c6a512-1295-4272-9138-f99709370657
2010-03-06 12:14:12 +00:00