summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
AgeCommit message (Collapse)Author
2016-04-04Fix checking for CONFIG_CHARGINGMihail Zenkov
Change-Id: I53b9a129679fd7b322770025106ef92033226d2a
2016-02-16iPod Classic: size optmizations for HAVE_ATA_SMARTCástor Muñoz
After commit e9497db the switch() in ata_smart_get_attr_name() is no longer optimized by the compiler, ata_smart_get_attr_rawfmt() is also updated to prevent that future additions will cause the same problem. Change-Id: Ib0d6482331f567896720589a5a2d93628f2d8f3d
2016-02-14iPod Classic: ATA SMART updatesCástor Muñoz
- Add description for attributes supported by Samsung HS081HA (80Gb) and HS161JQ (CEATA 160Gb). - Show error code when ata_read_smart() fails. Change-Id: I618cc4f37d139fc90f596e2cf3a751346b27deb6
2016-01-17Change the debug menu to show CPU frequency in MHz.Michael Giacomelli
Change-Id: Ibda9ceecbdd3c5548ccf0467c77c3fb4d4412c70
2015-10-07iPod Classic: reads HDD S.M.A.R.T. dataCástor Muñoz
Adds ata_read_smart() function to storage ATA driver, current SMART data can be displayed and optionally written to hard disk using System->Debug menu. Change-Id: Ie8817bb311d5d956df2f0fbfaf554e2d53e89a93
2015-01-30iBasso DX50/DX90: CPU info enhancements.Udo Schläpfer
System -> Debug (Keep Out) -> View CPU stats Will now show the current cpufreq scaling governor, minimum, current and maximum cpufreq scaling frequency for each CPU. 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: I53e212f8707bf2abaa557e297293fb559ac37058
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-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-08Do some kernel cleanupMichael Sevakis
* Seal away private thread and kernel definitions and declarations into the internal headers in order to better hide internal structure. * Add a thread-common.c file that keeps shared functions together. List functions aren't messed with since that's about to be changed to different ones. * It is necessary to modify some ARM/PP stuff since GCC was complaining about constant pool distance and I would rather not force dump it. Just bl the cache calls in the startup and exit code and let it use veneers if it must. * Clean up redundant #includes in relevant areas and reorganize them. * Expunge useless and dangerous stuff like remove_thread(). Change-Id: I6e22932fad61a9fac30fd1363c071074ee7ab382
2014-02-23storage: Add STORAGE_HOSTFSThomas Martitz
CONFIG_STORAGE & STORAGE_HOSTFS allows to use parts of the storage_* API to be compiled for application targets without compiling storage.c or performing actually raw storage access. This is primarily to enable application targets to implement HAVE_MULTIVOMULE/HAVE_HOTSWAP (in a later commit). SIMULATOR uses the same mechanism without explicitely defining STORAGE_HOSTFS (how to add a bit to an existing preprocessor token?). Change-Id: Ib3f8ee0d5231e2ed21ff00842d51e32bc4fc7292
2014-02-05Samsung YP-R1 target portLorenzo Miori
This is the basic port to the new target Samsung YP-R1, which runs on a similar platform as YP-R0. Port is usable, although there are still some optimizations that have to be done. Change-Id: If83a8e386369e413581753780c159026d9e41f04
2014-02-02talk: Add debug menu entry to view statistics about talk engine.Thomas Martitz
This engine includes voicefile, memory usage and cache hits/misses for TALK_PARTIAL_LOAD. Change-Id: I331981ddda39ea30c57b4b74504accb3c556c3b9
2013-12-14scroll_engine: Rename scroll_stop* functions to be more consistent with the ↵Thomas Martitz
lcd api. Change-Id: I8ada10b96bfb628cca0331689e8b936ae47c7e1c
2013-10-21debug_menu: add tea5760uk tuner debug infoAmaury Pouly
Change-Id: I18ee5374a312335498777713c20f5de9014dacf3
2013-08-17Cleanup MV/MD macros a little.Michael Sevakis
When using variadic macros there's no need for IF_MD2/IF_MV2 to deal with function parameters. IF_MD/IF_MV are enough. Throw in IF_MD_DRV/ID_MV_VOL that return the parameter if MD/MV, or 0 if not. Change-Id: I7605e6039f3be19cb47110c84dcb3c5516f2c3eb
2013-03-28woops, revert test codeJonathan Gordon
Change-Id: Ida0ef9e4d81520314d3757009d18f7b22accc1e4
2013-03-28simplelist: Fix simplelist_set_line_count() so it actually sets the countJonathan Gordon
(hopefully) Fixes FS#12838 Change-Id: I932184afaf7b65121a0c459cd03c8482e3bad22b
2013-03-05Debug Screen: - Skin Engine RAM usage - fix a small typoHayden Pearce
- s/Ram/RAM/ Change-Id: I65ea87b5b2fce85d8d1a0cfaec06fb2c47aaa79f Reviewed-on: http://gerrit.rockbox.org/415 Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2013-02-12and fix the last compile errorsJonathan Gordon
Change-Id: I6e1608276afdaf04705b333fc3e96c8b90ff5233
2013-02-12skin_engine: Add a debug screen to display skin ram usageJonathan Gordon
Change-Id: Ida9c33211d9360ac88e30a2cf8df9f191bee8b45
2013-02-12simplelist: Make better use of the static buffer and simplify APIJonathan Gordon
Change-Id: I1327fcd01d6f817be6c7018d30d33446c9b57287
2012-11-20rk27xx: dump ROM contentMarcin Bukat
Change-Id: Ib70300bb1a78b49730f3942ddb2085e770dabfb9
2012-11-12AMS: dump ROM contentRafaël Carré
Change-Id: I171b5f94b8beff571db8da32f28e31428980aaf3
2012-05-28ypr0: This patch adds radio support to Samsung YP-R0Lorenzo Miori
Basically it uses the default SI4700 radio chip driver, the only thing that's different is the I2C access, written specifically to interact with my kernel module. Next things to add are: - RDS support! Change-Id: I0ed125641e00f93124d7a34f90dd508e7f1db5a4 Signed-off-by: Lorenzo Miori <memorys60@gmail.com>
2012-05-19zenxfi3&stfm1000: implement fmradio i2c and debug screenAmaury Pouly
Change-Id: I83dbdee13185d9adcf590dc213da5a8c97adb2ba
2012-05-07remove debug-target.hRafaël Carré
2012-03-12rds: show rds clock-time as broken down time instead of UTC time in debug menuBertrik Sikken
Change-Id: I931182ccd20cf8899f3ce9b6b8d7c7c5f4ea006f
2012-02-18rds: add basic RDS clock-time supportBertrik Sikken
Change-Id: I931182ccd20cf8899f3ce9b6b8d7c7c5f4ea006f
2012-02-16rds: make programme identification (pi) decoding safer, show pi in the debug ↵Bertrik Sikken
screen Change-Id: I8b547400f4a28ee387157848b9640a3361df937f
2012-01-08fix cpp conditionRafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31628 a1c6a512-1295-4272-9138-f99709370657
2012-01-08ascodec-target.h: removeRafaël Carré
move prototypes to ascodec.h move code to ascodec*.c YPR0: use adc-as3514.c instead of duplicating it TODO: merge as3514.h and ascodec.h ? git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31626 a1c6a512-1295-4272-9138-f99709370657
2012-01-07apps: lcd-remote.h is not needed if HAVE_REMOTE_LCD is not definedRafaël Carré
Fix a comment git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31608 a1c6a512-1295-4272-9138-f99709370657
2012-01-04missing parensRafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31576 a1c6a512-1295-4272-9138-f99709370657
2012-01-04debug_menu.c: cleanupRafaël Carré
use c99 for() cosmetics remove the_menu_item struct -> merge with only use merge variables declaration/assignement git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31575 a1c6a512-1295-4272-9138-f99709370657
2012-01-04dbg_pcf(): use action_userabortRafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31561 a1c6a512-1295-4272-9138-f99709370657
2012-01-04dbg_partitions: make staticRafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31556 a1c6a512-1295-4272-9138-f99709370657
2012-01-04*frequency_linux(): factorizeRafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31555 a1c6a512-1295-4272-9138-f99709370657
2012-01-03Rework powermgmt to enable code re-use on appliation and sims.Thomas Martitz
* Introduce CONFIG_BATTERY_MEASURE define, to allow targets (application) to break powermgmt.c's assumption about the ability to read battery voltage. There's now additionally percentage (android) and remaining time measure (maemo). No measure at all also works (sdl app). If voltage can't be measured, then battery_level() is king and it'll be used for power_history and runtime estimation. * Implement target's API in the simulator, i.e. _battery_voltage(), so it doesn't need to implement it's own powermgmt.c and other stubs. Now the sim behaves much more like a native target, although it still changes the simulated battery voltage quickly, * Other changes include include renaming battery_adc_voltage() to _battery_voltage(), for consistency with the new target functions and making some of the apps code aware that voltage and runtime estimation is not always available. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31548 a1c6a512-1295-4272-9138-f99709370657
2011-12-31ypr0: Enable battery voltage read-out, charging monitoring and charger ↵Thomas Martitz
detection. Voltage can be read using as3543 adc (i.e. ascodec api, on this target implemented via ioctl()). TODO: Look into possibly controlling charging more by re-using powermgmt-ascodec.c. However, charging seems to be controlled by the kernel, so may not be needed. Charger state can be read using /dev/minivet. It allows to differentiate between wall charger and usb charging, but that's not implemented (is it even worthwhile?) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31470 a1c6a512-1295-4272-9138-f99709370657
2011-12-19Hosted/linux: Add process/cpu info screen to the debug menu.Thomas Martitz
The new menu is very helpful on RaaA, but also shown in the sim. It shows the process cpu usage, process' time stats (user,sys,real) and the cpu frequency stats. It uses a thread to sample the data, however the thread is not created until the menu is visited for the first time. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31364 a1c6a512-1295-4272-9138-f99709370657
2011-12-17FS#12370: Initial RDS support for Si4701/Si4703 tuner (beast and clip zip)Bertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31346 a1c6a512-1295-4272-9138-f99709370657
2011-11-17Remove sim_tasks from the sdl application build.Thomas Martitz
This unfortunately removes the screendump feature, but usually there are better desktop apps for that. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31011 a1c6a512-1295-4272-9138-f99709370657
2011-11-15FS#12251 - User shortcuts in the main menu.Jonathan Gordon
Custom shortcuts which give the user fast access to regularly used files/folders/settings/whatever. Thanks to Alexander Levin for the manual part of the patch git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30990 a1c6a512-1295-4272-9138-f99709370657
2011-10-15Changed the FOR_NB_SCREENS macro to always be a for loop that declares its ↵Björn Stenberg
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-05core_alloc: Provide a tiny test allocation, which can be freed for debug ↵Thomas Martitz
purposes. This allocation can be freed in the buflib debug menu (select it to free). Doing a another allocation, e.g. by selecting another item in this debug menu will cause compaction (all allocs move). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30719 a1c6a512-1295-4272-9138-f99709370657
2011-09-06rk27xx - enable debug screenMarcin Bukat
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30458 a1c6a512-1295-4272-9138-f99709370657
2011-09-01Fix the timeout so the selected item will scrollJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30402 a1c6a512-1295-4272-9138-f99709370657
2011-08-30GSoC/Buflib: Enable compaction in buflib.Thomas Martitz
This enables the ability to allocate (and free) memory dynamically without fragmentation, through compaction. This means allocations can move and fragmentation be reduced. Most changes are preparing Rockbox for this, which many times means adding a move callback which can temporarily disable movement when the corresponding code is in a critical section. For now, the audio buffer allocation has a central role, because it's the one having allocated most. This buffer is able to shrink itself, for which it needs to stop playback for a very short moment. For this, audio_buffer_available() returns the size of the audio buffer which can possibly be used by other allocations because the audio buffer can shrink. lastfm scrobbling and timestretch can now be toggled at runtime without requiring a reboot. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30381 a1c6a512-1295-4272-9138-f99709370657
2011-08-30GSoC/Buflib: Add buflib memory alocator to the core.Thomas Martitz
The buflib memory allocator is handle based and can free and compact, move or resize memory on demand. This allows to effeciently allocate memory dynamically without an MMU, by avoiding fragmentation through memory compaction. This patch adds the buflib library to the core, along with convinience wrappers to omit the context parameter. Compaction is not yet enabled, but will be in a later patch. Therefore, this acts as a replacement for buffer_alloc/buffer_get_buffer() with the benifit of a debug menu. See buflib.h for some API documentation. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30380 a1c6a512-1295-4272-9138-f99709370657
2011-07-24ipod nano 1g: enable readout of battery current through ADC channel 4066_ISTATBertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30204 a1c6a512-1295-4272-9138-f99709370657