summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c (follow)
Commit message (Collapse)AuthorAge
* Undo hacks to meant to get around string formatting limitationsMichael Sevakis2017-11-21
| | | | | | | | | | | | | | | The new vuprintf makes unnecessary workarounds due to formatting limitations. I checked grep output for whatever appeared to fit but it's possible I missed some instances because they weren't so obvious. Also, this means sound settings can dynamically work with any number of decimals rather than the current assumption of one or two. Add an ipow() function to help and take advantage of dynamic field width and precision. Consolidate string formatting of sound settings. Change-Id: I46caf534859dfd1916cd440cd25e5206b192fcd8
* fix redAmaury Pouly2017-11-06
| | | | Change-Id: If18080a1525591f803e2cb6dd0f28b4f1e286bdb
* nwzlinux: add support for radioAmaury Pouly2017-11-06
| | | | | | | None of the Sony up to A15 seem to support RDS (they use either Si4702 or Si4708), thus I did not add any code to support RDS. Change-Id: I64838993b9705b36b94665f8470c7a89c772c961
* Add boot data support to rockbox.William Wilgus2017-10-29
| | | | | | | | | | | | Bootdata is a special location in the Firmware marked by a magic header The bootloader is able to copy information to the firmware by locating this struct and passing data to the firmware when it is loaded but before it is actually executed Data is verified by a crc of the bootdata Change-Id: Ib3d78cc0c3a9d47d6fe73be4747a11b7ad6f0a9e
* cleanup linux cpuinfo codeAmaury Pouly2017-10-06
| | | | | | | | | | | | | | | | | sonynwz: quirk for cpufreq broken driver There was some redundancy between frequency_linux(cpu, true) and current_scaling_frequency(), also I see no reason to compile the cpuinfo stuff unconditionally and the scaling info only on DX since it was already printed some partial scaling info anyway. Thus compile all the code unconditionally and simplify the logic in the debug menu. Also avoid putting buffers of size PATH_MAX on stack since it can be quite big and we only requires 64 bytes for those paths. On Sony NWZ, the cpu driver reports frequency in MHz instead of kHz thus we need to make the cpuinfo code aware of that bug. Change-Id: I61af45ab5f179ecc909b4841b9137a915a60193a
* Add simulator support for the A860Amaury Pouly2017-09-17
| | | | | | | This requires a few changes unrelated to the A860 because configure unsets APPLICATION but the NWZ is an application! Change-Id: Id91aa23193383ac95886b281653da5286edd9caf
* Initial commit for the Sony NWZ linux portAmaury Pouly2017-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SUPPORTED SERIES: - NWZ-E450 - NWZ-E460 - NWZ-E470 - NWZ-E580 - NWZ-A10 NOTES: - bootloader makefile convert an extra font to be installed alongside the bootloader since sysfont is way too small - the toolsicon bitmap comes from the Oxygen iconset - touchscreen driver is untested TODO: - implement audio routing driver (pcm is handled by pcm-alsa) - fix playback: it crashes on illegal instruction in DEBUG builds - find out why the browser starts at / instead of /contents - implement radio support - implement return to OF for usb handling - calibrate battery curve (NB: of can report a battery level on a 0-5 scale but probabl don't want to use that ?) - implement simulator build (we need a nice image of the player) - figure out if we can detect jack removal POTENTIAL TODOS: - try to build a usb serial gadget and gdbserver Change-Id: Ic77d71e0651355d47cc4e423a40fb64a60c69a80
* Do some housekeeping with fat.h and SECTOR_SIZEMichael Sevakis2017-03-12
| | | | | | | | | | | | | | Many includes of fat.h are pointless. Some includes are just for SECTOR_SIZE. Add a file 'firmware/include/fs_defines.h' for that and to define tuneable values that were scattered amongst various headers. Remove some local definitions of SECTOR_SIZE since they have to be in agreement with the rest of the fs code anyway. (We'll see what's in fact pointless in a moment ;) Change-Id: I9ba183bf58bd87f5c45eba7bd675c7e2c1c18ed5
* Improve radio RDS driver and frameworkMichael Sevakis2017-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove unused bits like the radio event and simplify basic radio interface. It can be more self-contained with rds.h only required by radio and tuner code. * Add post-processing to text a-la Silicon Labs AN243. The chip's error correction can only do so much; additional checks are highly recommended. Simply testing for two identical messages in a row is extremely effective and I've never seen corrupted text since doing that, even with mediocre reception. Groups segments must arrive in order, not randomly; logic change only accepts them in order, starting at 0. Time readout was made a bit better but really we'd need to use verbose mode and ensure that no errors were seen during receiving of time and more checks would be need to have a stable PI. The text is the important bit anyway. * Time out of stale text. * Text is no longer updated until a complete group has been received, as is specified in the standard. Perhaps go back to scrolling text lines in the radio screen? * Add proper character conversion to UTF-8. Only the default G0 table for the moment. The other two could be added in. * Add variants "RDS_CFG_PROCESS" and "RDS_CFG_PUSH" to allow the option for processed RDS data to be pushed to the driver and still do proper post-processing (only text conversion for now for the latter). Change-Id: I4d83f8b2e89a209a5096d15ec266477318c66925
* AMS: Return ascodec to interrupt-based I2C2 driverMichael Sevakis2017-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Slightly revised and regularized internal interface. Callback is used for read and write to provide completion signal instead of having two mechanisms. 2. Lower overhead for asynchronous or alterate completion callbacks. We now only init what is required by the transfer. A couple unneeded structure members were also nixed. 3. Fixes a bug that would neglect a semaphore wait if pumping the I2C interrupts in a loop when not in thread state or interrupts are masked. 4. Corrects broken initialization order by defining KDEV_INIT, which makes kernel_init() call kernel_device_init() to initialize additional devices _after_ the kernel, threading and synchronization objects are safe to use. 5. Locking set_cpu_frequency has to be done at the highest level in system.c to ensure the boost counter and the frequency are both set in agreement. Reconcile the locking inteface between PP and AMS (the only two currently using locking there) to keep it clean. Now works fine with voltages in GIT HEAD on my Fuze v2, type 0. Previously, everything crashed and died instantly. action.c calling set_cpu_frequency from a tick was part of it. The rest may have been related to 3. and 4. Honestly, I'm not certain! Testing by Mihail Zenkov indicates it solves our problems. This will get the developer builds running again after the kernel assert code push. Change-Id: Ie245994fb3e318dd5ef48e383ce61fdd977224d4
* Fix checking for CONFIG_CHARGINGMihail Zenkov2016-04-04
| | | | Change-Id: I53b9a129679fd7b322770025106ef92033226d2a
* iPod Classic: size optmizations for HAVE_ATA_SMARTCástor Muñoz2016-02-16
| | | | | | | | 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
* iPod Classic: ATA SMART updatesCástor Muñoz2016-02-14
| | | | | | | | - Add description for attributes supported by Samsung HS081HA (80Gb) and HS161JQ (CEATA 160Gb). - Show error code when ata_read_smart() fails. Change-Id: I618cc4f37d139fc90f596e2cf3a751346b27deb6
* Change the debug menu to show CPU frequency in MHz.Michael Giacomelli2016-01-17
| | | | Change-Id: Ibda9ceecbdd3c5548ccf0467c77c3fb4d4412c70
* iPod Classic: reads HDD S.M.A.R.T. dataCástor Muñoz2015-10-07
| | | | | | | | 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
* iBasso DX50/DX90: CPU info enhancements.Udo Schläpfer2015-01-30
| | | | | | | | | | | | 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
* Rewrite filesystem code (WIP)Michael Sevakis2014-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Base scheduler queues off linked lists and do cleanup/consolidationMichael Sevakis2014-08-16
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Do some kernel cleanupMichael Sevakis2014-08-08
| | | | | | | | | | | | | | | | | | | | * 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
* storage: Add STORAGE_HOSTFSThomas Martitz2014-02-23
| | | | | | | | | | | | 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
* Samsung YP-R1 target portLorenzo Miori2014-02-05
| | | | | | | | | 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
* talk: Add debug menu entry to view statistics about talk engine.Thomas Martitz2014-02-02
| | | | | | | This engine includes voicefile, memory usage and cache hits/misses for TALK_PARTIAL_LOAD. Change-Id: I331981ddda39ea30c57b4b74504accb3c556c3b9
* scroll_engine: Rename scroll_stop* functions to be more consistent with the ↵Thomas Martitz2013-12-14
| | | | | | lcd api. Change-Id: I8ada10b96bfb628cca0331689e8b936ae47c7e1c
* debug_menu: add tea5760uk tuner debug infoAmaury Pouly2013-10-21
| | | | Change-Id: I18ee5374a312335498777713c20f5de9014dacf3
* Cleanup MV/MD macros a little.Michael Sevakis2013-08-17
| | | | | | | | | | 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
* woops, revert test codeJonathan Gordon2013-03-28
| | | | Change-Id: Ida0ef9e4d81520314d3757009d18f7b22accc1e4
* simplelist: Fix simplelist_set_line_count() so it actually sets the countJonathan Gordon2013-03-28
| | | | | | (hopefully) Fixes FS#12838 Change-Id: I932184afaf7b65121a0c459cd03c8482e3bad22b
* Debug Screen: - Skin Engine RAM usage - fix a small typoHayden Pearce2013-03-05
| | | | | | | | - s/Ram/RAM/ Change-Id: I65ea87b5b2fce85d8d1a0cfaec06fb2c47aaa79f Reviewed-on: http://gerrit.rockbox.org/415 Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
* and fix the last compile errorsJonathan Gordon2013-02-12
| | | | Change-Id: I6e1608276afdaf04705b333fc3e96c8b90ff5233
* skin_engine: Add a debug screen to display skin ram usageJonathan Gordon2013-02-12
| | | | Change-Id: Ida9c33211d9360ac88e30a2cf8df9f191bee8b45
* simplelist: Make better use of the static buffer and simplify APIJonathan Gordon2013-02-12
| | | | Change-Id: I1327fcd01d6f817be6c7018d30d33446c9b57287
* rk27xx: dump ROM contentMarcin Bukat2012-11-20
| | | | Change-Id: Ib70300bb1a78b49730f3942ddb2085e770dabfb9
* AMS: dump ROM contentRafaël Carré2012-11-12
| | | | Change-Id: I171b5f94b8beff571db8da32f28e31428980aaf3
* ypr0: This patch adds radio support to Samsung YP-R0Lorenzo Miori2012-05-28
| | | | | | | | | | 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>
* zenxfi3&stfm1000: implement fmradio i2c and debug screenAmaury Pouly2012-05-19
| | | | Change-Id: I83dbdee13185d9adcf590dc213da5a8c97adb2ba
* remove debug-target.hRafaël Carré2012-05-07
|
* rds: show rds clock-time as broken down time instead of UTC time in debug menuBertrik Sikken2012-03-12
| | | | Change-Id: I931182ccd20cf8899f3ce9b6b8d7c7c5f4ea006f
* rds: add basic RDS clock-time supportBertrik Sikken2012-02-18
| | | | Change-Id: I931182ccd20cf8899f3ce9b6b8d7c7c5f4ea006f
* rds: make programme identification (pi) decoding safer, show pi in the debug ↵Bertrik Sikken2012-02-16
| | | | | | screen Change-Id: I8b547400f4a28ee387157848b9640a3361df937f
* fix cpp conditionRafaël Carré2012-01-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31628 a1c6a512-1295-4272-9138-f99709370657
* ascodec-target.h: removeRafaël Carré2012-01-08
| | | | | | | | | | | 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
* apps: lcd-remote.h is not needed if HAVE_REMOTE_LCD is not definedRafaël Carré2012-01-07
| | | | | | Fix a comment git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31608 a1c6a512-1295-4272-9138-f99709370657
* missing parensRafaël Carré2012-01-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31576 a1c6a512-1295-4272-9138-f99709370657
* debug_menu.c: cleanupRafaël Carré2012-01-04
| | | | | | | | | 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
* dbg_pcf(): use action_userabortRafaël Carré2012-01-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31561 a1c6a512-1295-4272-9138-f99709370657
* dbg_partitions: make staticRafaël Carré2012-01-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31556 a1c6a512-1295-4272-9138-f99709370657
* *frequency_linux(): factorizeRafaël Carré2012-01-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31555 a1c6a512-1295-4272-9138-f99709370657
* Rework powermgmt to enable code re-use on appliation and sims.Thomas Martitz2012-01-03
| | | | | | | | | | | | | | | | | | | | | * 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
* ypr0: Enable battery voltage read-out, charging monitoring and charger ↵Thomas Martitz2011-12-31
| | | | | | | | | | | | | | 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
* Hosted/linux: Add process/cpu info screen to the debug menu.Thomas Martitz2011-12-19
| | | | | | | | | | | 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