summaryrefslogtreecommitdiffstats
path: root/firmware/target/mips
AgeCommit message (Collapse)AuthorFilesLines
2013-09-05touch devices: Disable touch on softlock.Jean-Louis Biasini1-0/+7
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-08-17Cleanup MV/MD macros a little.Michael Sevakis2-5/+5
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-04-22Do some cleanup, adjustment and a couple fixes to recent sound changes.Michael Sevakis1-3/+3
* 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-15Still at it for 0c7b787. Might be done now.Michael Sevakis1-1/+1
Change-Id: Idf45731dc6554954747f6036dc6dfcd4b63981a1
2013-04-15Straighten out the mad twisted state of sound.c and related areas.Michael Sevakis1-24/+0
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-11Implement universal in-PCM-driver software volume control.Michael Sevakis1-9/+18
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-03-11jz4740: a few minor fixesMarcin Bukat1-1/+1
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>
2012-05-07remove debug-target.hRafaël Carré2-1/+0
2012-05-07remove unused prototypesRafaël Carré1-4/+0
2012-03-03Revise the PCM callback system after adding multichannel audio.Michael Sevakis1-7/+5
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-02-28lcd drivers: Convert lcd_[remote_]framebuffer to a pointerJonathan Gordon1-2/+2
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-01-22Move optimized ffs to firmware/asm, using the new automatic-asm-picking ↵Thomas Martitz1-59/+0
infrastructure. Change-Id: I5e7bdc8be7de50ef604c16078857fff1b84650dc
2012-01-22Move optimized memcpy and friends and strlen to firmware/asm,Thomas Martitz2-382/+0
using the new automatic-asm-picking infrastructure.
2012-01-22Create fimrware/asm directory for assembly optimized stuff.Thomas Martitz2-133/+24
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-08lcd-target.h: remove some duplicate declarationsRafaël Carré1-6/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31625 a1c6a512-1295-4272-9138-f99709370657
2012-01-08adc-target.h: cleanupRafaël Carré1-2/+0
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-08button-target.h : move prototypes to button.hRafaël Carré2-16/+0
no need to define BUTTON_REMOTE anymore git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31620 a1c6a512-1295-4272-9138-f99709370657
2012-01-07ingenic_jz: remove ata-nand-target.hRafaël Carré2-29/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31616 a1c6a512-1295-4272-9138-f99709370657
2012-01-04dbg_hw_info(): remove duplicate prototypesRafaël Carré1-27/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31560 a1c6a512-1295-4272-9138-f99709370657
2012-01-04dbg_ports(): remove duplicate prototypeRafaël Carré2-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31558 a1c6a512-1295-4272-9138-f99709370657
2012-01-03Rework powermgmt to enable code re-use on appliation and sims.Thomas Martitz2-2/+2
* Introduce CONFIG_BATTERY_MEASURE define, to allow targets (application) to break powermgmt.c's assumption about the ability to read battery voltage. There's now additionally percentage (android) and remaining time measure (maemo). No measure at all also works (sdl app). If voltage can't be measured, then battery_level() is king and it'll be used for power_history and runtime estimation. * Implement target's API in the simulator, i.e. _battery_voltage(), so it doesn't need to implement it's own powermgmt.c and other stubs. Now the sim behaves much more like a native target, although it still changes the simulated battery voltage quickly, * Other changes include include renaming battery_adc_voltage() to _battery_voltage(), for consistency with the new target functions and making some of the apps code aware that voltage and runtime estimation is not always available. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31548 a1c6a512-1295-4272-9138-f99709370657
2011-12-31onda: remove now inlined USB_INIT_GPIO()Rafaël Carré1-1/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31500 a1c6a512-1295-4272-9138-f99709370657
2011-12-31usb-target.h: removeRafaël Carré3-1/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31498 a1c6a512-1295-4272-9138-f99709370657
2011-12-31onda 747/777 : move USB_STATUS_BY_EVENT to configRafaël Carré1-2/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31497 a1c6a512-1295-4272-9138-f99709370657
2011-12-31onda usb code: merge into .c fileRafaël Carré3-87/+17
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31496 a1c6a512-1295-4272-9138-f99709370657
2011-12-31usb_drv_connected() is declared in usb_drv.hRafaël Carré2-4/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31490 a1c6a512-1295-4272-9138-f99709370657
2011-12-31move usb_pin_init() declaration to PP's system-target.hRafaël Carré2-2/+0
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-31usb_init_device(): move prototype to usb.hRafaël Carré2-2/+0
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-21Fix red.Boris Gjenero1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31397 a1c6a512-1295-4272-9138-f99709370657
2011-12-21Add missing includes found using -Wmissing-declarations.Boris Gjenero3-1/+3
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31396 a1c6a512-1295-4272-9138-f99709370657
2011-12-18Add KEEP() around vectors in linker scripts.Boris Gjenero2-10/+10
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-17Commit to certain names for cache coherency APIs and discard the aliases.Michael Sevakis2-6/+4
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-10thread.c includes gcc_extensions.h and thread-XXX.c files are includes ↵Michael Sevakis1-2/+0
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-09Introduce USED_ATTR wrapper for __attribute__((used)).Boris Gjenero1-1/+3
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31188 a1c6a512-1295-4272-9138-f99709370657
2011-09-01Shuffle some functions around so that interfacing with playback.c in ↵Michael Sevakis1-1/+1
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-06-29Commit FS#12150 - Fully-functional audio mixer - and finally whip old ↵Michael Sevakis1-0/+2
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-05Move dbg_hw_info() into target tree. FS#11735 by meMarcin Bukat2-2/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29964 a1c6a512-1295-4272-9138-f99709370657
2011-03-02Merge functionality of wakeups and semaphores-- fewer APIs and object types. ↵Michael Sevakis5-23/+23
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-02-02Clean up multiple definitions of RAM size. Remove -DMEM (make) and MEM ↵Andree Buschmann1-1/+1
(code), use the already defined MEMORYSIZE instead. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29189 a1c6a512-1295-4272-9138-f99709370657
2011-01-21Fix red: defined(x || y) is not valid C preprocessorMaurus Cuelenaere1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29103 a1c6a512-1295-4272-9138-f99709370657
2011-01-21Fix Onda VX747+ LCD not working on bootMaurus Cuelenaere1-3/+4
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-18Try to get some control over #ifdef hell in usb.c by refactoring and inline ↵Michael Sevakis1-3/+0
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-18Fix Onda VX777 LCD not working on bootMaurus Cuelenaere1-5/+14
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
2010-11-11Onda VX767: get some facts about the state of the current LCD driver straightMaurus Cuelenaere1-1/+6
* 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-06move dbg_ports() from apps/menu_debug.c to target tree. FS#11712 by me.Marcin Bukat2-2/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28522 a1c6a512-1295-4272-9138-f99709370657
2010-09-20*/app.lds: remove STUBOFFSETRafaël Carré1-9/+2
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-09Also rename cpucache_invalidate() function for mips. There's more in the ↵Thomas Martitz1-1/+2
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-08-28jz4740 debug: use lcd_putsf() instead of redefining itRafaël Carré1-53/+39
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27934 a1c6a512-1295-4272-9138-f99709370657
2010-08-24mips is predefined by gcc, but we want it for paths. Don't let others fall ↵Thomas Martitz2-2/+0
into this trap again. Use __mips instead git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27872 a1c6a512-1295-4272-9138-f99709370657
2010-08-12Introduce NORETURN_ATTR wrapper for __attribute__((noreturn)), using this ↵Thomas Martitz1-1/+2
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