Commit graph

495 commits

Author SHA1 Message Date
Aidan MacDonald
fb99d890a8 Fix typo in MIPS cache discard
Change-Id: I6a06e5f3098324d985bd59322755cd68122ec0bf
2021-03-04 19:39:28 +00:00
Solomon Peachy
cbace906c6 mips: Revert to commiting the cache when we're told to discard an unaligned block.
The filesystem API often passes in unaligned receive buffers, and some
code (eg BMP reader) processes data in-place, leading to data loss when
we dropped the cache.

(And document exactly what we're doing, so we don't go through this again
 at $future_date)

Change-Id: If47a7f2148a5a1a43777f0bd3be1bdfe8239e91e
2021-03-04 12:00:15 -05:00
Aidan MacDonald
de53965e3f Third try fixing MIPS cache code
Changing this to be a pure discard operation after discussion on IRC

Change-Id: I62955ae7975fdbbfd9eef376476042a36fe3d95a
2021-03-04 02:47:13 +00:00
Solomon Peachy
b82298ae2c jz4740: Fix incorrect dcache flush in the USB RX DMA code.
Change-Id: I01eff581b16569bda97c55afc7adac897b29e0e3
2021-03-03 21:44:28 -05:00
Aidan MacDonald
8cb4c18310 Really fix the MIPS cache bug this time
In fixing the original bug I tried to optimize discard_dcache_range()
to minimize writeback and inadvertently introduced a second bug, which
typically ends in a TLB refill panic.

It occurs only if the range fits within one cache line, and when both
the start and end of the range are not aligned to a cache line. This
causes ptr to be incremented and end to be decremented, so ptr > end,
and the loop can't terminate.

Change-Id: Ibaac072f1369268d3327d534ad08ef9dcee3db65
2021-03-03 23:57:08 +00:00
Aidan MacDonald
74a3d1f5be Fix MIPS cache operations and enable HAVE_CPU_CACHE_ALIGN on MIPS
- The range-based cache operations on MIPS were broken and only worked
  properly when BOTH the address and size were multiples of the cache
  line size. If this was not the case, the last cache line of the range
  would not be touched!

  Fix is to align start/end pointers to cache lines before iterating.

- To my knowledge all MIPS processors have a cache, so I enabled
  HAVE_CPU_CACHE_ALIGN by default. This also allows mmu-mips.c to use
  the CACHEALIGN_UP/DOWN macros.

- Make jz4760/system-target.h define its cache line size properly.

Change-Id: I1fcd04a59791daa233b9699f04d5ac1cc6bacee7
2021-03-03 20:50:28 +00:00
Solomon Peachy
388adff3cc pcm: Further cleanup of unused bits of the PCM ACPI:
* pcm_get_bytes_remaining()
 * pcm_calculate_peaks()
 * pcm_get_peak_buffer()

Nothing in-tree uses these at all (except for the lua plugin wrapper)

Change-Id: I971b7beed6760250c8b1ce58f401a601e1e2d585
2020-11-12 15:59:09 +00:00
Solomon Peachy
fe2d52cc7d pcm: Get rid of pcm_play_pause() and associated APIs
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
2020-10-31 01:18:27 +00:00
Solomon Peachy
0cde20fadb xduoox3: Disable the DAC's digital de-emphasis filter.
Whether or not this is correct depends on how the source material was
mastered, digitized, and/or encoded.  There is no setting appropriate
for everything.

Eventually I'd like to make this configurable, but I'd want to have it
shared with more than one target first.

Change-Id: I20a0eff4b3dc2517c33db49d4f72e85bf81d1ca6
2020-10-15 13:30:48 -04:00
Solomon Peachy
7a1bf01541 Undo the hacks that allowed targets without LEFT/RIGHT (UP/DN) to build.
Replaced them with warnings until they are fixed *PROPERLY*

Change-Id: I4425200e60f8b5224262a54f105b974cec471d22
2020-10-08 20:30:08 -04:00
Solomon Peachy
f4f3255edf xduoox3: Work out clocks for 176/192KHz support.
Note:  PCM mix buffer sizes are _way_ too small for these high bitrates

(We really need to make the mixer stuff use dynamic buffer sizes based
 on the bitrate.  Maybe pre-allocate a max size based on upper bitrate limit,
 but use only part of it at lower bitrates?  So we can have sane latency..)

Change-Id: Id7b4afd73dba7f1ffb84b2e1c016859fae5d6835
2020-10-01 17:30:22 -04:00
Solomon Peachy
e404026308 jz4760: Implement USB DMA RX
Can be disabled at runtime by setting hold switch.

Boosts sysbench sequential write performance by 34-58%

Change-Id: I060c9d7dddc1b448f18aa46af8f8aff046e07843
2020-09-18 17:48:31 -04:00
William Wilgus
2df3a5b04c Headphone / lineout pause/resume #FS13237
Allow Lineout to behave like headphone port in regards to
plug/unplug pause/resume

Change-Id: I9cb2c9c40e0bdf3bf7e1e272164acd343f6b3850
2020-09-18 00:22:52 +00:00
Solomon Peachy
ec413f7692 jz4760: Heavily rework USB driver to add working DMA support
* DMA Bulk IN (ie our TX) results in sequential transfers 33-68% faster.
 * DMA Bulk OUT (ie RX) is mostly stripped out due to complete brokenness.
 * Interrupt and control endpoints remain PIO-driven.

Other improvements:

1) Use consistent endpoint references (no magic numbers)
2) Greatly enhanced logging
3) DMA support can be compiled out completely
4) Setting lockswitch will disable all DMA operations at runtime
5) Much more robust error checking and recovery

Change-Id: I57b82e655e55ced0dfe289e379b0b61d8fe443b4
2020-09-17 11:26:04 -04:00
William Wilgus
a66b908801 Xduoo X3 add headphone and lineout status to IO Ports debug menu
Change-Id: I9caf55c1249625dff7e437158afd20a526fa7499
2020-09-17 11:22:40 -04:00
William Wilgus
3c2b6809d9 Xduoo X3 no ADC after ROLO
Speachy suggested we don't shut down the adc on ROLO
this fixes the random adc drop out on ROLO

Change-Id: Ife7d679ce51a6f767963210ee650815f1de12223
2020-09-13 13:29:00 -04:00
William Wilgus
c62493e98a Xduoo X3 Add tree scrolling FS#13240, Emulate Multibutton presses
Fixes deficiencies with the button system on the X3

  The x3 has an interesting button layout.
  Multiple key presses are NOT supported unless
  [BUTTON_POWER] is one of the combined keys

  As you can imagine this causes problems as the power button takes
  precedence in the button system and initiates a shutdown if the
  key is held too long
  instead of BUTTON_POWER use BUTTON_PWRALT in combination with other keys
  IF using as a prerequsite button then BUTTON_POWER should be used

  Multiple buttons are emulated by button_read_device but there are a few
  caveats to be aware of:

  Button Order Matters!
   different keys have different priorities, higher priority keys 'overide'
   the lower priority keys
  VOLUP[7] VOLDN[6] PREV[5] NEXT[4] PLAY[3] OPTION[2] HOME[1]

  There will be no true release or repeat events, the user can let off the
   button pressed initially and it will still continue to appear to be
   pressed as long as the second key is held

Tree scrolling is PLAY+NEXT or PLAY+PREV

Change-Id: I88dfee1c70a6a99659e8227f5becacc50cc43910
2020-09-13 16:23:24 +00:00
William Wilgus
e18c2f3001 XduooX3 LCD tweaks #2
Group commands for a bit more speed

bitdelay was not being inlined
lower bitdelay to 12 cycles

Clean-up magic numbers

Change-Id: Ifeb57a5532807a598f1ec5e1c55f03e4aa1e133f
2020-09-08 14:37:46 +00:00
William Wilgus
af24ff1fc3 XduooX3 Gpio reconfigure button system #2
Fix issue with first battery sample taking 30 seconds

Clean up code

Change-Id: If2437d241e0ab4e3d23b141f5d853b6cf3209b07
2020-09-06 11:06:54 +00:00
Solomon Peachy
53142ae9f5 jz4760: Fix and re-enable the hardware udelay() timer
Change-Id: I591b4f023776b3501fce03e08bfc87a355f4c69b
2020-09-06 02:09:21 +00:00
Solomon Peachy
2dadb8c7d6 jz4760: Use a #define for the timer id, not a raw number
Change-Id: Ic31267a2ae82beede72100c1cc5ddf7211aa0abe
2020-09-06 00:27:07 +00:00
Solomon Peachy
d015165bc5 mips: Convert 'nop' to 'ssnop' -- for future-proofing
Change-Id: I17625f4d56a1f5205887cb47668a2dcb628053f4
2020-09-05 22:18:26 +00:00
Solomon Peachy
90a4f28c27 jz47xx: Audio path tweaks:
* Increase audio buffer size to better handle IRQ latency (256->2048)
 * Ensure DMA engine is idle prior to starting transfers
 * Set AIC to repeat last sample in case of underflows

Change-Id: I9c45c20481ee072e5882b7586fb7d50bd8ef2f35
2020-09-04 15:57:00 -04:00
William Wilgus
48a2b80c77 Xduoo Gpio fix bug
Change-Id: I76eda59a391a408d1a6642497d8cc4aeb93a0da1
2020-09-03 16:06:16 -04:00
Solomon Peachy
0cb162a76b mips: Heavily rework DMA & caching code
Based on code originally written by Amaury Pouly (g#1789, g#1791, g#1527)
but rebased and heavily updated.

Change-Id: Ic794abb5e8d89feb4b88fc3abe854270fb28db70
2020-09-03 15:34:28 -04:00
William Wilgus
1ae8213a64 XduooX3 Gpio reconfigure button system
only check button values with adc when buttons are actually pressed

battery level check frequency is now around 30 seconds
switched to polling for the battery voltage w/ timeout

Ifdef functions Allow BACK OPTION PLAY to be the first of a two key combo

Change-Id: Icb48d62ac8d82b4dc931df5e1c5b4a84a9a69772
2020-09-03 18:19:47 +00:00
Solomon Peachy
546212a977 jz4760: Dial down PIXCLK as low as possible
We don't use it on the X3.  Should we ever get another jz4760 target
we can revisit this.

Change-Id: I591d02c7e47b35424b3c96b776b31a38e3c8ceee
2020-09-02 13:39:05 -04:00
Solomon Peachy
f913829d06 xduoox3: Disable the LCD and MSC0 clocks as we don't use them
Change-Id: If2261aed464fcbe3ea1f036dd18376fa8ff42e69
2020-09-02 16:59:13 +00:00
William Wilgus
1a8939cc3d XduooX3 Slow down greylib framerate
halves cpu usage

Change-Id: I3797b01ecd2f7615acfed53a77d8a1f51e947c8b
2020-09-02 16:57:05 +00:00
William Wilgus
35371df671 XduooX3 Debug Menu -- HW_info
add scrolling for clocks and such

moved to a switch based structure..  this ends up a lot cleaner

Change-Id: I940506c4b8dc73f0b776d20810780527cbf7e0d4
2020-09-02 16:38:43 +00:00
Solomon Peachy
bb6fc21244 mips: use .set push/pop in asm code
Change-Id: I3e7bc7ffb8d6d0c5d18a6ab38b1a270559a62fb9
2020-09-02 08:29:04 -04:00
Solomon Peachy
a7ebd92ec8 jz4760: use SYSFONT in the hw info debug screen, and restore old font
Change-Id: I0c2df20a8c87f7a5bdf25d59904d32806171a544
2020-08-31 13:40:49 -04:00
William Wilgus
790a5bb0ca Xduoo_x3 Boot Fix red from debug menu changes
Change-Id: I1a84cf28f8a3416d661a8e2e4dd31c9e86f50ba0
2020-08-31 02:45:09 -04:00
William Wilgus
63e6aec260 xduooX3 debug menu add GPIO IO Ports
Change-Id: I6ca9f005e412240235354b9369bcc3f4a4ad256f
2020-08-31 03:07:17 +00:00
Solomon Peachy
748133cf9d xduoox3: Fix bootloader build
Change-Id: Ia2f2dba4a263c82aebc7fab9da4ad69ef90565ea
2020-08-30 21:56:11 -04:00
Solomon Peachy
8dadce5c4c jz4760: Explicitly disable UARTs at startup
(Bootloader uses UART1, and leaves it running when it hands it off to us)

Change-Id: Icde1d713574582f18e9f91b5c95f3917fe324b74
2020-08-30 21:36:26 -04:00
William Wilgus
06e9abc428 XduooX3 Tweak LCD drive strength and slew
Change-Id: Ic5ee9e700a0c8acffc39b51cedc24ff44d230fd3
2020-08-30 17:26:43 -04:00
Solomon Peachy
e06ab68166 xduoox3: Use correct "ms_clk" divider for SADC and be smarter with polling
Change-Id: Ibbbcd9fd1e7e2cfa896678cccaa00296c86c2c62
2020-08-30 01:45:15 -04:00
Solomon Peachy
cc5b0439a8 jz4760: Prioritize Audio DMA and TCU0 (systick) above all others
(And loop in the IRQ handler to make sure we catch everything!)

Change-Id: I813272c69e981fdc214ec28448ced403ad366ea0
2020-08-30 01:45:15 -04:00
Solomon Peachy
b01e9295e4 jz4760: Revert back to the delay loop udelay()
... the timer-based version used the same timer as our os tick!

Change-Id: Id84b308bfa1145cb8806e1029f2ca26159fb71e1
2020-08-30 01:45:15 -04:00
Solomon Peachy
733821b592 jz4760: Rework IRQ priorities, make audio the highest.
(it was effectively the _lowest_ prior to this.  wtf?)

Change-Id: I6905c5ba0d87a5e14aeae5d5b79f8f515ac5b806
2020-08-29 21:26:49 +00:00
Solomon Peachy
3dc4f817de jz4760: Disable dynamic clocking entirely.
Back off to 480MHz [max] clock, bus/mem clock of 120MHz.

576 is unstable on at least one unit, and 528 still glitches.

Change-Id: I020e48532524e739f3bfa42bed570381ccd34959
2020-08-29 14:59:46 -04:00
William Wilgus
3867f0b959 XduooX3 Sources WS changes
Change-Id: I17ae59e7ef0440756527ce50ab30f8bf34f79007
2020-08-29 10:14:03 -04:00
William Wilgus
31a1a29004 Xduoo X3 Tweak LCD settings
Adds contrast setting which actually sets the drive voltage

Change-Id: I173238e2efe9e50c6ef4cda9bf991e7ee5568ff5
2020-08-29 04:31:37 +00:00
Solomon Peachy
5e335f5c33 jz4760: do the MSC (ie SD) clocking setup when we change PLL0
Change-Id: Ia17b1d7069af507c3f029bcaed0f65e7e97df275
2020-08-29 00:29:25 -04:00
Solomon Peachy
4a6d8e91bb jz4740: Timer not re-enabled properly
(same fix as g#2703 for the jz4760)

Change-Id: Ic6467d9e6085e3057528b6d1a08b7c07e9dceab4
2020-08-28 15:19:07 +00:00
William Wilgus
77019c2c3c Xduoo_X3 Fix timer_set_period fail to reenable
when timer_set_period is called timer is stopped but never reenabled

Change-Id: I5cfc7a2d5620ff998005e013952b25f1e0a52754
2020-08-28 11:11:03 -04:00
Solomon Peachy
1aee168398 jz4760: Pull non-PLL init out of pll0_init() code.
So it only gets called once, at system startup.

Change-Id: I4c191519009e80dfb118065391295c88a014d25a
2020-08-28 10:41:41 -04:00
William Wilgus
5fb4c74bfb Xduoo X3 - Grey scale lib update
greylib on the xduoo x3 now matches the rest of the 1bit targets

Change-Id: I2685869da6734404356552cc9f4ed5f59ebd6650
2020-08-27 14:33:23 +00:00
Solomon Peachy
a52eb1d8cc xduoox3: Include curves for both battery types
There is no way to detect this at runtime so it is a user setting

Change-Id: Ibc5b87312238c59e3678d512af27e3a3bcb9a58a
2020-08-26 18:18:02 +00:00
Solomon Peachy
f4bf27c26e jz4760: fix the new udelay() to use _micro_seconds, not milliseconds
Change-Id: I4877b1c8e4a95259b5ade126e28458b65fbd3c4b
2020-08-26 11:56:04 -04:00
Solomon Peachy
f791df1375 xduoox3: Update battery discharge curve and runtime estimates
(Brand new unit lasted one minute shy of 12 hours!)

Change-Id: I0330f43065412d432a45b555bb310f943eb526e7
2020-08-26 08:34:07 -04:00
Solomon Peachy
6920c089af jz4740: SD clock sequencing changes.
* Don't stop clock before switching speeds
 * Don't stop clock prior to transactions
 * Stop clock at the end of transactions

Will result in slightly better performance and some power saving when
we're not actively using the SD peripheral.

Change-Id: I1c82476cad97137b1469900645ecf7bb0887119a
2020-08-25 14:01:44 -04:00
Solomon Peachy
0aa2197d93 jz4760: SD driver enhancements:
* Check to see if clock is [not] running prior to [en|dis]abling it
 * Stop clock _prior_ to resetting controller
 * Stop clock after transaction is completed, not before initiating it
 * Use controller's low power mode (disables clocks when idle)
 * Fix, and enable, interrupt-driven DMA transfers
 * Fixes for full interrupt-driven operation  (WIP, still broken)

Change-Id: I723ffa6450fc85f97898c8a8b3e538ae31c4858e
2020-08-25 12:07:50 -04:00
Solomon Peachy
1b31101fdd jz4740: Fix potential deadlock in SD init code.
There's a code path that calls sd_init_device() while we hold sd_mtx, but
sd_init_device() tries to obtain the mutex while doing its work.

Change-Id: I882c595e9e7cd2224b1db0d413925668628476e9
2020-08-25 08:19:10 -04:00
Solomon Peachy
63ef81de31 jz4760: Give each SD interface its own DMA channel, semaphore, and mutex
* Allows both SD interfaces to have requests in flight simultaneously
 * Fixed a deadlock in the hotswap code
 * Ensure TX DMA is idle before initiating a request (bug due to a typo)

Change-Id: I988fa29df5f8e41fc6bbdcc517db89842003b34d
2020-08-25 12:16:33 +00:00
Solomon Peachy
a9ac2d0ba3 jz4760: Use HW timer for more a more accurate udelay()
(More specifically, use the SoC's "OS Timer", slaved to the main XTAL so
 it doesn't matter how the main CPU is clocked)

Change-Id: I799561ac823ff7f659a05144cf03b6a13d57ea7b
2020-08-12 23:03:33 -04:00
Solomon Peachy
08c4b708ae jz4760: Move 11/22/44/88KHz back onto the PLL
PLL1 clock for those frequencies has been dropped from 508 to 169.5 MHz,
so it's still a respectable reduction.

(I'm not sure how/why it ever worked with the XTAL source, but it did,
 and was off by an audible amount)

Change-Id: I614d87e7dfdfe9210702b9c646d3863c06d6780b
2020-08-08 22:29:29 -04:00
Solomon Peachy
b3a0187416 jz4760: Major clocking improvements for audio PLL
* for <= 48KHz, BCLK must be 256*freq  (ie bdiv = 4)
 * for <= 96KHz, BCLK must be 128*freq  (ie bdiv = 2)
 * for 11/22/44/88 KHz, disable PLL1 and run off XTAL
 * cut PLL1 with 12/24/48/98 KHz audio from 516->86MHz
 * cut PLL1 with 8/16/32/64 KHz audio from 426->106.5MHz

This should result in significant power savings for
common 44.1KHz audio playback, and pretty good savings
for everything else.

As an added bonus:

 * enable de-emphasis filters at 32, 44.1, and 48 KHz

Change-Id: Ie59067cd46c47e62abf4a32c53519efad104d6c8
2020-08-07 15:55:31 -04:00
Solomon Peachy
eb0e41c1cc jz4760: Support dynamic reclocking!
default/low speed is 192 MHz, Max is 576

Downclock PCLK/MCLK/etc to 96MHz to save a bit of juice

Honestly the high speed could be dialed down to, eg 384
as this thing is so bloody fast..

Change-Id: Ie65597c74290f1603e65f69dae8e75b59c8ba0b4
2020-08-07 11:42:45 -04:00
Solomon Peachy
62146ed735 jz4760: Fixes in PLL calculation and reporting
Change-Id: I890c661fbff549de5a224d90e3fbda34c71b3a7e
2020-08-07 11:42:45 -04:00
Solomon Peachy
e0bb30a1bd xduoox3: Set PLL0 to 480MHz, not 492.
PLL0 Needs to be a multiple of 48MHz for sane USB operation!

(Indeed, "typical" clock for this part is 528, but that seems a
 waste of power)

Also fixes a minor bugaboo in the jz4670 usb divisor calculation
that won't matter until we enable reclocking

Change-Id: I40b1fd1ae48871e50885981ccc8b01feb711b9a5
2020-08-07 03:44:01 +00:00
Solomon Peachy
f554c78734 jz4760: Don't enable PLL1 until we need audio.
Change-Id: I6320ee9ac809da93c80e571d45f01e22c5bd1c40
2020-08-07 03:43:43 +00:00
Solomon Peachy
7ab063a157 jz7460: debugging improvements
Change-Id: Ie03609ebe8bff51eed26e3781fe2b8663cc49e3a
2020-08-07 03:43:43 +00:00
Solomon Peachy
658026e626 [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.
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
2020-07-24 21:20:13 +00:00
Solomon Peachy
c54170e8f6 mips: Adjust stack sizes
Main/IRQ  from:   7.5/0.75   to:  7.25/1.0

With the reduction of the opus codec stack usage, giving the IRQ stack
some additional breathing room is now possible.

Change-Id: Id0cd3747fcaab70e2360667ac8c1a97ba7234ccf
2020-07-15 11:43:39 -04:00
Solomon Peachy
83963fcb15 XduooX3: Uncomment code that prevented hotswap from working.
Change-Id: I5efec00e60aacf05166407ad43b9d63340e18967
2019-07-29 11:14:41 -04:00
Solomon Peachy
1e076a7be8 jz7460: Disable IRQ-driven DMA transfers.
This greatly increases the stability of SD card write operations.

(I suspect the underlying problem is not IRQ operation itself, instead
 being exacerbated by it..)

Change-Id: Ia00f0656abd4b3cb0b1b5fc9db7c1b6a02847956
2019-06-02 13:09:19 +02:00
Solomon Peachy
d24edc605b Add HAVE_LINEOUT_DETECTION and associated logic
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
2019-01-04 23:52:42 +01:00
Solomon Peachy
52ed74aad0 mips: Adjust main & irq stack sizes to fit in IRAM on all targets
New amounts:

7.50K main stack
0.75K irq stack

Prior values of 8K+1K overflowed IRAM by ~660 bytes on Onda 7x7 targets,
but worked on the xDuoo X3.

(The discrepancy is due to the Onda targets having more LCD code shoved
 into IRAM.)

Change-Id: I16fcfae3c5f3e36db688dfa9167b620584e79df8
2019-01-02 19:52:05 -05:00
Solomon Peachy
36a50dd00f mips: Use a separate IRQ stack & optimize IRQ handling a little
Should prevent the IRQ-related stack overflows seen on MIPS targets.

Change-Id: I447336ef3fe37e11b3276a78ba220ce64c2f87f5
2019-01-02 23:30:04 +01:00
Solomon Peachy
7e7ca0c858 Fix Xduoo X3 bootloader build, and silence all warnings.
Also enable USB bootloader mode

Change-Id: I73224c2e694b9941993c89a114b48d2a907e0dfb
2019-01-02 05:01:50 +01:00
Solomon Peachy
d2cef81bba mips: fix some compile warnings.
Change-Id: Ia5e83702313c1c184480290d3b0e6a66f01b7277
2018-10-09 22:35:37 -04:00
Solomon Peachy
71abdf5d82 mips: jz4740: JZ4740 does not have a MSC clock source select.
Change-Id: Ic2af37d92bcb8b6b35684f113eb8e392fc2eb609
2018-10-09 11:37:43 -04:00
Solomon Peachy
a454b7f9ef jz4760: Lots of stability fixes to the USB driver.
It actually works for transferring data now!

Igor Poretsky gets full credit for this patch.

Change-Id: I247c70fdf45e590b4699b9b8668bbdab7bc3ef03
2018-09-20 21:11:40 -04:00
Solomon Peachy
a26c1c1459 xduoo_x3: Disable keypress IRQ since we poll for keypresses.
Change-Id: Ieab5f864751cf798b62c4e89e670acf7ade756ab
2018-09-20 19:38:58 -04:00
Solomon Peachy
640ada0389 jz4760: Enhancements and fixes to SD driver.
* Fully Interrupt-driven, with proper task yielding
 * Much more robust error handling
 * Eliminate duplicate code
 * Pile of bugfixes

 (Much of this adapted from Igor Poretsky's tree)

Change-Id: I46006412323cba2088b70094635d62a241be1d7e
2018-09-20 19:38:25 -04:00
Solomon Peachy
8edf4052c7 jz7460: Silence codec when changing playback frequency/mode
Silences some annoying clicks.

Change-Id: I3d32d4b33c0ccc61877e10f5af97fe05084d66e5
2018-09-20 18:59:19 -04:00
Solomon Peachy
1020897794 jz7640: SD driver improvements:
* Better multidrive support
 * Common slot1/slot2 handling code

Change-Id: Id0aed90cbba4246fdc71b42e03f016f8060d258a
2018-09-20 18:59:19 -04:00
Solomon Peachy
679a0bd193 jz74x0: MSC clock needs to be divided from PLL clock.
Change-Id: I0cf2f0d55e0859f896afef289e833935d7c5a599
2018-09-20 18:59:19 -04:00
Solomon Peachy
72820d8b2d jz4760: Greatly enhance debug code and silence some compilation warnings.
Change-Id: I1746d67c818ad099edea83e6242ffd5c79be0000
2018-09-20 18:59:19 -04:00
Solomon Peachy
0662793ca0 Add cleaned-up xDuoo X3 support
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>
2018-07-28 10:56:31 -04:00
Michael Sevakis
e4a46c8d88 Fix a few missed things in 16454efc (and hopefully clear the red).
Change-Id: I2ce88e4c41e6e08efbfbdf261122318dfb0f8b0f
2017-10-26 16:32:53 -04:00
Michael Sevakis
1654efc313 Unify storage threads into one
* 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
2017-10-26 14:35:41 -04:00
Marcin Bukat
9ffd9327e3 Fix red/yellow
Change-Id: Ie01251af2cd843979b5fdefcfa541ba377d13bd7
2015-01-12 12:02:24 +01:00
Marcin Bukat
89ba7e818c Get rid of stupid _backlight_* function names
_remote_backlight_* and _buttonlight_* are cleaned as well

Change-Id: I73653752831bbe170c26ba95d3bc04c2e3a5cf30
2015-01-12 11:09:27 +01:00
Michael Sevakis
7d1a47cf13 Rewrite filesystem code (WIP)
This patch redoes the filesystem code from the FAT driver up to the
clipboard code in onplay.c.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Change-Id: Ia30f3082a136253e3a0eae0784e3091d138915c8
Reviewed-on: http://gerrit.rockbox.org/566
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
2014-08-30 03:48:23 +02:00
Marcin Bukat
2f21f77ade ingenic: crt0.S fixes #3
Hopefyly this time is the final one.

Change-Id: I386964f407ca98499e9a482507e4d5dfa02ee891
2014-03-04 10:28:02 +01:00
Marcin Bukat
7066197ccc ingenic: fix bugs introduced by 5900bf7
I must have been blind and copied some intermediate file
instead of final version. No functional change, only fixes.

Change-Id: Icaa868225517662c88f8492b1f04808407853361
2014-03-04 10:24:43 +01:00
Marcin Bukat
5900bf7315 ingenic: Tweak a few details in crt0.S
1) Avoid load/store delay slot by reorganizing instructions
   in copy loops
2) Fix off-by-one error in cache initialization code.
   This was harmless as it simply set line0 twice, now it sets
   every cacheline only once.
3) Fix off-by-word error in .bss clearing loop.
   The addiu in branch delay slot even if calculated is not seen
   by the branch instruction itself, so the code did one word
   too much in clearing.
4) Fix off-by-word error in deadbeefing stack.
   See above.

Change-Id: Iabb09a55979de7aa2e2b9234273683fc7e9762c5
2014-03-03 13:21:32 +01:00
Jean-Louis Biasini
df6eb82f51 touch devices: Disable touch on softlock.
Target that have a touchpad/touchscreen should disable it while
being locked (In order to avoid LCD to drain battery power due to
"key locked" constant reporting messages. If they a have a keylock
button this was already handled at driver level. If not (e.g. fuze+),
they will have to implement a switch at driver level that action.c
can operate on softlock.
This patch does the following for any target having a touchpad
or a touchscreen and no HAS_BUTTON_HOLD (ie any softlock target)
1) it implements the code to call button_enable_touch(bool en) in
action.c.
2) button_enable_touch is implemented in button.c and call
either touchpad_enable or touchscreen_enable
3) those two function are implemented respectively in touchscreen.c
and a new touchpad.c file. They provide a generic way to silents touch's
device and call a function at driver level where target specific code
can be implemented if possible/needed (for power saving for instance).
Those function name are touchpad_enable_device and touchscreen_enable_device
4) we implement an empty function at driver level of targets that need it
to have them still being able to compiled.

Change-Id: I9ead78a25bd33466a8533f5b9f259b395cb5ce49
Reviewed-on: http://gerrit.rockbox.org/569
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2013-09-05 20:02:07 +02:00
Michael Sevakis
a56f1ca1ed Cleanup MV/MD macros a little.
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-08-17 12:18:22 -04:00
Michael Sevakis
e61e9c61d0 Do some cleanup, adjustment and a couple fixes to recent sound changes.
* SOUND_x enum can be generated by audiohw_settings.h along with settings
entries and sound_val2phys.

* VOLUME_MIN and VOLUME_MAX are no longer necessary within sound.c. If
you need them, they are for target-defined purposes.

* Fix up SDL volume implementation in sdl.c. Move sim volume calculation
code to pcm-sdl.c.

* Min trigger tresholds were based upon VOLUME_MIN for some reason.
These setting have nothing to do with playback volume. Since it is no
longer present, set these at -89dB which is the minimum peak meter
sensitivity setting.

* Fix an oversight in wm8758.c. I forgot to add the dB->register
conversion to audiohw_set_volume.

Change-Id: Ie1df33f1793eee75e6793f16bc7bddd16edb7f75
2013-04-22 20:38:17 -04:00
Michael Sevakis
5261b19bdf Still at it for 0c7b787. Might be done now.
Change-Id: Idf45731dc6554954747f6036dc6dfcd4b63981a1
2013-04-15 14:58:00 -04:00
Michael Sevakis
0c7b787398 Straighten out the mad twisted state of sound.c and related areas.
This is going right in since it's long overdue. If anything is goofed,
drop me a line or just tweak it yourself if you know what's wrong. :-)

Make HW/SW codec interface more uniform when emulating HW functionality
on SWCODEC for functions such as "audiohw_set_pitch". The firmware-to-
DSP plumbing is in firmware/drivers/audiohw-swcodec.c. "sound_XXX"
APIs are all in sound.c with none in DSP code any longer.

Reduce number of settings definitions needed by each codec by providing
defaults for common ones like balance, channels and SW tone controls.

Remove need for separate SIM code and tables and add virtual codec header
for hosted targets.

Change-Id: I3f23702bca054fc9bda40f49824ce681bb7f777b
2013-04-15 12:02:05 -04:00
Michael Sevakis
f5a5b94686 Implement universal in-PCM-driver software volume control.
Implements double-buffered volume, balance and prescaling control in
the main PCM driver when HAVE_SW_VOLUME_CONTROL is defined ensuring
that all PCM is volume controlled and level changes are low in latency.

Supports -73 to +6 dB using a 15-bit factor so that no large-integer
math is needed.

Low-level hardware drivers do not have to implement it themselves but
parameters can be changed (currently defined in pcm-internal.h) to work
best with a particular SoC or to provide different volume ranges.

Volume and prescale calls should be made in the codec driver. It should
appear as a normal hardware interface. PCM volume calls expect .1 dB
units.

Change-Id: Idf6316a64ef4fb8abcede10707e1e6c6d01d57db
Reviewed-on: http://gerrit.rockbox.org/423
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
2013-04-11 22:55:16 +02:00
Marcin Bukat
027c035a4e jz4740: a few minor fixes
This was spotted while playing with qemu-jz:
1) rockbox reads TECR and TESR which are described as write-only
   registers. Datasheet doesn't mention what happens if they are
   readed. Apparently this doesn't have fatal side effects.
   It comes down to two defines from jz4740.h
   __tcu_stop_counter(n) and __tcu_start_counter(n) which use
   read-modify-write sequence.

2) rockbox accesses out of bound offset 0xd4 in DMA memspace.
   It comes from dis_irq() in system-jz4740.c. NUM_DMA is 6 but
   DMA channels are 0-5 so (irq <= IRQ_DMA_0 + NUM_DMA)) bound
   check is wrong.

This are *NOT* tested on device.

Change-Id: I29dff6a4f828030877b7d50fbcc98866478b9e3d
Reviewed-on: http://gerrit.rockbox.org/338
Reviewed-by: Bertrik Sikken <bertrik@sikken.nl>
Tested-by: Purling Nayuki <cyq.yzfl@gmail.com>
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2013-03-11 08:33:18 +01:00
Rafaël Carré
7ca2081036 remove debug-target.h 2012-05-07 00:55:59 -04:00
Rafaël Carré
ed38c5d953 remove unused prototypes 2012-05-07 00:51:13 -04:00
Michael Sevakis
286a4c5caa Revise the PCM callback system after adding multichannel audio.
Additional status callback is added to pcm_play/rec_data instead of
using a special function to set it. Status includes DMA error
reporting to the status callback. Playback and recording callback
become more alike except playback uses "const void **addr" (because
the data should not be altered) and recording  uses "void **addr".
"const" is put in place throughout where appropriate.

Most changes are fairly trivial. One that should be checked in
particular because it isn't so much is telechips, if anyone cares to
bother. PP5002 is not so trivial either but that tested as working.

Change-Id: I4928d69b3b3be7fb93e259f81635232df9bd1df2
Reviewed-on: http://gerrit.rockbox.org/166
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
2012-03-03 07:23:38 +01:00
Jonathan Gordon
b37e6bc8c1 lcd drivers: Convert lcd_[remote_]framebuffer to a pointer
Change all lcd drivers to using a pointer to the static framebuffer
instead of directly accessing the static array. This will let us
later do fun things like dynamic framebuffer sizes (RaaA) or
ability to use different buffers for different layers (dynamic
skin backdrops!)

Change-Id: I0a4d58a9d7b55e6c932131b929e5d4c9f9414b06
2012-02-28 11:44:59 +11:00
Thomas Martitz
c94cf3b888 Move optimized ffs to firmware/asm, using the new automatic-asm-picking infrastructure.
Change-Id: I5e7bdc8be7de50ef604c16078857fff1b84650dc
2012-01-22 18:46:45 +01:00
Thomas Martitz
a035261089 Move optimized memcpy and friends and strlen to firmware/asm,
using the new automatic-asm-picking infrastructure.
2012-01-22 18:46:45 +01:00
Thomas Martitz
991ae1e395 Create fimrware/asm directory for assembly optimized stuff.
This dir is suitable for stuff that doesn't fit the target tree, e.g. because
it also builds on hosted or otherwise. It also has a generic subfolder for
fallback C implementations so that not all archs need to provide asm files.

SOURCES should only contain "foo.c" where foo.c includes the specific
<arch>/foo.c files from the subdirs using the preprocessor. This way automatic
selection of asm versions or generic C verion is possible.

For the start, the thread support files are moved, since ASM threads can
be used on hosted platforms as well. Since core_sleep() remains platform
specific it's moved to the corresponding system.h headers.

Change-Id: Iebff272f3407a6eaafeb7656ceb0ae9eca3f7cb9
2012-01-22 18:46:44 +01:00
Rafaël Carré
2737a66471 lcd-target.h: remove some duplicate declarations
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31625 a1c6a512-1295-4272-9138-f99709370657
2012-01-08 00:52:55 +00:00
Rafaël Carré
7f2156661c adc-target.h: cleanup
move adc_close() prototype to adc.h
don't duplicate prototypes of adc.h
remove license header and guards for a single include of another file or for empty content

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31623 a1c6a512-1295-4272-9138-f99709370657
2012-01-08 00:39:29 +00:00
Rafaël Carré
95cf63b294 button-target.h : move prototypes to button.h
no need to define BUTTON_REMOTE anymore

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31620 a1c6a512-1295-4272-9138-f99709370657
2012-01-08 00:07:19 +00:00
Rafaël Carré
66149b454b ingenic_jz: remove ata-nand-target.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31616 a1c6a512-1295-4272-9138-f99709370657
2012-01-07 22:11:24 +00:00
Rafaël Carré
393f427a11 dbg_hw_info(): remove duplicate prototypes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31560 a1c6a512-1295-4272-9138-f99709370657
2012-01-04 05:29:30 +00:00
Rafaël Carré
b959497670 dbg_ports(): remove duplicate prototype
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31558 a1c6a512-1295-4272-9138-f99709370657
2012-01-04 05:21:52 +00:00
Thomas Martitz
c1bd9b0361 Rework powermgmt to enable code re-use on appliation and sims.
* 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
2012-01-03 23:44:38 +00:00
Rafaël Carré
f016893aaa onda: remove now inlined USB_INIT_GPIO()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31500 a1c6a512-1295-4272-9138-f99709370657
2011-12-31 18:50:45 +00:00
Rafaël Carré
568c441fd8 usb-target.h: remove
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31498 a1c6a512-1295-4272-9138-f99709370657
2011-12-31 18:44:55 +00:00
Rafaël Carré
db9ce6dc7f onda 747/777 : move USB_STATUS_BY_EVENT to config
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31497 a1c6a512-1295-4272-9138-f99709370657
2011-12-31 18:44:43 +00:00
Rafaël Carré
c721c69987 onda usb code: merge into .c file
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31496 a1c6a512-1295-4272-9138-f99709370657
2011-12-31 18:44:37 +00:00
Rafaël Carré
280d5844a1 usb_drv_connected() is declared in usb_drv.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31490 a1c6a512-1295-4272-9138-f99709370657
2011-12-31 18:44:07 +00:00
Rafaël Carré
df09274768 move usb_pin_init() declaration to PP's system-target.h
remove duplicate usb_detect() declaration
Remove all content from empty usb-target.h files

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31488 a1c6a512-1295-4272-9138-f99709370657
2011-12-31 18:43:53 +00:00
Rafaël Carré
bce42fdc31 usb_init_device(): move prototype to usb.h
Get rid of some usb-target.h files

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31487 a1c6a512-1295-4272-9138-f99709370657
2011-12-31 18:43:41 +00:00
Boris Gjenero
b4ffcb5224 Fix red.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31397 a1c6a512-1295-4272-9138-f99709370657
2011-12-21 18:08:26 +00:00
Boris Gjenero
6c97145e7d Add missing includes found using -Wmissing-declarations.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31396 a1c6a512-1295-4272-9138-f99709370657
2011-12-21 18:02:50 +00:00
Boris Gjenero
ca9111ef64 Add KEEP() around vectors in linker scripts.
Vectors are needed by the CPU, but they don't need to be accessed by Rockbox.
Without the KEEP(), they can be removed when liking with --gc-sections, 
creating a broken binary without any warnings. This tells the linker to not
remove them. It should enable use of --gc-sections for all targets. When not
using --gc-sections, this does not change the binary.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31351 a1c6a512-1295-4272-9138-f99709370657
2011-12-18 06:43:08 +00:00
Michael Sevakis
6a67707b5e Commit to certain names for cache coherency APIs and discard the aliases.
Wouldn't surprise me a bit to get some non-green.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31339 a1c6a512-1295-4272-9138-f99709370657
2011-12-17 07:27:24 +00:00
Michael Sevakis
09722dd28d thread.c includes gcc_extensions.h and thread-XXX.c files are includes inside thread.c therefore do not require their own.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31206 a1c6a512-1295-4272-9138-f99709370657
2011-12-10 20:47:59 +00:00
Boris Gjenero
59e71ee80c Introduce USED_ATTR wrapper for __attribute__((used)).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31188 a1c6a512-1295-4272-9138-f99709370657
2011-12-09 15:33:59 +00:00
Michael Sevakis
4db3e89652 Shuffle some functions around so that interfacing with playback.c in particular isn't required. Though playback does finish the audio init, pcm doesn't care who does it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30403 a1c6a512-1295-4272-9138-f99709370657
2011-09-01 12:15:43 +00:00
Michael Sevakis
a2b6703a36 Commit FS#12150 - Fully-functional audio mixer - and finally whip old limitations about playback of voice and other sounds when paused. Channels are independent in state and amplitude. Fade on stop/pause is handled by the channel's volume control rather than global volume which means it now works from anywhere. Opens up the possibility of plugin sounds during music playback by merely adding an additional channel enum. If any PCM drivers were not properly modified, see one of the last comments in the task for a description of the simple change that is expected. Some params are tunable in firmware/export/pcm-mixer.h as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30097 a1c6a512-1295-4272-9138-f99709370657
2011-06-29 06:37:04 +00:00
Marcin Bukat
dceceef052 Move dbg_hw_info() into target tree. FS#11735 by me
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29964 a1c6a512-1295-4272-9138-f99709370657
2011-06-05 10:26:06 +00:00
Michael Sevakis
12375d1d3a Merge functionality of wakeups and semaphores-- fewer APIs and object types. semaphore_wait takes a timeout now so codecs and plugins have to be made incompatible. Don't make semaphores for targets not using them.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29492 a1c6a512-1295-4272-9138-f99709370657
2011-03-02 08:49:38 +00:00
Andree Buschmann
5d849a963e Clean up multiple definitions of RAM size. Remove -DMEM (make) and MEM (code), use the already defined MEMORYSIZE instead.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29189 a1c6a512-1295-4272-9138-f99709370657
2011-02-02 17:43:32 +00:00
Maurus Cuelenaere
a6debb65fa Fix red: defined(x || y) is not valid C preprocessor
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29103 a1c6a512-1295-4272-9138-f99709370657
2011-01-21 12:46:00 +00:00
Maurus Cuelenaere
476e464901 Fix Onda VX747+ LCD not working on boot
Same fix as in r29083.

Flyspray: FS#11896
Author: Purling Nayuki

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29102 a1c6a512-1295-4272-9138-f99709370657
2011-01-21 12:38:03 +00:00
Michael Sevakis
453550a687 Try to get some control over #ifdef hell in usb.c by refactoring and inline function use. SYS_USB_DISCONNECTED_ACK hasn't been doing anything useful for the USB thread; remove it. USB thread simply ignores that value. Observe only valid usb_state transitions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29084 a1c6a512-1295-4272-9138-f99709370657
2011-01-18 14:10:06 +00:00
Maurus Cuelenaere
980225c3e2 Fix Onda VX777 LCD not working on boot
This fixes an issue with some Onda VX777's where the LCD doesn't seem to be
correctly inited by the OF SPL.

Based on FS#11888 by Purling Nayuki.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29083 a1c6a512-1295-4272-9138-f99709370657
2011-01-18 12:10:09 +00:00
Maurus Cuelenaere
b787c0dd05 Onda VX767: get some facts about the state of the current LCD driver straight
* Remove wrong comment in config
* Add a note to the LCD driver stating that it isn't complete and thus non-working atm

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28558 a1c6a512-1295-4272-9138-f99709370657
2010-11-11 13:04:22 +00:00
Marcin Bukat
b8a7f5137b move dbg_ports() from apps/menu_debug.c to target tree. FS#11712 by me.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28522 a1c6a512-1295-4272-9138-f99709370657
2010-11-06 14:24:25 +00:00
Rafaël Carré
66f8fb52a9 */app.lds: remove STUBOFFSET
This is related to gdb, and gdb can only work on SH and ifp
This was mistakenly kept when app.lds was forked for each SoC
Side-effect: fix DEBUG builds when the rockbox binary is expected to
be loaded at the start of DRAM and there is no runtime relocation

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28124 a1c6a512-1295-4272-9138-f99709370657
2010-09-20 17:09:55 +00:00
Thomas Martitz
637bb2e608 Also rename cpucache_invalidate() function for mips. There's more in the target tree of mips which I have overlooked yesterday.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28057 a1c6a512-1295-4272-9138-f99709370657
2010-09-09 16:41:03 +00:00
Rafaël Carré
71b2d2811b jz4740 debug: use lcd_putsf() instead of redefining it
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27934 a1c6a512-1295-4272-9138-f99709370657
2010-08-28 23:12:04 +00:00
Thomas Martitz
3478bc5d6d mips is predefined by gcc, but we want it for paths. Don't let others fall into this trap again. Use __mips instead
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27872 a1c6a512-1295-4272-9138-f99709370657
2010-08-24 13:41:45 +00:00
Thomas Martitz
0e2286f226 Introduce NORETURN_ATTR wrapper for __attribute__((noreturn)), using this and a bit further cleanup in main gets rid of a warning when compiling for android.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27788 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 13:38:25 +00:00
Nils Wallménius
6d732a32bc Don't duplicate byteswap code. Invent system where NEED_GENERIC_BYTESWAPS is set if the generic functions from system.h are needed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27440 a1c6a512-1295-4272-9138-f99709370657
2010-07-15 22:01:06 +00:00
Nils Wallménius
74063845c0 Properly fix warning by copying the swap16 and swap32 inline functions from system.h to mips/ingenic_jz47xx/system-target.h to replace the defines.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27433 a1c6a512-1295-4272-9138-f99709370657
2010-07-15 17:15:20 +00:00
Frank Gevaerts
9c43b2ce17 Remove card_enable_monitoring() and use a mutex instead. The card_enable_monitoring() method actually didn't eliminate the possible race conditions it was meant to fix.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26627 a1c6a512-1295-4272-9138-f99709370657
2010-06-06 13:20:47 +00:00
Frank Gevaerts
a0557b23f0 remane hotswap.* to sdmmc.*. The contents have nothing at all to do with hotswapping things
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26598 a1c6a512-1295-4272-9138-f99709370657
2010-06-05 21:12:16 +00:00
Michael Sevakis
555ad6710f Threading: Split processor support code into respective target files. C files from /target/xxx are included into thread.c because of essential inlining and files are code, not declarations. Copyrights in each new file go to whoever implemented the first functional support.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26479 a1c6a512-1295-4272-9138-f99709370657
2010-06-02 12:45:36 +00:00
Michael Sevakis
1f5b9434da Cleanup r26253 red and yellow.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26254 a1c6a512-1295-4272-9138-f99709370657
2010-05-24 16:57:48 +00:00
Michael Sevakis
d56999890f Make PCM->driver interface about as simple as it will get. Registered callback, zero data, alignment and stops are handled entirely inside pcm.c; driver merely calls fixed pcm.c callback. Remove pcm_record_more and do it just like playback; the original reason behind it isn't very practical in general. Everything checks out on supported targets. There wer some compat changes I can't check out on many unsupoorted but if there's a problem it will be a minor oops. Plugins become incompatible due to recording tweak-- full update. Sorted API.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26253 a1c6a512-1295-4272-9138-f99709370657
2010-05-24 16:42:32 +00:00
Michael Sevakis
ff25b3a208 ata: do some threading-related corrections (some sync related where it matters). Make sure 'sleeping' is 'false' before the powerup sequence (throws-off powermgmt and it *is* about to woken again and powermgmt will need to compensate). Avoid looking at mutex flag directly; there's no tangible benefit I can discern and changes to the kernel that alter the meaning shouldn't be able to break anything. For that, in the jz sd driver, have sd_disk_is_active just return 'false' like all the other SD drivers do. If it *must* return this, it should implement it's own method but it seems to not matter.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26234 a1c6a512-1295-4272-9138-f99709370657
2010-05-21 15:33:31 +00:00
Michael Sevakis
e73a175d6d Hopefully finish off the red from r26051.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26053 a1c6a512-1295-4272-9138-f99709370657
2010-05-15 14:16:35 +00:00
Michael Sevakis
4d04132c76 PCM bottom layer simplification. pcm_rec_peak_addr variable no longer has to be handled there. Driver can just return current pointer for recording peaks. A new define, HAVE_PCM_REC_DMA_ADDRESS, specifies that physical addresses are being used for recording and translation is needed before starting a new block. The drivers need not worry about aligning start and size nor should care if either will be zero. All this will be checked in the logical layer first.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25970 a1c6a512-1295-4272-9138-f99709370657
2010-05-12 14:05:36 +00:00
Thomas Martitz
50a6ca39ad Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes).
This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 21:04:40 +00:00
Maurus Cuelenaere
adb506df14 Ingenic Jz4740: Use lcd_putsf() instead of lcd_puts() in exception handler
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25849 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 19:28:12 +00:00
Maurus Cuelenaere
056f608f78 Ingenic Jz4740: eliminate EP0 state machine + small cleanups
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25797 a1c6a512-1295-4272-9138-f99709370657
2010-05-03 20:36:34 +00:00
Maurus Cuelenaere
35f341464b Ingenic Jz4740: cleanup USB driver a bit (no externally visible functional changes)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25796 a1c6a512-1295-4272-9138-f99709370657
2010-05-03 19:18:10 +00:00
Rafaël Carré
f2f34881ec Remove pcm_mute() which has been unused since r19308
Remove audiohw_mute from header as well, and make this function static
to each driver (commented out when it was unused)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25733 a1c6a512-1295-4272-9138-f99709370657
2010-04-27 00:05:02 +00:00
Maurus Cuelenaere
443cba7507 Onda VX747/VX777: only enable SD clock when transferring data
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24172 a1c6a512-1295-4272-9138-f99709370657
2010-01-03 17:32:15 +00:00
Maurus Cuelenaere
69b182dc9a Onda VX747/VX777: fix not closing I²C all times
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24171 a1c6a512-1295-4272-9138-f99709370657
2010-01-03 17:32:11 +00:00
Maurus Cuelenaere
338b1dec5f Onda VX747/VX777: update battery charge cycle
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24170 a1c6a512-1295-4272-9138-f99709370657
2010-01-03 16:55:18 +00:00
Maurus Cuelenaere
6acbff4673 Onda VX747/VX777: cleanup linker files a bit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24169 a1c6a512-1295-4272-9138-f99709370657
2010-01-03 16:34:56 +00:00
Maurus Cuelenaere
d3bbe51629 Onda VX747/VX777: centralise LCD clock en-/disabling.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24168 a1c6a512-1295-4272-9138-f99709370657
2010-01-03 16:28:15 +00:00
Maurus Cuelenaere
4fdf4ad728 Onda VX747/VX777: disable LCD when backlight is off (saves power)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24167 a1c6a512-1295-4272-9138-f99709370657
2010-01-03 15:57:09 +00:00
Maurus Cuelenaere
f15e6ff061 Onda VX747: fix USB charging detection
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24160 a1c6a512-1295-4272-9138-f99709370657
2010-01-03 13:07:30 +00:00
Maurus Cuelenaere
d42cdfd91c Onda VX747/VX777: fix FM radio
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24074 a1c6a512-1295-4272-9138-f99709370657
2009-12-18 12:41:12 +00:00
Maurus Cuelenaere
953f4d4acc Onda VX747(+)/VX777: update battery discharge curve
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23894 a1c6a512-1295-4272-9138-f99709370657
2009-12-08 00:20:03 +00:00
Maurus Cuelenaere
8facd57896 Ingenic Jz4740: fix CPU boosting (was reversed)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23864 a1c6a512-1295-4272-9138-f99709370657
2009-12-05 19:55:29 +00:00
Maurus Cuelenaere
972a7efcb4 Jz4740: init I²C GPIO pins
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23771 a1c6a512-1295-4272-9138-f99709370657
2009-11-27 14:54:55 +00:00
Maurus Cuelenaere
507465be94 Define sd_drive_nr also when HAVE_HOTSWAP is defined (fix red).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23764 a1c6a512-1295-4272-9138-f99709370657
2009-11-26 17:49:05 +00:00
Maurus Cuelenaere
eab70ca28c - Split off strip_volume() to a separate file
- fix some yellows

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23762 a1c6a512-1295-4272-9138-f99709370657
2009-11-26 17:39:30 +00:00
Maurus Cuelenaere
5afb4a97c2 Fix Onda VX767
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23761 a1c6a512-1295-4272-9138-f99709370657
2009-11-26 17:22:32 +00:00
Maurus Cuelenaere
d052ced874 Merge branch 'hotswap'
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23759 a1c6a512-1295-4272-9138-f99709370657
2009-11-26 16:57:30 +00:00
Thomas Martitz
ee7cf6c63c Remove unused card_detect(), and make card_detect_target() static inline in each sd driver.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23757 a1c6a512-1295-4272-9138-f99709370657
2009-11-26 00:51:09 +00:00
Andrew Mahone
81f72ddef6 Set DRMODE_SOLID, uniform colors, and sysfont before clearing LCD to display panic or exception messages - see FS#10665.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23623 a1c6a512-1295-4272-9138-f99709370657
2009-11-14 11:27:41 +00:00
Jeffrey Goode
59dd433ccd Removed unneeded includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23578 a1c6a512-1295-4272-9138-f99709370657
2009-11-09 05:46:08 +00:00
Jeffrey Goode
9d842683eb Comment out LOGF_ENABLE defines everywhere, replace evil comments
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23497 a1c6a512-1295-4272-9138-f99709370657
2009-11-03 16:25:03 +00:00
Maurus Cuelenaere
e415395c5b The Onda VX777 has only one button, add it to the keymap.
Also fix a typo that erroneously enabled button_hold in button-target.h

Flyspray: FS#10732
Author: Yann Muller

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23383 a1c6a512-1295-4272-9138-f99709370657
2009-10-28 21:16:45 +00:00
Thomas Martitz
d85c3ec410 Convert lcd_activation callbacks to use the event system to allow for multiple parallel callbacks (for custom statusbar).
Increase maximum event count as we need more (I actually had a report about it during custom statusbar testing).
Removed corresponding functions from the core and plugin api. Bump min version and sort.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23302 a1c6a512-1295-4272-9138-f99709370657
2009-10-20 21:54:59 +00:00
Michael Sparmann
f0a96580ae Core changes to allow storage drivers to do cleanup on shutdown, and iPod Nano 2G shutdown code rework (FS#10668)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23057 a1c6a512-1295-4272-9138-f99709370657
2009-10-09 20:36:09 +00:00
Maurus Cuelenaere
249392c2d3 Add a BTN_MASK for the VX777 (aka fix red)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22461 a1c6a512-1295-4272-9138-f99709370657
2009-08-21 22:50:50 +00:00
Maurus Cuelenaere
9f6d3a758f * Onda VX777: add support for its single physical button
* Use real wakeup events in the battery ADC driver
 * Adjust battery charge information a bit


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22458 a1c6a512-1295-4272-9138-f99709370657
2009-08-21 21:35:12 +00:00
Nils Wallménius
47608e06b3 fix red
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22432 a1c6a512-1295-4272-9138-f99709370657
2009-08-19 22:15:45 +00:00
Maurus Cuelenaere
caf2011311 Onda's: add touchscreen boot menu for targets without/not much physical buttons (VX777)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22416 a1c6a512-1295-4272-9138-f99709370657
2009-08-19 00:26:06 +00:00
Karl Kurbjun
1474b93011 Fix Yellow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22315 a1c6a512-1295-4272-9138-f99709370657
2009-08-14 23:16:20 +00:00
Karl Kurbjun
7ca4c7358d Hopefully get all of the touchscreen drivers to act the same so release events get the appropriate data.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22314 a1c6a512-1295-4272-9138-f99709370657
2009-08-14 23:08:50 +00:00
Maurus Cuelenaere
e9b061a717 Fix red: only use SW_VOLUME_MIN if HAVE_SW_VOLUME_CONTROL is defined
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22107 a1c6a512-1295-4272-9138-f99709370657
2009-08-01 21:50:19 +00:00
Maurus Cuelenaere
3c7c79189e * Move DSP_CALLBACK_* enum to sound.h
* Add software based volume control for a certain range (SW_VOLUME_MIN -> SW_VOLUME_MAX)
 * Make Onda VX747 use it
 * Don't change volume or frequency in Ingenic Jz4740 codec driver when they're already set


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22106 a1c6a512-1295-4272-9138-f99709370657
2009-08-01 21:38:18 +00:00
Maurus Cuelenaere
ddd82d6ab5 Ingenic Jz4740 timer driver: fix stupid mistake
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22096 a1c6a512-1295-4272-9138-f99709370657
2009-08-01 16:06:41 +00:00
Maurus Cuelenaere
d0a132a7a4 Jz4740 timer driver: only init timer in timer_set() when start is true
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22075 a1c6a512-1295-4272-9138-f99709370657
2009-07-27 19:01:40 +00:00
Maurus Cuelenaere
e38f3abac9 Jz4740 PCM driver: do 32-bit or 16-bit burst sizes if 16-byte ones won't fit (improves PDBox)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22074 a1c6a512-1295-4272-9138-f99709370657
2009-07-27 18:58:22 +00:00
Maurus Cuelenaere
86ef57b975 Jz4740 PCM driver: check whether pcm_callback_for_more isn't NULL (fixes metronome)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22072 a1c6a512-1295-4272-9138-f99709370657
2009-07-27 17:00:26 +00:00
Maurus Cuelenaere
682a991f0f Ingenic Jz4740 targets: turn backlight on when an exception occurs and EXTENDED_EXCEPTION_DESC is defined
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22052 a1c6a512-1295-4272-9138-f99709370657
2009-07-26 14:00:25 +00:00
Maurus Cuelenaere
4ce26ff328 Onda VX747: don't fully init the LCD when not doing an USB_BOOT compile (fixes flashes when booting up)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22051 a1c6a512-1295-4272-9138-f99709370657
2009-07-26 13:27:12 +00:00
Frank Gevaerts
a7548d3bc7 Make sd_present() and mmc_present() look only at the actual presence of a card, not at initialisation state
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21981 a1c6a512-1295-4272-9138-f99709370657
2009-07-20 13:47:21 +00:00
Frank Gevaerts
c0a5a67387 Commit FS#9545, storage cleanup and multi-driver support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21933 a1c6a512-1295-4272-9138-f99709370657
2009-07-17 22:28:49 +00:00
Rafaël Carré
9191b3c16e remove nand_soft_reset and nand_disk_is_active already voided in storage.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21924 a1c6a512-1295-4272-9138-f99709370657
2009-07-17 16:34:41 +00:00
Rafaël Carré
bdb5974c0e Revert r21912 : "Storage API : remove undeeded target-specific functions"
After a discussion mixed on mailing list and irc, it was agreed that
more abstraction for plugins is better (so developers don't have to add
a check to HAVE_DISK_STORAGE when writing disk-specific code)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21923 a1c6a512-1295-4272-9138-f99709370657
2009-07-17 16:34:34 +00:00
Maurus Cuelenaere
cf9935d636 Onda VX747: add dual-boot capability + make it possible to permanently 'stick' Rockbox to your DAP
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21919 a1c6a512-1295-4272-9138-f99709370657
2009-07-17 14:30:42 +00:00
Rafaël Carré
8eba69f91b Storage API : remove undeeded target-specific functions
storage_sleep, storage_spin, storage_spindown are only defined if #defiend (HAVE_DISK_STORAGE), not for MMC/ATA/SD
remove already unneeded nand_disk_is_active, nand_soft_reset

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21912 a1c6a512-1295-4272-9138-f99709370657
2009-07-17 00:09:14 +00:00
Maurus Cuelenaere
e63904c7e9 Onda VX747 backlight: use a higher frequency to reduce flickering
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21671 a1c6a512-1295-4272-9138-f99709370657
2009-07-05 18:58:06 +00:00
Maurus Cuelenaere
eabeb928dd Ingenic Jz4740: add basic frequency switching
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21625 a1c6a512-1295-4272-9138-f99709370657
2009-07-03 21:34:40 +00:00
Maurus Cuelenaere
7f2ddc4923 Ingenic Jz4740 PCM driver: add some locking here and there (doesn't fix all PCM issues)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21622 a1c6a512-1295-4272-9138-f99709370657
2009-07-03 11:50:58 +00:00