Commit Graph

429 Commits

Author SHA1 Message Date
Aidan MacDonald e532714d1f pcm: Remove unused function pcm_play_dma_get_peak_buffer()
Change-Id: Ifd20fb14a22489cdb99154c01f69809a1e70d0c5
2021-07-25 14:07:41 +00:00
William Wilgus f65fb2a64a h300, Others Bugfix Bootloader backlight_init()
backlight_init needs to be called after lcd_init when using
lcd_enable()

Change-Id: Id034835c903801fea49e2b972c110c1ec5106976
2020-11-13 18:08:01 +00:00
James Buren 8ac46f844f h300: fix one long-standing bootloader bug
This was introduced in e13c600133 back
when the author was trying to optimize the LCD code with DMA. For
whatever reason this broke the bootloader for the last 10 years or so
and no one could figure out why. This is now fixed.

However the bootloader is still currently broken in HEAD due to recent
changes to the LCD code. A fix for that is not yet known.

Change-Id: I046d53f9f391f558c391f2fadb6b260fe3be4d92
2020-11-13 18:08:01 +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 7dbfda6c55 iaudiom5: Fix build.
Basically we're overflowing IRAM by 48 bytes.  Shrink the stack
by 48 bytes to compensate.

Fixing this properly will require careful decisions about what
(code and/or data) to eject from IRAM.

Change-Id: Ia3054280bcbd9813b9cce83f16ba4fbd15085110
2020-10-27 14:49:19 -04:00
Solomon Peachy 61f698715d coldfire: We need -fno-delete-null-pointer-checks in flash controller code
Change-Id: I9a3e4ced2c3d41f6a31a968af72659a1a14f702e
2020-10-27 10:29:59 -04:00
William Wilgus ada919fc11 FIX RED framebuffer viewport rewrite
Change-Id: I4cb8f580e15440d06f8d5fabb2fbf5147c67b49c
2020-10-26 14:35:30 -04:00
William Wilgus 3237ae4a4f LCD core move buf ptr and address look up function viewport struct
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
2020-10-26 12:28:48 -04:00
James Buren bde72efa30 coldfire: make the RAM and ROM image locations configurable by macros
Change-Id: Ie27e39c34947b0391be621dafb8711c44e863a1c
2020-10-26 01:07:14 +00:00
Solomon Peachy 09785a8499 fix more yellow
Change-Id: I74bad58707d05ea167169d4315c05eb0cd1c8b7b
2020-10-13 17:23:56 -04:00
Solomon Peachy b94db707fb Fix more warnings.
Change-Id: Ib3a9fc622a46b1fc72e94dcbc6d29d2e430cd81b
2020-10-13 15:48:31 -04:00
Solomon Peachy f8bd54d575 iaudiox5: Fix red, due to slightly bogus asm
Change-Id: I6ebcda3452d4244b5e2d1a9bbeb9fff9a9456388
2020-10-13 14:18:35 -04:00
Solomon Peachy 4a3d046545 Fix a pile of yellow in the bootloader
Change-Id: Ia89a33bbb13683566e421ac2a002baa20cdb07de
2020-10-13 13:37:21 -04:00
Solomon Peachy c1d4bf290c coldfire: Fix iAudio M5 build
Change-Id: Iecbcfa16918be3abfaab0936a0dae9c9ed48933e
2020-10-03 16:56:19 -04:00
Solomon Peachy d5167b1221 coldfire: Allow building when 88KHz audio is disabled
Change-Id: Ieeacf591ad4233428dca99c347043e61abae1d1f
2020-10-03 15:57:38 -04:00
Solomon Peachy 88cae9d13d Coldfire: Don't clobber alwarm wakeup signal in dualboot mode
(See FS#7814 for details)

Change-Id: I6a09a8dfe1abc3a396ca8afe1dbbf1d203c7e3e2
2019-01-01 23:30:44 -05: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
Marcin Bukat bd10245e89 MPIO HD300: Fix occasional scrollstrip hang
Scrollstrip works as quadrature encoder. We set pin change
interrupt for both edges of signal both lines and sample the state
in ISR. From time to time the sequence is out-of-sync which was
properly detected but erroneously handled leaving scrollstip
interrupts disabled.

Change-Id: I08e4f99c6c27df0f8180aa16e6e1d9e4203bafa7
Reviewed-on: http://gerrit.rockbox.org/782
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
Tested: Marcin Bukat <marcin.bukat@gmail.com>
2014-04-15 08:18:56 +02:00
Dmitry Gamza 020f16a1c7 optimize Cypress chip power supply for iriver h100 series
Before, the Cypress chip power is always turn on either from internal battery
or from usb host. In this regard, the internal battery energy was spend on the
inactive chip. Now power of the Cypress chip is enabled only on the external usb host.

Change-Id: Iae7cddd1237ea9ed93fee5404575cc01543cb00c
Reviewed-on: http://gerrit.rockbox.org/433
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2014-04-02 20:28:37 +02:00
Marcin Bukat 1e7febe940 coldfire: fix bootloader builds
In b31c856 startup code section was renamed but boot.lds
linker scripts were not updated accordingly.

Change-Id: I9c9893ec2e199ac2555007a1d23e109ca0daea28
2014-01-18 22:21:00 +01:00
Marcin Bukat b31c856b84 coldfire: Implement HAVE_INIT_ATTR magic
This reclaims ~6kB of ram.

Change-Id: Iafdc661b1cf4445669c08c79205043792b8d14c3
Reviewed-on: http://gerrit.rockbox.org/718
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2014-01-17 19:03:06 +01:00
Marcin Bukat a02f863eef coldfire: Use single app.lds script for all coldfires.
The only true difference in this platform is the amount of iram
between MCF5249 and MCF5250. Instead of duplicating the file
simply use one with proper ifdefs.

Change-Id: Ifd56ebd2666813633502e3b5d83669424659c039
Reviewed-on: http://gerrit.rockbox.org/713
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2014-01-15 21:15:14 +01:00
Thomas Martitz 463d343102 Add missing kernel.h includes (hopefully all of them), take #3.
Change-Id: I68ed0e914239f0caf83082a41c2480a01b69285a
2014-01-05 20:51:25 +01:00
Thomas Martitz 22b33d6eb8 Add missing kernel.h includes (hopefully all of them), take #2.
Change-Id: I62cedf992bb096987050621cfc34f0432e9da170
2014-01-05 20:42:48 +01:00
Thomas Martitz 22a28f9caa Add missing kernel.h includes (hopefully all of them).
Change-Id: I9c1825296a788587b8d494d8514b3314847b0ff0
2014-01-05 20:32:09 +01:00
Marcin Bukat b35f82c91f HD300: Fix crash in bootloader introduced by 36281c4
Uninitialized struct scroll which is used to pass state between
scrollstrip ISR and button_read_device() can bomb out whole
button subsytem.

Change-Id: I3b415c22cfee4181b2132cddaeff68797c7cc0ea
2012-11-13 13:36:23 +01:00
Rafaël Carré 7ca2081036 remove debug-target.h 2012-05-07 00:55:59 -04:00
Michael Sevakis 4928810354 M5/X5 (MCF5250): Scoot the core/plugin IRAM boundary forward by 0x800.
Change-Id: I482fe3f4f2f59a3f17026e796c245c4efa8279f3
2012-04-29 14:35:53 -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
Marcin Bukat 36281c4cc9 MPIO HD300: Fix scrollstip issue at driver level.
Scrollstrip (as well as scrollwheel on ipods/sansas) works like
quadrature encoder. The states of input lines are tracked by the
gpio ISR and when the sequence is correct, appropriate button
event is pushed to the button queue directly. The downside of
this implementation is that scrollstrip doesn't emit _REL
events which has some weird consequences. For the scrollwheels
some hack have been crafted in action system to accomodate for
this. I don't like this approach. IMO the correct fix is to
properly emit _REL event when the user stops interacting with
the device or reverses the direction of the move. This patch
implements timeout which forces to emit _REL when expired.

Change-Id: I588ac5810dd2ab00c68935d23a62979cb1c2a912
2012-01-25 09:07:52 +01:00
Marcin Bukat dc85718bfd MPIO HD300: Use MENU button to go back from debug screens.
Change-Id: I17c0f573de75ab1fd0119d148337e45552eb04b0
2012-01-24 12:27:06 +01:00
Marcin Bukat e94d1b0ab0 MPIO HD200/HD300: Decrease ADC scanrate.
The adclk is decreased 4x. This solves problems with battery
readout drop during system startup.

Change-Id: I46d7c4b9ffcfdc812a6dd2a932c9e397d33c1168
2012-01-24 12:05:07 +01: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 3c17f28eca Move pcm_mixer helper routines to firmware/asm. 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é 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é 12ef8723f8 lcd-remote-target.h: Use only in firmware/target/
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31614 a1c6a512-1295-4272-9138-f99709370657
2012-01-07 20:05:44 +00:00
Rafaël Carré 95f3ba5658 lcd_remote_powersave: unused
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31611 a1c6a512-1295-4272-9138-f99709370657
2012-01-07 19:48:49 +00:00
Rafaël Carré 351c8b2573 move _remote_backlight_* to common header
remove unused REMOTE_INIT_LCD / REMOTE_DEINIT_LCD

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31607 a1c6a512-1295-4272-9138-f99709370657
2012-01-07 19:32:50 +00:00
Rafaël Carré 50f96943be remote_detect(): move to lcd-remote.h
Reorganize lcd-remote.h so it works for iaudio-m3 too

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31605 a1c6a512-1295-4272-9138-f99709370657
2012-01-07 19:07:36 +00:00
Rafaël Carré 666f2e61f0 move lcd remote common declarations to lcd-remote.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31604 a1c6a512-1295-4272-9138-f99709370657
2012-01-07 18:34:09 +00:00
Rafaël Carré 2a5772a20c lcd-remote-target.h: remove more duplicates
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31603 a1c6a512-1295-4272-9138-f99709370657
2012-01-07 18:22:13 +00:00
Rafaël Carré 07ee1b3729 lcd-remote-target.h: remove duplicate declarations
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31602 a1c6a512-1295-4272-9138-f99709370657
2012-01-07 18:15:32 +00:00
Michael Sevakis f860b57143 Coldfire: lcd_update call got dropped from dbg_hw_info. Replace.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31591 a1c6a512-1295-4272-9138-f99709370657
2012-01-06 16:20:26 +00:00
Michael Sevakis 302937e586 Coldfire: Fix alpha bitmap drawing from messing up the emac status register.
It failed to restore macsr to the expected default (FRAC/SAT) which caused DSP
functions like tone control filter calculation to fail (resulting in noise).
The FFT plugin was also affected.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31589 a1c6a512-1295-4272-9138-f99709370657
2012-01-05 23:00:14 +00:00