summaryrefslogtreecommitdiff
path: root/firmware (follow)
Commit message (Collapse)AuthorAge
...
* Provide high resolution volume and prescaler to hosted targets.Michael Sevakis2013-04-27
| | | | | | | | | | | | | | | | | | | | | HAVE_SW_VOLUME_CONTROL is required and at this time only affects the SDL targets using pcm-sdl.c. Enables balance control in SDL targets, unless mono volume is in use. Compiles software volume control as unbuffered when PCM_SW_VOLUME_UNBUFFERED is defined. This avoids the overhead and extra latency introduced by the double buffer when it is not needed. Use this config when the target's PCM driver is buffered and sufficient latency exists to perform safely the volume scaling. Simulated targets that are double-buffered when made as native targets remain so in the sim in order to run the same code. Change-Id: Ifa77d2d3ae7376c65afecdfc785a084478cb5ffb Reviewed-on: http://gerrit.rockbox.org/457 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
* Make fixepoint.c as a shared library (libfixedpoint.a).Michael Sevakis2013-04-26
| | | | | | | Change-Id: Icc10d6e85f890c432f191233a4d64e09f00be43d Reviewed-on: http://gerrit.rockbox.org/456 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
* Bass/Treble caps should exist implicitly with HAVE_SW_TONE_CONTROLS.Michael Sevakis2013-04-25
| | | | | | | | | | | | | If AUDIOHW_CAPS is defined without explicit BASS_CAP/TREBLE_CAP while HAVE_SW_TONE_CONTROLS is defined, AUDIOHW_HAVE_BASS/TREBLE should be defined or otherwise the tone controls won't show up. TREBLE/BASS were being defined if AUDIOHW_CAPS was NOT defined, but the same rule should apply if the codec needs to specify other caps but doesn't use hardware tone controls. (I'm surprised noone noticed some settings gone missing :-) Change-Id: I85b5c467bab07bb62362a0dc2d582267ac2d8ec9
* Add Serial Port 1 support for iPod Photo/Color/4G/Mini2Gandypotter2013-04-25
| | | | | | | | | | | | | | | | | | Based on FS#9920 by Ryan Press with changes to selection logic so that it works on my iPod Photo. Should also work on iPod Color/4G and Mini2G. Moved all target specific code from firmware/drivers/serial.c into new file firmware/target/arm/pp/uart-pp.c in the same manner as other target specific uart code. Update to fix build error on ipodmini2g by adding defines in config file. Removed unwanted whitespace Tested on iPod Photo. Change-Id: Ia5539563966198e06372d70b5adf2ef78882f863 Reviewed-on: http://gerrit.rockbox.org/455 Reviewed-by: andypotter <liveboxandy@gmail.com> Tested-by: andypotter <liveboxandy@gmail.com> Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
* Make pcm_sw_volume.c a bit less verbose by merging volume code.Michael Sevakis2013-04-23
| | | | | | | | pcm_set_master_volume had two implementations, one for a prescaler and one without one but the differences can be made minimal enough to combine them. Change-Id: I889e60b50b9f046c093853cb1685058796fe9067
* Oops. Revert a pointless change.Michael Sevakis2013-04-22
| | | | Change-Id: I082411145a411ca7d41b359dea419ef8190d70ce
* Do some cleanup, adjustment and a couple fixes to recent sound changes.Michael Sevakis2013-04-22
| | | | | | | | | | | | | | | | | | | | | * 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
* Forget about fixedpoint.c in any HWCODEC bin.Michael Sevakis2013-04-15
| | | | | | | It bloats to much just for one simple use. Just use a simple function for shifting sound setting decimal places. Change-Id: I1a7d37cce6ada3c6e6600dc0d301f354ffeff231
* Fix final error from 0c7b787 in Player sim.Michael Sevakis2013-04-15
| | | | Change-Id: Ifeebed8f594fc56acbbd2439fb8186566cc04de8
* Still at it for 0c7b787. Might be done now.Michael Sevakis2013-04-15
| | | | Change-Id: Idf45731dc6554954747f6036dc6dfcd4b63981a1
* Keep fixing 0c7b787 stuffMichael Sevakis2013-04-15
| | | | Change-Id: I0678d3307fbcad32156f9f4e0f8b90eed5a20d92
* Fix some more errors and warnings from 0c7b787.Michael Sevakis2013-04-15
| | | | Change-Id: Ib67d0ab344e36964cadbcc982dc2afe35733770b
* Hopefully knock out most of the red and yellow from 0c7b787.Michael Sevakis2013-04-15
| | | | Change-Id: Ib8dd0d011b11ee3eded3025308f19ddb5d151b59
* Straighten out the mad twisted state of sound.c and related areas.Michael Sevakis2013-04-15
| | | | | | | | | | | | | | | | | | 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
* rk27xx: do not attenuate signal twice in analog bypass modeMarcin Bukat2013-04-12
| | | | Change-Id: I108091adaa05e53ccb8bbe3d60ca35e2191a39fd
* rk27xx: avoid one multiply in udelay() as pointed by kugelMarcin Bukat2013-04-12
| | | | Change-Id: Ie33a393b0d4c4b45975ca53ced91dd9f03369db1
* rk27xx: make udelay() more accurateMarcin Bukat2013-04-12
| | | | Change-Id: Ic448c4e5ec52af6aaeebccee4feea49954394677
* hm60x/hm801: Fix balance by enabling sw volume control.Andrew Ryabinin2013-04-12
| | | | Change-Id: I8760b58d5b801409f35370d812d72f8d578d2889
* Fix f5a5b94 errors. Employ SW volume for select targets on SIM.Michael Sevakis2013-04-11
| | | | | | | | | | | Onda VX747 sim was missing a limits #define; #include limits.h in pcm_sw_volume.h. Simply use the software volume control for the SIM volume control rather than the SDL volume control when the target would have it natively. Change-Id: I8e924a2ff1b410f602452d2ea9b691efb82c931e
* Implement universal in-PCM-driver software volume control.Michael Sevakis2013-04-11
| | | | | | | | | | | | | | | | | | | | | | 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>
* fix yellowMarcin Bukat2013-04-11
| | | | Change-Id: Ide0df2c3719d6100c6dc61515bf7acf6ac11231b
* rk27xx: implement radio supportAmaury Pouly2013-04-11
| | | | | | | Change-Id: I59d3905e9b2a3df8aa235e424c7a6e0eff6d73e9 Reviewed-on: http://gerrit.rockbox.org/427 Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com> Tested-by: Marcin Bukat <marcin.bukat@gmail.com>
* Move fixedpoint.h to be accessible in /firmware.Michael Sevakis2013-04-10
| | | | | | | | | | Will need it soon enough. Combine the contents of all the various fixedpoint.h files. Not moving fixedpoint.c for now since I'm not sure where it should be and it causes some dependency issues. Change-Id: Ideacbca2ca78f9158c2b114b113c274f68e908d5
* rk27xx: fix i2c driverMarcin Bukat2013-04-09
| | | | Change-Id: I205cc92f452c1990c64da7e91b2baf00b920c922
* Fix identations.Andrew Ryabinin2013-04-04
| | | | Change-Id: I98acabd5c8ab024d553726cfabe5654242a18b3b
* rk27xx: Correct comment about i2c divider calculationMarcin Bukat2013-04-04
| | | | Change-Id: I75605d5bd6f8a3d1f44b63a9f4467ebcdd15267a
* Increase MAXUSERFONTS to 12.Frank Gevaerts2013-04-01
| | | | | | | | | In the modern everything-can-be-skinned world, themes are beginning to hit the limit of 8 fonts (which includes sysfont). Increasing this to 12 will allow some headroom, at the cost of a bit more RAM usage (about 20 bytes per extra possible font, so about 80 bytes total here) Change-Id: Iddf4374b7ccf92b400614a7309bf3d2147ba98ab
* android: Rewrite PCM playback without OnPlaybackPositionUpdateListener.Thomas Martitz2013-04-01
| | | | | | | | | | | | | | | The old way actually mis-used the API (I misunderstood the docs) because it specified the marker position as a "low buffer watermark" but instead of a future playback head position. The replacement is a simple thread that writes the data regardless of the filling level of the buffer (write() will just block) and polls the playback state periodically. Change-Id: If29237cee4ce78dc42f5a8320878bab0cafe78f7 Reviewed-on: http://gerrit.rockbox.org/422 Tested-by: Dominik Riebeling <Dominik.Riebeling@gmail.com> Reviewed-by: Thomas Martitz <kugel@rockbox.org>
* rk27xx: Add E & F gpio ports to debug info.Andrew Ryabinin2013-03-25
| | | | Change-Id: Idafd6fe37864625f7052045a32bb374798edfe1a
* hm60x: Add lcd type information to debug info.Andrew Ryabinin2013-03-25
| | | | Change-Id: I09d30f9db6ac40cc92c22c637d560e4a3dcd50de
* Remove redundant assigment of variable to itselfBertrik Sikken2013-03-24
| | | | Change-Id: Ibecd8c869280a55a0716e631f44ab556f7dbd8b5
* Fix LV24020 tuner chip volume level definition (found by cppcheck)Bertrik Sikken2013-03-24
| | | | Change-Id: I328cfbd7c9fc6295db2e62f6174f8f4405e281a8
* jz4740: a few minor fixesMarcin Bukat2013-03-11
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Samsung YP-R0 LCD improvementsLorenzo Miori2013-03-06
| | | | | | | | | | | | This patch adds to YP-R0 (and other future targets using Linux framebuffer) the ability to use LCD_ENABLE to save some CPU cycles while display is powered off. This patch also changes the way to toggle LCD power: now using a proper ioctl call, slightly more efficient. Change-Id: I544de77f5abd4ac1c13d3fe3a6e40a30f7c0bece Reviewed-on: http://gerrit.rockbox.org/410 Reviewed-by: Thomas Martitz <kugel@rockbox.org>
* ypr0: Align to coding guidelines (no typedef) and remove unused function.Thomas Martitz2013-03-06
| | | | Change-Id: If61e2290f4e0e5c971ece967b7d826624df392df
* ypr0: Fix erroneous if condition.Thomas Martitz2013-03-06
| | | | | | | The GPIO device file wasn't closed due to this. This wasn't a big deal because the device powers off shorty afterwards anyway. Change-Id: I9a6b4d57d32627157323b4883e47b8812f5dcb4d
* Samsung YP-R0 hosted target code refactoringLorenzo Miori2013-03-06
| | | | | | | | | | | | | | As per title this patch aims at splitting common target code and specific target code in a better way to support future ports within the same environment (e.g. Samsung YP-R1 where the Linux and the SoC are the same, with differences in hardware devices handling) Change-Id: I67b4918c46403b184d3d8f42ab5aae7d01037fd0 Reviewed-on: http://gerrit.rockbox.org/409 Reviewed-by: Thomas Martitz <kugel@rockbox.org> Tested-by: Thomas Martitz <kugel@rockbox.org>
* rk27xx: fix usb logfAmaury Pouly2013-03-04
| | | | Change-Id: I1bae5613fd96587bcdcf179ec4132ce75224d398
* rk27xx: add memmap to debug screenAmaury Pouly2013-03-04
| | | | Change-Id: I93ae961abfed567ab972bc99d43ff4c8029ee3f7
* hm60x: Fix white screen bug.Andrew Ryabinin2013-02-16
| | | | | | Lcd should be reseted after power is supplied. Change-Id: I2a47ffb7d9b20d9ef2ad90aee15f4ada2fdd7f2e
* bitmap drawing: Support alpha blend if image over the framebuffer contents.Thomas Martitz2013-02-12
| | | | | | | | If DRMODE_FG now the alpha channel in bitmaps can be used to draw the bitmap over the framebuffer, so that e.g. a line selector isn't cleared for for transparent bitmap pixels. Change-Id: I09d59a09d2f3c90450a0fe2b83c6c59d757b686b
* bitmap drawing: use temp vars to help gcc opmize loops.Thomas Martitz2013-02-12
| | | | | | | By saving current_vp fields into temp vars just before the loop gcc can put them into registers. This yields ~15% speedup for drawing anti-aliased fonts. Change-Id: I4c0c9f5ff7a7f084e2eb08c4ed874176b1f9832c
* bitmap drawing: Use extra bit in mask to avoid nested if() in switch-cases.Thomas Martitz2013-02-12
| | | | | | Speeds up alpha bitmap drawing by up to 10%. mono bitmap drawing is also a tiny bit faster. Change-Id: I5a9379740c1a0091de9c621aabbe57d767ce2905
* bitmap drawing: Negate alpha channel to match alpha information format of ↵Thomas Martitz2013-02-12
| | | | | | | | | | font files. The comment about the format was actually incorrect. The alpha information is now negated during conversion to native format, according to the corrected comment. Change-Id: Ifdb9ffdf9b55e39e64983eec2d9d60339e570bd9
* rk27xx: do not disable irq in commit_discard_dcache_range()Marcin Bukat2013-02-12
| | | | | | | | | commit_discard_dcache_range() is used in sd, lcd and pcm drivers to handle transfers form/to data buffers so this should not introduce any problems. It is reported to fix pop noise observed on some hifimans. We apparently don't fully understand cache handling on this platform. Change-Id: I436d291509f91d16a13d10965a28171fb27574ab
* rk27xx: Increase timeout for sd card initialization. 1 sec isn't enough in ↵Andrew Ryabinin2013-02-01
| | | | | | some cases. Change-Id: I8d5384b53754e71b9a057a8602854d09b1885c68
* imx233: add a missing packed attribute for dma !!Amaury Pouly2013-01-26
| | | | Change-Id: Iada56b34d0517851859e60f064a2e9032c2f0fe2
* PP: Do not use ATA DMA in bootloaderMarcin Bukat2013-01-24
| | | | | | | | | | The build of bootloader with HAVE_ATA_DMA fails because of missing commit_discard_dcache(). This seems to be bigger problem as bootloader builds don't call cache_init() also which seems wrong. but I know too little about the PP platform to judge. For now use ATA DMA only in regular builds. Change-Id: I82873cb1771f5a95ebfbef91ce26744e3abd743c
* Re-enable PP502x ATA DMABoris Gjenero2013-01-24
| | | | | | | | | | | | | | | | PP502x ATA DMA was disabled in 55fab77 because it caused various instability on all targets using it. This instability is fixed in 583c948 via FS#12391. Here, ATA DMA is enabled for all PP502x targets except nano1g and hdd6330. For nano1g, there may be other causes of instability and more testing is needed. ATA DMA does not work on hdd6330. Change-Id: I786b9edb19e74e6eb957ab205ea026f0969200ac Reviewed-on: http://gerrit.rockbox.org/340 Tested-by: David Hooper <dave@beermex.com> Tested-by: Boris Gjenero <boris.gjenero@gmail.com> Reviewed-by: Szymon Dziok <b0hoon@o2.pl> Tested-by: Szymon Dziok <b0hoon@o2.pl> Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
* Fix FS#12391 : Memory corruption on PP502x after commit_discard_idcache()Boris Gjenero2013-01-24
| | | | | | | | | | | | | | | In commit_discard_idcache(), cache lines were marked as invalid. When some cache lines are marked as invalid, memory corruption can occur. This caused instability when using PP502x ATA DMA because of the many more calls to that function. Here, commit_discard_idcache() is changed to avoid the problem. Also, the cache is filled after being enabled to to ensure there are never any cache lines that aren't marked as valid. Change-Id: Ia26300acef6b0573c1f40299c496ee5cbda3dac8 Reviewed-on: http://gerrit.rockbox.org/339 Reviewed-by: Szymon Dziok <b0hoon@o2.pl> Tested-by: Szymon Dziok <b0hoon@o2.pl> Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>