summaryrefslogtreecommitdiff
path: root/firmware (follow)
Commit message (Collapse)AuthorAge
...
* imx233: add audioout debug infoAmaury Pouly2013-07-13
| | | | Change-Id: Iac092de861847e31aba48d2fdc51ae72cd9bd202
* imx233: rework power managementAmaury Pouly2013-07-07
| | | | | | | | | | | | The current code was spreaded over power and powermgmt which made it behave strangely, especially since there are relationships between power management and frequency scaling. The new code makes sure power management is initialised before frequency scaling starts. It also makes sure to start from a known state, thus fixing potential issue when the bootloader stops in a trickle state where DCDC is improperly configured. Change-Id: Ibded2e590e108f6c98daa52d2cf1bd28763c8923
* imx233: add emi debug infoAmaury Pouly2013-07-07
| | | | Change-Id: I33317ae26b70c825d4c5e3aaac364da5e0dc06c2
* buflib: Change buflib_available() and add buflib_allocatable().Thomas Martitz2013-07-07
| | | | | | | | | | | | | | | buflib_allocatable() is what buflib_available() was before (it was in fact simply renamed). It returns the largest contiguous block of memory. This can be allocated and will definitely succeed, although larger allocations may also succeed if the buffer can be compacted and shrinked. buflib_available() now counts all free bytes, contiguous or not. This better matches the description and how the caller use it. Change-Id: I511e4eb5f4cf1821d957b3f4ef8a685ce40fe289 Reviewed-on: http://gerrit.rockbox.org/481 Reviewed-by: Thomas Martitz <kugel@rockbox.org> Tested-by: Thomas Martitz <kugel@rockbox.org>
* Enable setting of global output samplerate on certain targets.Michael Sevakis2013-07-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaces the NATIVE_FREQUENCY constant with a configurable frequency. The user may select 48000Hz if the hardware supports it. The default is still 44100Hz and the minimum is 44100Hz. The setting is located in the playback settings, under "Frequency". "Frequency" was duplicated in english.lang for now to avoid having to fix every .lang file for the moment and throwing everything out of sync because of the new play_frequency feature in features.txt. The next cleanup should combine it with the one included for recording and generalize the ID label. If the hardware doesn't support 48000Hz, no setting will be available. On particular hardware where very high rates are practical and desireable, the upper bound can be extended by patching. The PCM mixer can be configured to play at the full hardware frequency range. The DSP core can configure to the hardware minimum up to the maximum playback setting (some buffers must be reserved according to the maximum rate). If only 44100Hz is supported or possible on a given target for playback, using the DSP and mixer at other samperates is possible if the hardware offers them. Change-Id: I6023cf0c0baa8bc6292b6919b4dd3618a6a25622 Reviewed-on: http://gerrit.rockbox.org/479 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
* imx233: fix sd init sequenceAmaury Pouly2013-07-02
| | | | | | | | | | Implement the switch function as specified by the specification, that is wait for the response AND transfer 64 bytes of data. This fixes some issue when the SD card take a long time to switch. In particular waiting 100ms (max per spec) will not work if no data is transfered in some cases. Change-Id: Ia22350468018b842e57ce6f6c1a8d676eba97fb8
* imx233: implement alarm wake upAmaury Pouly2013-07-02
| | | | | | | | | | This adds the application part of alarm wake up. On some targets like the Fuze+, it will also require a bootloader change to make sure that the device doesn't power down on alarm wake up (for example on the Fuze+ the bootloader requires the power button to be hold sufficiently long, thus preventing alarm wake up to work) Change-Id: I5d01957852355fddbd48110d3d75a5533f07879e
* imx233: fix emi frequency scalingAmaury Pouly2013-07-02
| | | | | | | On the ZEN X-Fi2, the fractiona dividers are gated by the bootloader and must be ungated before switching emi to pll. Change-Id: I5df57ed5581054883da4cbb3b4f3ce3539391ab5
* Update software recording engine to latest codec interface.Michael Sevakis2013-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basically, just give it a good rewrite. Software codec recording can be implemented in a more straightforward and simple manner and made more robust through the better codec control now available. Encoded audio buffer uses a packed format instead of fixed-size chunks and uses smaller data headers leading to more efficient usage. The greatest benefit is with a VBR format like wavpack which needs to request a maximum size but only actually ends up committing part of that request. No guard buffers are used for either PCM or encoded audio. PCM is read into the codec's provided buffer and mono conversion done at that time in the core if required. Any highly-specialized sample conversion is still done within the codec itself, such as 32-bit (wavpack) or interleaved mono (mp3). There is no longer a separate filename array. All metadata goes onto the main encoded audio buffer, eliminating any predermined file limit on the buffer as well as not wasting the space for unused path queue slots. The core and codec interface is less awkward and a bit more sensible. Some less useful interface features were removed. Threads are kept on narrow code paths ie. the audio thread never calls encoding functions and the codec thread never calls file functions as before. Codecs no longer call file functions directly. Writes are buffered in the core and data written to storage in larger chunks to speed up flushing of data. In fact, codecs are no longer aware of the stream being a file at all and have no access to the fd. SPDIF frequency detection no longer requires a restart of recording or plugging the source before entering the screen. It will poll for changes and update when stopped or prerecording (which does discard now-invalid prerecorded data). I've seen to it that writing a proper header on full disk works when the format makes it reasonably practical to do so. Other cases may have incorrect data sizes but sample info will be in tact. File left that way may play anyway. mp3_enc.codec acquires the ability to write 'Info' headers with LAME tags to make it gapless (bonus). Change-Id: I670685166d5eb32ef58ef317f50b8af766ceb653 Reviewed-on: http://gerrit.rockbox.org/493 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
* Fix some whitespace in files changed in following commit.Michael Sevakis2013-06-30
| | | | | | | Change-Id: Ie3f43e43076e0dcae9a10f1b0b9e4698b398acee Reviewed-on: http://gerrit.rockbox.org/492 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
* Move load_firmware() to separate fileMarcin Bukat2013-06-27
| | | | | | | | The idea is to share loading code between bootloaders and rolo(). Change-Id: I1656ed91946d7a05cb7c9fa7a16793c3c862a5cd Reviewed-on: http://gerrit.rockbox.org/190 Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
* buflib: Allow handle to be freed entirely during the shrink callback.Thomas Martitz2013-06-24
| | | | | | | Change-Id: I3a069dcb99bbd4022faf37596b03beb926d2ea82 Reviewed-on: http://gerrit.rockbox.org/480 Reviewed-by: Thomas Martitz <kugel@rockbox.org> Tested-by: Thomas Martitz <kugel@rockbox.org>
* imx233: fix ocotop/debug and usb-core for stmp3600Amaury Pouly2013-06-24
| | | | | | | | Currently we don't know where the serial number is stored on the stmp3600. It is probably using the laser fuses but this needs to be investigated Change-Id: I1ac25e38b8f65635abb68788ceb65df0a740dabd
* imx233: fix debug for stmp3600Amaury Pouly2013-06-20
| | | | | | | | The STMP3600 cannot lock some usb bits so there is only a single status in POWER_STS. Also stmp3600 has no clock bypass and frac div. Change-Id: I101f4263bdddeff58e142d10f9b76dd643bf928d
* zenxfi2: remove lcd yuv blitting code (duplicate from generic)Amaury Pouly2013-06-20
| | | | Change-Id: I2be7d5f9cbc2086673c731e7b76b7d7d6f728f26
* imx233: allow audio routing driver to have pre/post init functionsAmaury Pouly2013-06-18
| | | | Change-Id: Ic1fe8c5bc6c8bf5d449ae44c12cb6cb8df409260
* imx233: add generic lradc based button driverAmaury Pouly2013-06-18
| | | | | | | | This driver does debouncing and best lradc usage and only requires a sorted table of values to work, this factoring code as much as possible. Change-Id: I84b46f4b08094634e1c5deb5ca9ba20763389e66
* imx233: don't dcp on stmp3600, allow touchscreen with HAVE_*Amaury Pouly2013-06-18
| | | | Change-Id: Icb9dd3c9b9abdf1c013a78d67576ac857a7f010f
* imx233: add basic ATA driverAmaury Pouly2013-06-18
| | | | | | The current driver only works in PIO mode. Change-Id: I1cf2eaedcce0172a254c3bab0e1257886226d3a0
* imx233: add uartdbg driverAmaury Pouly2013-06-18
| | | | | | | | The driver is current unused and very minimal. It can used on targets which have an accessible UART port and it will be used on some creative targets as backlight control. Change-Id: Id710d63574aadb0a2d7327b03187506b469470b1
* imx233: add stmp3600 and stmp3700 pin descriptionsAmaury Pouly2013-06-18
| | | | Change-Id: I1f64b669eac688583f27dde5216e40f7333de0b6
* zenxfi3: drop audio routing driver in favor of the generic oneAmaury Pouly2013-06-18
| | | | Change-Id: Ia104c148f9139434d2c70190d2834b06de20de23
* zenxfi2: drop audio routing driver in favor of the generic oneAmaury Pouly2013-06-18
| | | | Change-Id: I8186f4b8e7cdc5abc549dffb033178921f447998
* fuzeplus: drop audio routing driver in favor of the generic oneAmaury Pouly2013-06-18
| | | | Change-Id: I89828ef858606bf09e115ff9c27ff9ecc8bf8b8e
* imx233: introduce generic audio routing driverAmaury Pouly2013-06-18
| | | | Change-Id: Icd439e02dd9835778d2733fc01a9306552b36966
* imx233: add recording side and 3d to codec driverAmaury Pouly2013-06-18
| | | | Change-Id: I3587434749c401a28c6e77bd30395e7df15f2e8a
* imx233: implement recording side of pcmAmaury Pouly2013-06-18
| | | | | | | Although everything is implemented, recording still doesn't work, dma is stuck. Add code for reference until this get a proper fix. Change-Id: Ifc016b00876230c6d337a5cd4f8bb90b856efac8
* imx233: implement audioinAmaury Pouly2013-06-18
| | | | Change-Id: I0cf896f59fd2176217d0dd1f6032c3463b936669
* imx233: rework touchscreen driverAmaury Pouly2013-06-18
| | | | | | | | The old driver didn't behave nicely because it waiting for stability which could never arrive on some gestures. The new one uses a fixed delay and averaging. Change-Id: I8ff80f373b6792e6d5fc3cfe41b709642e61c38b
* imx233: fix soc header for stmp3600 and stmp3700Amaury Pouly2013-06-18
| | | | | | | | Document various register macros (autogenerated). Fix memory map for stmp3700, make framebuffer size configurable and cache aligned and fix the PHYSICAL_ADDR macro. Change-Id: I40a2875fb3eb35c6fce1158db37dbc0c1a10c68e
* fuze+: fix lcd code which got broken in 52426d0Amaury Pouly2013-06-18
| | | | | | | The lcd data line were not setup as input anymore, making register reading plain broken and probably lead to bad lcd detection. Change-Id: I281460f845537c58045f3893261ded5c9c6e53b5
* imx233: fix system for stmp3600 and stmp3700Amaury Pouly2013-06-17
| | | | Change-Id: I2b425b56358ed21269beae27a4afb490939b7f9d
* imx233: only do power management on imx233Amaury Pouly2013-06-17
| | | | | | | | Power management is somewhat different on stmp3700 which doesn't have the 4.2V rail and completely different on stmp3600 which has several DCDC. Currently only handle imx233. Change-Id: Ic7815141286117b74022ffc53cfa48664fd7faac
* imx233: clarity comment about errataAmaury Pouly2013-06-17
| | | | Change-Id: I3309ce112762f09fcf6bce9d416dbf4b0aa2f197
* imx233: fix audioout for stmp3600 and stmp3700, add 3d effectAmaury Pouly2013-06-17
| | | | | | Although the 3D effets sound terrible, add support for it. Change-Id: Ib24be01986a974387b592c6e291d34b196ceb884
* imx233: fix octop for stmp3600 and stmp3700Amaury Pouly2013-06-17
| | | | Change-Id: Iacfa8bb96c8b78d56e5010f313bc47b73df80720
* imx233: always use the timer for kernel tickAmaury Pouly2013-06-17
| | | | Change-Id: Ifb7f77569b351e66edb5b8f1ac2e805c2f8b394a
* imx233: fix ssp for stmp3600 and stmp3700Amaury Pouly2013-06-17
| | | | | | | | Using the ssp macros, we can easily handle the stmp3600 which has a single ssp block. Take care of all the nasty differences between targets like bus width Change-Id: If98a091cc262e9e6834f6fb9826f7c5515bfe621
* imx233: fix emi for stmp3600 and stmp3700Amaury Pouly2013-06-17
| | | | | | | | Currently don't do anything on stmp3600 because emi is completely different. On stmp3700 it is unsure how the pll lock is handled and this will need more testing. Change-Id: I3d11282531f54f2ecc4187c0d913e2c61f4de14d
* imx233: fix dma for stmp3600 and stmp3700, improve supportAmaury Pouly2013-06-17
| | | | | | | Add finer granularity to start command: now commands can be prepared, schedule and semaphore increased independently. Change-Id: Ib1ed1f20f4b46dc61b6dbab6ddec8b54e3d832b9
* imx233: improve debug and fix for stmp3600 and stmp3700Amaury Pouly2013-06-17
| | | | | | | Add pwm and usb screen, fix charging, icoll and dcp on other stmps. Change-Id: I3cddf987e178bc01046132adaed15cff750835c9
* imx233: fix/improve lcdif for stmp3600 and stmp4700, fix driversAmaury Pouly2013-06-17
| | | | | | | | Factorise pin setup, rewrite PIO code, add support for lcdif irq, handle all the various differences between the stmps, drop yuv blitting code since it already exists in the common lcd drivers. Change-Id: Ifc40aed9b3b12f16611ce960602e46a5bc87ae53
* imx233: fix pinctrl for stmp3600 and stmp3700Amaury Pouly2013-06-17
| | | | Change-Id: I87281b89315890fa285cb9a63fda5c90bdc8cdbf
* imx233: fix lradc/adc for stmp3600 and stmp3700Amaury Pouly2013-06-17
| | | | | | | | | | The lradc architecture of the stmp3600 is rather different: only channels 6 and 7 have configurable source and we need to take care when allocating channels so that we can actually measure the right channel! Delegate die temperature sensing to the power block on stmp3600. Change-Id: I0860eb4ea98240facc3d4a19d61684eca5f630cc
* imx233: fix power for stmp3600 and stmp3700Amaury Pouly2013-06-17
| | | | | | | | | | There are many small differences between them. In particular some regulators are not available on stmp3600. Also the vbusvalid detect method is not available as an irq on stmp3600 and seems broken on stmp3700. Finally die temperature is handled by the power block on stmp3600. Change-Id: I2c68b418738f15564e445d3a1496018cef97fff7
* imx233: fix clkctrl for stmp3600 and stmp3700Amaury Pouly2013-06-17
| | | | Change-Id: I7596e41c0d0b7fdcc18f7d328a0927c2c78dc4cb
* imx233: fix icoll for stmp3600 and stmp3700Amaury Pouly2013-06-17
| | | | Change-Id: I97b86d67b53615eca0d870058ff5c095c3063151
* imx233: various sdmmc fixesAmaury Pouly2013-06-17
| | | | Change-Id: I261d0bdea1e7c5bc9139b10bf42e7ce7ce6b6dd8
* imx233: simplify timer codeAmaury Pouly2013-06-17
| | | | Change-Id: I845c3f20c17ce6091ed02bc4fbfca176358d31b7
* imx233: improve sspAmaury Pouly2013-06-17
| | | | | | | | | | Under some circumstance (timeout), the dma interrupt is not fired and only the error one is. This can happen with some picky SD cards and with the current code it causes a 1 second timeout. This code properly catches the error interrupt to stop as soon as possible. Change-Id: I9c53ea272d01793f0f229571502e99eb62f1b723