summaryrefslogtreecommitdiff
path: root/firmware/export
AgeCommit message (Collapse)Author
2014-09-08Fuze+: add a configurable deadzone area for touchpad buttonsAmaury Pouly
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-08-30Remove I/O priority. It is harmful when used with the new file code.Michael Sevakis
HAVE_IO_PRIORITY was defined for native targets with dircache. It is already effectively disabled for the most part since dircache no longer lowers its thread's I/O priority. It existed primarily for the aforementioned configuration. Change-Id: Ia04935305397ba14df34647c8ea29c2acaea92aa
2014-08-29Hopefully fix most of the errors and warnings from the last pushMichael Sevakis
Change-Id: I1a466b2d55f120796910039a0296ca324c58e891
2014-08-30Rewrite filesystem code (WIP)Michael Sevakis
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-25panicf doesn't return so why not tell GCC and $AVE :Michael Sevakis
Change-Id: I6096576f539bfb02b340b82fabc5019f6756b722
2014-08-25Do a better endian.h setup that isn't as fragileMichael Sevakis
We redefine the top-level macros to our own in order to maintain compatibility with compound initializers by wrapping the mid or low level definitions from the OS header. This allows, hopefully optimized, macros from the host OS's headers to be used when building any hosted target obviating the need for NEED_GENERIC_BYTESWAPS unless the target simply doesn't define its own optimized versions (MIPS!). Throw in some 64-bit swaps for completeness' sake; they generate no code if not yet used anyway. Change-Id: I21b384b55fea46833d01ea3cad1ad8952ea01a11
2014-08-25Fuze+: fixed brightness settings: previously there were 81 settings for only ↵Avi Eisenberg
26 possible brightnesses, now there are 33 for 33 Change-Id: Idc6e3a635850f3ee54ec23246795af88af960ab0 Reviewed-on: http://gerrit.rockbox.org/916 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-08-16Base scheduler queues off linked lists and do cleanup/consolidationMichael Sevakis
Abstracts threading from itself a bit, changes the way its queues are handled and does type hiding for that as well. Do alot here due to already required major brain surgery. Threads may now be on a run queue and a wait queue simultaneously so that the expired timer only has to wake the thread but not remove it from the wait queue which simplifies the implicit wake handling. List formats change for wait queues-- doubly-linked, not circular. Timeout queue is now singly-linked. The run queue is still circular as before. Adds a better thread slot allocator that may keep the slot marked as used regardless of the thread state. Assists in dumping special tasks that switch_thread was tasked to perform (blocking tasks). Deletes alot of code yet surprisingly, gets larger than expected. Well, I'm not not minding that for the time being-- omlettes and break a few eggs and all that. Change-Id: I0834d7bb16b2aecb2f63b58886eeda6ae4f29d59
2014-08-05Fix up some more redMichael Sevakis
find_first_set_bit() becomes a small inline on ARMv5+ and checkwps now gets made with -std=gnu99 (it eats all the GCCOPTS) like the rest of things. Change-Id: Ie6039b17fec057a3dcb0f453d8fd5efac984df89
2014-07-27Samsung YH-820: enable battery monitoringSebastian Leonhardt
The "percent_to_volt_charge" values are quite arbitrary and may need some more tweaking. Change-Id: I9f177d46681030d615fe2c2e78cf9bd2dde026af Reviewed-on: http://gerrit.rockbox.org/824 Reviewed-by: Szymon Dziok <b0hoon@o2.pl> Tested: Szymon Dziok <b0hoon@o2.pl>
2014-07-17zen/zenxfi/zenxfistyle/zenmozaic: implement plugin keymaps and enable pluginsAmaury Pouly
Plugins on the ZEN/ZEN X-Fi require to increase the plugin buffer size. Change-Id: If4651c87b402060faa24530985c6e871379c8ea1
2014-06-25zen/zenxfi: fix config file commentsAmaury Pouly
Change-Id: I7c9c73f749622ffc552638e84e5907a187087381
2014-06-24zen/zenxfi: switch lcd driver to 24-bit modeAmaury Pouly
Change-Id: I2c42f0e422130bcdaf1aaf92c7b56776752f4f64
2014-06-23fix sdlapp and ypr0 buildsThomas Martitz
Change-Id: I3953350c04607691b427fc2a3b00e8ae08bcea45
2014-06-21lcd-24bit: fix up previous commit a1842c0Thomas Martitz
* e200v2 shouldn't use 24bit (was just for testing) * samsung ypr0/ypr1 should enable it but the correct number must be passed to bmp2rb Change-Id: Ia91b0ff80a54265d4c3111d9dcb8e7b9dd12b5d4
2014-06-21lcd-24bit: Introduce a 24-bit mid-level LCD driverThomas Martitz
With LCD driver all calculation will be performed on RGB888 and the hardware/OS can display from our 24bit framebuffer. It is not yet as performance optimized as the existing drivers but should be good enough.The vast number of small changes is due to the fact that fb_data can be a struct type now, while most of the code expected a scalar type. lcd-as-memframe ASM code does not work with 24bit currently so the with 24bit it enforces the generic C code. All plugins are ported over. Except for rockpaint. It uses so much memory that it wouldnt fit into the 512k plugin buffer anymore (patches welcome). Change-Id: Ibb1964545028ce0d8ff9833ccc3ab66be3ee0754
2014-06-18Radio and radio recording for Samsung YH-920.Szymon Dziok
There is no simple method to detect radio through the 3-wire interface, so it's not implemented for the YH-925 for now. YH-920 always has a radio. Change-Id: Iea484d752915fcd40dbbbd7dbbf13e81aaf548db
2014-06-18YH92x: Implement ATA power off.Szymon Dziok
Change-Id: If1f48df42ea7a150365c4ddbd3f9f7a85ae4b7dc
2014-06-18YH92x: Use the led near the lcd as the ATA led, instead of shine all the time.Szymon Dziok
Change-Id: I139d0a8dc00e4d5fd964c3667e598aec923cc1cd
2014-06-09Samsung YH-820: implement an inverting of colours on the lcd.Szymon Dziok
Change-Id: Ibddf444b35402f8d2a9ad8b6af9d897a6618da18
2014-06-09Samsung YH-920: properly implement and enable lcd flipping.Szymon Dziok
Change-Id: I0a8609c9b4849332a97a125d186f339a61e4d584
2014-06-09Samsung YH-920: enable lcd contrast setting, fix default lcd contrast.Szymon Dziok
Change-Id: I58303feed59754143f57889ab19a21a628d5ed3d
2014-06-09Samsung YH-920: enable inverting of colours on the lcd.Szymon Dziok
Change-Id: Iaf70e9e854a52c6ddd12bc81e59580dbc3938888
2014-06-01recording on Samsung YH-820/YH-92xSebastian Leonhardt
Change-Id: I6eac4cf6c16a322910ad17bfbf3105e330cd0e36 Reviewed-on: http://gerrit.rockbox.org/815 Reviewed-by: Szymon Dziok <b0hoon@o2.pl> Tested: Szymon Dziok <b0hoon@o2.pl>
2014-05-24Separate keymaps for YH-820 and YH-920/925Sebastian Leonhardt
Although both players basically have the same keys, the differences in the layout is rather big, so I think both deserve their own keymaps. (On the yh820 the FFWD/PLAY/REW buttons are located above the direction keys, on the yh920 at the side of the player. Furthermore the yh920/925 has a REC switch, whereas yh820 has a push button.) Change-Id: I0e62a1b101c387646c0bdb07ea142d9d2430ca15 Reviewed-on: http://gerrit.rockbox.org/814 Reviewed-by: Szymon Dziok <b0hoon@o2.pl>
2014-05-11sansaview: fix lcd codeAmaury Pouly
The lcd driver now works but is awfully slow. The trick is to put it in system mode instead of RGB and setup 16bpp. The GRAM data can then be sent directly with the SPI but since it's bit-banged and the CPU running at slow speed, full screen refresh takes over a second, even with a slightly optmised version. The OF uses a DMA mechanism with a proper LCD controller but the setup is much more complicated and doesn't work at the moment. Change-Id: I6c95d91de31bff97d0a5848b8e2078c21deb5895
2014-05-11sansaview: clean config fileAmaury Pouly
Change-Id: I2dc4bd724272f4c044815370dd2df95f131426a0
2014-03-27Sansa View: adjust two things (define fake codec, missing header file) in orderSzymon Dziok
to compile the bootloader (now it should). Change-Id: Iba6aa2f118670d66e10451eaf43dd4d83176b06a
2014-03-27define more GPIO ports for the NVIDIA GoForce SoC (PP6100).Szymon Dziok
Change-Id: Ib02c44b9174fd968ed17640fc515b9c01c4a248d
2014-03-27HDD6330: enable AB repeat.Szymon Dziok
Change-Id: Ia8bb739cd60b1b2d8a8cd7ad2c536e22553083c6
2014-03-27HDD6330: enable backlight fading.Szymon Dziok
Change-Id: I60265237485e5892da2d45af0c44eb0aef40d22a
2014-03-27SA9200: enable headphones detection.Szymon Dziok
Change-Id: Ieeeb59f9899a7de61cfc3604b127f1c4377774bf
2014-03-27HDD1630: enable AB repeat.Szymon Dziok
Change-Id: I474e3cd300e2282de44f9d6e7bdc616e96e3496a
2014-03-27HDD1630: enable backlight fading.Szymon Dziok
Change-Id: I767cab4ab51c17a262519d56d0a3071d3c7bbe16
2014-03-24Fix ALIGN_DOWN() macro on 64bit.Thomas Martitz
When the align parameter was a 32bit value (like all default integer literals), and the to-be-aligned value is a pointer the upper 32bit got corrupted because the value was casted down to 32bit. Note: This hasnt been a problem because apparently the sim always gets 32bit addresses (I found this when compiling Rockbox as a library). Change-Id: I0d2d3fd8bfa210326b27162bb22c059da97d207a
2014-03-14events: Rework event subsystem (add_event, send_event) to be more versatile.Thomas Martitz
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-10Implement time-based resume and playback start.Michael Sevakis
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-09zenxfi: enable speakerAmaury Pouly
Change-Id: I603112d2a348abf92d5c8975ea76d3a57fda7cfc
2014-03-08zen(xfi): enable frequency scalingAmaury Pouly
With the lcd underflow code at work, it results in small flicker when switching frequency but it should be fine because it doesn't happen very often and I don't think there is a way to avoid it without disabling EMI frequency scaling. Change-Id: I458732d52bbf27cda2510c3836539db1fb24ea15
2014-03-08Greatly reduce volume-change zipper artifacts with SW volume.Michael Sevakis
Uses a cosine factor to smoothly shift the PCM level from the old level to the new one over the length of a frame. Implements indirect calls to PCM scaling function instead of testing conditions on every callback, cleanly assigning a different call to do the volume transition. The volume change call then assigns the final scaling function. Change-Id: If1004b92a91c5ca766dd0e4014ec274636e8ed26 Reviewed-on: http://gerrit.rockbox.org/763 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested: Michael Sevakis <jethead71@rockbox.org>
2014-03-03kernel: Break out kernel primitives into separate files and move to separate ↵Thomas Martitz
dir. No code changed, just shuffling stuff around. This should make it easier to build only select parts kernel and use different implementations. Change-Id: Ie1f00f93008833ce38419d760afd70062c5e22b5
2014-03-03Iaudio m3: implement lcd_get_dpi() (aka fix red).Thomas Martitz
Change-Id: I66dbbb4d8795cf1274fc721bf0e8769b8f757c31
2014-03-03Implement lcd_get_dpi() for X-Fi Style (aka fix red).Thomas Martitz
Change-Id: I9cab3a08c9e28558db2c16e8df30afcef6e11004
2014-03-03Touchscreen: Show a line separator in lists.Thomas Martitz
This patch adds a configurable line separator between list items, very similar to lists in Android. Additionally, below the list item there is a thicker line. It can be disabled in the settings. Its color can be configured as well. Remote and monochrome displays are explicitly unsupported. If there is desire this can be changed but it doesn't seem useful to me. Change-Id: I005313b0d8f5ecd15864bf20e66ea4e3390d8b7d
2014-03-03Implement lcd_get_dpi() for all bitmap targets.Thomas Martitz
DPI values are autogenerated from the resolution and collected display size values. These values are inserted as comments as well. Change-Id: Id03aedf9af18348f773dfce002805e480f6751e8
2014-03-03Fix hostfs_init() return value.Thomas Martitz
Change-Id: Ic8048e3fa0075de234e8879ba9faad101168bf09
2014-02-24hosted/multidrive: Speed up readdir()/get_dir_info().Thomas Martitz
The two functions need to check whether they are called for a specific path to implement the virtual mount point for the external storage. This is statistically rare and a hit on the common case. Therefore speed up the common case by performing integer comparision first, and only expensive string construction and comparision if that succeeds. Change-Id: I3c41fe073e1f4f8eb62d2b8556a36937c9cb8290
2014-02-23Second try at undefing STORAGE_GET_INFO, the previous one was too hasty, sorry.Thomas Martitz
Change-Id: If938c132d46efcb531227d9fde8cce91104566e0
2014-02-23undef HAVE_STORAGE_GET_INFO for the sim, there is no useful implementation ↵Thomas Martitz
right now. Change-Id: I3050b97d10d9b4705321d8e37faf4d5a6c58485b
2014-02-23Add forgotten file.Thomas Martitz
Change-Id: Ibd17bba201427b4bc0e45f29b246c20bd493c7d6