Commit graph

31720 commits

Author SHA1 Message Date
Michael Sevakis
ffa8626b0c Fix whitespace in files for following commit.
Change-Id: I4adb8a152e9b99fcd26d95da7334d7d0cbe2a036
2013-07-12 21:39:06 -04:00
Amaury Pouly
d85f796890 imx233: fix debug screen keys for the zen x-fi3
Change-Id: I81cfb25d3bd6ff8ec43c64a9f55e1b7bd0ee1473
2013-07-13 03:02:41 +02:00
Amaury Pouly
1a7bf7b91c imx233: fix debug keys for zenxfi2
Change-Id: I535fb611f951244686c60f336a49e068edfaf96a
2013-07-13 02:52:47 +02:00
Amaury Pouly
bbe94e2b24 imx233: fix audio debug screen
Change-Id: Iaadd43a28907ebd425a0b7199f067a4fab8e9653
2013-07-13 02:42:17 +02:00
Amaury Pouly
8c91d05543 imx233: add audioin debug info
Change-Id: Iba6e2b720489c1d2178a44a0a4fe5df2a7540579
2013-07-13 02:42:17 +02:00
Amaury Pouly
15c8ec8987 imx233: don't disable monitor when recording from radio
Change-Id: Ibefb0b12b7ff787f5b8a837cab1f764148a8b0c6
2013-07-13 02:42:17 +02:00
Amaury Pouly
9e535e9864 imx233: fix audio settings, some values were nonsense
Change-Id: Ib9969bf843169cc5ddafd7758b5b5c729b2784f1
2013-07-13 02:42:17 +02:00
Amaury Pouly
352b3876e6 imx233: fix recording volume (tenth-dB -> half-dB)
Change-Id: I6960d3f4bd506713ffb139750fbe581ef66af947
2013-07-13 02:42:17 +02:00
Amaury Pouly
960788343a imx233: correctly select recording source
Change-Id: I651856292922097efe21e01543ae2568dfa13980
2013-07-13 02:42:17 +02:00
Amaury Pouly
a3af301677 imx233: rewrite debug screens
The old code used get_action which is bad because it belongs to
apps/. Instead rewrite a simple version of get_action, also
rewrite the top level handler. Since the number of screens is
becoming quite high, it now shows a list and the user can start
from any screen. Once in a screen and as long as the user presses
select, it will advance to next screen until it finally returns
to the list on cancellation.

Change-Id: Icbc7676a17e4a6e859b7781a4a471d8303910591
2013-07-13 02:42:17 +02:00
Amaury Pouly
a22855ce61 imx233: add audioout debug info
Change-Id: Iac092de861847e31aba48d2fdc51ae72cd9bd202
2013-07-13 02:42:17 +02:00
Bertrik Sikken
93de093690 mkamsboot: add support for clip zip original firmware 01.01.21 (tested by me)
Change-Id: Ief8a8e6dfe87a17285dd5259fd3c4cebfc962643
2013-07-12 22:23:36 +02:00
Michael Sevakis
e04e29d017 mp3_enc: Fix early snafu with stream finish on COP
Distractions make logic fail. It only needs one more loop and should
not trigger further compression cycles after not feeding more data.

Change-Id: Ie0dbb34af92e0ca5718480dd4ab4719a141717ff
2013-07-11 04:50:27 -04:00
Michael Sevakis
1329cc29de Fix .ncbss from possibly overlapping .ncdata in plugins/codecs.
(Take #2)

If .bss wasn't large enough, and .ncdata was empty, .ncbss would be
at an address overlapping the alignment-padded end of .ncdata and
and linking would fail with an overlap error.

Adds plugin load end address that accounts for IRAM going past
the final .bss sections, making IRAM overlay compatible. load_code
could also use this instead of the file size.

The .lds becomes a bit more straightforward and explicit when
assigning addresses.

Change-Id: Id0c33f257710e97ece2c831e0feaaa32c1a14e05
2013-07-11 04:32:23 -04:00
Michael Sevakis
2948cb42ae Revert "Fix .ncbss from possibly overlapping .ncdata in plugins/codecs."
This reverts commit 5c2ad2fd36.

The .ncbss bug is still showing up. Will try again shortly.
2013-07-11 00:28:39 -04:00
Michael Sevakis
5c2ad2fd36 Fix .ncbss from possibly overlapping .ncdata in plugins/codecs.
If .bss wasn't large enough, and .ncdata was empty, .ncbss would be
at an address overlapping the alignment-padded end of .ncdata and
and linking would fail with an overlap error.

There also should no longer be an issue that needs special correction
with iramcopy and empty .bss. The .maps look good in that case.

Change-Id: I02bf73a0acef2c0c04b5d135ecf4e18fb97ee339
2013-07-10 22:37:17 -04:00
Michael Giacomelli
18f9486e3b Add Roman Poltoradnev to the CREDITS file.
Change-Id: I07b791fda7e8490e18e22ce7d09a4e8729ddbaf7
2013-07-09 18:49:37 +02:00
Roman
1fa3f5906e Swap over a position of cursor while reaching the end of filename in keyboard
In sansa clip + with virtual keyboard you can write/rename a stuff and move
your cursor in the filename field. But while your cursor reaches the end/start
of filename it just blocks the movement of cursor and beeps if you enabled the
"Voice Menu" feature. This patch swaps over cursor to the start/end of filename
instead of just blocking movement.

Change-Id: I37450df062df60ef4c0d747c13e448d0adbde05b
Reviewed-on: http://gerrit.rockbox.org/503
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2013-07-09 18:43:10 +02:00
Michael Sevakis
5f0692b98c SWCODEC recording: Boost CPU frequency before doing flush on stop
If CPU is not boosted for some reason already, then the stop flush
can take longer than it really ought to.

Change-Id: I0572cc83067749e9945b3eb825f976db21d914f9
2013-07-09 07:36:22 -04:00
Michael Sevakis
95bc93194e Multithread compressing encoders on multicore targets.
For mp3_enc, split encoding duties between COP and CPU.

For wavpack_enc, simply run the encoding on COP (splitting that one
needs more consideration) which keeps the it and the UI from running
on the same core.

As a result, at least they are now useable on PP at "normal" sample
rates.

mp3_enc in all this gets an extensive renovation and some optimizations
for speed, to reduce IRAM requirements and remove unneeded stuff.

Change-Id: I215578dbe36f14e516b05a5ca70880eb01ca0ec2
2013-07-09 06:28:33 -04:00
Amaury Pouly
08e466ff92 imxtools: add device info and serial number requests to scsitool
Change-Id: I17b679062fa53c20034e7db6f4080f8762a7818c
2013-07-07 17:36:21 +02:00
Amaury Pouly
03a4ba5481 mkimxboot: rewrite dualboot
Rewrite dualboot in C code instead of assembly. Also properly
handle subtarget and simply Makefile. This should make the
dualboot stub more readable and easier to extend. The new code
also gracefully handles power up from RTC alarm on imx233.

Change-Id: I7c225254b1463a97e76b6cb4de476aa2d2c9d2f9
2013-07-07 17:36:21 +02:00
Amaury Pouly
3afcb53fb9 imx233: rework power management
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
2013-07-07 17:36:21 +02:00
Amaury Pouly
659febc749 imx233: add emi debug info
Change-Id: I33317ae26b70c825d4c5e3aaac364da5e0dc06c2
2013-07-07 17:36:20 +02:00
Thomas Martitz
af4e408555 buflib: Change buflib_available() and add buflib_allocatable().
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>
2013-07-07 10:46:07 +02:00
Michael Sevakis
f9e47c6886 19b289a somehow missed one last LANG_RECORDING_FREQUENCY.
Did grep fail me?

Change-Id: Id8254aa542d57204e265ef06829b4e034f032137
2013-07-06 17:37:08 -04:00
Michael Sevakis
19b289a1b9 Reuse frequency string from recording for playback frequency.
Update all .lang files and change the id from LANG_RECORDING_FREQUENCY
to LANG_FREQUENCY. Also update description and target.

It will throw things off for targets without recording but that do
have 48KHz, possibly older iPods. I'm not sure what else it might be
off hand. Regenerate voice files and replace .lang files in that case.

Change-Id: I9ab396ecfcca9206054bde34aa2cc23b505dabff
2013-07-06 17:14:02 -04:00
Lorenzo Miori
228372c38d Bugfix: (un)locking state message(s) did not disappear
after unlocking the device while being into FM
radio screen. This patch restores expected behaviour by
forcing screen refresh when receiving the proper event.

Change-Id: Ibe0864ab78619ddf235912d06a2efe3203b5042a
Reviewed-on: http://gerrit.rockbox.org/505
Reviewed-by: Lorenzo Miori <memorys60@gmail.com>
Tested-by: Lorenzo Miori <memorys60@gmail.com>
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
2013-07-06 14:21:36 +02:00
Lorenzo Miori
8fcce9653f Samsung YP-R0: small patch to enable support to new keylock-in-FM feature.
Change-Id: I965550753bdd65ef4b02ef24e44e0faad2c74289
Reviewed-on: http://gerrit.rockbox.org/504
Reviewed-by: Lorenzo Miori <memorys60@gmail.com>
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
2013-07-06 12:38:41 +02:00
Michael Sevakis
91ff99c2ad ...and mixer_set/get_frequency is SWCODEC only! :-)
Change-Id: I6badf687ef330abf79f2e1a809d8b2f93ba4e911
2013-07-05 22:54:02 -04:00
Michael Sevakis
74f90bdb18 Oops, two test plugins were left in apps/plugins/SOURCES.
Change-Id: I1df74c535a8c054223e8687e7c28bc6a130070d0
2013-07-05 22:32:56 -04:00
Michael Sevakis
d37bf24d90 Enable setting of global output samplerate on certain targets.
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>
2013-07-06 04:22:04 +02:00
Amaury Pouly
00faabef5e imx233: document some more stmp vendor scsi command
Change-Id: Ie03c0c8288b4bd9c0b4beedae363cff6caf3c5cd
2013-07-03 01:05:00 +02:00
Amaury Pouly
20ee453edc imx233: fix sd init sequence
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
2013-07-02 00:45:00 +02:00
Amaury Pouly
d8024df105 imx233: implement alarm wake up
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
2013-07-02 00:45:00 +02:00
Amaury Pouly
2773673733 imx233: fix emi frequency scaling
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
2013-07-02 00:45:00 +02:00
Michael Sevakis
bb87590e05 Temporarily disable keyclick in recording screen.
Those who have keyclick enabled and are really eagar to record upon
boot can get the samplerate messed up because who gets to set the sample
rate last (recording or mixer) is not currently deterministic.

Change-Id: Icc43ed789cf23f928ca49657cb146445b0c558cb
2013-06-30 20:14:06 -04:00
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