Commit Graph

703 Commits

Author SHA1 Message Date
Solomon Peachy 8cb555460f [3/4] Completely remove HWCODEC support
'swcodec' is now always set (and recording_swcodec for recording-capable
units) in feature.txt so the manual and language strings don't need to
all be fixed up.

Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
2020-07-24 21:20:13 +00:00
Solomon Peachy 092c340a20 [1/4] Remove SH support and all archos targets
This removes all code specific to SH targets

Change-Id: I7980523785d2596e65c06430f4638eec74a06061
2020-07-24 21:20:13 +00:00
William Wilgus cb94b3ae2e keyboard add ability to specify temporary custom layouts
rb core allows you to load custom keyboard layouts

this patch adds the ability to load a keyboard layout in a buffer
the custom layout is temporary and does not overwrite the current layout

use like so:

    unsigned short kbd[64];
    unsigned short *kbd_p = kbd;
    if (!kbd_create_layout("ABCD1234\n", kbd, sizeof(kbd)))
        kbd_p = NULL;

    rb->kbd_input(buf,sizeof(buf), kbd_p);

Change-Id: I7be2bd4a1b4797a147fa70228a9749dc56ac052a
2020-07-22 06:48:28 -04:00
Solomon Peachy 25f9601d7b Fix the sea of red introduced in bf546fb
Change-Id: Ic158771d8dae6b587e0f567e7a6bb005b5e2ac50
2020-07-20 22:39:01 -04:00
Solomon Peachy bf546fbfcb Run-time validation of INT settings.
Check against min/max/step parameters

Many places this value is used as an index into an array; this will
help prevent array overflows and undefined/undesireable behavior.

Some fields accept arbitary values, continue to accept those.

Change-Id: Idbb5a17b7ceae5500660987703e2d6c16e920c92
2020-07-21 02:20:26 +00:00
Igor B. Poretsky f26cf6a3ec Fixed system state information loss when it is saved in file
Change-Id: If2aca712af4152e144ec919cfc4b4d9cb23bf4f2
2020-06-30 14:20:37 +00:00
William Wilgus 3f6fed8eca Fix potential buffer overflow in settings.c
Change-Id: Ie8953e3ffc5188685f1ea056863bfbdb817080a7
2019-01-08 03:44:32 +01:00
William Wilgus dd40c46d50 Fix menu warnings
change offending bool return to int

warning: cast between incompatible function types from
'_Bool (*)(void)' to 'int (*)(void)' [-Wcast-function-type]

forgot to remove -- typedef int (*menu_function)(void);

Change-Id: Ie4c8d3ddb0fb7843c4ec584203350d658d6bee3e
2018-10-18 00:06:31 +02:00
Michael Sevakis abef236081 Do playback restarts the proper way
It isn't necessary to explicitly stop and restart playback to
force it to update something that must cause rebuffering.

Change-Id: I6ff5394fcafc7374af67ef9fbf9022bb4a79b773
2017-11-24 08:55:49 -05:00
Amaury Pouly 1245c5fe61 Implement speaker enable/disable on jack (un)plug
The implementation is not very complicated but there are a few things worth
noting. There was a previous "speaker enable" setting but it was a boolean.
I decided to replace it with a choice setting that has 2 options (on, off)
if headphones cannot be detect on this target, or 3 options (on, off, auto)
if we can detect headphones. This will break the old setting on target that
cannot detect jack but it makes the code more uniform and avoid maintaining
two settings with more #ifdef. The third option (auto) uses the LANG_AUTO
text, which I think is clear enough (disable speaker on jack plug).
In order to avoid code duplication (both in apps and firmware), I decided to
keep the audiohw_enable_speaker function as-is: it takes a boolean and doesn't
care about the speaker policy. I introduced a new audio_enable_speaker that
takes directly the mode (which follows the setting encoding): 0=off, 1=on
and 2=auto. This way one calls audio_enable_speaker and it changes the speaker
once to reflect the request mode. The apps code then uses this function in the
places where it makes sense: on setting load, setting change and jack (un)plug
event.

Change-Id: I027873f698eb4bc365d7c02b515297806355d9e2
2017-02-04 17:22:08 +01:00
William Wilgus dc87e9e9f3 Selective Backlight/Advanced Softlock - Selective actions based on context
Selective backlight allows the user to choose actions that will not
enable the backlight when pressed.

Advanced softlock allows user to choose actions that  will not be
blocked by screenlock on devices without a hold button.

Both only occur in FM and WPS Contexts.

Update:
Back from the dead
-Cleaned up code, removed unnecessary calls, re-arranged last filter action
  timeout conditional to work in case last_filtered_action_tick was never set
-Added entries to the manual
-Fixed back button on some menus not activating backlight
-Made menus more intuitive, no actions selected now changes menu item to off.
-Added talk fuctionality.
-Added option to disable selective backlight while on external power.
-Rewrote backlight and softlock handling code to fix issue with scrollwheels
-Menu changed to have toggle(yes/no) and settings
-Optimized selective actions lookup
-Added option to disable notification of 'buttons locked' while softlocked
-Removed uneeded code, consolidated action lookup to single function
-Fixed incorrect name on selective softlock menu
-Added option to disable touch on touchscreen devices
-Fixed backlight on original screenlock without selective screenlock active
-Added text selection in mask_select for when show_icons is off
-Fixed voice in mask_select to speak if voice is defined instead of spelling
-Added more lang defines (play skip seek)
-Added option to disable unknown keys turning on backlight
-Fixed Conditional argument In wrong place causing players without
	backlight to fail to build
-Fixed Disable Unknown blocking detection of context change
-Fixed canceling menu didn't update new settings
-Added Autolock on backlight off
-Removed backlight_on_force from backlight.c, Now sets ignore next to false
	and uses backlight_on
-Cleaned up autolock code added strings to lang file
-Fixed issue where rapid presses would bypass softlock
-Removed old softlock code, Cleaned selective actions code
-Changed menu to match existing RB menus
-Fixed Backlight_on_Hold blocked by backlight_ignore_next
-Fixed ignore_next for ipod
-Fixed bug allowing context with softlock to bypass selective backlight
-Changed mask_select to no longer prompt for changes to be saved
-Changed menu names
-Added ignore timeout to allow ipod scroll wheel to work properly and other
 players to still work properly, removed some previous code including
 ignore_event
-Increased ignore timeout to prevent sd card accesses from interrupting action
 code and turning on backlight
-Changed Unknown action to unmapped action in menu, changed handling code
-Removed unneeded logic and variables for handling unfiltered actions
-Reverted unmapped action code to previous functionality
-Added manual entries (thanks JohnB)
-Removed elusive unhandled unicode character from manual, changed formatting slightly

Actions:
Volume,Play,Seek,Skip

Extras:
Disable unmapped actions
Disable selective backlight on external power
Disable touch during softlock on touchscreen devices
Disable softlock notifications (power button still notifies)
Autolock on backlight off

Method:
Adds a function to ignore backlight on next call
 If selected action occurs backlight is forced on,
 Filter_first_keypress stays intact.

Selective softlock allows selected actions through, bypasses the normal
 softlock routine.

ToDo:
DONE

previous commit (#1) has attribution for folder_select.c which mask_select
is based from.

Change-Id: I08132ddcfd64c81751ef23b720f3ec6d68695fe4
2017-01-17 23:06:17 +01:00
Mihail Zenkov 6228c8da18 Fix reset runtime
Change-Id: Ic1ba0c7c7883aae43100c67235dbc2db83056fe7
2016-04-04 11:05:43 +02:00
Udo Schläpfer 95fdad5e28 iBasso DX50/DX90: User selectable USB mode.
Depends on http://gerrit.rockbox.org/r/#/c/1043/.

This patch adds a new setting in Settings -> General -> System: USB Mode.

Usable in Quickscreen and Shortcuts.

Possible settings are:
- Mass Storage: The default, on USB connect export the internal and external
drives as usual. Rockbox will exit gracefully in this case, since the internal
drive (/mnt/sdcard) is exported as mass storage device and Android prevents
Rockbox from continued execution.
- Charge Only: USB charge only, do not export the internal and external drives.
This will not close Rockbox.
- ADB: Enable the Android Debug Bridge. This will not close Rockbox.

Charge only and ADB are actually the same, since it is not yet established if
charge only is doable without adb and major hooks into Android.

German translation provided.

This may be genric for Android based devices but is only enabled
for iBasso Devices. Other maintainers may choose do adopt this.

Change-Id: I616247c29946c6595ebcf8f0c14b2410c9f0498b
2015-02-02 22:43:46 +01:00
Udo Schläpfer 040306a716 iBasso DX50/DX90: User selectable freq scaling governor.
Depends on http://gerrit.rockbox.org/r/#/c/1043/.

This patch adds a new setting in Settings -> General
-> System: Freq Scaling Governor

Usable in Quickscreen and Shortcuts.

Possible settings are:
- Conservative: Slow frequency switching.
- Ondemand or Interactive: Fast frequency switching.
- Powersave: Allways lowest frequency.
- Performance: Allways highest frequency.

German translation provided.

This may be genric for Android kernel based devices but is only enabled
for iBasso Devices. Other maintainers may choose do adopt this.

Change-Id: I10296f5be9586ad3a409105db0cd03682a30e9c1
2015-02-02 21:58:25 +01:00
Chiwen Chang 3ae0f32ac3 three new DSPs
perceptual bass enhancement
- a bbe-ish group delay corrction with Biophonic EQ boost.
- precut

auditory fatigue reduction
-reduce signal in frequency that may trigger temporary threshold shift

haas surround
-frequency between f(x1) and f(x2) is always bypassed.
-can apply to side only.

Change-Id: Icb6355ce9b1c99bf2c58c9385c3c411c0ae209d3
2015-01-19 19:34:01 +01:00
Thomas Jarosch 5d3aa1bce1 Fix red (pass pointer of 'item')
Change-Id: I2d04251519623b2531948615c35e61203f9a9940
2014-12-22 21:30:30 +01:00
Thomas Jarosch 06eeab0242 Always initialize "item"
Otherwise item.cfg_name and item.default_val
will contain garbage. It doesn't seem to have
an effect right now, but who knows what
a future refactoring might do.

cppcheck reported:
[rockbox/apps/settings.c:1268]: (error) Uninitialized variable: item

Change-Id: Ic4d0c302929613de8f291cd2d69cd39db8711107
2014-12-22 21:12:11 +01:00
Amaury Pouly 8146b40e73 Fuze+: add a configurable deadzone area for touchpad buttons
To stop erroneous button presses, allow users to add a deadzone between
the button via the Settings > General > System menu > Touch Dead Zone.

The configuration was chosen this way: the touchpad has the same DPI
in both direction so the setting applies the same on both the X and Y
axis. The setting ranges from 0 to 100 and is internally multiplied by 2
giving a maximum deadzone of 2*100 = 200 around each button, which
account for 400 total (once around each button), effectively reducing
each virtual button from 1000x600 to 600x200 when using the maximum value.

Change-Id: I8683c63d2950200eb32d1dda0a00bbd92d83d5be
Reviewed-on: http://gerrit.rockbox.org/677
Reviewed-by: Benjamin Brown <foolshperson@gmail.com>
Tested: Benjamin Brown <foolshperson@gmail.com>
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-09-08 11:21:54 +02:00
Michael Sevakis 7d1a47cf13 Rewrite filesystem code (WIP)
This patch redoes the filesystem code from the FAT driver up to the
clipboard code in onplay.c.

Not every aspect of this is finished therefore it is still "WIP". I
don't wish to do too much at once (haha!). What is left to do is get
dircache back in the sim and find an implementation for the dircache
indicies in the tagcache and playlist code or do something else that
has the same benefit. Leaving these out for now does not make anything
unusable. All the basics are done.

Phone app code should probably get vetted (and app path handling
just plain rewritten as environment expansions); the SDL app and
Android run well.

Main things addressed:
1) Thread safety: There is none right now in the trunk code. Most of
what currently works is luck when multiple threads are involved or
multiple descriptors to the same file are open.

2) POSIX compliance: Many of the functions behave nothing like their
counterparts on a host system. This leads to inconsistent code or very
different behavior from native to hosted. One huge offender was
rename(). Going point by point would fill a book.

3) Actual running RAM usage: Many targets will use less RAM and less
stack space (some more RAM because I upped the number of cache buffers
for large memory). There's very little memory lying fallow in rarely-used
areas (see 'Key core changes' below). Also, all targets may open the same
number of directory streams whereas before those with less than 8MB RAM
were limited to 8, not 12 implying those targets will save slightly
less.

4) Performance: The test_disk plugin shows markedly improved performance,
particularly in the area of (uncached) directory scanning, due partly to
more optimal directory reading and to a better sector cache algorithm.
Uncached times tend to be better while there is a bit of a slowdown in
dircache due to it being a bit heavier of an implementation. It's not
noticeable by a human as far as I can say.

Key core changes:
1) Files and directories share core code and data structures.

2) The filesystem code knows which descriptors refer to same file.
This ensures that changes from one stream are appropriately reflected
in every open descriptor for that file (fileobj_mgr.c).

3) File and directory cache buffers are borrowed from the main sector
cache. This means that when they are not in use by a file, they are not
wasted, but used for the cache. Most of the time, only a few of them
are needed. It also means that adding more file and directory handles
is less expensive. All one must do in ensure a large enough cache to
borrow from.

4) Relative path components are supported and the namespace is unified.
It does not support full relative paths to an implied current directory;
what is does support is use of "." and "..". Adding the former would
not be very difficult. The namespace is unified in the sense that
volumes may be specified several times along with relative parts, e.g.:
"/<0>/foo/../../<1>/bar" :<=> "/<1>/bar".

5) Stack usage is down due to sharing of data, static allocation and
less duplication of strings on the stack. This requires more
serialization than I would like but since the number of threads is
limited to a low number, the tradoff in favor of the stack seems
reasonable.

6) Separates and heirarchicalizes (sic) the SIM and APP filesystem
code. SIM path and volume handling is just like the target. Some
aspects of the APP file code get more straightforward (e.g. no path
hashing is needed).

Dircache:
Deserves its own section. Dircache is new but pays homage to the old.
The old one was not compatible and so it, since it got redone, does
all the stuff it always should have done such as:

1) It may be update and used at any time during the build process.
No longer has one to wait for it to finish building to do basic file
management (create, remove, rename, etc.).

2) It does not need to be either fully scanned or completely disabled;
it can be incomplete (i.e. overfilled, missing paths), still be
of benefit and be correct.

3) Handles mounting and dismounting of individual volumes which means
a full rebuild is not needed just because you pop a new SD card in the
slot. Now, because it reuses its freed entry data, may rebuild only
that volume.

4) Much more fundamental to the file code. When it is built, it is
the keeper of the master file list whether enabled or not ("disabled"
is just a state of the cache). Its must always to ready to be started
and bind all streams opened prior to being enabled.

5) Maintains any short filenames in OEM format which means that it does
not need to be rebuilt when changing the default codepage.

Miscellaneous Compatibility:
1) Update any other code that would otherwise not work such as the
hotswap mounting code in various card drivers.

2) File management: Clipboard needed updating because of the behavioral
changes. Still needs a little more work on some finer points.

3) Remove now-obsolete functionality such as the mutex's "no preempt"
flag (which was only for the prior FAT driver).

4) struct dirinfo uses time_t rather than raw FAT directory entry
time fields. I plan to follow up on genericizing everything there
(i.e. no FAT attributes).

5) unicode.c needed some redoing so that the file code does not try
try to load codepages during a scan, which is actually a problem with
the current code. The default codepage, if any is required, is now
kept in RAM separarately (bufalloced) from codepages specified to
iso_decode() (which must not be bufalloced because the conversion
may be done by playback threads).

Brings with it some additional reusable core code:
1) Revised file functions: Reusable code that does things such as
safe path concatenation and parsing without buffer limitations or
data duplication. Variants that copy or alter the input path may be
based off these.

To do:
1) Put dircache functionality back in the sim. Treating it internally
as a different kind of file system seems the best approach at this
time.

2) Restore use of dircache indexes in the playlist and database or
something effectively the same. Since the cache doesn't have to be
complete in order to be used, not getting a hit on the cache doesn't
unambiguously say if the path exists or not.

Change-Id: Ia30f3082a136253e3a0eae0784e3091d138915c8
Reviewed-on: http://gerrit.rockbox.org/566
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
2014-08-30 03:48:23 +02:00
Thomas Martitz 470989bd70 events: Rework event subsystem (add_event, send_event) to be more versatile.
add_event_ex is added that takes an extra user_data pointer. This pointer is
passed to the callback (add_event and add_event_ex have slightly different
callbacks types). All callbacks also get the event id passed. Events added
with add_event_ex must be removed with remove_event_ex because the user_data
pointer must match in addition to the callback pointer.

On the other add_event is simplified to omit the oneshort parameter which
was almost always false (still there with add_event_ex).

As a side effect the ata_idle_notify callbacks are changed as well, they
do not take a data parameter anymore which was always NULL anyway.

This commit also adds some documentation to events.h

Change-Id: I13e29a0f88ef908f175b376d83550f9e0231f772
2014-03-14 23:36:30 +01:00
Michael Sevakis 31b7122867 Implement time-based resume and playback start.
This complements offset-based resume and playback start funcionality.
The implementation is global on both HWCODEC and SWCODEC.

Basically, if either the specified elapsed or offset are non-zero,
it indicates a mid-track resume.

To resume by time only, set elapsed to nonzero and offset to zero.
To resume by offset only, set offset to nonzero and elapsed to zero.

Which one the codec uses and which has priority is up to the codec;
however, using an elapsed time covers more cases:

* Codecs not able to use an offset such as VGM or other atomic
formats

* Starting playback at a nonzero elapsed time from a source that
contains no offset, such as a cuesheet

The change re-versions pretty much everything from tagcache to nvram.

Change-Id: Ic7aebb24e99a03ae99585c5e236eba960d163f38
Reviewed-on: http://gerrit.rockbox.org/516
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
2014-03-10 04:12:30 +01:00
Thomas Martitz 428f069a1f talk: Remove superflous call to talk_init().
talk_init() is called by settings_apply() already which is called on boot.
Doing it again means loading the voicefile a second time which isn't necessary.

Change-Id: I4decd16401e63bf87338d3163c99d06d69fe3a3c
2014-02-02 19:40:38 +01:00
Thomas Martitz e1c7b3b8f7 lcd-16bit: Remove {lss,lse,lst}_pattern fields from struct viewport.
These where used for line styling during scrolling, which is now done in apps/,
The  viewport struct doesn't need to record these anymore.

Change-Id: I810d9dcb2644b00a798c6e75acab69c74a78e77f
2014-01-07 14:13:48 +01:00
Thomas Martitz 1c5d0b41ee scroll_engine: Rename scroll_stop* functions to be more consistent with the lcd api.
Change-Id: I8ada10b96bfb628cca0331689e8b936ae47c7e1c
2013-12-14 23:11:30 +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
Andrew Ryabinin 0519f7e5ab Add DAC's oversampling filter roll-off selection to sound settings.
Change-Id: I1258ba50dd9308f49d97965562f3a423c9bfb785
2013-05-24 11:18:16 +04: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 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
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