Commit graph

31683 commits

Author SHA1 Message Date
Michael Sevakis
9b990bdab1 SWCODEC Audio: Add some INIT_ATTR's to get a few bytes back.
Change-Id: Ie7b04ecf3b3535e0ed45a6e0e8d81af89e38378e
2013-06-29 22:29:23 -04:00
Michael Sevakis
89b05af496 Fix whitespace
Change-Id: I2072c355f05b6e709a5c179512bc2b71756163a5
2013-06-29 22:29:03 -04:00
Michael Sevakis
59abdb5190 Fix strlcpy warnings in 4888131.
Change-Id: Ibd355ee1cf39d1a4b07def94634f0316468bf727
2013-06-29 19:27:21 -04:00
Michael Sevakis
4888131972 Update software recording engine to latest codec interface.
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>
2013-06-30 00:40:27 +02:00
Michael Sevakis
a9ea1a4269 Fix some whitespace in files changed in following commit.
Change-Id: Ie3f43e43076e0dcae9a10f1b0b9e4698b398acee
Reviewed-on: http://gerrit.rockbox.org/492
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
2013-06-30 00:40:09 +02:00
Amaury Pouly
bc3a079522 clip+/zip: add FMS soft lock action
Change-Id: Iba5cb8b29ad06080d04105d6f9ef2c62e81d4f36
Reviewed-on: http://gerrit.rockbox.org/491
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2013-06-29 11:39:35 +02:00
Michael Sevakis
662f7576bf Fix a bug in pcmbuf.c when doing offset with modulus.
Causes the track change to go in the wrong buffer (and even be missed
by playback) if the current descriptor for the write index is descriptor
0 because the offset used is "-1" upon track change.

Got nailed by implicit conversion of the % operator dividend to unsigned.

Change-Id: I32538db801ac9d790c8b1b5bd041b09ad4b64d2e
2013-06-28 02:17:58 -04:00
Michael Sevakis
363f96b95b Fix whitespace for next commit
Change-Id: I8773ff7275372882321ebf2e66462781735cddc6
2013-06-28 02:17:17 -04:00
Marcin Bukat
38032a41e9 sansa connect bootloader: fix red
Change-Id: Ide8784e33e1671bf915b5375fb5cd8dae4e09ae6
2013-06-27 14:04:32 +02:00
Marcin Bukat
0b29691324 Move load_firmware() to separate file
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>
2013-06-27 13:50:11 +02:00
Thomas Martitz
46ea8bfe7c buflib: Allow handle to be freed entirely during the shrink callback.
Change-Id: I3a069dcb99bbd4022faf37596b03beb926d2ea82
Reviewed-on: http://gerrit.rockbox.org/480
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
Tested-by: Thomas Martitz <kugel@rockbox.org>
2013-06-24 15:24:34 +02:00
Amaury Pouly
d938ae692c imx233: fix ocotop/debug and usb-core for stmp3600
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
2013-06-24 13:17:17 +02:00
Thomas Martitz
be5fadff94 skin_engine: Fix crash on skin_reset (e.g. on language change).
Change-Id: Ie2da1a1ba9d2dad76e2f1c45abd907c3ede4f56c
2013-06-23 20:55:46 +02:00
Michael Giacomelli
d475dd36a3 Remove old EQ presets.
The old presets never made sense for Rockbox's EQ.  They were apparently
copied from some other software.  We have a parametric EQ, that means that
EQ bands can be made wider or narrower.  Putting two identical bands side
by side just wastes battery life and adds rounding error.  Replacement
presets are on gerrit but they need more work.  In the mean time, users
should probably not be using these.

Change-Id: I85213100129fafd3ac0fa1a9438cb4d651bb94cb
2013-06-21 16:53:02 +02:00
Amaury Pouly
c57b37ab99 imx233: fix debug for stmp3600
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
2013-06-20 14:11:58 +02:00
Amaury Pouly
a235200430 zenxfi2: remove lcd yuv blitting code (duplicate from generic)
Change-Id: I2be7d5f9cbc2086673c731e7b76b7d7d6f728f26
2013-06-20 13:49:59 +02:00
Amaury Pouly
7f552f80b8 imx233: allow audio routing driver to have pre/post init functions
Change-Id: Ic1fe8c5bc6c8bf5d449ae44c12cb6cb8df409260
2013-06-18 21:27:29 +02:00
Amaury Pouly
2f6c060656 imx233: fix bootloader for stmp3600 and stmp3700
Change-Id: Icfdf4c0a35813576c9d2a60558b4c00599f091fc
2013-06-18 21:26:23 +02:00
Amaury Pouly
277d358eda imx233: add generic lradc based button driver
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
2013-06-18 16:43:27 +02:00
Amaury Pouly
27aca8f276 imx233: don't dcp on stmp3600, allow touchscreen with HAVE_*
Change-Id: Icb9dd3c9b9abdf1c013a78d67576ac857a7f010f
2013-06-18 16:41:23 +02:00
Amaury Pouly
0b6198f8a8 imx233: add basic ATA driver
The current driver only works in PIO mode.

Change-Id: I1cf2eaedcce0172a254c3bab0e1257886226d3a0
2013-06-18 16:41:13 +02:00
Amaury Pouly
bbb789120c imx233: add uartdbg driver
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
2013-06-18 16:24:28 +02:00
Amaury Pouly
4962854005 imx233: add stmp3600 and stmp3700 pin descriptions
Change-Id: I1f64b669eac688583f27dde5216e40f7333de0b6
2013-06-18 16:21:38 +02:00
Amaury Pouly
ea8b22a9b6 zenxfi3: drop audio routing driver in favor of the generic one
Change-Id: Ia104c148f9139434d2c70190d2834b06de20de23
2013-06-18 16:19:28 +02:00
Amaury Pouly
11c907a83c zenxfi2: drop audio routing driver in favor of the generic one
Change-Id: I8186f4b8e7cdc5abc549dffb033178921f447998
2013-06-18 16:18:08 +02:00
Amaury Pouly
d997dafb6c fuzeplus: drop audio routing driver in favor of the generic one
Change-Id: I89828ef858606bf09e115ff9c27ff9ecc8bf8b8e
2013-06-18 16:15:07 +02:00
Amaury Pouly
e735ce4693 imx233: introduce generic audio routing driver
Change-Id: Icd439e02dd9835778d2733fc01a9306552b36966
2013-06-18 16:11:51 +02:00
Amaury Pouly
d8368d58b0 imx233: add recording side and 3d to codec driver
Change-Id: I3587434749c401a28c6e77bd30395e7df15f2e8a
2013-06-18 16:09:07 +02:00
Amaury Pouly
7fb0b893f9 imx233: implement recording side of pcm
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
2013-06-18 15:45:58 +02:00
Amaury Pouly
ac4e76d072 imx233: implement audioin
Change-Id: I0cf896f59fd2176217d0dd1f6032c3463b936669
2013-06-18 15:43:43 +02:00
Amaury Pouly
57bb7b2d27 imx233: rework touchscreen driver
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
2013-06-18 15:34:54 +02:00
Amaury Pouly
0173f6edf5 imx233: fix soc header for stmp3600 and stmp3700
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
2013-06-18 15:33:07 +02:00
Amaury Pouly
55babd5895 mkimxboot: add zen style 100/300 firmware to the list
The tool cannot produce any firmware yet but it can extract the
OF from the installer.

Change-Id: I98684b2bf43310443d93b482aa853464f6f87fa8
2013-06-18 15:02:01 +02:00
Amaury Pouly
87b84c07d7 sbtools: fix sbloader (allow transfer size override)
Change-Id: Id6d3188b7f837726c29845f01b0b1588acf40407
2013-06-18 14:59:13 +02:00
Amaury Pouly
9c965c88b4 fuze+: fix lcd code which got broken in 52426d0
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
2013-06-18 13:08:38 +02:00
Amaury Pouly
505f37e1b8 sbtools: various little fixes, mostly cosmetics
Change-Id: Ic53ef0283bdaee8d3272f648b71eff567b25059b
2013-06-17 13:58:59 +02:00
Amaury Pouly
c1eafa1b65 sbtools: add Sansa Express bootloader key
Change-Id: I167a6410e40478173e5ce496ace4f705c3e26a1b
2013-06-17 13:38:31 +02:00
Amaury Pouly
dafc359fad imx233: fix system for stmp3600 and stmp3700
Change-Id: I2b425b56358ed21269beae27a4afb490939b7f9d
2013-06-17 00:29:26 +02:00
Amaury Pouly
8d7cc320b7 imx233: only do power management on imx233
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
2013-06-17 00:29:25 +02:00
Amaury Pouly
2ed36fc4a2 imx233: clarity comment about errata
Change-Id: I3309ce112762f09fcf6bce9d416dbf4b0aa2f197
2013-06-17 00:29:25 +02:00
Amaury Pouly
63ffdc1c89 imx233: fix audioout for stmp3600 and stmp3700, add 3d effect
Although the 3D effets sound terrible, add support for it.

Change-Id: Ib24be01986a974387b592c6e291d34b196ceb884
2013-06-17 00:29:25 +02:00
Amaury Pouly
f0f6aee58c imx233: fix octop for stmp3600 and stmp3700
Change-Id: Iacfa8bb96c8b78d56e5010f313bc47b73df80720
2013-06-17 00:29:25 +02:00
Amaury Pouly
6e88d98dcf imx233: always use the timer for kernel tick
Change-Id: Ifb7f77569b351e66edb5b8f1ac2e805c2f8b394a
2013-06-17 00:29:25 +02:00
Amaury Pouly
b74a459189 imx233: fix ssp for stmp3600 and stmp3700
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
2013-06-17 00:29:25 +02:00
Amaury Pouly
86ff093267 imx233: fix emi for stmp3600 and stmp3700
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
2013-06-17 00:29:25 +02:00
Amaury Pouly
e671472c3f imx233: fix dma for stmp3600 and stmp3700, improve support
Add finer granularity to start command: now commands can be
prepared, schedule and semaphore increased independently.

Change-Id: Ib1ed1f20f4b46dc61b6dbab6ddec8b54e3d832b9
2013-06-17 00:29:25 +02:00
Amaury Pouly
bdc572b8a1 imx233: improve debug and fix for stmp3600 and stmp3700
Add pwm and usb screen, fix charging, icoll and dcp on other
stmps.

Change-Id: I3cddf987e178bc01046132adaed15cff750835c9
2013-06-17 00:29:25 +02:00
Amaury Pouly
069a0269a9 imx233: fix/improve lcdif for stmp3600 and stmp4700, fix drivers
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
2013-06-17 00:29:25 +02:00
Amaury Pouly
52426d0891 imx233: fix pinctrl for stmp3600 and stmp3700
Change-Id: I87281b89315890fa285cb9a63fda5c90bdc8cdbf
2013-06-17 00:29:25 +02:00
Amaury Pouly
f4fdf1ffe2 imx233: fix lradc/adc for stmp3600 and stmp3700
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
2013-06-17 00:29:25 +02:00