SSDs that respect powermgmt commands should be treated the same, as the
powermgmt commands are an important part of ensuring it's safe to shut
down.
And greatly expand the comment explaining things.
Change-Id: Ia52b99fca802f495422b5ee097390a72dbc28f61
Commit 5462907 made sure that SLEEP commands weren't issued on devices that don't support ATA power management commands (e.g. certain CF->SD converters including several iFlash models).
Since Rockbox waits for the disk to become inactive in shutdown_hw(), which won't happen in this case, the OS would previously stall during the shutdown process until a timeout was reached.
Change-Id: I03bb05f6f6401bb8f0da5d0b76bd3f07681fdc06
Some mSATA adapters seem to have trouble working with Rockbox using our
normal PIO timings; the timing value we use is probably out of spec and
is different to the OF. Switch to using the OF's timings according to
which PIO mode we select. This may not completely resolve problems with
these adapters but allows Rockbox to boot and play audio.
Change-Id: If73210700eb4af01864b373709ee1d15c775fb11
Also audiohw driver to specific device name, rewrite alsa controls code to
cache more data, thus making the code easier and use less stack. Avoid using
short/long in pcm alsa code since it's the wrong size on 64-bit (simulator
for example)
Change-Id: Ibc1ec44396e37b6cbdedbcf37300878638e5d2d3
several issues I saw that could pontentially cause problems
scroll engine doesn't take text height into account when checking bounds
NBELEMS was one whole row too large hopefully I got them right this time
Change-Id: If303da8320429c3964fc675351cb088d46303745
Nothing in the core has used it for some time. It's exported to the
plugin API but the last plugins to use it were switched to the mixer API
back in 2011.
This allows us to get rid of pcm_play_dma_pause() from all audio drivers
Change-Id: Ic3fa02592316f84963e41d792d1cabb436d1ff6b
I'm currently running up against the limitations of the lcd_draw functions
I want these functions to be able to be used on any size buffer not
just buffers with a stride matching the underlying device
[DONE] allow the framebuffer to be decoupled from the device framebuffer
[DONE need examples] allow for some simple blit like transformations
[DONE] remove the device framebuffer from the plugin api
[DONE}ditto remote framebuffer
[DONE] remove _viewport_get_framebuffer you can call struct *vp = lcd_set_viewport(NULL) and vp->buffer->fb_ptr
while remote lcds may compile (and work in the sim) its not been tested on targets
[FIXED] backdrops need work to be screen agnostic
[FIXED] screen statusbar is not being combined into the main viewport correctly yet
[FIXED] screen elements are displayed incorrectly after switch to void*
[FIXED] core didn't restore proper viewport on splash etc.
[NEEDS TESTING] remote lcd garbled data
[FIXED] osd lib garbled screen on bmp_part
[FIXED] grey_set_vp needs to return old viewport like lcd_set_viewport
[FIXED] Viewport update now handles viewports with differing buffers/strides by copying to the main buffer
[FIXED] splash on top of WPS leaves old framebuffer data (doesn't redraw)
[UPDATE] refined this a bit more to have clear_viewport set the clean bit and have skin_render do its own screen clear
scrolling viewports no longer trigger wps refresh
also fixed a bug where guisyncyesno was displaying and then disappearing
[ADDED!] New LCD macros that allow you to create properly size frame buffers in you desired size without wasting bytes
(LCD_ and LCD_REMOTE_)
LCD_STRIDE(w, h) same as STRIDE_MAIN
LCD_FBSTRIDE(w, h) returns target specific stride for a buffer W x H
LCD_NBELEMS(w, h) returns the number of fb_data sized elemenst needed for a buffer W x H
LCD_NATIVE_STRIDE(s) conversion between rockbox native vertical and lcd native stride (2bitH)
test_viewports.c has an example of usage
[FIXED!!] 2bit targets don't respect non-native strides
[FIXED] Few define snags
Change-Id: I0d04c3834e464eca84a5a715743a297a0cefd0af
In short, the display fading back in after a pause resuming interferes
with the audio codec, causing BadThings(tm) that cannot be recovered from
This really is just avoiding a known trigger; there's no guarantee this
condition won't occur under random circumstances during normal use,
and there's no good way to work around this from within rockbox.
I suspect the underlying problem is that both the display control and
codec control share an i2c bus, but the kernel drivers implementing them
isn't using proper linux bus access/locking.
Change-Id: Id4f56f9cb269ed74aac2f041146b3630cef09030
REMOVED FROM ALL NATIVE BOOTLOADERS:
finish removing the text scrolling
pare down printf to a minimal subset (%c %s %l %d %u and %x(%p))
remove diacritic and rtl language support
GOAL 134000
START 135305
CURRENT 133700
SUCCESS! (ASSUMING IT WORKS -- UNESTED)
Change-Id: Ic3f6ac1dc260578f581ee53458b3e5bb47d313ec
* Track mute state, only call hw if actual change is needed
* Don't unmute in audiohw_postinit()
* sample rate tracking fixes
* erosq: Don't start up muted
Change-Id: I004f787a4b7ea73c16b6ec9818ec29a12c89f46b
* If AUDIOHW_MUTE_ON_PAUSE, no meaningful change
* Unconditionally unmute on playback start
* xduoox3ii: Mute on sample rate change
* rocker/xduoo: Stay muted after startup
This avoids the nasty "pop" on startup, without doing
the full mute-on-pause stuff that causes unacceptable
dropouts on the X3ii.
Change-Id: I2e3ee0bb8094e288f37a0acada86a80016ce5cac
The Q and K have a slightly different case, but the hardware under the
shell is completely identical.
These models are rebadged versions:
* Hifiwalker H2 (== Q)
* AGPTek H3 (== K)
* Surfans F20 (== K)
Other notes:
* Significant improvements in the shared Hiby-platform launcher/loader
* SD card can theoretically be hot-swapped now
* Support external USB mass storage!
* Some consolidation of Hiby-platform targets
* Some consolidation of plugin keymaps
Todo/known issues:
* Keymaps need to be gone over properly
* Convert to HAVE_SCROLLWHEEL?
Change-Id: I5a8a4f22c38a5b69392ca7c0a8ad8c4e07d9523c
Most credit goes to: Roman Skylarov
Additional integration and refactoring by myself.
*** COMPLETELY UNTESTED ***
Change-Id: Ia64c36d92e0214c6b15f7a868df286f8113ea27b
* xduoo x3ii/x20: Better line out support
* less granular volume settings (too many steps before)
* Better handling of swiching sample rates
* Log actual sample rate in debug menu
Most credit goes to Roman Stolyarov
Additional integration [re]work by myself
Change-Id: I63af3740678cf2ed3170f61534e1029c81826bb6
Note: I left behind lcd_bitmap in features.txt, because removing it
would require considerable work in the manual and the translations.
Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
'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
HAVE_LCD_BITMAP is now redundant.
lcd_bitmap is always-on in features.txt so manual and lang strings
don't have to change
Change-Id: I08eeb20de48099ffc2dc23782711af368c2ec794
The FC-1307 CF->SD converter that is the basis of a lot of ATA->CF
devices (including several iflash iFlash models) claims to not support
ATA power management commands.
Rockbox unconditionally issues those commands as support is mandated by
the ATA spec. This patch checks the capability bit, and if it's not
supported, does not attempt to put the ATA subsystem to sleep.
It is not clear if the problems lie with the SLEEP commands or the wakeup
process, but who knows where else the FC1307 violates the ATA specs, and
reliability is much more important than power savings.
Change-Id: I8b539c579d0449a8a3cfa63cdd1387db990fe820
The "try to mount as superfloppy" fails with some partitioning layouts
because sector 0 can have a mostly-valid FAT32 signature. However, in
all dumps I've looked at, sector 0's fsinfo offset value points at a place
which lacks the fsinfo signature.
Resolves FS#13213, no known regressions.
Change-Id: Ib323d35cca6ca54e11aca6ba77041bf33a05a277
This was broken when the major update to iap was comitted.
ia-lingo7.c created and various iap related files modified.
On 4G, 6G and Nano 1/2Gen iPods the remote will function
even though the radio won't.
Tested on 4G Greyscale, 4G Color, 4G Photo, 4G Mini 1st Gen,
4G Mini 2Gen, Nano 1G, Nano 2G, Video 5G, Video 5.5G
Change-Id: Ia74e3d07d9ab5edc6da8eafa96801ede722be331
On some devices, the button driver allows a "software poweroff" by long-
pressing a certain key. This behavior is inconvnient when that button needs
to be held down for other purposes, such as moving the cursor in rockpaint
or sgt-untangle.
This patch allows selectively disabling the software poweroff (enabled by
default) from both core and plugin code.
Change-Id: I7580752888ae5c7c7c5eb1be5966e3d67f17d4b4
Loop terminator needed a preincrement rather than postincrement, and
also used a proper #define instead of a magic number.
Change-Id: Iafd6a0dce0304cb94e4f1d04cce46d2ca603507a
On file systems with 2048 bytes per cluster, the bpb_secperclus value
gets multiplied by 4 when the meta data is loaded. This patch changes
the sanity check to consider (and reverse) that multiplication before
checking the cluster size.
Signed-off-by: Stefan Ott <stefan@ott.net>
Provided by Roman Stolyarov
Integration, Refactoring, and Upstreaming by Solomon Peachy
X3II confirmed working by forum tester, X20 is nearly identical.
This includes bootloader, main firmware, and the flash image patcher.
Eventual Todo:
* Further refactor AGPTek Rocker & xduoo hiby bootloaders
* Further refactor AGPTek Rocker & xduoo hosted platform code
Change-Id: I34a674051d368efcc75d1d18c725971fe46c3eee
This should be done even if the backlight is set to "always off",
i.e. if the LCD is sleeping, a button press should be "eaten"
and just wake up the LCD.
Change-Id: I3946bdbbdc81f23eae3f47423123cefa275e0afc
This allows targets to automatically switch audio settings when the
line out is plugged/unplugged.
Only hooked up on the xDuoo X3, but there are other potential users.
Change-Id: Ic46a329bc955cca2e2ad0335ca16295eab24ad59
Original patch by Alexander Spyridakis
Modified by Steve Bavin and Igor Poretsky
Keymap fixes by Marianne Arnold
Change-Id: I5a252d97d2b05c533e048931f7354f4261f76499
Patch taken from Igor Poretsky's tree.
Original clip-radio-tick.patch modified to acts only when screen is
deemed, or when recording, in order to preserve indicators
functionality.
Change-Id: I62afb24a0dad7ad2ecc9272c24810b37f032408d
Cleaned up, rebased, and forward-ported from the xvortex fork.
(original credit to vsoftster@gmail.com)
Change-Id: Ibcc023a0271ea81e901450a88317708c2683236d
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
This patch was supposed to only remove scroll worker from devices without
remote displays, the build system said otherwise
Change-Id: I240db89ee6b55818dbd2567338515b53ebe09300
fixed: conditional define
Instead of checking ticks, set a sticky dirty flag that indicates
that the RTC needs to be read. This gives a timely update and more
accurate readout without actually reading the RTC until it changes.
The implementation should atomically read the flag and clear it.
Setting the flag would typically happen in an RTC tick ISR.
Change-Id: I6fd325f22845029a485c502c884812d3676026ea
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
* Editing a bunch of drivers' thread routines in order to
implement a new feature is tedious.
* No matter the number of storage drivers, they share one thread.
No extra threads needed for CONFIG_STORAGE_MULTI.
* Each has an event callback called by the storage thread.
* A default callback is provided to fake sleeping in order to
trigger idle callbacks. It could also do other default processing.
Changes to it will be part of driver code without editing each
one.
* Drivers may sleep and wake as they please as long as they give
a low pulse on their storage bit to ask to go into sleep mode.
Idle callback is called on its behalf and driver immediately put
into sleep mode.
* Drivers may indicate they are to continue receiving events in
USB mode, otherwise they receve nothing until disconnect (they
do receive SYS_USB_DISCONNECTED no matter what).
* Rework a few things to keep the callback implementation sane
and maintainable. ata.c was dreadful with all those bools; make
it a state machine and easier to follow. Remove last_user_activity;
it has no purpose that isn't served by keeping the disk active
through last_disk_activity instead.
* Even-out stack sizes partly because of a lack of a decent place
to define them by driver or SoC or whatever; it doesn't seem too
critical to do that anyway. Many are simply too large while at
least one isn't really adequate. They may be individually
overridden if necessary (figure out where). The thread uses the
greatest size demanded. Newer file code is much more frugal with
stack space. I barely see use crack 50% after idle callbacks
(usually mid-40s). Card insert/eject doesn't demand much.
* No forcing of idle callbacks. If it isn't necessary for one or
more non-disk storage types, it really isn't any more necessary for
disk storage. Besides, it makes the whole thing easier to implement.
Change-Id: Id30c284d82a8af66e47f2cfe104c52cbd8aa7215
We don't really know what those are supposed to do. They seem to change the
volume curve but it is not very clear what is the intended purpose.
Change-Id: I65f5d18aba139844c23df092277ba17ee8518f96
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
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
Also, use rds_reset() now to clear data on station change since
the rds driver internal buffers are used.
Change-Id: I043b09d661eeec21617381015347f0bcead4f7d4
* fmradio.c needs an implementation of tuner_get_rds_info() for the
sim (kill all the sims).
* Some macro bitflags shouldn't be seen unless HAVE_RDS_CAP is
defined.
Change-Id: Idd00c94ca2fc43cf32f9223aa4530d5a02fb3454
* 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
On Windows 64-bit, the size of long is 32-bit, thus any pointer to long cast is
not valid. In any case, one should use intptr_t and ptrdiff_t when casting
to integers. This commit attempts to fix all instances reported by GCC.
When relevant, I replaced code by the macros PTR_ADD, ALIGN_UP from system.h
Change-Id: I2273b0e8465d3c4689824717ed5afa5ed238a2dc
Some drivers set tm_wday just fine and do not need it coerced to
be correct. Others set tm_yday, so don't overwrite what the driver
sets; just zero it inside if it can't fill the field. Move calls
to set_day_of_week() to the sorts of drivers that presumably
required the hammer (FS#11814) in get_time() where the weekday
isn't locked to the date.
Change-Id: Idd0ded6bfc9d9f48fcc1a6074068164c42fcf24a
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
The function is neither reentrant nor ISR callable. Instead of
using a ticked-based timeout, have the button driver provide the
unboost after a delay when waiting for a button.
HAVE_GUI_BOOST gets immediate boost after dequeuing any message,
otherwise the queue has to have at least three messages waiting
for it to trigger a boost-- essentially the behavior that existed
but now combined in one place.
Change-Id: I1d924702840f56a1a65abe41fa92b4e753c4e75a
The file system rework introduced incompatibility between dircache
and the tagcache ramcache and playlist dircache path caching. This
update makes changes to filesystem code to reintegrate all that.
It also fixes a couple bugs that were found when vetting all the
code. The filestream cache was being reset without regard to
the stream even if it was shared in write mode (made work of
.playlist_control). Better handling of unmounting gives files a
better go at force-closing them without risk to disk integrity.
Did some miscellaneous pedantic changes. Improved efficiency of
testing a file's existence (a little) since the path parser will
be shared between file code and parsing for the sake of finding
dircache references, not duplicated as before.
This commit doesn't reenable said items just for the sake of
keeping changes separate and related.
Plan for the next is to enable dircache again for the playlists
(easy peasy) and reenable tagcache ramcache but *without* the
dircache path caching because it's rather substantial to change
in itself. The ramcache will still function without dircache.
Change-Id: I7e2a9910b866251fa8333e1275f72fcfc8425d2d
Document 3D depth range. Fix mismatch in recording volume: the displayed volume
is completely off the chart
Change-Id: I4c363f369e5d72f332391a6f96457b4e450404f9
The old code made the setting appear as 0dB, 1.5dB, 3dB and 4.5dB when
in fact it is 0dB, 3dB, 4.5dB and 6dB. This commit clarifies the code and
also fix this at the same time. This imx233 3D enhancement is complete crap anyway
but now you can satisfy yourself with 6 dB of pure crap, clearly an enhancement.
Change-Id: Ia3e088987c1ff0cdde228905ff70f46476a499a2
For some reason, there was a mismatch between the setting (decibel) and the
audiohw code (centicel). This resulted in a gain divided by 10. This may
explain why some people experienced low volume with the mic on the fuze+.
Change-Id: I138ac18dd93c36f43a7dfce735efc826405c598c
Also clarity parts of the code. The old code suffered from two defects:
- it was very unclear because it made changes to whole registers
(using as3514_write) instead of fields (using as3514_set/clear/write_masked).
Also the routing code was spread accross several functions which made it hard to
follow.
- it did not properly reroute audio on monitor changes. In particular, the following
could happen: when switching from DAC to radio, the code would fail to clear
SUM_off, resulting in a weird situation where the main mixer was off
(SUM_off) but the headphone where using the main mixer as input. Incredibly this
worked anyway (at least on AMSv2 and YP-R0) but resulted in strange volume gaps
between DAC and radio mode.
Change-Id: I7826835fdb59c21f6483b223883ca9289e85caca
The old driver was bad in many respect, it had some race conditions, it was
using a thread to serialize transfers because of the legacy i2c interface.
It also had huge latency (typically 50ms but delays up to 300ms can happen),
thus some presses were missed.
The new driver takes advantage of the new i2c driver to do everything
asynchronously. It also does not need a thread anymore because queueing
ensures proper serialization. It provides much better and reliable latency
(typically ~2ms).
Also fix the debug screen which was horribly broken. The new screen also
displays the deadzones.
Change-Id: I69b7f99b75053e6b1d3d56beb4453c004fd2076e
NOTE: this commit does not introduce any change, ideally even the binary should
be almost the same. I checked the disassembly by hand and there are only a few
differences here and there, mostly the compiler decides to compile very close
expressions slightly differently. I tried to run the new code on several targets
to make sure and saw no difference.
The major syntax changes of the new headers are as follows:
- BF_{WR,SET,CLR} are now superpowerful and allows to set several fileds at once:
BF_WR(reg, field1(value1), field2(value2), ...)
- BF_CS (use like BF_WR) does a write to reg_CLR and then reg_SET instead of RMW
- there is no more need for macros like BF_{WR_,SET,CLR}_V, since one can simply
BF_WR with field_V(name)
- the old BF_SETV macro has no trivial equivalent and is replaced with its
its equivalent for BF_WR(reg_SET, ...)
I also rename the register headers: "regs/regs-x.h" -> "regs/x.h" to avoid the
redundant "regs".
Final note: the registers were generated using the following command:
./headergen_v2 -g imx -o ../../firmware/target/arm/imx233/regs/ desc/regs-stmp3{600,700,780}.xml
Change-Id: I7485e8b4315a0929a8edb63e7fa1edcaa54b1edc
Interrupts version is cause of freeze on USB extraction.
Also non-interrupts version much simpler and faster.
Change-Id: I30a2993cdcaa85abfba77ca06bfacd5b6b4353e2
Some old code made the assumption that CONFIG_CPU == AS3525v2 if and only if
HAVE_AS3543, which is not true on targets like the Samsung YP-R0. This fixes
several issues on such targets like a huge volume gap between -39dB and -40dB
and a volume artificially capped at -72dB instead of -82dB.
Change-Id: Ib1c883ac593c0c3ce5e2bf4eb408924ce5f5ad93
There are a couple of power saving options that can be selected using
defines, they configure the CODEC in a different way than OF does:
MONO_MIC: jack microphone is connected to left channel, disabling
right channel saves ~1 mW, there is no reason to not to do it.
BYPASS_PGA: this option only applies to the line-in, OF does not
bypass the PGA and configures it to 0 dB gain. At the beginning,
this patch was written based on CODEC datasheet, bypassing PGA
because it saves power and incrementes dinamic range ~1dB, i have
used this setup for a while without problems. Finally this option
was disabled at the last minute, i decided to do it after reviewing
the OF and realizing that CS42L55 datasheet recommends to bypass the
PGA only if the HW includes a couple of capacitors (see Typical
Connection Diagram, Note 4), at this moment i don't know if Classic
includes these capacitors (probably not). Anyway, i am not able to
tell the difference listening to voice recodings.
TODO:
- Use variable PGA gain for jack microphone (it is fixed to +12 dB.
as OF does).
- I am not a fan of having lots of unused #define options, these could
be useful for a generic driver but actually this driver is Classic
oriented, i am not sure if it could be considered disirable to
eliminate them in the final version.
Change-Id: I3dadf2341f44d5e13f3847e6c9de4a76cd6f0918
Reorganization
- Separated iBasso devices from PLATFORM_ANDROID. These are now standlone
hosted targets. Most device specific code is in the
firmware/target/hosted/ibasso directory.
- No dependency on Android SDK, only the Android NDK is needed.
32 bit Android NDK and Android API Level 16.
- Separate implementation for each device where feasible.
Code cleanup
- Rewrite of existing code, from simple reformat to complete reimplementation.
- New backlight interface, seperating backlight from touchscreen.
- Rewrite of device button handler, removing unneeded code and fixing memory
leaks.
- New Debug messages interface logging to Android adb logcat (DEBUGF, panicf,
logf).
- Rewrite of lcd device handler, removing unneeded code and fixing memory leaks.
- Rewrite of audiohw device handler/pcm interface, removing unneeded code and
fixing memory leaks, enabling 44.1/48kHz pthreaded playback.
- Rewrite of power and powermng, proper shutdown, using batterylog results
(see http://gerrit.rockbox.org/r/#/c/1047/).
- Rewrite of configure (Android NDK) and device specific config.
- Rewrite of the Android NDK specific Makefile.
Misc
- All plugins/games/demos activated.
- Update tinyalsa to latest from https://github.com/tinyalsa/tinyalsa.
Includes
- http://gerrit.rockbox.org/r/#/c/993/
- http://gerrit.rockbox.org/r/#/c/1010/
- http://gerrit.rockbox.org/r/#/c/1035/
Does not include http://gerrit.rockbox.org/r/#/c/1007/ due to new backlight
interface and new option for hold switch, touchscreen, physical button
interaction.
Rockbox needs the iBasso DX50/DX90 loader for startup, see
http://gerrit.rockbox.org/r/#/c/1099/
The loader expects Rockbox to be installed in /mnt/sdcard/.rockbox/. If
/mnt/sdcard/ is accessed as USB mass storage device, Rockbox will exit
gracefully and the loader will restart Rockbox on USB disconnect.
Tested on iBasso DX50.
Compiled (not tested) for iBasso DX90.
Compiled (not tested) for PLATFORM_ANDROID.
Change-Id: I5f5e22e68f5b4cf29c28e2b40b2c265f2beb7ab7
It will be out of scope once the function is left.
cppcheck reported:
[firmware/drivers/rtc/rtc_zenvisionm.c:31]: (error) Pointer to local array variable returned.
[firmware/drivers/rtc/rtc_zenvisionm.c:38]: (error) Pointer to local array variable returned.
Change-Id: Ibf28ba9b3d20cadcaff22398e143488c86746660
Except for unfinished or experimental ports, it isthe case that
USE_ROCKBOX_USB and HAVE_USBSTACK are both defined or both undefined.
Furthermore, it is a leftover of some early developments on the USB stack and
doesn't make sense anymore.
Change-Id: Ic87a865b6bb4c7c9a8d45d1f0bb0f2fb536b8cad
Reviewed-on: http://gerrit.rockbox.org/1091
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
If any of those functions should be (unused) API functions,
they can easily be turned back once really needed.
Detected using a new cppcheck check that
uses the internal symbol database to catch
functions that are only used in the current file.
Change-Id: Ic2b1e5b8020b76397f11cefc4e205f3b7ac1f184
The last big filesystem code refactoring
broke a lot of debug statements.
firmware/test/fat/ doesn't build anymore,
but that's more or less unrelated.
Change-Id: I4c9e1289eeabe1b59d436b176f1d35a02176614f
The port to for this two targets has been entirely developped by Ilia Sergachev (alias Il or xzcc). His source
can be found at https://bitbucket.org/isergachev/rockbox . The few necesary modifications for the DX90 port
was done by headwhacker form head-fi.org. Unfortunately i could not try out the final state of the DX90 port.
The port is hosted on android (without java) as standalone app. The official Firmware is required to run this port.
Ilia did modify the source files for the "android" target in the rockbox source to make the DX port work. The work I did
was to separate the code for DX50 (&DX90) from the android target.
On this Target Ilia used source from tinyalsa from AOSP. I did not touch that part of the code because I do not understand it.
What else I changed from Ilias sources besides the separation from the target "android":
* removed a dirty hack to keep backlight off
* changed value battery meter to voltage battery meter
* made all plugins compile (named target as "standalone") and added keymaps
* i added the graphics for the manual but did not do anything else for the manual yet
* minor optimizations
known bugs:
* timers are slowed donw when playback is active (tinyalsa related?)
* some minor bugs
Things to do:
* The main prolem will be how to install the app correctly. A guy called DOC2008 added a CWM (by androtab.info) to the
official firmware and Ilia made a CWM installation script and a dualboot selector (rbutils/ibassoboot, build with
ndk-build). We will have to find a way to install rockbox in a proper way without breaking any copyrights.
Maybe ADB is an option but it is not enable with OF by default. Patching the OF is probably the way to go.
* All the wiki and manual
to build:
needed: android ndk installed, android sdk installed with additional build-tools 19.1.0 installed
./tools/configure
select iBasso DX50 or iBasso DX90
make -j apk
the content of rockbox.zip/.rockbox needs to be copied to /system/rockbox/app_rockbox/rockbox/ (rockbox app not needed)
the content of libs/armeabi to /system/rockbox/lib/ (rockbox app needed)
The boot selector is needed as /system/bin/MangoPlayer and the iBasso app as /system/bin/MangoPlayer_original. There
is also the "vold" file. The one from OF does not work with DX50 rockbox (DX90 works!?), the one from Ilia is necessary.
Until we have found a proper way to install it, it can only be installed following the instructions of Ilia on his
bitbucket page, using the CWM-OF and his installation script package.
Change-Id: Ic4faaf84824c162aabcc08e492cee6e0068719d0
Reviewed-on: http://gerrit.rockbox.org/941
Tested: Chiwen Chang <rock1104.tw@yahoo.com.tw>
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
For Iriver h100 & h300 series we don't need always use WSPLL,
because in most cases WSPLL clock and SYSCLK has the same value,
and we have additional WSPLL errors to the output clock. Now that is fixed.
Change-Id: I04aebee659c57c45dc8603e409b9db42bdde534a
Reviewed-on: http://gerrit.rockbox.org/434
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
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>
* HWCODEC bootloaders
* Remove references to thread structures outside the kernel. They are
private and should not be used elsewhere. The mrobe-100 is an offender
that gets squashed.
* The ata.c hack stuff for large sector disks on iPod Video gets squashed
for the same reason. I will no longer maintain it, period; please find
the real reason for its difficulties.
Change-Id: Iae1a675beac887754eb3cc59b560c941077523f5
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
An upcoming lcd-24bit.c driver will re-use a lot of code from the 16bit
drivers, so prepare for that.
Change-Id: I7bc7f6b992e5e3f4e0a0aa54dc08103ebb05315f
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
Because of architecture of the codec it's always necessary to route the input
signal from ADC to DAC, in order to have a control over the monitoring volume
and in order to hear anything while recording.
Change-Id: I1089894c949ab7371857d74aedb6bdf5a7d39c41
Turn on 4x oversampling inside UDA1380 codec.
This allow will move the quantization noise to the higher frequencies,
that slightly improve the final sound quality.
Change-Id: Idf79cd877c526d8937a47c34e9c180d837a15db1
Reviewed-on: http://gerrit.rockbox.org/435
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
Reviewed-by: Björn Stenberg <bjorn@haxx.se>
Defining HAVE_BUTTON_DATA without simultaneously defining HAVE_TOUCHSCREEN
caused compile errors. (I need them separated for a scrollstrip driver.)
Change-Id: I945d3437d840035ccc0c147f8155029b403c6ec2
Reviewed-on: http://gerrit.rockbox.org/771
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
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
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
With the new lcd_putsxy_scroll_func() code can register custom scroll functions
(put_line() makes use of that). In order for the custom scroller to be able
to properly manage its userdata pointer (set via struct scrollinfo::userdata)
the scroll engine must inform the scroller about start and stop of scrolling.
To inform about start the lcd_scroll_* functions now return true when
the line will scroll. To inform about stop the scroll engine calls into the
scroller one last time, with the text set to NULL.
put_line() can use this to release the userdata registered per scrolling line
so that it can be recycled.
This fixes that some scrolling lines became glitchy after some time because
the userdata was recycled too early.
Change-Id: Iff0a6ce2a4f9ae2bada1b8e62f4f5950224942a9
This is used by lcd_puts_scroll_worker() to render the line immediately
instead of waiting for the next scroll tick when only the text was updated.
Previously lcd_puts_scroll_worker() did not render anything in this case
which could lead to visible blinking.
This fixes blinking scrolling lines with dynamic text in the skin engine.
Change-Id: I475bde8c8eb7c92f505e3c5ecf4d32bb90690536
1) The 9-segment images need not be multiple of 3 pixels anymore. If it
isn't the inner segments will be smaller than the corners.
2) If the desired actual images is not a multiple of the segment sizes the
function drawed more than the desired rectangle. This is fixed by
drawing the last segment only partially.
Change-Id: Ic918facd8734fa4a4aa72536f0b67de82d81651e
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
This logic is moved into apps (put_line()) which can better handle line
decorations with respect to scrolling, mulitline and other complications.
Firmware doesn't need this. The remaining drawing function know only one style,
that is foreground on background/backdrop (changing drawmode is still supported).
Change-Id: I707060edc388a7d723a7d09b0cf5cbda6ec56708
This main (and only) purpose for it was to adjust the pixel position of the text
in otherwise linebased (scrolling) functions. With pixel-based scrolling
this isnt necessary anymore.
Change-Id: I2a45b8ca6a3f8f50aa2f6630201b30ce9ddfe043
Since scrolling is now pixel-based this is not necessary anymore. custom line
height is handled by put_line() but can also possible to implement with
lcd_puts_scroll_func().
Change-Id: Iee9b12bf99afac93d95d2a1a6f5d5b4db237b21c
With this functions removed there is no exported function in firmware left
that draws line decorations. Also no function supports specifying an y-offset
anymore (was used for pixel accurate positioning of otherwise strictly line-based
API calls).
Both should be handled in apps/ now.
Change-Id: Iba4b28ccc6e686c7db63e34b51ad4badae983fce