Compare commits

...
Sign in to create a new pull request.

77 commits
master ... v3.0

Author SHA1 Message Date
Jens Arnold
d7e637d4a4 Merge the reworked archos flashing chapter from trunk, and reenable it for release 3.0.1. Add a clarification regarding 3.0.1 and 8MB-modded boxes.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18843 a1c6a512-1295-4272-9138-f99709370657
2008-10-20 07:24:16 +00:00
Jens Arnold
5d4d69bdf9 Increase UCL blocksize in order to fix 'blocksize too small' errors when trying to flash rockbox on fm/v2 recorders. Default blocksize is 256KB and our thinned-out decompressor only supports single-block UCL files. 1MB blocksize should be on the safe side.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18824 a1c6a512-1295-4272-9138-f99709370657
2008-10-18 11:23:07 +00:00
Jens Arnold
f50a5121b9 Bump release to 3.0.1 for compiling.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18818 a1c6a512-1295-4272-9138-f99709370657
2008-10-15 20:49:51 +00:00
Jens Arnold
da32e58cae Further cleanup: Always check bootloader version, and do away with CRC check for this purpose. Also make most functions static, and remove an unused function.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18817 a1c6a512-1295-4272-9138-f99709370657
2008-10-15 20:29:34 +00:00
Jens Arnold
09cf3c49e7 Necessary changes for 3.0.1 and the upcoming full-flash images: Fix a message for the Player, and bump the flash (bootloader) version. The upcoming images will be version 2. Also change the rombox start address for the Player as bootbox became a little too big. Now it's at (28K+16) as all other archoses.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18794 a1c6a512-1295-4272-9138-f99709370657
2008-10-12 23:39:54 +00:00
Jens Arnold
85ac1ced98 Archos flash loader: compile with -Os and make all internal functions static to save space. main() and _main() must not be static or they wouldn't end up in IRAM for execution. * Also make some bootbox functions static, and drop an unused function.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18792 a1c6a512-1295-4272-9138-f99709370657
2008-10-12 22:19:33 +00:00
Jens Arnold
3d948cb27d Bootloaders don't need special handling in sys_poweroff() for recording targets.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18781 a1c6a512-1295-4272-9138-f99709370657
2008-10-12 12:29:09 +00:00
Nils Wallménius
aaeb289a10 Bump ipodpatcher version string
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18761 a1c6a512-1295-4272-9138-f99709370657
2008-10-10 16:27:42 +00:00
Jens Arnold
d04a15e1a2 Port several bootloader size reductions and functional fixes from trunk in preparation for new archos flash ROM images. r18609 (disable font caching), r18614 (no idle callbacks), r18631+r18633 (full USB init), r18636 (ASCII-only sysfont), r18637 (main.c cleanup).
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18638 a1c6a512-1295-4272-9138-f99709370657
2008-09-24 22:05:17 +00:00
Dominik Riebeling
28a86faac7 update rbutil configuration for 3.0 release and prepare for theme site change.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18617 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 22:31:27 +00:00
Marianne Arnold
7b659cce06 Manual: cube button table, be a bit more accurate to avoid misunderstandings.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18615 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 22:12:47 +00:00
Daniel Stenberg
bd8e85c91f strip off RC!
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18607 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 21:01:58 +00:00
Martin Arver
20660c9561 add supported codecs
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18606 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 21:01:39 +00:00
Robert Menes
64c993be73 Remove some nonessential comments from the c100 section.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18605 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 21:00:50 +00:00
Frank Gevaerts
29dd0ad2aa disable flashing chapter, as it's most probably outdated
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18603 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 20:59:06 +00:00
Frank Gevaerts
1d15924ef2 remove some things that are not in the release
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18602 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 20:53:45 +00:00
Martin Arver
3562837a2d Include changelog in the 3.0 manual. Copied from MajorChanges
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18601 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 20:48:26 +00:00
Dominik Riebeling
672eb86569 Add a new environment for setting the changelog using a different bullet icon and smaller vertical space between items.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18600 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 20:31:52 +00:00
Marianne Arnold
f62df613df Manual: update the button table in the cube chapter to reflect the new control scheme.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18599 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 20:31:33 +00:00
Frank Gevaerts
3d2be4fa4a remove fixme, and fix typo. The content of this chapter appears correct, but no guarantees about completeness
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18597 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 20:28:06 +00:00
Jens Arnold
afdc728ef2 Simplify controls in order to resolve impossible combos on several targets. Now uses a similar system as bounce: use left/right (or equivalent) to select the axis to adjust, and up/down (or the equivalent) to change speed/angle. * Show angle instead of speed in angle adjust mode (i.e. pause). * Better event handling when paused (button_get_w_tmo()). * Includes touchscreen fixup.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18595 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 20:13:22 +00:00
Frank Gevaerts
620d48469d leave unknown step sizes and ranges blank instead of showing red fixmes.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18593 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 20:04:40 +00:00
Frank Gevaerts
7fc18cd0bd fix another small fixme
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18592 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 19:55:27 +00:00
Frank Gevaerts
228677feca remove the warning about mr100 needing rbutil 1.0.5 which might not be available yet
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18590 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 19:42:30 +00:00
Frank Gevaerts
5c21ae0168 re-apply r18459 as it got lost in r18471
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18589 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 19:41:23 +00:00
Frank Gevaerts
79220cd94a fill in some missing values
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18588 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 19:38:19 +00:00
Martin Arver
ed64914737 remove fixme in the doom chapter, and remove the menu overview from the appendix
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18587 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 19:12:30 +00:00
Jens Arnold
a84066227b Disable bidirectional text handling and arabic joining in the bootloaders in order to save space. * Disable greyblitting in archos bootloaders for the same reason.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18585 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 18:55:54 +00:00
Frank Gevaerts
10b57c0915 Remove the Changelog chapter, as it's empty anyway
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18583 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 18:07:06 +00:00
Frank Gevaerts
abacf516b9 merge r18580 and r18581 (manual fixes)
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18582 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 17:56:47 +00:00
Jens Arnold
7577e2f14b Port MMC driver fixes & improvements (r18541, r18551, r18552) to the 3.0 branch.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18579 a1c6a512-1295-4272-9138-f99709370657
2008-09-23 16:45:13 +00:00
Marianne Arnold
0805a82781 Manual - plugins section: update a bunch of screenshots. (Some plugins changed in overall appearance , e.g. calculator or sliding_puzzle, some plugins now look different because they show the default font and background, the pegbox screenshots were not available in all necessary sizes yet.) There are still some more screenshots to be updated but this should cover the more obvious ones.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18554 a1c6a512-1295-4272-9138-f99709370657
2008-09-19 21:31:09 +00:00
Nils Wallménius
7519b64b2e Fix Gigabeat F/X bootloader, patch by Karl Kurbjun committed to trunk as r18492
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18542 a1c6a512-1295-4272-9138-f99709370657
2008-09-17 19:06:26 +00:00
Nicolas Pennequin
062daf0af3 Merge r18537 from trunk:
Fix a display bug with the tracklist in Picture Flow. Thanks to Thomas Schott.


git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18538 a1c6a512-1295-4272-9138-f99709370657
2008-09-17 16:05:54 +00:00
Marianne Arnold
46906fc835 Manual - plugin button tables: fill out missing info for the c200 pad (chip8emulator, doom, snake, snake2, wormlet), also update the table in clock.tex (was outdated for all and missing the mode and skin 'shortcuts'), add a small note about how to quit credits, change the list of the four direction buttons in some tex files (minesweeper, flipit, sudoku) so that the line can break and won't overlap, correct the position of } in rockblox.tex to not let the 'pause' line appear when it doesn't exist on a target. Break overly long lines.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18536 a1c6a512-1295-4272-9138-f99709370657
2008-09-16 23:34:03 +00:00
Jens Arnold
8a21a2f209 Fix error handling in multiple block read and multiple block write state. When an error occurs, the host still needs to send CMD_STOP_TRANSMISSION resp. the STOP_TRAN token.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18527 a1c6a512-1295-4272-9138-f99709370657
2008-09-16 06:48:38 +00:00
Jonas Häggqvist
177bb338dd Language updates:
- Typo fix for Spanish by Fransisco Vila (FS#9406)
 - Sync of Norwegian by Thom Johansen


git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18525 a1c6a512-1295-4272-9138-f99709370657
2008-09-16 02:29:04 +00:00
Jonas Häggqvist
49d063bbec Spanish update by Francisco Vila (FS#9402 and FS#9403).
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18519 a1c6a512-1295-4272-9138-f99709370657
2008-09-15 15:04:04 +00:00
Jens Arnold
7b6f11897d Implement chasing bitswap for reading. Speeds up reading single 512-byte blocks by 15..20%. * Restructure the write buffer handling a bit, making it more readable and a bit smaller. Also fixes an old corner case bug: writing data from address 0x0 (archos boot ROM dump) would have written wrong data.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18518 a1c6a512-1295-4272-9138-f99709370657
2008-09-15 06:45:17 +00:00
Jens Arnold
a3213118eb Simplify & fix the MMC driver. After more than 3 years I found that the MMC specs were a bit misleading, and the 'large' MMC which state a block size of 1024 or 2048 bytes and no partial read and/or partial write capability are happily accepting a block size of 512 bytes. So go KISS and remove all the variable/partial block handling code. This fixes the driver for the Transcend 4GB MMCplus, which doesn't cope when we actually set the 2048 byte block size it states. It also makes write operations involving small blocks faster and more reliable. * Note: The 4GB Transcend still doesn't work when plugged at boot, but works when hotplugged.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18517 a1c6a512-1295-4272-9138-f99709370657
2008-09-15 06:44:04 +00:00
Jens Arnold
f7412c178f iPod Video: Fix playback after recording (FS #7402). Implement recording gain adjustment. * Enable timeout for zero-crossing detection (SLOWCLK), avoids hanging volume/ gain due to DC offsets.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18510 a1c6a512-1295-4272-9138-f99709370657
2008-09-13 19:47:34 +00:00
Peter D'Hoye
d484c362f9 Updated screenshot for H10-5GB recording screen, the previous one was showing an illegal gain value
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18507 a1c6a512-1295-4272-9138-f99709370657
2008-09-13 10:32:02 +00:00
Frank Gevaerts
ef18bf1d24 fix out-of-bounds array access
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18502 a1c6a512-1295-4272-9138-f99709370657
2008-09-12 19:21:41 +00:00
Frank Gevaerts
2c7d012bb4 replace 2.5 references with 3.0 in the manual, and add an option to differentiate between released and unreleased ports
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18501 a1c6a512-1295-4272-9138-f99709370657
2008-09-12 18:19:41 +00:00
Frank Gevaerts
a411b98406 remove the "DRAFT VERSION" watermark from the release manual
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18500 a1c6a512-1295-4272-9138-f99709370657
2008-09-12 17:26:39 +00:00
Dominik Wenger
2641b2be5a rbutil: commit japanese translation by Yoshihisa Uchida.(FS#9393)
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18494 a1c6a512-1295-4272-9138-f99709370657
2008-09-11 15:51:15 +00:00
Jens Arnold
079043fa3e iPod G4, Color/Photo and Nano audio driver rework: Fix playback after recording (FS #7402). Implement recording gain adjustment. * Fix slightly off Bass/Treble scale.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18491 a1c6a512-1295-4272-9138-f99709370657
2008-09-11 00:03:02 +00:00
Peter D'Hoye
8739c8bb96 backport ipod keymap fix for recording screen (r18484)
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18488 a1c6a512-1295-4272-9138-f99709370657
2008-09-10 20:20:10 +00:00
Dominik Wenger
0a46feac31 rbutil: commit hebrew by Tomer Shalev
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18486 a1c6a512-1295-4272-9138-f99709370657
2008-09-10 20:12:02 +00:00
Marianne Arnold
af12ff8c45 Disable the pacbox chapter for the c200 manual.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18477 a1c6a512-1295-4272-9138-f99709370657
2008-09-09 19:06:29 +00:00
Marianne Arnold
5065b67841 Fix manuals (some of them were broken by r18469) by using the correct button macros. Also add additional 'fly' buttons to the button table where they exist.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18474 a1c6a512-1295-4272-9138-f99709370657
2008-09-09 01:38:28 +00:00
Robert Menes
bb9550e6b7 A little fix in wording; thanks to Marc Guay for pointing it out (and for committing it in the main trunk!).
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18472 a1c6a512-1295-4272-9138-f99709370657
2008-09-09 01:01:50 +00:00
Robert Menes
fcfce9427c Some more manual work: new plugin description for Chopper. Also updated disktidy description, and moved dice to "Games" where it belongs.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18471 a1c6a512-1295-4272-9138-f99709370657
2008-09-09 00:55:23 +00:00
Marianne Arnold
8d73dccadd Update the OndioFM's WRS screenshot too.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18467 a1c6a512-1295-4272-9138-f99709370657
2008-09-08 23:03:44 +00:00
Frank Gevaerts
addb14c304 don't build spacerocks for the release, due to FS#8926 and FS#9380
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18463 a1c6a512-1295-4272-9138-f99709370657
2008-09-08 19:51:37 +00:00
Martin Arver
501e852bda update recorder screenshot
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18462 a1c6a512-1295-4272-9138-f99709370657
2008-09-08 19:25:31 +00:00
Peter D'Hoye
2598c5b94d add fix from r18441 to 3.0 as well: Change screens members char_width, char_height and nb_lines to functions returning a calculated value. Fixes FS #9361 because the values were calculated based on sysfont, not the user selected font.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18460 a1c6a512-1295-4272-9138-f99709370657
2008-09-08 19:05:08 +00:00
Frank Gevaerts
4441482abd disable metronome for c200, player and ondio since it doesn't work (also disable it in the manual for those)
don't include md5sum in the manual


git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18459 a1c6a512-1295-4272-9138-f99709370657
2008-09-08 18:48:44 +00:00
Martin Arver
4081bbe50a update screenshots of wrs, and add a missing one
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18458 a1c6a512-1295-4272-9138-f99709370657
2008-09-08 18:15:51 +00:00
Nicolas Pennequin
67f560541d Merge r18454 from trunk:
Some bug fixes for PictureFlow by Thomas Martitz: Mistitled zoom setting, FPS setting not saved, FPS overlapping tracklist, tracklist not refreshing and tracklist missing one song.


git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18456 a1c6a512-1295-4272-9138-f99709370657
2008-09-08 17:55:47 +00:00
Frank Gevaerts
68ca28f6dc Don't build md5sum. By default it md5s the entire disk which takes very long (>10min) and is not interruptable, which isn't acceptable in a release
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18453 a1c6a512-1295-4272-9138-f99709370657
2008-09-08 16:47:56 +00:00
Frank Gevaerts
274507e5f8 apply the fix for FS#8641. Applied to 3.0 because this is a crash bug and the fix is obviously correct
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18452 a1c6a512-1295-4272-9138-f99709370657
2008-09-08 15:18:16 +00:00
Jonas Häggqvist
62f282cf08 Language updates:
- Catalan by Víctor Zabalza (FS#9345)
 - Spanish by Francisco Vila (FS#9366)


git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18436 a1c6a512-1295-4272-9138-f99709370657
2008-09-07 11:43:51 +00:00
Robert Menes
0de035391a Correct a minor error in wording.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18432 a1c6a512-1295-4272-9138-f99709370657
2008-09-06 01:37:16 +00:00
Robert Menes
5f5505daec My first proper commit: some manual fixes to properly describe shutting down and starting the iPod 1st, 2nd, and 3rd generations, and removed some old bootloader information which is no longer valid. This should bring the manuals for these iPods more up to date.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18430 a1c6a512-1295-4272-9138-f99709370657
2008-09-06 01:12:47 +00:00
Robert Menes
05b5dd5604 Welcome Robert Menes as Committer #64!
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18428 a1c6a512-1295-4272-9138-f99709370657
2008-09-06 00:10:08 +00:00
Nicolas Pennequin
40f591a026 Merge r18419 and r18421 from trunk:
Fix the bug reported in FS#9350: the WPS would crash on %mm or %cf if they weren't in conditionals, and make %mm 0-based again (as described in CustomWPS) and change %cf accordingly.


git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18427 a1c6a512-1295-4272-9138-f99709370657
2008-09-05 22:53:03 +00:00
Frank Gevaerts
d74b737d63 merge r18423 from trunk
Adds descriptions to the manual for the iPod 1st, 2nd, and 3rd generations, and fixes some problems with the nano and Sansa c200 manuals (FS#9367 by Robert Menes)



git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18425 a1c6a512-1295-4272-9138-f99709370657
2008-09-05 18:59:01 +00:00
Marianne Arnold
21fe142a9f C200: Also flip the function of the volume buttons when display flip is enabled. I think it is more consistent, especially when thinking of cases where these buttons are used for something else (e.g. left/right in brickmania). Taken from FS#8393 by Volker Mische - add him to CREDITS too.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18419 a1c6a512-1295-4272-9138-f99709370657
2008-09-04 21:19:09 +00:00
Frank Gevaerts
9d300cb3cf remove the "reconnect usb storage" debug menu for the release
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18417 a1c6a512-1295-4272-9138-f99709370657
2008-09-04 20:57:58 +00:00
Jonas Häggqvist
e1cee4e671 Correct the number in the CHARS line to match the actual number of chars.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18410 a1c6a512-1295-4272-9138-f99709370657
2008-09-04 17:31:20 +00:00
Steve Bavin
2a85965ee4 Fix 3.0 building on Cygwin (and maybe other places where sh is used).
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18406 a1c6a512-1295-4272-9138-f99709370657
2008-09-04 10:00:40 +00:00
Jens Arnold
c4703a1ecc Fix width of the '1' to be the same as the width of the other digits. Fixes the last part of FS #2918.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18401 a1c6a512-1295-4272-9138-f99709370657
2008-09-03 20:19:05 +00:00
Jens Arnold
0353f6c206 Fix default font names in the settings code (FS #9358 by Thomas Schott).
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18398 a1c6a512-1295-4272-9138-f99709370657
2008-09-03 17:50:52 +00:00
Daniel Stenberg
3a4a9d846d reverted the VERSION change and instead added 3.0 RC in the generated string for
now, do the VERSION thing immediately before final release instead


git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18394 a1c6a512-1295-4272-9138-f99709370657
2008-09-03 09:21:04 +00:00
Daniel Stenberg
6be002a1f0 this is (to become) 3.0!
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18393 a1c6a512-1295-4272-9138-f99709370657
2008-09-03 09:15:53 +00:00
Daniel Stenberg
d224e6ac60 creating the branch to prepare for the 3.0 release
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_0@18392 a1c6a512-1295-4272-9138-f99709370657
2008-09-03 09:08:37 +00:00
226 changed files with 9524 additions and 3248 deletions

View file

@ -194,7 +194,7 @@ $(BUILDDIR)/$(BINARY) : $(OBJS) $(DEPFILE) $(BUILDDIR)/libsim.a \
endif
$(BUILDDIR)/rockbox.ucl: $(OBJDIR)/rockbox.bin
$(call PRINTS,UCLPACK rockbox)$(TOOLSDIR)/uclpack --best --2e $< $@ >/dev/null 2>&1
$(call PRINTS,UCLPACK rockbox)$(TOOLSDIR)/uclpack --best --2e -b1048576 $< $@ >/dev/null 2>&1
$(BUILDDIR)/rombox.ucl: $(OBJDIR)/rombox.bin $(MAXOUTFILE)
$(call PRINTS,UCLPACK rombox)$(TOOLSDIR)/uclpack --none $< $@ >/dev/null 2>&1; \

View file

@ -1784,11 +1784,7 @@ static int disk_callback(int btn, struct gui_synclist *lists)
CARDTYPE " v%s", temp < 5 ?
spec_vers[temp] : "?.?");
simplelist_addline(SIMPLELIST_ADD_LINE,
"Blocks: 0x%06lx", card->numblocks);
simplelist_addline(SIMPLELIST_ADD_LINE,
"Blksz.: %d P:%c%c", card->blocksize,
card_extract_bits(card->csd, 48, 1) ? 'R' : '-',
card_extract_bits(card->csd, 106, 1) ? 'W' : '-');
"Blocks: 0x%08lx", card->numblocks);
output_dyn_value(pbuf, sizeof pbuf, card->speed / 1000,
kbit_units, false);
simplelist_addline(SIMPLELIST_ADD_LINE,
@ -2402,15 +2398,6 @@ static bool logf_usb_serial(void)
}
#endif
#if defined(HAVE_USBSTACK) && defined(USB_STORAGE)
static bool usb_reconnect(void)
{
splash(HZ, "Reconnect mass storage");
usb_storage_reconnect();
return false;
}
#endif
#if CONFIG_USBOTG == USBOTG_ISP1583
extern int dbg_usb_num_items(void);
extern char* dbg_usb_item(int selected_item, void *data, char *buffer, size_t buffer_len);
@ -2547,9 +2534,6 @@ static const struct the_menu_item menuitems[] = {
#if defined(HAVE_USBSTACK) && defined(ROCKBOX_HAS_LOGF) && defined(USB_SERIAL)
{"logf over usb",logf_usb_serial },
#endif
#if defined(HAVE_USBSTACK) && defined(USB_STORAGE)
{"reconnect usb storage",usb_reconnect},
#endif
#ifdef CPU_BOOST_LOGGING
{"cpu_boost log",cpu_boost_log},
#endif

View file

@ -51,13 +51,13 @@ void list_draw(struct screen *display, struct viewport *parent,
int i;
int lines;
int start, end;
display->set_viewport(NULL);
lines = display->nb_lines;
lines = display->getnblines();
display->clear_display();
start = 0;
end = display->nb_lines;
end = display->getnblines();
gui_list->last_displayed_start_item[display->screen_type] =
gui_list->start_item[display->screen_type];

View file

@ -158,11 +158,12 @@ static void draw_screen(struct screen *display, char *title,
enough to display the selected slider - calculate total height
of display with three sliders present */
display_three_rows =
display->getheight() >= MARGIN_TOP +
display->char_height*4 + /* Title + 3 sliders */
TITLE_MARGIN_BOTTOM +
SELECTOR_TB_MARGIN*6 + /* 2 margins/slider */
MARGIN_BOTTOM;
display->getheight() >=
MARGIN_TOP +
display->getcharheight()*4 + /* Title + 3 sliders */
TITLE_MARGIN_BOTTOM +
SELECTOR_TB_MARGIN*6 + /* 2 margins/slider */
MARGIN_BOTTOM;
/* Figure out widest label character in case they vary -
this function assumes labels are one character */
@ -185,8 +186,8 @@ static void draw_screen(struct screen *display, char *title,
slider_left = MARGIN_LEFT + SELECTOR_WIDTH + SELECTOR_LR_MARGIN +
max_label_width + SLIDER_MARGIN_LEFT;
slider_width = display->getwidth() - slider_left - SLIDER_MARGIN_RIGHT -
display->char_width*2 - SELECTOR_LR_MARGIN - SELECTOR_WIDTH -
MARGIN_RIGHT;
display->getcharwidth()*2 - SELECTOR_LR_MARGIN -
SELECTOR_WIDTH - MARGIN_RIGHT;
for (i = 0; i < 3; i++)
{
@ -209,7 +210,7 @@ static void draw_screen(struct screen *display, char *title,
display->fillrect(0,
text_top - SELECTOR_TB_MARGIN,
display->getwidth(),
display->char_height +
display->getcharheight() +
SELECTOR_TB_MARGIN*2);
if (display->depth < 16)
@ -221,7 +222,7 @@ static void draw_screen(struct screen *display, char *title,
else if (display_three_rows)
{
/* Draw "> <" around sliders */
int top = text_top + (display->char_height -
int top = text_top + (display->getcharheight() -
SELECTOR_HEIGHT) / 2;
screen_put_iconxy(display, MARGIN_LEFT, top, Icon_Cursor);
screen_put_iconxy(display,
@ -244,7 +245,7 @@ static void draw_screen(struct screen *display, char *title,
/* Draw label */
buf[0] = str(LANG_COLOR_RGB_LABELS)[i];
buf[1] = '\0';
display->putsxy(slider_left - display->char_width -
display->putsxy(slider_left - display->getcharwidth() -
SLIDER_MARGIN_LEFT, text_top, buf);
/* Draw color value */
@ -255,24 +256,21 @@ static void draw_screen(struct screen *display, char *title,
/* Draw scrollbar */
gui_scrollbar_draw(display,
slider_left,
text_top + display->char_height / 4,
text_top + display->getcharheight() / 4,
slider_width,
display->char_height / 2,
display->getcharheight() / 2,
rgb_max[i],
0,
rgb->rgb_val[i],
sb_flags);
/* Advance to next line */
text_top += display->char_height + 2*SELECTOR_TB_MARGIN;
text_top += display->getcharheight() + 2*SELECTOR_TB_MARGIN;
if (!display_three_rows)
break;
} /* end for */
/* Draw color value in system font */
display->setfont(FONT_SYSFIXED);
/* Format RGB: #rrggbb */
snprintf(buf, sizeof(buf), str(LANG_COLOR_RGB_VALUE),
rgb->red, rgb->green, rgb->blue);
@ -287,7 +285,7 @@ static void draw_screen(struct screen *display, char *title,
int height = display->getheight() - top - MARGIN_BOTTOM;
/* Only draw if room */
if (height >= display->char_height + 2)
if (height >= display->getcharheight() + 2)
{
display->set_foreground(rgb->color);
display->fillrect(left, top, width, height);
@ -342,7 +340,7 @@ static int touchscreen_slider(struct rgb_pick *rgb, int *selected_slider)
struct screen *display = &screens[SCREEN_MAIN];
int pressed_slider;
char buf[2];
if (button == BUTTON_NONE)
return ACTION_NONE;
/* same logic as draw_screen */
@ -357,25 +355,27 @@ static int touchscreen_slider(struct rgb_pick *rgb, int *selected_slider)
max_label_width = x1;
}
/* Get slider positions and top starting position */
text_top = MARGIN_TOP + display->char_height + TITLE_MARGIN_BOTTOM + SELECTOR_TB_MARGIN;
text_top = MARGIN_TOP + display->getcharheight() + TITLE_MARGIN_BOTTOM +
SELECTOR_TB_MARGIN;
slider_left = MARGIN_LEFT + SELECTOR_WIDTH + SELECTOR_LR_MARGIN +
max_label_width + SLIDER_MARGIN_LEFT;
slider_width = display->getwidth() - slider_left - SLIDER_MARGIN_RIGHT -
display->char_width*2 - SELECTOR_LR_MARGIN - SELECTOR_WIDTH -
MARGIN_RIGHT;
display->getcharwidth()*2 - SELECTOR_LR_MARGIN -
SELECTOR_WIDTH - MARGIN_RIGHT;
display_three_rows =
display->getheight() >= MARGIN_TOP +
display->char_height*4 + /* Title + 3 sliders */
TITLE_MARGIN_BOTTOM +
SELECTOR_TB_MARGIN*6 + /* 2 margins/slider */
MARGIN_BOTTOM;
if (y < MARGIN_TOP+display->char_height)
display->getheight() >=
MARGIN_TOP +
display->getcharheight()*4 + /* Title + 3 sliders */
TITLE_MARGIN_BOTTOM +
SELECTOR_TB_MARGIN*6 + /* 2 margins/slider */
MARGIN_BOTTOM;
if (y < MARGIN_TOP+display->getcharheight())
{
if (button == BUTTON_REL)
return ACTION_STD_CANCEL;
}
y -= text_top;
pressed_slider = y/display->char_height;
pressed_slider = y/display->getcharheight();
if (pressed_slider > (display_three_rows?2:0))
{
if (button == BUTTON_REL)

View file

@ -1138,12 +1138,12 @@ static char *get_token_value(struct gui_wps *gwps,
case WPS_TOKEN_REPEAT_MODE:
if (intval)
*intval = global_settings.repeat_mode + 1;
snprintf(buf, buf_size, "%d", *intval);
snprintf(buf, buf_size, "%d", global_settings.repeat_mode);
return buf;
case WPS_TOKEN_RTC_12HOUR_CFG:
if (intval)
*intval = global_settings.timeformat + 1;
snprintf(buf, buf_size, "%d", *intval);
snprintf(buf, buf_size, "%d", global_settings.timeformat);
return buf;
#if CONFIG_RTC
case WPS_TOKEN_RTC_DAY_OF_MONTH:

View file

@ -60,12 +60,12 @@ static void pitch_screen_draw(struct screen *display, int pitch, int pitch_mode)
display->clear_display();
if (display->nb_lines < 4) /* very small screen, just show the pitch value */
if (display->getnblines() < 4) /* very small screen, just show pitch value*/
{
w = snprintf((char *)buf, sizeof(buf), "%s: %d.%d%%",str(LANG_PITCH),
pitch / 10, pitch % 10 );
display->putsxy((display->lcdwidth-(w*display->char_width))/2,
display->nb_lines/2,buf);
display->putsxy((display->lcdwidth-(w*display->getcharwidth()))/2,
display->getnblines()/2,buf);
}
else /* bigger screen, show everything... */
{
@ -242,7 +242,7 @@ bool pitch_screen(void)
nudged = (new_pitch != pitch);
pitch = new_pitch;
break;
case ACTION_PS_NUDGE_LEFTOFF:
if (nudged) {
pitch = pitch_increase(pitch, PITCH_NUDGE_DELTA, false);
@ -268,7 +268,7 @@ bool pitch_screen(void)
return 1;
break;
}
if(delta)
{
if (pitch_mode == PITCH_MODE_ABSOLUTE) {
@ -276,10 +276,10 @@ bool pitch_screen(void)
} else {
pitch = pitch_increase_semitone(pitch, delta > 0 ? true:false);
}
delta = 0;
}
}
#if CONFIG_CODEC == SWCODEC
pcmbuf_set_low_latency(false);

View file

@ -207,7 +207,7 @@ static void gui_quickscreen_draw(struct gui_quickscreen *qs,
value = option_get_valuestring((struct settings_list*)qs->items[i],
buf, MAX_PATH, temp);
if (vps[screen][i].height < display->char_height*2)
if (vps[screen][i].height < display->getcharheight()*2)
{
char text[MAX_PATH];
snprintf(text, MAX_PATH, "%s: %s", title, value);

View file

@ -178,10 +178,10 @@ const struct button_mapping button_context_recscreen[] = {
{ ACTION_STD_NEXT, BUTTON_SCROLL_FWD|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_STD_PREV, BUTTON_SCROLL_BACK, BUTTON_NONE },
{ ACTION_STD_PREV, BUTTON_SCROLL_BACK|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_SETTINGS_INC, BUTTON_LEFT, BUTTON_NONE },
{ ACTION_SETTINGS_INCREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_SETTINGS_DEC, BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_SETTINGS_DECREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_SETTINGS_INCREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE },
{ ACTION_SETTINGS_DECREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_recscreen */

View file

@ -125,7 +125,7 @@
*: "Guany"
</dest>
<voice>
*: "Gain"
*: "Guany"
</voice>
</phrase>
<phrase>
@ -220,10 +220,10 @@
*: "Failed"
</source>
<dest>
*: "Fallada"
*: "ha fallat"
</dest>
<voice>
*: "Fallada"
*: "ha fallat"
</voice>
</phrase>
<phrase>
@ -845,11 +845,11 @@
</source>
<dest>
*: none
swcodec: "Cross Gain"
swcodec: "Guany Creuat"
</dest>
<voice>
*: none
swcodec: "Cross Gain"
swcodec: "Guany Creuat"
</voice>
</phrase>
<phrase>
@ -1047,11 +1047,11 @@
</source>
<dest>
*: none
swcodec: "%d Hz Band Gain"
swcodec: "Guany Banda %d Hz"
</dest>
<voice>
*: none
swcodec: "hertz band gain"
swcodec: "hertz guany banda"
</voice>
</phrase>
<phrase>
@ -1064,11 +1064,11 @@
</source>
<dest>
*: none
swcodec: "Low Shelf Filter"
swcodec: "Filtre nivell baix"
</dest>
<voice>
*: none
swcodec: "Low Shelf Filter"
swcodec: "Filtre nivell baix"
</voice>
</phrase>
<phrase>
@ -1081,11 +1081,11 @@
</source>
<dest>
*: none
swcodec: "Peak Filter %d"
swcodec: "Filtre passabanda %d"
</dest>
<voice>
*: none
swcodec: "Peak Filter"
swcodec: "Filtre passabanda"
</voice>
</phrase>
<phrase>
@ -1098,11 +1098,11 @@
</source>
<dest>
*: none
swcodec: "High Shelf Filter"
swcodec: "Filtre nivell alt"
</dest>
<voice>
*: none
swcodec: "High Shelf Filter"
swcodec: "Filtre nivell alt"
</voice>
</phrase>
<phrase>
@ -1602,10 +1602,10 @@
*: "Party Mode"
</source>
<dest>
*: "Party Mode"
*: "Mode Festa"
</dest>
<voice>
*: "Party Mode"
*: "Mode Festa"
</voice>
</phrase>
<phrase>
@ -1831,10 +1831,10 @@
*: "Replaygain Type"
</source>
<dest>
*: "Replaygain Type"
*: "Tipus de Replaygain"
</dest>
<voice>
*: "Replaygain Type"
*: "Tipus de Replaygain"
</voice>
</phrase>
<phrase>
@ -1845,10 +1845,10 @@
*: "Album Gain"
</source>
<dest>
*: "Album Gain"
*: "Guany d'Àlbum"
</dest>
<voice>
*: "Album Gain"
*: "Guany d'Àlbum"
</voice>
</phrase>
<phrase>
@ -1859,10 +1859,10 @@
*: "Track Gain"
</source>
<dest>
*: "Track Gain"
*: "Guany de pista"
</dest>
<voice>
*: "Track Gain"
*: "Guany de pista"
</voice>
</phrase>
<phrase>
@ -1873,10 +1873,10 @@
*: "Track Gain if Shuffling"
</source>
<dest>
*: "Track Gain if Shuffling"
*: "Guany de pista en mode aleatori"
</dest>
<voice>
*: "Track Gain if Shuffling"
*: "Guany de pista en mode aleatori"
</voice>
</phrase>
<phrase>
@ -1890,7 +1890,7 @@
*: "Pre-amp"
</dest>
<voice>
*: "Preamp"
*: "Preamplificació"
</voice>
</phrase>
<phrase>
@ -1980,7 +1980,7 @@
</phrase>
<phrase>
id: LANG_ID3_ORDER
desc: DEPRECATED
desc: DEPRECATED
user:
<source>
*: ""
@ -1994,7 +1994,7 @@
</phrase>
<phrase>
id: LANG_ID3_V1_FIRST
desc: DEPRECATED
desc: DEPRECATED
user:
<source>
*: ""
@ -2008,7 +2008,7 @@
</phrase>
<phrase>
id: LANG_ID3_V2_FIRST
desc: DEPRECATED
desc: DEPRECATED
user:
<source>
*: ""
@ -2056,10 +2056,10 @@
*: "Last.fm Log"
</source>
<dest>
*: "Last.fm Log"
*: "Registre Last.fm"
</dest>
<voice>
*: "Last.fm Log"
*: "Registre Last.fm"
</voice>
</phrase>
<phrase>
@ -2070,10 +2070,10 @@
*: "Cuesheet Support"
</source>
<dest>
*: "Cuesheet Support"
*: "Suport Cuesheet"
</dest>
<voice>
*: "Cuesheet Support"
*: "Suport Cuesheet"
</voice>
</phrase>
<phrase>
@ -2120,11 +2120,11 @@
</source>
<dest>
*: none
headphone_detection: "Duration to Rewind"
headphone_detection: "Durada a rebobinar"
</dest>
<voice>
*: none
headphone_detection: "Duration to Rewind"
headphone_detection: "Durada a rebobinar"
</voice>
</phrase>
<phrase>
@ -2474,7 +2474,7 @@
*: "Importar Modificacions"
</dest>
<voice>
*: "Import Modifications"
*: "Importar Modificacions"
</voice>
</phrase>
<phrase>
@ -2485,10 +2485,10 @@
*: "Updating in background"
</source>
<dest>
*: "Updating in background"
*: "Actualitzant en segon plà"
</dest>
<voice>
*: "Updating in background"
*: "Actualitzant en segon plà"
</voice>
</phrase>
<phrase>
@ -2592,6 +2592,7 @@
</dest>
<voice>
*: none
remote: "Veure fitxers wps remot"
</voice>
</phrase>
<phrase>
@ -2975,7 +2976,7 @@
desc: in color screen
user:
<source>
*: none
*: none
lcd_color: "RGB: %02X%02X%02X"
</source>
<dest>
@ -2992,7 +2993,7 @@
desc: splash when user selects an invalid colour
user:
<source>
*: none
*: none
lcd_non-mono: "Invalid colour"
</source>
<dest>
@ -3217,10 +3218,10 @@
*: "Screen Scrolls Out Of View"
</source>
<dest>
*: "Screen Scrolls Out Of View"
*: "Desplaçament fora de la pantalla"
</dest>
<voice>
*: "Screen Scrolls Out Of View"
*: "Desplaçament fora de la pantalla"
</voice>
</phrase>
<phrase>
@ -3245,10 +3246,10 @@
*: "Paged Scrolling"
</source>
<dest>
*: "Paged Scrolling"
*: "Desplaçament per pàgines"
</dest>
<voice>
*: "Paged scrolling"
*: "Desplaçament per pàgines"
</voice>
</phrase>
<phrase>
@ -3260,11 +3261,11 @@
scrollwheel: none
</source>
<dest>
*: "List Acceleration Start Delay"
*: "Retard abans d'acceleració de llista"
scrollwheel: none
</dest>
<voice>
*: "List Acceleration Start Delay"
*: "Retard abans d'acceleració de llista"
scrollwheel: none
</voice>
</phrase>
@ -3277,11 +3278,11 @@
scrollwheel: none
</source>
<dest>
*: "List Acceleration Speed"
*: "Velocitat d'acceleració"
scrollwheel: none
</dest>
<voice>
*: "List Acceleration Speed"
*: "Velocitat d'acceleració"
scrollwheel: none
</voice>
</phrase>
@ -3611,10 +3612,10 @@
*: "Default Codepage"
</source>
<dest>
*: "Default Codepage"
*: "Codificació per defecte"
</dest>
<voice>
*: "Default codepage"
*: "Codificació per defecte"
</voice>
</phrase>
<phrase>
@ -3748,11 +3749,11 @@
</source>
<dest>
*: none
lcd_bitmap: "Japanese (SJIS)"
lcd_bitmap: "Japonés (SJIS)"
</dest>
<voice>
*: none
lcd_bitmap: "Japanese"
lcd_bitmap: "Japonés"
</voice>
</phrase>
<phrase>
@ -4057,7 +4058,7 @@
</dest>
<voice>
*: none
rtc: "Set Time and Date"
rtc: "Posar Hora/Data"
</voice>
</phrase>
<phrase>
@ -5152,11 +5153,11 @@
</source>
<dest>
*: none
radio: "No presets"
radio: "Cap presintonia"
</dest>
<voice>
*: none
radio: "No presets"
radio: "Cap presintonia"
</voice>
</phrase>
<phrase>
@ -5390,11 +5391,11 @@
</source>
<dest>
*: none
radio: "Auto-Scan Presets"
radio: "Auto-Escanejar Presintonies"
</dest>
<voice>
*: none
radio: "Auto-Scan Presets"
radio: "Auto-Escanejar Presintonies"
</voice>
</phrase>
<phrase>
@ -5424,7 +5425,7 @@
</source>
<dest>
*: none
radio: "Scanning %d.%01dMHz"
radio: "Escanejant %d.%02d MHz"
</dest>
<voice>
*: none
@ -5441,7 +5442,7 @@
</source>
<dest>
*: none
radio: "%d.%01dMHz"
radio: "%d.%02d MHz"
</dest>
<voice>
*: none
@ -5457,11 +5458,11 @@
</source>
<dest>
*: none
radio: "Scan"
radio: "Escanejar"
</dest>
<voice>
*: none
radio: "Scan"
radio: "Escanejar"
</voice>
</phrase>
<phrase>
@ -5784,7 +5785,7 @@
</dest>
<voice>
*: none
recording: "No settings available"
recording: "Sense preferències"
</voice>
</phrase>
<phrase>
@ -5953,11 +5954,11 @@
</source>
<dest>
*: none
recording: "Split Measure"
recording: "Mesura de separació"
</dest>
<voice>
*: none
recording: "Split Measure"
recording: "Mesura de separació"
</voice>
</phrase>
<phrase>
@ -6242,11 +6243,11 @@
</source>
<dest>
*: none
recording: "Trigger"
recording: "Disparador"
</dest>
<voice>
*: none
recording: "Trigger"
recording: "Disparador"
</voice>
</phrase>
<phrase>
@ -6276,11 +6277,11 @@
</source>
<dest>
*: none
recording: "Trigtype"
recording: "Tipus disp."
</dest>
<voice>
*: none
recording: "Trigtype"
recording: "Tipus disparador"
</voice>
</phrase>
<phrase>
@ -6463,11 +6464,11 @@
</source>
<dest>
*: none
agc: "Safety (clip)"
agc: "Seguretat (trunca)"
</dest>
<voice>
*: none
agc: "Safety (clip)"
agc: "Seguretat (trunca)"
</voice>
</phrase>
<phrase>
@ -6480,11 +6481,11 @@
</source>
<dest>
*: none
agc: "Live (slow)"
agc: "Directe (lent)"
</dest>
<voice>
*: none
agc: "Live (slow)"
agc: "Directe (lent)"
</voice>
</phrase>
<phrase>
@ -6497,11 +6498,11 @@
</source>
<dest>
*: none
agc: "DJ-Set (slow)"
agc: "DJ-Set (lent)"
</dest>
<voice>
*: none
agc: "DJ set (slow)"
agc: "DJ set (lent)"
</voice>
</phrase>
<phrase>
@ -6514,11 +6515,11 @@
</source>
<dest>
*: none
agc: "Medium"
agc: "Mitjà"
</dest>
<voice>
*: none
agc: "Medium"
agc: "Mitjà"
</voice>
</phrase>
<phrase>
@ -6531,11 +6532,11 @@
</source>
<dest>
*: none
agc: "Voice (fast)"
agc: "Veu (ràpid)"
</dest>
<voice>
*: none
agc: "Voice (fast)"
agc: "Veu (ràpid)"
</voice>
</phrase>
<phrase>
@ -6582,11 +6583,11 @@
</source>
<dest>
*: none
remote: "(Vol- : Re-enable)"
remote: "(Vol- : Engegar)"
</dest>
<voice>
*: none
remote: "(Vol- : Re-enable)"
remote: "(Vol- : Engegar)"
</voice>
</phrase>
<phrase>
@ -6726,7 +6727,7 @@
*: "Desades %d Pistes (%s)"
</dest>
<voice>
*: "tracks saved"
*: "pistes desades"
</voice>
</phrase>
<phrase>
@ -6839,11 +6840,11 @@
player: "Buf:"
</source>
<dest>
*: "Buffer: %d.%03dMB"
player: "Buf: %d.%03dMB"
*: "Buffer:"
player: "Buf:"
</dest>
<voice>
*: ""
*: "Mida de Buffer"
player: ""
</voice>
</phrase>
@ -6859,7 +6860,7 @@
<dest>
*: "Bateria: %d%% %dh %dm"
player,recorder,fmrecorder,recorderv2,ondio*,ifp7xx: "%d%% %dh %dm"
h10,ipodmini,ipodmini2g: "Batt: %d%% %dh %dm"
h10,ipodmini,ipodmini2g: "Bat: %d%% %dh %dm"
</dest>
<voice>
*: "Nivell de batería"
@ -6876,7 +6877,7 @@
*: "Disc:"
</dest>
<voice>
*: ""
*: "Mida de disc"
</voice>
</phrase>
<phrase>
@ -6983,7 +6984,7 @@
*: "Temps màxim"
</dest>
<voice>
*: "Top Time"
*: "Temps màxim"
</voice>
</phrase>
<phrase>
@ -7151,7 +7152,7 @@
*: "Reproduir Següent"
</dest>
<voice>
*: "Play Next"
*: "Reproduir Següent"
</voice>
</phrase>
<phrase>
@ -7165,7 +7166,7 @@
*: "Afegides %d Pistes (%s)"
</dest>
<voice>
*: "tracks inserted"
*: "pistes afegides"
</voice>
</phrase>
<phrase>
@ -7179,7 +7180,7 @@
*: "En cua %d Pistes (%s)"
</dest>
<voice>
*: ""
*: "pistes en cua"
</voice>
</phrase>
<phrase>
@ -7291,7 +7292,7 @@
*: "%s no existeix"
</dest>
<voice>
*: ""
*: "El directori no existeix"
</voice>
</phrase>
<phrase>
@ -7386,10 +7387,10 @@
*: "Browse Cuesheet"
</source>
<dest>
*: "Browse Cuesheet"
*: "Navegar per Cuesheet"
</dest>
<voice>
*: "Browse Cuesheet"
*: "Navegar per Cuesheet"
</voice>
</phrase>
<phrase>
@ -7400,10 +7401,10 @@
*: "Show Track Info"
</source>
<dest>
*: "Mostrar Info de Cançó"
*: "Mostrar Info de Pista"
</dest>
<voice>
*: "Mostrar Info de Cançó"
*: "Mostrar Info de Pista"
</voice>
</phrase>
<phrase>
@ -7610,7 +7611,7 @@
*: "[Track Gain]"
</source>
<dest>
*: "[Track Gain]"
*: "[Guany de pista]"
</dest>
<voice>
*: ""
@ -7795,7 +7796,7 @@
*: "Esborrant..."
</dest>
<voice>
*: "Deleting"
*: "Esborrant"
</voice>
</phrase>
<phrase>
@ -7836,11 +7837,11 @@
</source>
<dest>
*: none
lcd_non-mono: "Establir de fons"
lcd_non-mono: "Establir com fons"
</dest>
<voice>
*: none
lcd_non-mono: "Establir de fons"
lcd_non-mono: "Establir com fons"
</voice>
</phrase>
<phrase>
@ -7853,7 +7854,7 @@
</source>
<dest>
*: none
lcd_non-mono: "Backdrop Loaded"
lcd_non-mono: "Fons carregat"
</dest>
<voice>
*: none
@ -7870,7 +7871,7 @@
</source>
<dest>
*: none
lcd_non-mono: "Backdrop Failed"
lcd_non-mono: "Càrrega de Fons Fallida"
</dest>
<voice>
*: none
@ -7992,7 +7993,7 @@
</source>
<dest>
*: none
pitchscreen: "Semitone Up"
pitchscreen: "Semitó Amunt"
</dest>
<voice>
*: none
@ -8009,7 +8010,7 @@
</source>
<dest>
*: none
pitchscreen: "Semitone Down"
pitchscreen: "Semitó Avall"
</dest>
<voice>
*: none
@ -9432,7 +9433,7 @@
*: ""
</dest>
<voice>
*: "kilobits per second"
*: "kilobits per segon"
</voice>
</phrase>
<phrase>
@ -9981,7 +9982,7 @@
</dest>
<voice>
*: none
remote: "remote while-playing-screen"
remote: "pantalla de reproducció remota"
</voice>
</phrase>
<phrase>
@ -10040,7 +10041,7 @@
</dest>
<voice>
*: none
rtc: "Current time:"
rtc: "Hora actual:"
</voice>
</phrase>
<phrase>
@ -10142,7 +10143,7 @@
</dest>
<voice>
*: none
swcodec: "Cutoff Frequency"
swcodec: "Freqüència de tall"
</voice>
</phrase>
<phrase>
@ -10478,11 +10479,11 @@
</source>
<dest>
*: none
recording: "Stereo"
recording: "Estèreo"
</dest>
<voice>
*: none
recording: "Stereo"
recording: "Estèreo"
</voice>
</phrase>
<phrase>
@ -10563,11 +10564,11 @@
</source>
<dest>
*: none
recording: "Int. Mic"
recording: "Mic. Intern"
</dest>
<voice>
*: none
recording: "Internal Microphone"
recording: "Micròfon intern"
</voice>
</phrase>
<phrase>
@ -10631,11 +10632,11 @@
</source>
<dest>
*: none
recording: "Trigger"
recording: "Disparador"
</dest>
<voice>
*: none
recording: "Trigger"
recording: "Disparador"
</voice>
</phrase>
<phrase>
@ -10904,7 +10905,7 @@
*: ""
</dest>
<voice>
*: "of"
*: "de"
</voice>
</phrase>
<phrase>
@ -11084,7 +11085,7 @@
</dest>
<voice>
*: none
rtc: "oh"
rtc: "zero"
</voice>
</phrase>
<phrase>
@ -11148,11 +11149,11 @@
</source>
<dest>
*: none
usbstack: "Mode USB Stack"
usbstack: "Mode Stack USB"
</dest>
<voice>
*: none
usbstack: "Mode U S B Stack"
usbstack: "Mode Stack U S B"
</voice>
</phrase>
<phrase>
@ -11182,11 +11183,11 @@
</source>
<dest>
*: none
usbstack: "Host"
usbstack: "Hoste"
</dest>
<voice>
*: none
usbstack: "Host"
usbstack: "Hoste"
</voice>
</phrase>
<phrase>
@ -11546,11 +11547,11 @@
</source>
<dest>
*: none
accessory_supply: "Accessory Power Supply"
accessory_supply: "Font d'alimentació acc."
</dest>
<voice>
*: none
accessory_supply: "Accessory Power Supply"
accessory_supply: "Font d'alimentació accesoria"
</voice>
</phrase>
<phrase>
@ -11561,10 +11562,10 @@
*: "Unknown"
</source>
<dest>
*: "Unknown"
*: "Desconegut"
</dest>
<voice>
*: "Unknown"
*: "Desconegut"
</voice>
</phrase>
<phrase>
@ -11634,7 +11635,7 @@
*: ""
</dest>
<voice>
*: "Quick screen"
*: "Menú ràpid"
</voice>
</phrase>
<phrase>
@ -11661,11 +11662,11 @@
</source>
<dest>
*: none
recording: "Stop Recording And Shutdown"
recording: "Atura gravació i apaga"
</dest>
<voice>
*: none
recording: "Stop Recording And Shutdown"
recording: "Atura gravació i apaga"
</voice>
</phrase>
<phrase>
@ -11678,11 +11679,11 @@
</source>
<dest>
*: none
gigabeatf: "Touchpad Sensitivity"
gigabeatf: "Sensibilitat de Touchpad"
</dest>
<voice>
*: none
gigabeatf: "Touchpad Sensitivity"
gigabeatf: "Sensibilitat de Touchpad"
</voice>
</phrase>
<phrase>
@ -11766,10 +11767,10 @@
*: "Skip Length"
</source>
<dest>
*: "Skip Length"
*: "Llargada de salt"
</dest>
<voice>
*: "Skip Length"
*: "Llargada de salt"
</voice>
</phrase>
<phrase>
@ -11780,10 +11781,10 @@
*: "Skip Track"
</source>
<dest>
*: "Skip Track"
*: "Saltar Pista"
</dest>
<voice>
*: "Skip Track"
*: "Saltar Pista"
</voice>
</phrase>
<phrase>
@ -11810,11 +11811,11 @@
</source>
<dest>
*: none
recording: "Gain L"
recording: "Guany L"
</dest>
<voice>
*: none
recording: "Gain Left"
recording: "Guany Esquerra"
</voice>
</phrase>
<phrase>
@ -11827,11 +11828,11 @@
</source>
<dest>
*: none
recording: "Gain R"
recording: "Guany R"
</dest>
<voice>
*: none
recording: "Gain Right"
recording: "Guany Dreta"
</voice>
</phrase>
<phrase>
@ -11848,7 +11849,7 @@
</dest>
<voice>
*: none
agc: "Automatic gain control"
agc: "Control Automàtic de guany"
</voice>
</phrase>
<phrase>
@ -11861,11 +11862,11 @@
</source>
<dest>
*: none
agc: "AGC clip time"
agc: "AGC llargada truncació"
</dest>
<voice>
*: none
agc: "AGC clip time"
agc: "AGC llargada truncació"
</voice>
</phrase>
<phrase>
@ -11878,11 +11879,11 @@
</source>
<dest>
*: none
agc: "AGC max. gain"
agc: "AGC guany màxim"
</dest>
<voice>
*: none
agc: "AGC maximum gain"
agc: "AGC guany màxim"
</voice>
</phrase>
<phrase>
@ -11929,7 +11930,7 @@
</source>
<dest>
*: none
recording: "Split Time:"
recording: "Temps Separació:"
</dest>
<voice>
*: none

File diff suppressed because it is too large Load diff

View file

@ -294,10 +294,10 @@
*: "Plugins"
</source>
<dest>
*: "Plugin-filer"
*: "Programmer"
</dest>
<voice>
*: "Plugin-filer"
*: "Programmer"
</voice>
</phrase>
<phrase>
@ -921,10 +921,10 @@
*: "Shuffle"
</source>
<dest>
*: "Stokk om"
*: "Tilfeldig rekkefølge"
</dest>
<voice>
*: "Stokk om"
*: "Tilfeldig rekkefølge"
</voice>
</phrase>
<phrase>
@ -991,10 +991,10 @@
*: "Fast-Forward/Rewind"
</source>
<dest>
*: "Spol forover/bakover"
*: "Spoling"
</dest>
<voice>
*: "Spol forover/bakover"
*: "Spoling"
</voice>
</phrase>
<phrase>
@ -2198,7 +2198,7 @@
</source>
<dest>
*: none
recording: ""
recording: deprecated
</dest>
<voice>
*: none
@ -2230,10 +2230,10 @@
*: "FF/RW Min Step"
</source>
<dest>
*: "Minimum søkesteg"
*: "Minste spolesteg"
</dest>
<voice>
*: "Minimum søkesteg"
*: "Minste spolesteg"
</voice>
</phrase>
<phrase>
@ -2244,10 +2244,10 @@
*: "FF/RW Accel"
</source>
<dest>
*: "Søkeaksellerasjon"
*: "Spoleeaksellerasjon"
</dest>
<voice>
*: "Søkeaksellerasjon"
*: "Spoleaksellerasjon"
</voice>
</phrase>
<phrase>
@ -3949,15 +3949,15 @@
</phrase>
<phrase>
id: LANG_RECORDING_LEFT
desc: in the recording screen
desc: deprecated
user:
<source>
*: none
recording: "Gain Left"
recording: ""
</source>
<dest>
*: none
recording: "Forsterkning venstre"
recording: ""
</dest>
<voice>
*: none
@ -3966,15 +3966,15 @@
</phrase>
<phrase>
id: LANG_RECORDING_RIGHT
desc: in the recording screen
desc: deprecated
user:
<source>
*: none
recording: "Gain Right"
recording: ""
</source>
<dest>
*: none
recording: "Forsterkning høyre"
recording: ""
</dest>
<voice>
*: none
@ -5931,7 +5931,7 @@
*: ""
</source>
<dest>
*: ""
*: deprecated
</dest>
<voice>
*: ""
@ -6786,7 +6786,7 @@
*: "Program returnerte feil"
</dest>
<voice>
*: "Program returnerte feil"
*: ""
</voice>
</phrase>
<phrase>
@ -6797,10 +6797,10 @@
*: "Extension array full"
</source>
<dest>
*: "Filnavnendingsliste full"
*: "Filnavnendelsesliste full"
</dest>
<voice>
*: "Filnavnendingsliste full"
*: "Filnavnendelsesliste full"
</voice>
</phrase>
<phrase>
@ -7045,10 +7045,10 @@
*: "First Buttonpress Enables Backlight Only"
</source>
<dest>
*: "Det første tastetrykket slår bare på lyset"
*: "Første tastetrykk slår bare på lys"
</dest>
<voice>
*: "Det første tastetrykket slår bare på lyset"
*: "Første tastetrykk slår bare på lys"
</voice>
</phrase>
<phrase>
@ -7219,11 +7219,11 @@
</source>
<dest>
*: none
swcodec: "Høy knekkfrekvens"
swcodec: "Høyfrekvensgrense"
</dest>
<voice>
*: none
swcodec: "Høy knekkfrekvens"
swcodec: "Høyfrekvensgrense"
</voice>
</phrase>
<phrase>
@ -7920,36 +7920,36 @@
</phrase>
<phrase>
id: LANG_SYSFONT_OFF
desc: Used in a lot of places
desc: deprecated
user:
<source>
*: none
lcd_bitmap: "Off"
lcd_bitmap: ""
</source>
<dest>
*: none
lcd_bitmap: "Av"
lcd_bitmap: ""
</dest>
<voice>
*: none
lcd_bitmap: "Av"
lcd_bitmap: ""
</voice>
</phrase>
<phrase>
id: LANG_SYSFONT_VOLUME
desc: in sound_settings
desc: deprecated
user:
<source>
*: none
recording: "Volume"
recording: ""
</source>
<dest>
*: none
recording: "Volum"
recording: ""
</dest>
<voice>
*: none
recording: "Volum"
recording: ""
</voice>
</phrase>
<phrase>
@ -8277,15 +8277,15 @@
</phrase>
<phrase>
id: LANG_SYSFONT_RECORDING_TIME
desc: Display of recorded time
desc: deprecated
user:
<source>
*: none
recording: "Time:"
recording: ""
</source>
<dest>
*: none
recording: "Tid:"
recording: ""
</dest>
<voice>
*: none
@ -8294,15 +8294,15 @@
</phrase>
<phrase>
id: LANG_SYSFONT_RECORD_TIMESPLIT_REC
desc: Display of record timer interval setting, on the record screen
desc: deprecated
user:
<source>
*: none
recording: "Split Time:"
recording: ""
</source>
<dest>
*: none
recording: "Deletid:"
recording: ""
</dest>
<voice>
*: none
@ -8311,15 +8311,15 @@
</phrase>
<phrase>
id: LANG_SYSFONT_RECORDING_SIZE
desc: Display of recorded file size
desc: deprecated
user:
<source>
*: none
recording: "Size:"
recording: ""
</source>
<dest>
*: none
recording: "Størrelse:"
recording: ""
</dest>
<voice>
*: none
@ -8328,15 +8328,15 @@
</phrase>
<phrase>
id: LANG_SYSFONT_RECORD_PRERECORD
desc: in recording and radio screen
desc: deprecated
user:
<source>
*: none
recording: "Pre-Recording"
recording: ""
</source>
<dest>
*: none
recording: "Føropptak"
recording: ""
</dest>
<voice>
*: none
@ -8379,25 +8379,19 @@
</phrase>
<phrase>
id: LANG_SYSFONT_DISK_FULL
desc: in recording screen
desc: deprecated
user:
<source>
*: none
recording: "The disk is full. Press OFF to continue."
h100,h120,h300: "The disk is full. Press STOP to continue."
m5,x5,ipod4g,ipodcolor,ipodnano,ipodvideo,e200,c200: "The disk is full. Press LEFT to continue."
recording: ""
</source>
<dest>
*: none
recording: "Disken er full. Trykk OFF for å fortsette."
h100,h120,h300: "Disken er full. Trykk STOP for å fortsette."
m5,x5,ipod4g,ipodcolor,ipodnano,ipodvideo,e200,c200: "Disken er full. Trykk LEFT for å fortsette."
recording: ""
</dest>
<voice>
*: none
recording: ""
h100,h120,h300: ""
m5,x5,ipod4g,ipodcolor,ipodnano,ipodvideo,e200,c200: ""
recording,h100,h120,h300,m5,x5,ipod4g,ipodcolor,ipodnano,ipodvideo,e200,c200: ""
</voice>
</phrase>
<phrase>
@ -8487,104 +8481,104 @@
</phrase>
<phrase>
id: LANG_SYSFONT_AGC_SAFETY
desc: AGC preset
desc: deprecated
user:
<source>
*: none
agc: "Safety (clip)"
agc: ""
</source>
<dest>
*: none
agc: "Sikker (klipp)"
agc: ""
</dest>
<voice>
*: none
agc: "Sikker klipp"
agc: ""
</voice>
</phrase>
<phrase>
id: LANG_SYSFONT_AGC_VOICE
desc: AGC preset
desc: deprecated
user:
<source>
*: none
agc: "Voice (fast)"
agc: ""
</source>
<dest>
*: none
agc: "Stemme (rask)"
agc: ""
</dest>
<voice>
*: none
agc: "Stemme rask"
agc: ""
</voice>
</phrase>
<phrase>
id: LANG_SYSFONT_AGC_MEDIUM
desc: AGC preset
desc: deprecated
user:
<source>
*: none
agc: "Medium"
agc: ""
</source>
<dest>
*: none
agc: "Medium"
agc: ""
</dest>
<voice>
*: none
agc: "Medium"
agc: ""
</voice>
</phrase>
<phrase>
id: LANG_SYSFONT_AGC_LIVE
desc: AGC preset
desc: deprecated
user:
<source>
*: none
agc: "Live (slow)"
agc: ""
</source>
<dest>
*: none
agc: "Live (treg"
agc: ""
</dest>
<voice>
*: none
agc: "Live (treg)"
agc: ""
</voice>
</phrase>
<phrase>
id: LANG_SYSFONT_AGC_DJSET
desc: AGC preset
desc: deprecated
user:
<source>
*: none
agc: "DJ-Set (slow)"
agc: ""
</source>
<dest>
*: none
agc: "DJ-sett (treg)"
agc: ""
</dest>
<voice>
*: none
agc: "DJ-sett (treg)"
agc: ""
</voice>
</phrase>
<phrase>
id: LANG_SYSFONT_RECORDING_AGC_MAXGAIN
desc: AGC maximum gain in recording screen
desc: deprecated
user:
<source>
*: none
agc: "AGC max. gain"
agc: ""
</source>
<dest>
*: none
agc: "AGC maks forsterkning"
agc: ""
</dest>
<voice>
*: none
agc: "AGC maksimal forsterkning"
agc: ""
</voice>
</phrase>
<phrase>
@ -8623,19 +8617,19 @@
</phrase>
<phrase>
id: LANG_RECORD_AGC_PRESET
desc: automatic gain control in record settings
desc: deprecated
user:
<source>
*: none
agc: "Automatic Gain Control"
agc: ""
</source>
<dest>
*: none
agc: "Automatisk nivåkontroll (AGC)"
agc: ""
</dest>
<voice>
*: none
agc: "utomatisk nivåkontroll (AGC)"
agc: ""
</voice>
</phrase>
<phrase>
@ -9143,15 +9137,15 @@
</phrase>
<phrase>
id: LANG_SYSFONT_RECORDING_FILENAME
desc: Filename header in recording screen
desc: deprecated
user:
<source>
*: none
recording: "Filename:"
recording: ""
</source>
<dest>
*: none
recording: "Filnavn:"
recording: ""
</dest>
<voice>
*: none
@ -9301,19 +9295,19 @@
</phrase>
<phrase>
id: LANG_SYSFONT_RECORDING_AGC_PRESET
desc: automatic gain control in recording screen
desc: deprecated
user:
<source>
*: none
agc: "AGC"
agc: ""
</source>
<dest>
*: none
agc: "AGC"
agc: ""
</dest>
<voice>
*: none
agc: "A G C"
agc: ""
</voice>
</phrase>
<phrase>
@ -9442,19 +9436,19 @@
</phrase>
<phrase>
id: LANG_SYSFONT_SPLIT_SIZE
desc: in record timesplit options
desc: deprecated
user:
<source>
*: none
recording: "Split Filesize"
recording: ""
</source>
<dest>
*: none
recording: "Oppdelingsstørrelse"
recording: ""
</dest>
<voice>
*: none
recording: "Oppdelingsstørrelse"
recording: ""
</voice>
</phrase>
<phrase>
@ -9569,19 +9563,19 @@
</phrase>
<phrase>
id: LANG_RECORD_AGC_CLIPTIME
desc: in record settings
desc: deprecated
user:
<source>
*: none
agc: "AGC clip time"
agc: ""
</source>
<dest>
*: none
agc: "AGC-klipptid"
agc: ""
</dest>
<voice>
*: none
agc: "A G C klipptid"
agc: ""
</voice>
</phrase>
<phrase>
@ -9912,10 +9906,10 @@
*: "Previous Screen"
</source>
<dest>
*: "Forrige skjerm"
*: "Siste skjerm"
</dest>
<voice>
*: "Forrige skjerm"
*: "Siste skjerm"
</voice>
</phrase>
<phrase>
@ -10933,15 +10927,15 @@
</phrase>
<phrase>
id: LANG_SYSFONT_PM_CLIPCOUNT
desc: in recording GUI, for recording peak meter. MAX 5 characters!
desc: deprecated
user:
<source>
*: none
recording: "CLIP:"
recording: ""
</source>
<dest>
*: none
recording: "CLIP:"
recording: ""
</dest>
<voice>
*: none
@ -11097,10 +11091,10 @@
*: "Show Filename Extensions"
</source>
<dest>
*: "Vis filnavnending"
*: "Vis filnavnendelse"
</dest>
<voice>
*: "Vis filnavnending"
*: "Vis filnavnendelse"
</voice>
</phrase>
<phrase>
@ -11561,7 +11555,7 @@
*: "Hopplengde"
</dest>
<voice>
*: "Skip Length"
*: "Hopplengde"
</voice>
</phrase>
<phrase>
@ -11678,11 +11672,11 @@
</source>
<dest>
*: none
swcodec: "Keyclick"
swcodec: "Tastelyd"
</dest>
<voice>
*: none
swcodec: "Keyclick"
swcodec: "Tastelyd"
</voice>
</phrase>
<phrase>
@ -11831,3 +11825,156 @@
*: "skråstrek"
</voice>
</phrase>
<phrase>
id: LANG_RECORDING_SIZE
desc: Display of recorded file size
user:
<source>
*: none
recording: "Size:"
</source>
<dest>
*: none
recording: "Størrelse:"
</dest>
<voice>
*: none
recording: ""
</voice>
</phrase>
<phrase>
id: LANG_RECORDING_AGC_MAXGAIN
desc: AGC maximum gain in recording screen
user:
<source>
*: none
agc: "AGC max. gain"
</source>
<dest>
*: none
agc: "AGC maks forsterkning"
</dest>
<voice>
*: none
agc: "AGC maksimum forsterkning"
</voice>
</phrase>
<phrase>
id: LANG_RECORDING_TIMESPLIT_REC
desc: Display of record timer interval setting, on the record screen
user:
<source>
*: none
recording: "Split Time:"
</source>
<dest>
*: none
recording: "Splittid:"
</dest>
<voice>
*: none
recording: ""
</voice>
</phrase>
<phrase>
id: LANG_PM_CLIPCOUNT
desc: in recording GUI, for recording peak meter. MAX 5 characters!
user:
<source>
*: none
recording: "CLIP:"
</source>
<dest>
*: none
recording: "CLIP:"
</dest>
<voice>
*: none
recording: ""
</voice>
</phrase>
<phrase>
id: LANG_GAIN_RIGHT
desc: in the recording screen
user:
<source>
*: none
recording: "Gain R"
</source>
<dest>
*: none
recording: "Lydnivå H"
</dest>
<voice>
*: none
recording: "Lydnivå for høyre kanal"
</voice>
</phrase>
<phrase>
id: LANG_RECORDING_FILENAME
desc: Filename header in recording screen
user:
<source>
*: none
recording: "Filename:"
</source>
<dest>
*: none
recording: "Filnavn:"
</dest>
<voice>
*: none
recording: ""
</voice>
</phrase>
<phrase>
id: LANG_GAIN_LEFT
desc: in the recording screen
user:
<source>
*: none
recording: "Gain L"
</source>
<dest>
*: none
recording: "Lydnivå V"
</dest>
<voice>
*: none
recording: "Lydnivå for venstre kanal"
</voice>
</phrase>
<phrase>
id: LANG_RECORDING_AGC_PRESET
desc: automatic gain control in record settings and screen
user:
<source>
*: none
agc: "AGC"
</source>
<dest>
*: none
agc: "AGC"
</dest>
<voice>
*: none
agc: "Automatisk forsterkningskontroll"
</voice>
</phrase>
<phrase>
id: LANG_RECORDING_AGC_CLIPTIME
desc: in record settings
user:
<source>
*: none
agc: "AGC clip time"
</source>
<dest>
*: none
agc: "AGC klipptid"
</dest>
<voice>
*: none
agc: "AGC klipptid"
</voice>
</phrase>

View file

@ -288,7 +288,6 @@ static void init(void)
debug_init();
#endif
/* Must be done before any code uses the multi-screen APi */
screen_access_init();
gui_syncstatusbar_init(&statusbars);
ata_init();
settings_reset();
@ -404,13 +403,12 @@ static void init(void)
button_init();
powermgmt_init();
#if CONFIG_TUNER
radio_init();
#endif
/* Must be done before any code uses the multi-screen APi */
screen_access_init();
gui_syncstatusbar_init(&statusbars);
#if CONFIG_CHARGING && (CONFIG_CPU == SH7034)
@ -448,11 +446,11 @@ static void init(void)
#ifdef HAVE_EEPROM_SETTINGS
eeprom_settings_init();
#endif
usb_start_monitoring();
#ifndef HAVE_USBSTACK
while (usb_detect() == USB_INSERTED)
{
{
#ifdef HAVE_EEPROM_SETTINGS
firmware_settings.disk_clean = false;
#endif
@ -517,7 +515,7 @@ static void init(void)
remove(TAGCACHE_STATEFILE);
#endif
}
gui_sync_wps_init();
settings_apply(true);
init_dircache(false);

View file

@ -674,8 +674,9 @@ static void draw_slider(void)
int i;
FOR_NB_SCREENS(i)
{
show_busy_slider(&screens[i], 1, LCD_HEIGHT-2*screens[i].char_height,
LCD_WIDTH-2, 2*screens[i].char_height-1);
show_busy_slider(&screens[i], 1,
LCD_HEIGHT-2*screens[i].getcharheight(),
LCD_WIDTH-2, 2*screens[i].getcharheight()-1);
screens[i].update();
}
}

View file

@ -58,7 +58,7 @@
/* The number of items between the selected one and the end/start of
* the buffer under which the buffer must reload */
#define MIN_BUFFER_MARGIN (screens[0].nb_lines+1)
#define MIN_BUFFER_MARGIN (screens[0].getnblines()+1)
/* Information about a specific track */
struct playlist_entry {
@ -182,7 +182,7 @@ static void playlist_buffer_load_entries_screen(struct playlist_buffer * pb,
{
if(direction==FORWARD)
{
int min_start=viewer.selected_track-2*screens[0].nb_lines;
int min_start=viewer.selected_track-2*screens[0].getnblines();
while(min_start<0)
min_start+=viewer.num_tracks;
min_start %= viewer.num_tracks;
@ -190,7 +190,7 @@ static void playlist_buffer_load_entries_screen(struct playlist_buffer * pb,
}
else
{
int max_start=viewer.selected_track+2*screens[0].nb_lines;
int max_start=viewer.selected_track+2*screens[0].getnblines();
max_start%=viewer.num_tracks;
playlist_buffer_load_entries(pb, max_start, BACKWARD);
}

View file

@ -130,12 +130,12 @@ void* plugin_get_buffer(size_t *buffer_size);
#define PLUGIN_MAGIC 0x526F634B /* RocK */
/* increase this every time the api struct changes */
#define PLUGIN_API_VERSION 122
#define PLUGIN_API_VERSION 123
/* update this to latest version if a change to the api struct breaks
backwards compatibility (and please take the opportunity to sort in any
new function which are "waiting" at the end of the function table) */
#define PLUGIN_MIN_API_VERSION 122
#define PLUGIN_MIN_API_VERSION 123
/* plugin return codes */
enum plugin_status {

View file

@ -32,8 +32,12 @@ jpeg.c
#ifndef OLYMPUS_MROBE_500
#if (CONFIG_CODEC == SWCODEC) || !defined(SIMULATOR)
/* button maps are broken on the following */
#if !defined(SANSA_C200) && !defined(ARCHOS_ONDIOSP) && !defined(ARCHOS_ONDIOFM) && !defined(ARCHOS_PLAYER)
metronome.c
#endif
#endif
#if ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)) && !defined(SIMULATOR)
wavplay.c
@ -110,7 +114,6 @@ zxbox.c
fireworks.c
#endif
xobox.c
spacerocks.c
#if LCD_DEPTH >= 16
rockpaint.c
#endif
@ -156,5 +159,3 @@ invadrox.c
superdom.c
#endif
#endif /* m:robe 500 */
md5sum.c

View file

@ -111,7 +111,7 @@ static void draw_headers(void)
char *Dayname[7] = {"M","T","W","T","F","S","S"};
int ws = 2;
rb->lcd_getstringsize("A",&w,&h);
for (i = 0; i < 8;)
for (i = 0; i < 7;)
{
rb->lcd_putsxy(ws, 0 , Dayname[i++]);
ws += space;

View file

@ -34,50 +34,41 @@ PLUGIN_HEADER
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
#define CUBE_QUIT BUTTON_OFF
#define CUBE_X_INC BUTTON_RIGHT
#define CUBE_X_DEC BUTTON_LEFT
#define CUBE_Y_INC BUTTON_UP
#define CUBE_Y_DEC BUTTON_DOWN
#define CUBE_Z_INC BUTTON_F2
#define CUBE_Z_DEC BUTTON_F1
#define CUBE_MODE BUTTON_F3
#define CUBE_NEXT BUTTON_RIGHT
#define CUBE_PREV BUTTON_LEFT
#define CUBE_INC BUTTON_UP
#define CUBE_DEC BUTTON_DOWN
#define CUBE_MODE BUTTON_F1
#define CUBE_PAUSE BUTTON_PLAY
#define CUBE_HIGHSPEED BUTTON_ON
#elif CONFIG_KEYPAD == ARCHOS_AV300_PAD
#define CUBE_QUIT BUTTON_OFF
#define CUBE_X_INC BUTTON_RIGHT
#define CUBE_X_DEC BUTTON_LEFT
#define CUBE_Y_INC BUTTON_UP
#define CUBE_Y_DEC BUTTON_DOWN
#define CUBE_Z_INC BUTTON_F2
#define CUBE_Z_DEC BUTTON_F1
#define CUBE_MODE BUTTON_F3
#define CUBE_NEXT BUTTON_RIGHT
#define CUBE_PREV BUTTON_LEFT
#define CUBE_INC BUTTON_UP
#define CUBE_DEC BUTTON_DOWN
#define CUBE_MODE BUTTON_F1
#define CUBE_PAUSE BUTTON_SELECT
#define CUBE_HIGHSPEED BUTTON_ON
#elif CONFIG_KEYPAD == PLAYER_PAD
#define CUBE_QUIT BUTTON_STOP
#define CUBE_X_INC BUTTON_RIGHT
#define CUBE_X_DEC BUTTON_LEFT
#define CUBE_Y_INC (BUTTON_ON | BUTTON_RIGHT)
#define CUBE_Y_DEC (BUTTON_ON | BUTTON_LEFT)
#define CUBE_Z_INC (BUTTON_MENU | BUTTON_RIGHT)
#define CUBE_Z_DEC (BUTTON_MENU | BUTTON_LEFT)
#define CUBE_MODE_PRE BUTTON_MENU
#define CUBE_MODE (BUTTON_MENU | BUTTON_REL)
#define CUBE_INC BUTTON_RIGHT
#define CUBE_DEC BUTTON_LEFT
#define CUBE_NEXT (BUTTON_ON | BUTTON_RIGHT)
#define CUBE_PREV (BUTTON_ON | BUTTON_LEFT)
#define CUBE_MODE BUTTON_MENU
#define CUBE_PAUSE BUTTON_PLAY
#define CUBE_HIGHSPEED_PRE BUTTON_ON
#define CUBE_HIGHSPEED (BUTTON_ON | BUTTON_REL)
#elif CONFIG_KEYPAD == ONDIO_PAD
#define CUBE_QUIT BUTTON_OFF
#define CUBE_X_INC BUTTON_RIGHT
#define CUBE_X_DEC BUTTON_LEFT
#define CUBE_Y_INC BUTTON_UP
#define CUBE_Y_DEC BUTTON_DOWN
#define CUBE_Z_INC (BUTTON_MENU | BUTTON_UP)
#define CUBE_Z_DEC (BUTTON_MENU | BUTTON_DOWN)
#define CUBE_NEXT BUTTON_RIGHT
#define CUBE_PREV BUTTON_LEFT
#define CUBE_INC BUTTON_UP
#define CUBE_DEC BUTTON_DOWN
#define CUBE_MODE_PRE BUTTON_MENU
#define CUBE_MODE (BUTTON_MENU | BUTTON_REL)
#define CUBE_PAUSE (BUTTON_MENU | BUTTON_LEFT)
@ -86,15 +77,12 @@ PLUGIN_HEADER
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define CUBE_QUIT BUTTON_OFF
#define CUBE_X_INC BUTTON_RIGHT
#define CUBE_X_DEC BUTTON_LEFT
#define CUBE_Y_INC BUTTON_UP
#define CUBE_Y_DEC BUTTON_DOWN
#define CUBE_Z_INC (BUTTON_ON | BUTTON_UP)
#define CUBE_Z_DEC (BUTTON_ON | BUTTON_DOWN)
#define CUBE_NEXT BUTTON_RIGHT
#define CUBE_PREV BUTTON_LEFT
#define CUBE_INC BUTTON_UP
#define CUBE_DEC BUTTON_DOWN
#define CUBE_MODE BUTTON_MODE
#define CUBE_PAUSE_PRE BUTTON_ON
#define CUBE_PAUSE (BUTTON_ON | BUTTON_REL)
#define CUBE_PAUSE BUTTON_ON
#define CUBE_HIGHSPEED BUTTON_SELECT
#define CUBE_RC_QUIT BUTTON_RC_STOP
@ -102,143 +90,114 @@ PLUGIN_HEADER
#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || \
(CONFIG_KEYPAD == IPOD_3G_PAD) || \
(CONFIG_KEYPAD == IPOD_1G2G_PAD)
#define CUBE_QUIT BUTTON_MENU
#define CUBE_X_INC BUTTON_RIGHT
#define CUBE_X_DEC BUTTON_LEFT
#define CUBE_Y_INC BUTTON_SCROLL_FWD
#define CUBE_Y_DEC BUTTON_SCROLL_BACK
#define CUBE_Z_INC (BUTTON_SELECT | BUTTON_RIGHT)
#define CUBE_Z_DEC (BUTTON_SELECT | BUTTON_LEFT)
#define CUBE_MODE (BUTTON_SELECT | BUTTON_MENU)
#define CUBE_PAUSE_PRE BUTTON_PLAY
#define CUBE_PAUSE (BUTTON_PLAY | BUTTON_REL)
#define CUBE_HIGHSPEED (BUTTON_SELECT | BUTTON_PLAY)
#define CUBE_QUIT (BUTTON_SELECT | BUTTON_MENU)
#define CUBE_NEXT BUTTON_RIGHT
#define CUBE_PREV BUTTON_LEFT
#define CUBE_INC BUTTON_SCROLL_FWD
#define CUBE_DEC BUTTON_SCROLL_BACK
#define CUBE_MODE BUTTON_MENU
#define CUBE_PAUSE BUTTON_PLAY
#define CUBE_HIGHSPEED_PRE BUTTON_SELECT
#define CUBE_HIGHSPEED (BUTTON_SELECT | BUTTON_REL)
#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
#define CUBE_QUIT BUTTON_PLAY
#define CUBE_X_INC BUTTON_RIGHT
#define CUBE_X_DEC BUTTON_LEFT
#define CUBE_Y_INC BUTTON_UP
#define CUBE_Y_DEC BUTTON_DOWN
#define CUBE_Z_INC BUTTON_MODE
#define CUBE_Z_DEC BUTTON_EQ
#define CUBE_MODE (BUTTON_SELECT | BUTTON_REPEAT)
#define CUBE_PAUSE (BUTTON_SELECT | BUTTON_REL)
#define CUBE_HIGHSPEED (BUTTON_MODE | BUTTON_EQ) /* TODO: this is impossible */
#define CUBE_NEXT BUTTON_RIGHT
#define CUBE_PREV BUTTON_LEFT
#define CUBE_INC BUTTON_UP
#define CUBE_DEC BUTTON_DOWN
#define CUBE_MODE BUTTON_MODE
#define CUBE_PAUSE BUTTON_SELECT
#define CUBE_HIGHSPEED BUTTON_EQ
#elif (CONFIG_KEYPAD == IAUDIO_X5M5_PAD)
#define CUBE_QUIT BUTTON_POWER
#define CUBE_X_INC BUTTON_LEFT
#define CUBE_X_DEC BUTTON_RIGHT
#define CUBE_Y_INC BUTTON_UP
#define CUBE_Y_DEC BUTTON_DOWN
#define CUBE_Z_INC (BUTTON_PLAY | BUTTON_UP)
#define CUBE_Z_DEC (BUTTON_PLAY | BUTTON_DOWN)
#define CUBE_MODE BUTTON_SELECT
#define CUBE_PAUSE_PRE BUTTON_PLAY
#define CUBE_PAUSE (BUTTON_PLAY | BUTTON_REL)
#define CUBE_HIGHSPEED (BUTTON_REC | BUTTON_REL)
#define CUBE_NEXT BUTTON_RIGHT
#define CUBE_PREV BUTTON_LEFT
#define CUBE_INC BUTTON_UP
#define CUBE_DEC BUTTON_DOWN
#define CUBE_MODE BUTTON_REC
#define CUBE_PAUSE BUTTON_PLAY
#define CUBE_HIGHSPEED BUTTON_SELECT
#elif (CONFIG_KEYPAD == GIGABEAT_PAD)
#define CUBE_QUIT BUTTON_POWER
#define CUBE_X_INC BUTTON_LEFT
#define CUBE_X_DEC BUTTON_RIGHT
#define CUBE_Y_INC BUTTON_UP
#define CUBE_Y_DEC BUTTON_DOWN
#define CUBE_Z_INC BUTTON_VOL_UP
#define CUBE_Z_DEC BUTTON_VOL_DOWN
#define CUBE_NEXT BUTTON_RIGHT
#define CUBE_PREV BUTTON_LEFT
#define CUBE_INC BUTTON_UP
#define CUBE_DEC BUTTON_DOWN
#define CUBE_MODE BUTTON_MENU
#define CUBE_PAUSE BUTTON_SELECT
#define CUBE_HIGHSPEED BUTTON_A
#elif (CONFIG_KEYPAD == SANSA_E200_PAD)
#define CUBE_QUIT BUTTON_POWER
#define CUBE_X_INC BUTTON_LEFT
#define CUBE_X_DEC BUTTON_RIGHT
#define CUBE_Y_INC BUTTON_SCROLL_FWD
#define CUBE_Y_DEC BUTTON_SCROLL_BACK
#define CUBE_Z_INC BUTTON_UP
#define CUBE_Z_DEC BUTTON_DOWN
#define CUBE_MODE_PRE BUTTON_SELECT
#define CUBE_MODE (BUTTON_SELECT|BUTTON_REPEAT)
#define CUBE_PAUSE_PRE BUTTON_SELECT
#define CUBE_PAUSE (BUTTON_SELECT|BUTTON_REL)
#define CUBE_HIGHSPEED BUTTON_REC
#define CUBE_NEXT BUTTON_RIGHT
#define CUBE_PREV BUTTON_LEFT
#define CUBE_INC BUTTON_SCROLL_FWD
#define CUBE_DEC BUTTON_SCROLL_BACK
#define CUBE_MODE BUTTON_DOWN
#define CUBE_PAUSE BUTTON_UP
#define CUBE_HIGHSPEED BUTTON_SELECT
#elif (CONFIG_KEYPAD == SANSA_C200_PAD)
#define CUBE_QUIT BUTTON_POWER
#define CUBE_X_INC BUTTON_LEFT
#define CUBE_X_DEC BUTTON_RIGHT
#define CUBE_Y_INC BUTTON_VOL_UP
#define CUBE_Y_DEC BUTTON_VOL_DOWN
#define CUBE_Z_INC BUTTON_UP
#define CUBE_Z_DEC BUTTON_DOWN
#define CUBE_MODE_PRE BUTTON_SELECT
#define CUBE_MODE (BUTTON_SELECT|BUTTON_REPEAT)
#define CUBE_PAUSE_PRE BUTTON_SELECT
#define CUBE_PAUSE (BUTTON_SELECT|BUTTON_REL)
#define CUBE_HIGHSPEED BUTTON_REC
#define CUBE_NEXT BUTTON_RIGHT
#define CUBE_PREV BUTTON_LEFT
#define CUBE_INC BUTTON_VOL_UP
#define CUBE_DEC BUTTON_VOL_DOWN
#define CUBE_MODE BUTTON_DOWN
#define CUBE_PAUSE BUTTON_UP
#define CUBE_HIGHSPEED BUTTON_SELECT
#elif (CONFIG_KEYPAD == IRIVER_H10_PAD)
#define CUBE_QUIT BUTTON_POWER
#define CUBE_X_INC BUTTON_LEFT
#define CUBE_X_DEC BUTTON_RIGHT
#define CUBE_Y_INC BUTTON_SCROLL_UP
#define CUBE_Y_DEC BUTTON_SCROLL_DOWN
#define CUBE_Z_INC (BUTTON_PLAY | BUTTON_SCROLL_UP)
#define CUBE_Z_DEC (BUTTON_PLAY | BUTTON_SCROLL_DOWN)
#define CUBE_NEXT BUTTON_RIGHT
#define CUBE_PREV BUTTON_LEFT
#define CUBE_INC BUTTON_SCROLL_UP
#define CUBE_DEC BUTTON_SCROLL_DOWN
#define CUBE_MODE BUTTON_REW
#define CUBE_PAUSE_PRE BUTTON_PLAY
#define CUBE_PAUSE (BUTTON_PLAY | BUTTON_REL)
#define CUBE_HIGHSPEED (BUTTON_FF | BUTTON_REL)
#define CUBE_PAUSE BUTTON_PLAY
#define CUBE_HIGHSPEED BUTTON_FF
#elif CONFIG_KEYPAD == MROBE500_PAD
#define CUBE_QUIT BUTTON_POWER
#define CUBE_X_INC BUTTON_LEFT
#define CUBE_X_DEC BUTTON_RIGHT
#define CUBE_Y_INC BUTTON_RC_PLAY
#define CUBE_Y_DEC BUTTON_RC_DOWN
#define CUBE_Z_INC BUTTON_RC_VOL_UP
#define CUBE_Z_DEC BUTTON_RC_VOL_DOWN
#define CUBE_NEXT BUTTON_RIGHT
#define CUBE_PREV BUTTON_LEFT
#define CUBE_INC BUTTON_RC_VOL_UP
#define CUBE_DEC BUTTON_RC_VOL_DOWN
#define CUBE_MODE BUTTON_RC_MODE
#define CUBE_PAUSE_PRE BUTTON_RC_HEART
#define CUBE_PAUSE (BUTTON_RC_HEART | BUTTON_REL)
#define CUBE_HIGHSPEED BUTTON_RC_HEART
#define CUBE_HIGHSPEED BUTTON_RC_HEART /* fixme: clashes with pause */
#elif CONFIG_KEYPAD == GIGABEAT_S_PAD
#define CUBE_QUIT BUTTON_BACK
#define CUBE_X_INC BUTTON_LEFT
#define CUBE_X_DEC BUTTON_RIGHT
#define CUBE_Y_INC BUTTON_UP
#define CUBE_Y_DEC BUTTON_DOWN
#define CUBE_Z_INC BUTTON_VOL_UP
#define CUBE_Z_DEC BUTTON_VOL_DOWN
#define CUBE_MODE BUTTON_PREV
#define CUBE_PAUSE_PRE BUTTON_PLAY
#define CUBE_PAUSE (BUTTON_PLAY | BUTTON_REL)
#define CUBE_HIGHSPEED (BUTTON_NEXT | BUTTON_REL)
#define CUBE_NEXT BUTTON_RIGHT
#define CUBE_PREV BUTTON_LEFT
#define CUBE_INC BUTTON_UP
#define CUBE_DEC BUTTON_DOWN
#define CUBE_MODE BUTTON_MENU
#define CUBE_PAUSE BUTTON_PLAY
#define CUBE_HIGHSPEED BUTTON_SELECT
#elif (CONFIG_KEYPAD == MROBE100_PAD)
#define CUBE_QUIT BUTTON_POWER
#define CUBE_X_INC BUTTON_LEFT
#define CUBE_X_DEC BUTTON_RIGHT
#define CUBE_Y_INC BUTTON_UP
#define CUBE_Y_DEC BUTTON_DOWN
#define CUBE_Z_INC (BUTTON_DISPLAY | BUTTON_UP)
#define CUBE_Z_DEC (BUTTON_DISPLAY | BUTTON_DOWN)
#define CUBE_NEXT BUTTON_RIGHT
#define CUBE_PREV BUTTON_LEFT
#define CUBE_INC BUTTON_UP
#define CUBE_DEC BUTTON_DOWN
#define CUBE_MODE BUTTON_MENU
#define CUBE_PAUSE BUTTON_PLAY
#define CUBE_HIGHSPEED BUTTON_SELECT
#elif (CONFIG_KEYPAD == IAUDIO_M3_PAD)
#define CUBE_QUIT BUTTON_RC_REC
#define CUBE_X_INC BUTTON_RC_FF
#define CUBE_X_DEC BUTTON_RC_REW
#define CUBE_Y_INC BUTTON_RC_VOL_UP
#define CUBE_Y_DEC BUTTON_RC_VOL_DOWN
#define CUBE_Z_INC BUTTON_VOL_UP /* FIXME: quick hack */
#define CUBE_Z_DEC BUTTON_VOL_DOWN
#define CUBE_NEXT BUTTON_RC_FF
#define CUBE_PREV BUTTON_RC_REW
#define CUBE_INC BUTTON_RC_VOL_UP
#define CUBE_DEC BUTTON_RC_VOL_DOWN
#define CUBE_MODE BUTTON_RC_MODE
#define CUBE_PAUSE BUTTON_RC_PLAY
#define CUBE_HIGHSPEED BUTTON_RC_MENU
@ -251,37 +210,29 @@ PLUGIN_HEADER
#endif
#ifdef HAVE_TOUCHSCREEN
// not enough touchfields, so CUBE_QUIT have to be
// mapped to a real button
//ifndef CUBE_QUIT
//#define CUBE_QUIT BUTTON_TOPLEFT
//#endif
#ifndef CUBE_X_INC
#define CUBE_X_INC BUTTON_MIDRIGHT
#ifndef CUBE_QUIT
#define CUBE_QUIT BUTTON_TOPLEFT
#endif
#ifndef CUBE_X_DEC
#define CUBE_X_DEC BUTTON_MIDLEFT
#ifndef CUBE_NEXT
#define CUBE_NEXT BUTTON_MIDRIGHT
#endif
#ifndef CUBE_Y_INC
#define CUBE_Y_INC BUTTON_TOPMIDDLE
#ifndef CUBE_PREV
#define CUBE_PREV BUTTON_MIDLEFT
#endif
#ifndef CUBE_Y_DEC
#define CUBE_Y_DEC BUTTON_BOTTOMMIDDLE
#ifndef CUBE_INC
#define CUBE_INC BUTTON_TOPMIDDLE
#endif
#ifndef CUBE_Z_INC
#define CUBE_Z_INC BUTTON_BOTTOMRIGHT
#endif
#ifndef CUBE_Z_DEC
#define CUBE_Z_DEC BUTTON_BOTTOMLEFT
#ifndef CUBE_DEC
#define CUBE_DEC BUTTON_BOTTOMMIDDLE
#endif
#ifndef CUBE_MODE
#define CUBE_MODE BUTTON_TOPRIGHT
#endif
#ifndef CUBE_PAUSE
#define CUBE_PAUSE (BUTTON_CENTER | BUTTON_REL)
#define CUBE_PAUSE BUTTON_CENTER
#endif
#ifndef CUBE_HIGHSPEED
#define CUBE_HIGHSPEED BUTTON_TOPLEFT
#define CUBE_HIGHSPEED BUTTON_BOTTOMRIGHT
#endif
#endif
@ -420,6 +371,18 @@ enum {
static int mode = 0;
struct counter {
const char *label;
short speed;
short angle;
};
static struct counter axes[] = {
{"x-axis", 1, 0},
{"y-axis", 3, 0},
{"z-axis", 2, 0}
};
static struct point_3D point3D[8];
static struct point_2D point2D[8];
static long matrice[3][3];
@ -594,12 +557,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
int button;
int lastbutton = BUTTON_NONE;
int xa = 0;
int ya = 0;
int za = 0;
int xs = 1;
int ys = 3;
int zs = 1;
int curr = 0;
bool highspeed = false;
bool paused = false;
bool redraw = true;
@ -638,20 +596,15 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
rb->splash(HZ*2, "Old LCD :(");
return PLUGIN_OK;
}
pgfx_display(3, 0);
pgfx_display(0, 0);
#endif
while(!exit)
{
if (highspeed)
rb->yield();
else
rb->sleep(4);
if (redraw)
{
MYLCD(clear_display)();
cube_rotate(xa, ya, za);
cube_rotate(axes[0].angle, axes[1].angle, axes[2].angle);
cube_viewport();
cube_draw();
redraw = false;
@ -661,8 +614,10 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
if (t_disp > 0)
{
t_disp--;
rb->snprintf(buffer, sizeof(buffer), "x:%d y:%d z:%d h:%d",
xs, ys, zs, highspeed);
rb->snprintf(buffer, sizeof(buffer), "%s: %d %s",
axes[curr].label,
paused ? axes[curr].angle : axes[curr].speed,
highspeed ? "(hs)" : "");
MYLCD(putsxy)(0, LCD_HEIGHT-8, buffer);
if (t_disp == 0)
redraw = true;
@ -672,21 +627,17 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
{
if (t_disp == DISP_TIME)
{
rb->snprintf(buffer, sizeof(buffer), "x%d", xs);
rb->lcd_puts(0, 0, buffer);
rb->snprintf(buffer, sizeof(buffer), "y%d", ys);
rb->lcd_puts(0, 1, buffer);
pgfx_display(3, 0);
rb->snprintf(buffer, sizeof(buffer), "z%d", zs);
rb->lcd_puts(8, 0, buffer);
rb->snprintf(buffer, sizeof(buffer), "h%d", highspeed);
rb->lcd_puts(8, 1, buffer);
rb->lcd_puts(5, 0, axes[curr].label);
rb->snprintf(buffer, sizeof(buffer), "%d %c",
paused ? axes[curr].angle : axes[curr].speed,
highspeed ? 'H' : ' ');
rb->lcd_puts(5, 1, buffer);
}
t_disp--;
if (t_disp == 0)
{
rb->lcd_clear_display();
pgfx_display(3, 0);
pgfx_display(0, 0);
}
}
#endif
@ -701,129 +652,73 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
if (!paused)
{
xa += xs;
if (xa > 359)
xa -= 360;
else if (xa < 0)
xa += 360;
int i;
ya += ys;
if (ya > 359)
ya -= 360;
else if (ya < 0)
ya += 360;
za += zs;
if (za > 359)
za -= 360;
else if (za < 0)
za += 360;
for (i = 0; i < 3; i++)
{
axes[i].angle += axes[i].speed;
if (axes[i].angle > 359)
axes[i].angle -= 360;
else if (axes[i].angle < 0)
axes[i].angle += 360;
}
redraw = true;
if (highspeed)
rb->yield();
else
rb->sleep(HZ/25);
button = rb->button_get(false);
}
else
{
button = rb->button_get_w_tmo(HZ/25);
}
button = rb->button_get(false);
switch (button)
{
case CUBE_X_INC:
case (CUBE_X_INC|BUTTON_REPEAT):
if( !paused )
case CUBE_INC:
case CUBE_INC|BUTTON_REPEAT:
if (!paused)
{
if( xs < 10)
xs++;
if (axes[curr].speed < 10)
axes[curr].speed++;
}
else
{
xa++;
if( xa > 359 )
xa -= 360;
if (++axes[curr].angle > 359)
axes[curr].angle -= 360;
}
t_disp = DISP_TIME;
redraw = true;
break;
case CUBE_X_DEC:
case (CUBE_X_DEC|BUTTON_REPEAT):
if( !paused )
case CUBE_DEC:
case CUBE_DEC|BUTTON_REPEAT:
if (!paused)
{
if (xs > -10)
xs--;
if (axes[curr].speed > -10)
axes[curr].speed--;
}
else
{
xa--;
if( xa < 0 )
xa += 360;
if (--axes[curr].angle < 0)
axes[curr].angle += 360;
}
t_disp = DISP_TIME;
redraw = true;
break;
case CUBE_Y_INC:
case (CUBE_Y_INC|BUTTON_REPEAT):
if( !paused )
{
if (ys < 10)
ys++;
}
else
{
ya++;
if( ya > 359 )
ya -= 360;
}
case CUBE_NEXT:
if (++curr > 2)
curr = 0;
t_disp = DISP_TIME;
redraw = true;
break;
case CUBE_Y_DEC:
case (CUBE_Y_DEC|BUTTON_REPEAT):
if( !paused )
{
if (ys > -10)
ys--;
}
else
{
ya--;
if( ya < 0 )
ya += 360;
}
case CUBE_PREV:
if (--curr < 0)
curr = 2;
t_disp = DISP_TIME;
redraw = true;
break;
case CUBE_Z_INC:
case (CUBE_Z_INC|BUTTON_REPEAT):
if( !paused )
{
if (zs < 10)
zs++;
}
else
{
za++;
if( za > 359 )
za -= 360;
}
t_disp = DISP_TIME;
redraw = true;
break;
case CUBE_Z_DEC:
case (CUBE_Z_DEC|BUTTON_REPEAT):
if( !paused )
{
if (zs > -10)
zs--;
}
else
{
za--;
if( za < 0 )
za += 360;
}
t_disp = DISP_TIME;
redraw = true;
break;
case CUBE_MODE:

View file

@ -667,7 +667,7 @@ void I_FinishUpdate (void)
{
int y;
for (y = 0; y < SCREENHEIGHT; y++)
for (y = 1; y <= SCREENHEIGHT; y++)
{
fb_data *dst = rb->lcd_framebuffer + LCD_WIDTH - y;
count = SCREENWIDTH;

View file

@ -177,12 +177,17 @@ const struct picture logos[]={
{pictureflow_logo, BMPWIDTH_pictureflow_logo, BMPHEIGHT_pictureflow_logo},
};
enum show_album_name_values { album_name_hide = 0, album_name_bottom , album_name_top };
struct config_data {
long avg_album_width;
int spacing_between_slides;
int extra_spacing_for_center_slide;
int show_slides;
int zoom;
bool show_fps;
bool resize;
enum show_album_name_values show_album_name;
};
/** below we allocate the memory we want to use **/
@ -200,7 +205,6 @@ static int center_index; /* index of the slide that is in the center */
static int itilt;
static PFreal offsetX;
static PFreal offsetY;
static bool show_fps; /* show fps in the main screen */
static int number_of_slides;
static struct slide_cache cache[SLIDE_CACHE_SIZE];
@ -459,7 +463,7 @@ int create_track_index(const int slide_index)
/* now fix the track list order */
l = 0;
track_count = 0;
while (l < heighest_index &&
while (l <= heighest_index &&
string_index < MAX_TRACKS*AVG_TRACK_NAME_LENGTH)
{
if (temp_titles[l][0] != '\0')
@ -913,7 +917,7 @@ bool create_bmp(struct bitmap *input_bmp, char *target_path, bool resize)
/* resize image */
output_bmp.width = config.avg_album_width;
output_bmp.height = config.avg_album_width;
simple_resize_bitmap(input_bmp, &output_bmp);
smooth_resize_bitmap(input_bmp, &output_bmp);
/* Resized bitmap is now in the output buffer,
copy it back to the input buffer */
@ -1567,7 +1571,7 @@ int settings_menu(void) {
selection=rb->do_menu(&settings_menu,&selection, NULL, false);
switch(selection) {
case 0:
rb->set_bool("Show FPS", &show_fps);
rb->set_bool("Show FPS", &(config.show_fps));
break;
case 1:
@ -1594,12 +1598,11 @@ int settings_menu(void) {
break;
case 4:
rb->set_int("Number of slides", "", 1, &(config.zoom),
rb->set_int("Zoom", "", 1, &(config.zoom),
NULL, 1, 10, 300, NULL );
recalc_table();
reset_slides();
break;
case 5:
rb->remove(CACHE_PREFIX "/ready");
rb->remove(EMPTY_SLIDE);
@ -1658,6 +1661,9 @@ void set_default_config(void)
config.show_slides = 3;
config.avg_album_width = 0;
config.zoom = 100;
config.show_fps = false;
config.resize = true;
config.show_album_name = album_name_bottom;
}
/**
@ -1765,7 +1771,8 @@ void reset_track_list(void)
int albumtxt_w, albumtxt_h;
const char* albumtxt = get_album_name(center_index);
rb->lcd_getstringsize(albumtxt, &albumtxt_w, &albumtxt_h);
const int height = LCD_HEIGHT-albumtxt_h-10;
const int height =
LCD_HEIGHT-albumtxt_h-10 - (config.show_fps?(albumtxt_h + 5):0);
track_list_visible_entries = fmin( height/albumtxt_h , track_count );
start_index_track_list = 0;
track_scroll_index = 0;
@ -1784,7 +1791,7 @@ void show_track_list(void)
reset_track_list();
}
static int titletxt_w, titletxt_h, titletxt_y, titletxt_x, i, color;
titletxt_y = 0;
rb->lcd_getstringsize("W", NULL, &titletxt_h);
if (track_list_visible_entries >= track_count)
{
int albumtxt_h;
@ -1792,11 +1799,15 @@ void show_track_list(void)
rb->lcd_getstringsize(albumtxt, NULL, &albumtxt_h);
titletxt_y = ((LCD_HEIGHT-albumtxt_h-10)-(track_count*albumtxt_h))/2;
}
else if (config.show_fps)
titletxt_y = titletxt_h + 5;
else
titletxt_y = 0;
int track_i;
for (i=0; i < track_list_visible_entries; i++) {
track_i = i+start_index_track_list;
rb->lcd_getstringsize(get_track_name(track_i), &titletxt_w, &titletxt_h);
rb->lcd_getstringsize(get_track_name(track_i), &titletxt_w, NULL);
titletxt_x = (LCD_WIDTH-titletxt_w)/2;
if ( track_i == selected_track ) {
draw_gradient(titletxt_y, titletxt_h);
@ -1970,7 +1981,6 @@ int main(void)
step = 0;
target = 0;
fade = 256;
show_fps = false;
recalc_table();
reset_slides();
@ -2027,7 +2037,7 @@ int main(void)
}
/* Draw FPS */
if (show_fps) {
if (config.show_fps) {
rb->lcd_set_foreground(LCD_RGBPACK(255, 0, 0));
rb->snprintf(fpstxt, sizeof(fpstxt), "FPS: %d", fps);
rb->lcd_putsxy(0, 0, fpstxt);
@ -2095,8 +2105,10 @@ int main(void)
#endif
case PICTUREFLOW_SELECT_ALBUM:
if ( pf_state == pf_idle )
if ( pf_state == pf_idle ) {
reset_track_list();
pf_state = pf_cover_in;
}
if ( pf_state == pf_show_tracks )
pf_state = pf_cover_out;
break;

View file

@ -30,7 +30,7 @@ PLUGIN_HEADER
/* define DUMMY if you only want to "play" with the UI, does no harm */
/* #define DUMMY */
#define LATEST_BOOTLOADER_VERSION 1 /* update this with the bootloader */
#define LATEST_BOOTLOADER_VERSION 2 /* update this with the bootloader */
#ifndef UINT8
#define UINT8 unsigned char
@ -105,7 +105,8 @@ static UINT8* sector; /* better not place this on the stack... */
/* read the manufacturer and device ID */
bool ReadID(volatile UINT8* pBase, UINT8* pManufacturerID, UINT8* pDeviceID)
static bool ReadID(volatile UINT8* pBase, UINT8* pManufacturerID,
UINT8* pDeviceID)
{
UINT8 not_manu, not_id; /* read values before switching to ID mode */
UINT8 manu, id; /* read values when in ID mode */
@ -141,7 +142,7 @@ bool ReadID(volatile UINT8* pBase, UINT8* pManufacturerID, UINT8* pDeviceID)
}
/* erase the sector which contains the given address */
bool EraseSector(volatile UINT8* pAddr)
static bool EraseSector(volatile UINT8* pAddr)
{
#ifdef DUMMY
(void)pAddr; /* prevents warning */
@ -168,7 +169,7 @@ bool EraseSector(volatile UINT8* pAddr)
}
/* address must be in an erased location */
inline bool ProgramByte(volatile UINT8* pAddr, UINT8 data)
static inline bool ProgramByte(volatile UINT8* pAddr, UINT8 data)
{
#ifdef DUMMY
(void)pAddr; /* prevents warnings */
@ -195,7 +196,7 @@ inline bool ProgramByte(volatile UINT8* pAddr, UINT8 data)
}
/* this returns true if supported and fills the info struct */
bool GetFlashInfo(tFlashInfo* pInfo)
static bool GetFlashInfo(tFlashInfo* pInfo)
{
rb->memset(pInfo, 0, sizeof(tFlashInfo));
@ -225,17 +226,8 @@ bool GetFlashInfo(tFlashInfo* pInfo)
/*********** Tool Functions ************/
/* place a 32 bit value into memory, big endian */
void Write32(UINT8* pByte, UINT32 value)
{
pByte[0] = (UINT8)(value >> 24);
pByte[1] = (UINT8)(value >> 16);
pByte[2] = (UINT8)(value >> 8);
pByte[3] = (UINT8)(value);
}
/* read a 32 bit value from memory, big endian */
UINT32 Read32(UINT8* pByte)
static UINT32 Read32(UINT8* pByte)
{
UINT32 value;
@ -248,7 +240,7 @@ UINT32 Read32(UINT8* pByte)
}
/* get the start address of the second image */
tImageHeader* GetSecondImage(void)
static tImageHeader* GetSecondImage(void)
{
tImageHeader* pImage1;
UINT32 pos = 0; /* default: not found */
@ -277,88 +269,17 @@ tImageHeader* GetSecondImage(void)
return (tImageHeader*)pos;
}
/* Tool function to calculate a CRC32 across some buffer */
/* third argument is either 0xFFFFFFFF to start or value from last piece */
UINT32 crc_32(unsigned char* buf, unsigned len, unsigned crc32)
/* return bootloader version */
static inline unsigned BootloaderVersion(void)
{
/* CCITT standard polynomial 0x04C11DB7 */
static const UINT32 crc32_lookup[16] =
{ /* lookup table for 4 bits at a time is affordable */
0x00000000, 0x04C11DB7, 0x09823B6E, 0x0D4326D9,
0x130476DC, 0x17C56B6B, 0x1A864DB2, 0x1E475005,
0x2608EDB8, 0x22C9F00F, 0x2F8AD6D6, 0x2B4BCB61,
0x350C9B64, 0x31CD86D3, 0x3C8EA00A, 0x384FBDBD
};
unsigned char byte;
UINT32 t;
while (len--)
{
byte = *buf++; /* get one byte of data */
/* upper nibble of our data */
t = crc32 >> 28; /* extract the 4 most significant bits */
t ^= byte >> 4; /* XOR in 4 bits of data into the extracted bits */
crc32 <<= 4; /* shift the CRC register left 4 bits */
crc32 ^= crc32_lookup[t]; /* do the table lookup and XOR the result */
/* lower nibble of our data */
t = crc32 >> 28; /* extract the 4 most significant bits */
t ^= byte & 0x0F; /* XOR in 4 bits of data into the extracted bits */
crc32 <<= 4; /* shift the CRC register left 4 bits */
crc32 ^= crc32_lookup[t]; /* do the table lookup and XOR the result */
}
return crc32;
return FB[BOOT_VERS_ADR];
}
/* test if the bootloader is up-to-date, returns 0 if yes, else CRC */
unsigned CheckBootloader(void)
{
unsigned crc;
UINT32* pFlash = (UINT32*)FB;
int bootloader_version = FB[BOOT_VERS_ADR];
if (bootloader_version) /* this is a newer image, with a version number */
{
if (bootloader_version < LATEST_BOOTLOADER_VERSION)
return bootloader_version;
else
return 0;
}
/* checksum the bootloader, unfortunately I have no version info yet */
crc = crc_32((unsigned char*)pFlash[2], pFlash[3], -1);
/* Here I have to check for ARCHOS_* defines in source code, which is
generally strongly discouraged. But here I'm not checking for a certain
feature, I'm checking for the model itself. */
#if defined(ARCHOS_PLAYER)
if (crc == 0x78DAC94A)
return 0;
#elif defined(ARCHOS_RECORDER)
if (crc == 0xE968702E || crc == 0x7C3D93B4) /* normal or ROMless each */
return 0;
#elif defined(ARCHOS_RECORDERV2)
if (crc == 0x4511E9B5 || crc == 0x3A93DBDF)
return 0;
#elif defined(ARCHOS_FMRECORDER)
if (crc == 0x4511E9B5 || crc == 0x3A93DBDF)
return 0;
#endif
return crc;
}
/*********** Image File Functions ************/
/* so far, only compressed images in UCL NRV algorithm 2e supported */
tCheckResult CheckImageFile(char* filename, int space, tImageHeader* pHeader,
UINT8* pos)
tCheckResult CheckImageFile(char* filename, int space,
tImageHeader* pHeader, UINT8* pos)
{
int i;
int fd;
@ -487,8 +408,9 @@ tCheckResult CheckImageFile(char* filename, int space, tImageHeader* pHeader,
/* returns the # of failures, 0 on success */
unsigned ProgramImageFile(char* filename, UINT8* pos,
tImageHeader* pImageHeader, int start, int size)
static unsigned ProgramImageFile(char* filename, UINT8* pos,
tImageHeader* pImageHeader,
int start, int size)
{
int i;
int fd;
@ -537,8 +459,9 @@ unsigned ProgramImageFile(char* filename, UINT8* pos,
}
/* returns the # of failures, 0 on success */
unsigned VerifyImageFile(char* filename, UINT8* pos,
tImageHeader* pImageHeader, int start, int size)
static unsigned VerifyImageFile(char* filename, UINT8* pos,
tImageHeader* pImageHeader,
int start, int size)
{
int i;
int fd;
@ -586,7 +509,7 @@ unsigned VerifyImageFile(char* filename, UINT8* pos,
/***************** User Interface Functions *****************/
int WaitForButton(void)
static int WaitForButton(void)
{
int button;
@ -598,8 +521,9 @@ int WaitForButton(void)
return button;
}
#ifdef HAVE_LCD_BITMAP
/* helper for DoUserDialog() */
void ShowFlashInfo(tFlashInfo* pInfo, tImageHeader* pImageHeader)
static void ShowFlashInfo(tFlashInfo* pInfo, tImageHeader* pImageHeader)
{
char buf[32];
@ -636,9 +560,8 @@ void ShowFlashInfo(tFlashInfo* pInfo, tImageHeader* pImageHeader)
/* Kind of our main function, defines the application flow. */
#ifdef HAVE_LCD_BITMAP
/* recorder version */
void DoUserDialog(char* filename)
static void DoUserDialog(char* filename)
{
tImageHeader ImageHeader;
tFlashInfo FlashInfo;
@ -648,7 +571,7 @@ void DoUserDialog(char* filename)
UINT32 space, aligned_size, true_size;
UINT8* pos;
ssize_t memleft;
UINT32 crc;
unsigned bl_version;
bool show_greet = false;
/* this can only work if Rockbox runs in DRAM, not flash ROM */
@ -692,10 +615,10 @@ void DoUserDialog(char* filename)
return; /* exit */
}
crc = CheckBootloader();
if (crc) /* outdated version found */
bl_version = BootloaderVersion();
if (bl_version < LATEST_BOOTLOADER_VERSION)
{
rb->snprintf(buf, sizeof(buf), "(check=0x%08lx)", crc);
rb->snprintf(buf, sizeof(buf), "Bootloader V%d", bl_version);
rb->lcd_puts(0, 0, buf);
rb->lcd_puts(0, 1, "Hint: You're not ");
rb->lcd_puts(0, 2, "using the latest ");
@ -842,7 +765,7 @@ void DoUserDialog(char* filename)
#else /* #ifdef HAVE_LCD_BITMAP */
/* Player version */
void DoUserDialog(char* filename)
static void DoUserDialog(char* filename)
{
tImageHeader ImageHeader;
tFlashInfo FlashInfo;
@ -852,7 +775,7 @@ void DoUserDialog(char* filename)
UINT32 space, aligned_size, true_size;
UINT8* pos;
ssize_t memleft;
UINT32 crc;
unsigned bl_version;
/* this can only work if Rockbox runs in DRAM, not flash ROM */
if ((UINT8*)rb >= FB && (UINT8*)rb < FB + 4096*1024) /* 4 MB max */
@ -890,8 +813,8 @@ void DoUserDialog(char* filename)
return; /* exit */
}
crc = CheckBootloader();
if (crc) /* outdated version found */
bl_version = BootloaderVersion();
if (bl_version < LATEST_BOOTLOADER_VERSION)
{
rb->lcd_puts_scroll(0, 0, "Hint: You're not using the latest bootloader. A full reflash is recommended, but not required.");
rb->lcd_puts_scroll(0, 1, "Press [Menu] to ignore");
@ -939,7 +862,7 @@ void DoUserDialog(char* filename)
rb->lcd_puts_scroll(0, 1, "File invalid. Blocksize too small?");
break;
case eBadRomLink:
rb->lcd_puts_scroll(0, 1, "BootBox mismatch");
rb->lcd_puts_scroll(0, 1, "RomBox mismatch.");
break;
default:
rb->lcd_puts_scroll(0, 1, "Check failed.");

View file

@ -32,6 +32,73 @@
#include "screen_access.h"
/* some helper functions to calculate metrics on the fly */
static int screen_helper_getcharwidth(void)
{
#ifdef HAVE_LCD_BITMAP
return font_get(lcd_getfont())->maxwidth;
#else
return 1;
#endif
}
static int screen_helper_getcharheight(void)
{
#ifdef HAVE_LCD_BITMAP
return font_get(lcd_getfont())->height;
#else
return 1;
#endif
}
static int screen_helper_getnblines(void)
{
int height=screens[0].lcdheight;
#ifdef HAVE_LCD_BITMAP
if(global_settings.statusbar)
height -= STATUSBAR_HEIGHT;
#ifdef HAVE_BUTTONBAR
if(global_settings.buttonbar && screens[0].has_buttonbar)
height -= BUTTONBAR_HEIGHT;
#endif
#endif
return height / screens[0].getcharheight();
}
#if NB_SCREENS == 2
static int screen_helper_remote_getcharwidth(void)
{
#ifdef HAVE_LCD_BITMAP
return font_get(lcd_remote_getfont())->maxwidth;
#else
return 1;
#endif
}
static int screen_helper_remote_getcharheight(void)
{
#ifdef HAVE_LCD_BITMAP
return font_get(lcd_remote_getfont())->height;
#else
return 1;
#endif
}
static int screen_helper_remote_getnblines(void)
{
int height=screens[1].lcdheight;
#ifdef HAVE_LCD_BITMAP
if(global_settings.statusbar)
height -= STATUSBAR_HEIGHT;
#ifdef HAVE_BUTTONBAR
if(global_settings.buttonbar && screens[0].has_buttonbar)
height -= BUTTONBAR_HEIGHT;
#endif
#endif
return height / screens[1].getcharheight();
}
#endif
struct screen screens[NB_SCREENS] =
{
{
@ -39,6 +106,7 @@ struct screen screens[NB_SCREENS] =
.lcdwidth=LCD_WIDTH,
.lcdheight=LCD_HEIGHT,
.depth=LCD_DEPTH,
.getnblines=&screen_helper_getnblines,
#if defined(HAVE_LCD_COLOR)
.is_color=true,
#else
@ -47,6 +115,8 @@ struct screen screens[NB_SCREENS] =
#ifdef HAVE_LCD_BITMAP
.pixel_format=LCD_PIXELFORMAT,
#endif
.getcharwidth=screen_helper_getcharwidth,
.getcharheight=screen_helper_getcharheight,
#if (CONFIG_LED == LED_VIRTUAL)
.has_disk_led=false,
#elif defined(HAVE_REMOTE_LCD)
@ -137,8 +207,11 @@ struct screen screens[NB_SCREENS] =
.lcdwidth=LCD_REMOTE_WIDTH,
.lcdheight=LCD_REMOTE_HEIGHT,
.depth=LCD_REMOTE_DEPTH,
.getnblines=&screen_helper_remote_getnblines,
.is_color=false,/* No color remotes yet */
.pixel_format=LCD_REMOTE_PIXELFORMAT,
.getcharwidth=screen_helper_remote_getcharwidth,
.getcharheight=screen_helper_remote_getcharheight,
.has_disk_led=false,
.set_viewport=&lcd_remote_set_viewport,
.getwidth=&lcd_remote_getwidth,
@ -219,32 +292,3 @@ void screen_clear_area(struct screen * display, int xstart, int ystart,
display->set_drawmode(DRMODE_SOLID);
}
#endif
void screen_access_init(void)
{
int i;
struct screen *display;
FOR_NB_SCREENS(i)
{
display = &screens[i];
#ifdef HAVE_LCD_BITMAP
((struct screen*)&screens[i])->setfont(FONT_UI);
#endif
int height=display->lcdheight;
#ifdef HAVE_LCD_BITMAP
if(global_settings.statusbar)
height -= STATUSBAR_HEIGHT;
#ifdef HAVE_BUTTONBAR
if(global_settings.buttonbar && display->has_buttonbar)
height -= BUTTONBAR_HEIGHT;
#endif
display->getstringsize((unsigned char *)"A", &display->char_width,
&display->char_height);
#else
display->char_width = 1;
display->char_height = 1;
#endif
display->nb_lines = height / display->char_height;
}
}

View file

@ -60,12 +60,12 @@ struct screen
enum screen_type screen_type;
int lcdwidth, lcdheight;
int depth;
int nb_lines;
int (*getnblines)(void);
#ifdef HAVE_LCD_BITMAP
int pixel_format;
#endif
int char_width;
int char_height;
int (*getcharwidth)(void);
int (*getcharheight)(void);
bool is_color;
#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)
bool has_disk_led;
@ -165,11 +165,6 @@ void screen_clear_area(struct screen * display, int xstart, int ystart,
int width, int height);
#endif
/*
* Initializes the whole screen_access api
*/
extern void screen_access_init(void);
/*
* exported screens array that should be used
* by each app that wants to write to access display

View file

@ -174,15 +174,15 @@ static const char graphic_numeric[] = "graphic,numeric";
#ifdef HAVE_LCD_BITMAP
#if LCD_HEIGHT <= 64
#define DEFAULT_FONTNAME "rockfont-8"
#define DEFAULT_FONTNAME "08-Rockfont"
#elif LCD_HEIGHT <= 80
#define DEFAULT_FONTNAME "Sazanami-Mincho-Regular-11"
#define DEFAULT_FONTNAME "11-Sazanami-Mincho"
#elif LCD_HEIGHT <= 220
#define DEFAULT_FONTNAME "helvR10"
#define DEFAULT_FONTNAME "12-Adobe-Helvetica"
#elif LCD_HEIGHT <= 320
#define DEFAULT_FONTNAME "helvR12"
#define DEFAULT_FONTNAME "15-Adobe-Helvetica"
#else
#define DEFAULT_FONTNAME "helvR10"
#define DEFAULT_FONTNAME "12-Adobe-Helvetica"
#endif
#else

View file

@ -68,6 +68,7 @@ quelsaruk Jose Maria Garcia-Valdecasas Bernal
raenye Rani Hod
rasher Jonas Häggqvist
rdjackso Ryan Jackson
rmenes Robert Menes
rob Rob Purchase
robert Robert Keevil
roolku Robert Kukla

View file

@ -415,6 +415,8 @@ Jelle Geerts
Tadeusz PyÅ›
Rostislav Chekan
Florin Popescu
Volker Mische
Francisco Vila
The libmad team
The wavpack team

View file

@ -12,6 +12,13 @@ INCLUDES=$(TARGET_INC) -Iinclude -I$(FIRMDIR) -Iexport -Icommon -Idrivers -I$(BU
CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(BUILDDATE) $(EXTRA_DEFINES) \
-DMEM=${MEMORYSIZE}
# Limits for the built-in sysfont: ASCII for bootloaders, ISO8859-1 for normal builds
ifneq (,$(findstring -DBOOTLOADER,$(EXTRA_DEFINES)))
MAXCHAR = 127
else
MAXCHAR = 255
endif
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
@ -43,10 +50,10 @@ $(OBJDIR)/thread.o: thread.c export/thread.h
$(call PRINTS,CC thread.c)$(CC) -c -O -fomit-frame-pointer $(CFLAGS) $< -o $@
$(BUILDDIR)/sysfont.h: ../fonts/08-Schumacher-Clean.bdf
$(call PRINTS,Create sysfont.h)$(TOOLSDIR)/convbdf -l 255 -h -o $@ $<
$(call PRINTS,Create sysfont.h)$(TOOLSDIR)/convbdf -l $(MAXCHAR) -h -o $@ $<
$(OBJDIR)/sysfont.o: ../fonts/08-Schumacher-Clean.bdf
$(call PRINTS,CONVBDF)$(TOOLSDIR)/convbdf -l 255 -c -o $(OBJDIR)/sysfont.c $<
$(call PRINTS,CONVBDF)$(TOOLSDIR)/convbdf -l $(MAXCHAR) -c -o $(OBJDIR)/sysfont.c $<
$(call PRINTS,CC sysfont.c)$(CC) $(CFLAGS) -c $(OBJDIR)/sysfont.c -o $@
-include $(DEPFILE)

View file

@ -43,6 +43,7 @@
#define _isnewline(c) ((c=='\n' || c=='\r') ? 1 : 0)
#define XOR(a,b) ((a||b) && !(a&&b))
#ifndef BOOTLOADER
static const arab_t * arab_lookup(unsigned short uchar)
{
if (uchar >= 0x621 && uchar <= 0x63a)
@ -132,14 +133,18 @@ static void arabjoin(unsigned short * stringprt, int length)
}
}
}
#endif /* !BOOTLOADER */
unsigned short *bidi_l2v(const unsigned char *str, int orientation)
{
int length = utf8length(str);
static unsigned short utf16_buf[SCROLL_LINE_SIZE];
unsigned short *target, *tmp;
#ifndef BOOTLOADER
static unsigned short bidi_buf[SCROLL_LINE_SIZE];
unsigned short *heb_str, *target, *tmp; /* *broken_str */
unsigned short *heb_str; /* *broken_str */
int block_start, block_end, block_type, block_length, i;
int length = utf8length(str);
#endif
/*
long max_chars=0;
int begin, end, char_count, orig_begin;
@ -151,6 +156,11 @@ unsigned short *bidi_l2v(const unsigned char *str, int orientation)
str = utf8decode(str, target++);
*target = 0;
#ifdef BOOTLOADER
(void)orientation;
return utf16_buf;
#else /* !BOOTLOADER */
if (target == utf16_buf) /* empty string */
return target;
@ -282,5 +292,6 @@ unsigned short *bidi_l2v(const unsigned char *str, int orientation)
return broken_str;
#endif
return heb_str;
#endif /* !BOOTLOADER */
}

View file

@ -37,8 +37,7 @@
#include "bitswap.h"
#include "disk.h" /* for mount/unmount */
#define SECTOR_SIZE 512
#define MAX_BLOCK_SIZE 2048
#define BLOCK_SIZE 512 /* fixed */
/* Command definitions */
#define CMD_GO_IDLE_STATE 0x40 /* R1 */
@ -119,35 +118,19 @@ static const unsigned char dummy[] = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
};
struct block_cache_entry {
bool inuse;
#ifdef HAVE_MULTIVOLUME
int drive;
#endif
unsigned long blocknum;
unsigned char data[MAX_BLOCK_SIZE+4];
/* include start token, dummy crc, and an extra byte at the start
* to keep the data word aligned. */
};
/* 2 buffers used alternatively for writing, and also for reading
* and sub-block writing if block size > sector size */
#define NUMCACHES 2
static struct block_cache_entry block_cache[NUMCACHES];
static int current_cache = 0;
/* globals for background copy and swap */
static const unsigned char *bcs_src = NULL;
static unsigned char *bcs_dest = NULL;
static unsigned long bcs_len = 0;
/* 2 buffers used alternatively for writing, including start token,
* dummy CRC and an extra byte to keep word alignment. */
static unsigned char write_buffer[2][BLOCK_SIZE+4];
static int current_buffer = 0;
static const unsigned char *send_block_addr = NULL;
static tCardInfo card_info[2];
#ifndef HAVE_MULTIVOLUME
static int current_card = 0;
#endif
static bool last_mmc_status = false;
static int countdown; /* for mmc switch debouncing */
static bool usb_activity; /* monitoring the USB bridge */
static int countdown = HZ/3; /* for mmc switch debouncing */
static bool usb_activity; /* monitoring the USB bridge */
static long last_usb_activity;
/* private function declarations */
@ -162,14 +145,13 @@ static void read_transfer(unsigned char *buf, int len)
__attribute__ ((section(".icode")));
static unsigned char poll_byte(long timeout);
static unsigned char poll_busy(long timeout);
static int send_cmd(int cmd, unsigned long parameter, unsigned char *response);
static unsigned char send_cmd(int cmd, unsigned long parameter, void *data);
static int receive_cxd(unsigned char *buf);
static int initialize_card(int card_no);
static void bg_copy_swap(void);
static int receive_block(unsigned char *inbuf, int size, long timeout);
static int send_block(int size, unsigned char start_token, long timeout);
static int cache_block(IF_MV2(int drive,) unsigned long blocknum,
int size, long timeout);
static int receive_block(unsigned char *inbuf, long timeout);
static void send_block_prepare(void);
static int send_block_send(unsigned char start_token, long timeout,
bool prepare_next);
static void mmc_tick(void);
/* implementation */
@ -190,6 +172,8 @@ static int select_card(int card_no)
led(true);
last_disk_activity = current_tick;
mmc_enable_int_flash_clock(card_no == 0);
if (!card_info[card_no].initialized)
{
setup_sci1(7); /* Initial rate: 375 kbps (need <= 400 per mmc specs) */
@ -334,30 +318,25 @@ static unsigned char poll_busy(long timeout)
return (dummy == 0xFF) ? data : 0;
}
/* Send MMC command and get response */
static int send_cmd(int cmd, unsigned long parameter, unsigned char *response)
/* Send MMC command and get response. Returns R1 byte directly.
* Returns further R2 or R3 bytes in *data (can be NULL for other commands) */
static unsigned char send_cmd(int cmd, unsigned long parameter, void *data)
{
unsigned char command[] = {0x40, 0x00, 0x00, 0x00, 0x00, 0x95, 0xFF};
static struct {
unsigned char cmd;
unsigned long parameter;
const unsigned char crc7; /* fixed, valid for CMD0 only */
const unsigned char trailer;
} __attribute__((packed)) command = {0x40, 0, 0x95, 0xFF};
command[0] = cmd;
if (parameter != 0)
{
command[1] = (parameter >> 24) & 0xFF;
command[2] = (parameter >> 16) & 0xFF;
command[3] = (parameter >> 8) & 0xFF;
command[4] = parameter & 0xFF;
}
write_transfer(command, 7);
unsigned char ret;
response[0] = poll_byte(20);
command.cmd = cmd;
command.parameter = htobe32(parameter);
if (response[0] != 0x00)
{
write_transfer(dummy, 1);
return -1;
}
write_transfer((unsigned char *)&command, sizeof(command));
ret = poll_byte(20);
switch (cmd)
{
@ -365,24 +344,21 @@ static int send_cmd(int cmd, unsigned long parameter, unsigned char *response)
case CMD_SEND_CID:
case CMD_READ_SINGLE_BLOCK:
case CMD_READ_MULTIPLE_BLOCK:
break;
return ret;
case CMD_SEND_STATUS: /* R2 response, close with dummy */
read_transfer(response + 1, 1);
write_transfer(dummy, 1);
read_transfer(data, 1);
break;
case CMD_READ_OCR: /* R3 response, close with dummy */
read_transfer(response + 1, 4);
write_transfer(dummy, 1);
read_transfer(data, 4);
break;
default: /* R1 response, close with dummy */
write_transfer(dummy, 1);
break; /* also catches block writes */
}
return 0;
write_transfer(dummy, 1);
return ret;
}
/* Receive CID/ CSD data (16 bytes) */
@ -402,8 +378,8 @@ static int receive_cxd(unsigned char *buf)
static int initialize_card(int card_no)
{
int rc, i, temp;
unsigned char response[5];
int rc, i;
int blk_exp, ts_exp, taac_exp;
tCardInfo *card = &card_info[card_no];
static const char mantissa[] = { /* *10 */
@ -417,98 +393,82 @@ static int initialize_card(int card_no)
if (card_no == 1)
mmc_status = MMC_TOUCHED;
/* switch to SPI mode */
send_cmd(CMD_GO_IDLE_STATE, 0, response);
if (response[0] != 0x01)
return -1; /* error response */
if (send_cmd(CMD_GO_IDLE_STATE, 0, NULL) != 0x01)
return -1; /* error or no response */
/* initialize card */
for (i = 0; i < 100; i++) /* timeout 1 sec */
for (i = HZ;;) /* try for 1 second*/
{
sleep(1);
if (send_cmd(CMD_SEND_OP_COND, 0, response) == 0)
if (send_cmd(CMD_SEND_OP_COND, 0, NULL) == 0)
break;
if (--i <= 0)
return -2; /* timeout */
}
if (response[0] != 0x00)
return -2; /* not ready */
/* get OCR register */
rc = send_cmd(CMD_READ_OCR, 0, response);
if (rc)
return rc * 10 - 3;
card->ocr = (response[1] << 24) | (response[2] << 16)
| (response[3] << 8) | response[4];
if (send_cmd(CMD_READ_OCR, 0, &card->ocr))
return -3;
card->ocr = betoh32(card->ocr); /* no-op on big endian */
/* check voltage */
if (!(card->ocr & 0x00100000)) /* 3.2 .. 3.3 V */
return -4;
/* get CSD register */
rc = send_cmd(CMD_SEND_CSD, 0, response);
if (rc)
return rc * 10 - 5;
if (send_cmd(CMD_SEND_CSD, 0, NULL))
return -5;
rc = receive_cxd((unsigned char*)card->csd);
if (rc)
return rc * 10 - 6;
return rc * 10 - 5;
/* check block sizes */
card->block_exp = card_extract_bits(card->csd, 44, 4);
card->blocksize = 1 << card->block_exp;
if ((card_extract_bits(card->csd, 102, 4) != card->block_exp)
|| card->blocksize > MAX_BLOCK_SIZE)
{
return -7;
}
blk_exp = card_extract_bits(card->csd, 44, 4);
if (blk_exp < 9) /* block size < 512 bytes not supported */
return -6;
if (card->blocksize != SECTOR_SIZE)
{
rc = send_cmd(CMD_SET_BLOCKLEN, card->blocksize, response);
if (rc)
return rc * 10 - 8;
}
card->numblocks = (card_extract_bits(card->csd, 54, 12) + 1)
<< (card_extract_bits(card->csd, 78, 3) + 2 + blk_exp - 9);
card->blocksize = BLOCK_SIZE;
/* max transmission speed, clock divider */
temp = card_extract_bits(card->csd, 29, 3);
temp = (temp > 3) ? 3 : temp;
ts_exp = card_extract_bits(card->csd, 29, 3);
ts_exp = (ts_exp > 3) ? 3 : ts_exp;
card->speed = mantissa[card_extract_bits(card->csd, 25, 4)]
* exponent[temp + 4];
* exponent[ts_exp + 4];
card->bitrate_register = (FREQ/4-1) / card->speed;
/* NSAC, TSAC, read timeout */
card->nsac = 100 * card_extract_bits(card->csd, 16, 8);
card->tsac = mantissa[card_extract_bits(card->csd, 9, 4)];
temp = card_extract_bits(card->csd, 13, 3);
taac_exp = card_extract_bits(card->csd, 13, 3);
card->read_timeout = ((FREQ/4) / (card->bitrate_register + 1)
* card->tsac / exponent[9 - temp]
* card->tsac / exponent[9 - taac_exp]
+ (10 * card->nsac));
card->read_timeout /= 8; /* clocks -> bytes */
card->tsac = card->tsac * exponent[temp] / 10;
card->tsac = card->tsac * exponent[taac_exp] / 10;
/* r2w_factor, write timeout */
card->r2w_factor = 1 << card_extract_bits(card->csd, 99, 3);
if (card->r2w_factor > 32) /* dirty MMC spec violation */
{
card->read_timeout *= 4; /* add safety factor */
card->write_timeout = card->read_timeout * 8;
}
else
card->write_timeout = card->read_timeout * card->r2w_factor;
card->write_timeout = card->read_timeout * card->r2w_factor;
/* card size */
card->numblocks = (card_extract_bits(card->csd, 54, 12) + 1)
* (1 << (card_extract_bits(card->csd, 78, 3) + 2));
card->size = card->numblocks * card->blocksize;
if (card->r2w_factor > 32) /* Such cards often need extra read delay */
card->read_timeout *= 4;
/* switch to full speed */
setup_sci1(card->bitrate_register);
/* always use 512 byte blocks */
if (send_cmd(CMD_SET_BLOCKLEN, BLOCK_SIZE, NULL))
return -7;
/* get CID register */
rc = send_cmd(CMD_SEND_CID, 0, response);
if (rc)
return rc * 10 - 9;
if (send_cmd(CMD_SEND_CID, 0, NULL))
return -8;
rc = receive_cxd((unsigned char*)card->cid);
if (rc)
return rc * 10 - 9;
return rc * 10 - 8;
card->initialized = true;
return 0;
@ -526,33 +486,11 @@ tCardInfo *mmc_card_info(int card_no)
return card;
}
/* copy and swap in the background. If destination is NULL, use the next
* block cache entry */
static void bg_copy_swap(void)
/* Receive one block with DMA and bitswap it (chasing bitswap). */
static int receive_block(unsigned char *inbuf, long timeout)
{
if (!bcs_len)
return;
if (!bcs_dest)
{
current_cache = (current_cache + 1) % NUMCACHES; /* next cache */
block_cache[current_cache].inuse = false;
bcs_dest = block_cache[current_cache].data + 2;
}
if (bcs_src)
{
memcpy(bcs_dest, bcs_src, bcs_len);
bcs_src += bcs_len;
}
bitswap(bcs_dest, bcs_len);
bcs_dest += bcs_len;
bcs_len = 0;
}
unsigned long buf_end;
/* Receive one block with dma, possibly swapping the previously received
* block in the background */
static int receive_block(unsigned char *inbuf, int size, long timeout)
{
if (poll_byte(timeout) != DT_START_BLOCK)
{
write_transfer(dummy, 1);
@ -568,18 +506,32 @@ static int receive_block(unsigned char *inbuf, int size, long timeout)
CHCR0 = 0; /* disable */
SAR0 = RDR1_ADDR;
DAR0 = (unsigned long) inbuf;
DTCR0 = size;
DTCR0 = BLOCK_SIZE;
CHCR0 = 0x4601; /* fixed source address, RXI1, enable */
DMAOR = 0x0001;
SCR1 = (SCI_RE|SCI_RIE); /* kick off DMA */
/* dma receives 2 bytes more than DTCR2, but the last 2 bytes are not
/* DMA receives 2 bytes more than DTCR2, but the last 2 bytes are not
* stored. The first extra byte is available from RDR1 after the DMA ends,
* the second one is lost because of the SCI overrun. However, this
* the second one is lost because of the SCI overrun. However, this
* behaviour conveniently discards the crc. */
bg_copy_swap();
yield(); /* be nice */
/* Bitswap received data, chasing the DMA pointer */
buf_end = (unsigned long)inbuf + BLOCK_SIZE;
do
{
/* Call bitswap whenever (a multiple of) 8 bytes are
* available (value optimised by experimentation). */
int swap_now = (DAR0 - (unsigned long)inbuf) & ~0x00000007;
if (swap_now)
{
bitswap(inbuf, swap_now);
inbuf += swap_now;
}
}
while ((unsigned long)inbuf < buf_end);
while (!(CHCR0 & 0x0002)); /* wait for end of DMA */
while (!(SSR1 & SCI_ORER)); /* wait for the trailing bytes */
@ -591,15 +543,31 @@ static int receive_block(unsigned char *inbuf, int size, long timeout)
return 0;
}
/* Send one block with dma from the current block cache, possibly preparing
* the next block within the next block cache in the background. */
static int send_block(int size, unsigned char start_token, long timeout)
/* Prepare a block for sending by copying it to the next write buffer
* and bitswapping it. */
static void send_block_prepare(void)
{
unsigned char *dest;
current_buffer ^= 1; /* toggle buffer */
dest = write_buffer[current_buffer] + 2;
memcpy(dest, send_block_addr, BLOCK_SIZE);
bitswap(dest, BLOCK_SIZE);
send_block_addr += BLOCK_SIZE;
}
/* Send one block with DMA from the current write buffer, possibly preparing
* the next block within the next write buffer in the background. */
static int send_block_send(unsigned char start_token, long timeout,
bool prepare_next)
{
int rc = 0;
unsigned char *curbuf = block_cache[current_cache].data;
unsigned char *curbuf = write_buffer[current_buffer];
curbuf[1] = fliptable[(signed char)start_token];
*(unsigned short *)(curbuf + size + 2) = 0xFFFF;
*(unsigned short *)(curbuf + BLOCK_SIZE + 2) = 0xFFFF;
while (!(SSR1 & SCI_TEND)); /* wait for end of transfer */
@ -610,12 +578,13 @@ static int send_block(int size, unsigned char start_token, long timeout)
CHCR0 = 0; /* disable */
SAR0 = (unsigned long)(curbuf + 1);
DAR0 = TDR1_ADDR;
DTCR0 = size + 3; /* start token + block + dummy crc */
DTCR0 = BLOCK_SIZE + 3; /* start token + block + dummy crc */
CHCR0 = 0x1701; /* fixed dest. address, TXI1, enable */
DMAOR = 0x0001;
SCR1 = (SCI_TE|SCI_TIE); /* kick off DMA */
bg_copy_swap();
if (prepare_next)
send_block_prepare();
yield(); /* be nice */
while (!(CHCR0 & 0x0002)); /* wait for end of DMA */
@ -632,64 +601,19 @@ static int send_block(int size, unsigned char start_token, long timeout)
return rc;
}
static int cache_block(IF_MV2(int drive,) unsigned long blocknum,
int size, long timeout)
{
int rc, i;
unsigned char response;
/* check whether the block is already cached */
for (i = 0; i < NUMCACHES; i++)
{
if (block_cache[i].inuse && (block_cache[i].blocknum == blocknum)
#ifdef HAVE_MULTIVOLUME
&& (block_cache[i].drive == drive)
#endif
)
{
current_cache = i;
bg_copy_swap();
return 0;
}
}
/* not found: read the block */
current_cache = (current_cache + 1) % NUMCACHES;
rc = send_cmd(CMD_READ_SINGLE_BLOCK, blocknum * size, &response);
if (rc)
return rc * 10 - 1;
block_cache[current_cache].inuse = false;
rc = receive_block(block_cache[current_cache].data + 2, size, timeout);
if (rc)
return rc * 10 - 2;
#ifdef HAVE_MULTIVOLUME
block_cache[current_cache].drive = drive;
#endif
block_cache[current_cache].blocknum = blocknum;
block_cache[current_cache].inuse = true;
return 0;
}
int ata_read_sectors(IF_MV2(int drive,)
unsigned long start,
int incount,
void* inbuf)
{
int rc = 0;
unsigned int blocksize, offset;
unsigned long c_addr, c_end_addr;
unsigned long c_block, c_end_block;
unsigned char response;
int lastblock = 0;
unsigned long end_block;
tCardInfo *card;
#ifndef HAVE_MULTIVOLUME
int drive = current_card;
#endif
c_addr = start * SECTOR_SIZE;
c_end_addr = c_addr + incount * SECTOR_SIZE;
card = &card_info[drive];
rc = select_card(drive);
if (rc)
@ -697,90 +621,64 @@ int ata_read_sectors(IF_MV2(int drive,)
rc = rc * 10 - 1;
goto error;
}
if (c_end_addr > card->size)
end_block = start + incount;
if (end_block > card->numblocks)
{
rc = -2;
goto error;
}
blocksize = card->blocksize;
offset = c_addr & (blocksize - 1);
c_block = c_addr >> card->block_exp;
c_end_block = c_end_addr >> card->block_exp;
bcs_dest = inbuf;
if (offset) /* first partial block */
{
unsigned long len = MIN(c_end_addr - c_addr, blocksize - offset);
rc = cache_block(IF_MV2(drive,) c_block, blocksize,
card->read_timeout);
if (rc)
{
rc = rc * 10 - 3;
goto error;
}
bcs_src = block_cache[current_cache].data + 2 + offset;
bcs_len = len;
inbuf += len;
c_addr += len;
c_block++;
}
/* some cards don't like reading the very last block with
/* Some cards don't like reading the very last block with
* CMD_READ_MULTIPLE_BLOCK, so make sure this block is always
* read with CMD_READ_SINGLE_BLOCK. Let the 'last partial block'
* read catch this. */
if (c_end_block == card->numblocks)
c_end_block--;
if (c_block < c_end_block)
* read with CMD_READ_SINGLE_BLOCK. */
if (end_block == card->numblocks)
lastblock = 1;
if (incount > 1)
{
int read_cmd = (c_end_block - c_block > 1) ?
CMD_READ_MULTIPLE_BLOCK : CMD_READ_SINGLE_BLOCK;
rc = send_cmd(read_cmd, c_addr, &response);
if (rc)
/* MMC4.2: make multiplication conditional */
if (send_cmd(CMD_READ_MULTIPLE_BLOCK, start * BLOCK_SIZE, NULL))
{
rc = rc * 10 - 4;
rc = -3;
goto error;
}
while (c_block < c_end_block)
while (--incount >= lastblock)
{
rc = receive_block(inbuf, blocksize, card->read_timeout);
rc = receive_block(inbuf, card->read_timeout);
if (rc)
{
rc = rc * 10 - 5;
/* If an error occurs during multiple block reading, the
* host still needs to send CMD_STOP_TRANSMISSION */
send_cmd(CMD_STOP_TRANSMISSION, 0, NULL);
rc = rc * 10 - 4;
goto error;
}
bcs_src = NULL;
bcs_len = blocksize;
inbuf += blocksize;
c_addr += blocksize;
c_block++;
inbuf += BLOCK_SIZE;
start++;
/* ^^ necessary for the abovementioned last block special case */
}
if (read_cmd == CMD_READ_MULTIPLE_BLOCK)
if (send_cmd(CMD_STOP_TRANSMISSION, 0, NULL))
{
rc = send_cmd(CMD_STOP_TRANSMISSION, 0, &response);
if (rc)
{
rc = rc * 10 - 6;
goto error;
}
rc = -5;
goto error;
}
}
if (c_addr < c_end_addr) /* last partial block */
if (incount > 0)
{
rc = cache_block(IF_MV2(drive,) c_block, blocksize,
card->read_timeout);
/* MMC4.2: make multiplication conditional */
if (send_cmd(CMD_READ_SINGLE_BLOCK, start * BLOCK_SIZE, NULL))
{
rc = -6;
goto error;
}
rc = receive_block(inbuf, card->read_timeout);
if (rc)
{
rc = rc * 10 - 7;
goto error;
}
bcs_src = block_cache[current_cache].data + 2;
bcs_len = c_end_addr - c_addr;
}
}
bg_copy_swap();
error:
@ -795,18 +693,13 @@ int ata_write_sectors(IF_MV2(int drive,)
const void* buf)
{
int rc = 0;
unsigned int blocksize, offset;
unsigned long c_addr, c_end_addr;
unsigned long c_block, c_end_block;
unsigned char response;
int write_cmd;
unsigned char start_token;
tCardInfo *card;
#ifndef HAVE_MULTIVOLUME
int drive = current_card;
#endif
c_addr = start * SECTOR_SIZE;
c_end_addr = c_addr + count * SECTOR_SIZE;
card = &card_info[drive];
rc = select_card(drive);
if (rc)
@ -814,120 +707,45 @@ int ata_write_sectors(IF_MV2(int drive,)
rc = rc * 10 - 1;
goto error;
}
if (c_end_addr > card->size)
if (start + count > card->numblocks)
panicf("Writing past end of card");
blocksize = card->blocksize;
offset = c_addr & (blocksize - 1);
c_block = c_addr >> card->block_exp;
c_end_block = c_end_addr >> card->block_exp;
bcs_src = buf;
send_block_addr = buf;
send_block_prepare();
/* Special case: first block is trimmed at both ends. May only happen
* if (blocksize > 2 * sectorsize), i.e. blocksize == 2048 */
if ((c_block == c_end_block) && offset)
c_end_block++;
if (c_block < c_end_block)
if (count > 1)
{
int write_cmd;
unsigned char start_token;
if (c_end_block - c_block > 1)
{
write_cmd = CMD_WRITE_MULTIPLE_BLOCK;
start_token = DT_START_WRITE_MULTIPLE;
}
else
{
write_cmd = CMD_WRITE_BLOCK;
start_token = DT_START_BLOCK;
}
if (offset)
{
unsigned long len = MIN(c_end_addr - c_addr, blocksize - offset);
rc = cache_block(IF_MV2(drive,) c_block, blocksize,
card->read_timeout);
if (rc)
{
rc = rc * 10 - 2;
goto error;
}
bcs_dest = block_cache[current_cache].data + 2 + offset;
bcs_len = len;
c_addr -= offset;
}
else
{
bcs_dest = NULL; /* next block cache */
bcs_len = blocksize;
}
bg_copy_swap();
rc = send_cmd(write_cmd, c_addr, &response);
write_cmd = CMD_WRITE_MULTIPLE_BLOCK;
start_token = DT_START_WRITE_MULTIPLE;
}
else
{
write_cmd = CMD_WRITE_BLOCK;
start_token = DT_START_BLOCK;
}
/* MMC4.2: make multiplication conditional */
if (send_cmd(write_cmd, start * BLOCK_SIZE, NULL))
{
rc = -2;
goto error;
}
while (--count >= 0)
{
rc = send_block_send(start_token, card->write_timeout, count > 0);
if (rc)
{
rc = rc * 10 - 3;
goto error;
}
c_block++; /* early increment to simplify the loop */
while (c_block < c_end_block)
{
bcs_dest = NULL; /* next block cache */
bcs_len = blocksize;
rc = send_block(blocksize, start_token, card->write_timeout);
if (rc)
{
rc = rc * 10 - 4;
goto error;
}
c_addr += blocksize;
c_block++;
}
rc = send_block(blocksize, start_token, card->write_timeout);
if (rc)
{
rc = rc * 10 - 5;
goto error;
}
c_addr += blocksize;
/* c_block++ was done early */
if (write_cmd == CMD_WRITE_MULTIPLE_BLOCK)
{
response = DT_STOP_TRAN;
write_transfer(&response, 1);
poll_busy(card->write_timeout);
break;
/* If an error occurs during multiple block writing,
* the STOP_TRAN token still needs to be sent. */
}
}
if (c_addr < c_end_addr) /* last partial block */
if (write_cmd == CMD_WRITE_MULTIPLE_BLOCK)
{
rc = cache_block(IF_MV2(drive,) c_block, blocksize,
card->read_timeout);
if (rc)
{
rc = rc * 10 - 6;
goto error;
}
bcs_dest = block_cache[current_cache].data + 2;
bcs_len = c_end_addr - c_addr;
bg_copy_swap();
rc = send_cmd(CMD_WRITE_BLOCK, c_addr, &response);
if (rc)
{
rc = rc * 10 - 7;
goto error;
}
rc = send_block(blocksize, DT_START_BLOCK, card->write_timeout);
if (rc)
{
rc = rc * 10 - 8;
goto error;
}
static const unsigned char stop_tran = DT_STOP_TRAN;
write_transfer(&stop_tran, 1);
poll_busy(card->write_timeout);
}
error:
@ -960,7 +778,7 @@ static void mmc_thread(void)
{
struct queue_event ev;
bool idle_notified = false;
while (1) {
queue_wait_w_tmo(&mmc_queue, &ev, HZ);
switch ( ev.id )
@ -1017,13 +835,10 @@ bool mmc_touched(void)
{
if (mmc_status == MMC_UNKNOWN) /* try to detect */
{
unsigned char response;
mutex_lock(&mmc_mutex);
setup_sci1(7); /* safe value */
and_b(~0x02, &PADRH); /* assert CS */
send_cmd(CMD_SEND_OP_COND, 0, &response);
if (response == 0xFF)
if (send_cmd(CMD_SEND_OP_COND, 0, NULL) == 0xFF)
mmc_status = MMC_UNTOUCHED;
else
mmc_status = MMC_TOUCHED;
@ -1064,7 +879,7 @@ static void mmc_tick(void)
if (current_status != last_mmc_status)
{
last_mmc_status = current_status;
countdown = 30;
countdown = HZ/3;
}
else
{
@ -1096,18 +911,15 @@ int ata_soft_reset(void)
void ata_enable(bool on)
{
PBCR1 &= ~0x0CF0; /* PB13, PB11 and PB10 become GPIOs, if not modified below */
PACR2 &= ~0x4000; /* use PA7 (bridge reset) as GPIO */
PBCR1 &= ~0x0CF0; /* PB13, PB11 and PB10 become GPIO,
* if not modified below */
if (on)
{
PBCR1 |= 0x08A0; /* as SCK1, TxD1, RxD1 */
IPRE &= 0x0FFF; /* disable SCI1 interrupts for the CPU */
mmc_enable_int_flash_clock(true); /* always enabled in SPI mode */
}
and_b(~0x80, &PADRL); /* assert reset */
sleep(HZ/20);
or_b(0x80, &PADRL); /* de-assert reset */
sleep(HZ/20);
PBCR1 |= 0x08A0; /* as SCK1, TxD1, RxD1 */
and_b(~0x80, &PADRL); /* assert flash reset */
sleep(HZ/100);
or_b(0x80, &PADRL); /* de-assert flash reset */
sleep(HZ/100);
card_info[0].initialized = false;
card_info[1].initialized = false;
}
@ -1124,36 +936,33 @@ int ata_init(void)
mutex_lock(&mmc_mutex);
led(false);
/* Port setup */
PACR1 &= ~0x0F00; /* GPIO function for PA12, /IRQ1 for PA13 */
PACR1 |= 0x0400;
PADR |= 0x0680; /* set all the selects + reset high (=inactive) */
PAIOR |= 0x1680; /* make outputs for them and the PA12 clock gate */
PBDR |= 0x2C00; /* SCK1, TxD1 and RxD1 high when GPIO CHECKME: mask */
PBIOR |= 0x2000; /* SCK1 output */
PBIOR &= ~0x0C00; /* TxD1, RxD1 input */
last_mmc_status = mmc_detect();
#ifndef HAVE_MULTIVOLUME
if (last_mmc_status)
{ /* MMC inserted */
current_card = 1;
}
else
{ /* no MMC, use internal memory */
current_card = 0;
}
/* Use MMC if inserted, internal flash otherwise */
current_card = last_mmc_status ? 1 : 0;
#endif
new_mmc_circuit = ((HW_MASK & MMC_CLOCK_POLARITY) != 0);
ata_enable(true);
if ( !initialized )
if (!initialized)
{
if (!last_mmc_status)
mmc_status = MMC_UNTOUCHED;
/* Port setup */
PACR1 &= ~0x0F3C; /* GPIO function for PA13 (flash busy), PA12
* (clk gate), PA10 (flash CS), PA9 (MMC CS) */
PACR2 &= ~0x4000; /* GPIO for PA7 (flash reset) */
PADR |= 0x0680; /* set all the selects + reset high (=inactive) */
PAIOR |= 0x1680; /* make outputs for them and the PA12 clock gate */
PBCR1 &= ~0x0CF0; /* GPIO function for PB13, PB11 and PB10 */
PBDR |= 0x2C00; /* SCK1, TxD1 and RxD1 high in GPIO */
PBIOR |= 0x2000; /* SCK1 output */
PBIOR &= ~0x0C00; /* TxD1, RxD1 input */
IPRE &= 0x0FFF; /* disable SCI1 interrupts for the CPU */
new_mmc_circuit = ((HW_MASK & MMC_CLOCK_POLARITY) != 0);
create_thread(mmc_thread, mmc_stack,
sizeof(mmc_stack), 0, mmc_thread_name
IF_PRIO(, PRIORITY_SYSTEM)
@ -1161,6 +970,7 @@ int ata_init(void)
tick_add_task(mmc_tick);
initialized = true;
}
ata_enable(true);
mutex_unlock(&mmc_mutex);
return rc;

View file

@ -41,117 +41,113 @@ const struct sound_settings_info audiohw_settings[] = {
[SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0},
[SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100},
#ifdef HAVE_RECORDING
[SOUND_LEFT_GAIN] = {"dB", 1, 1,-128, 96, 0},
[SOUND_RIGHT_GAIN] = {"dB", 1, 1,-128, 96, 0},
[SOUND_MIC_GAIN] = {"dB", 1, 1,-128, 108, 16},
[SOUND_LEFT_GAIN] = {"dB", 1, 1, 0, 63, 16},
[SOUND_RIGHT_GAIN] = {"dB", 1, 1, 0, 63, 16},
[SOUND_MIC_GAIN] = {"dB", 1, 1, 0, 63, 16},
#endif
[SOUND_BASS_CUTOFF] = {"", 0, 1, 1, 4, 1},
[SOUND_TREBLE_CUTOFF] = {"", 0, 1, 1, 4, 1},
};
/* shadow registers */
unsigned int eq1_reg;
unsigned int eq5_reg;
static unsigned short eq1_reg = EQ1_EQ3DMODE | EQ_GAIN_VALUE(0);
static unsigned short eq5_reg = EQ_GAIN_VALUE(0);
/* convert tenth of dB volume (-57..6) to master volume register value */
int tenthdb2master(int db)
{
/* +6 to -57dB in 1dB steps == 64 levels = 6 bits */
/* 0111111 == +6dB (0x3f) = 63) */
/* 0111001 == 0dB (0x39) = 57) */
/* 0000001 == -56dB (0x01) = */
/* 0000000 == -57dB (0x00) */
/* 1000000 == Mute (0x40) */
if (db < VOLUME_MIN) {
return 0x40;
} else {
return((db/10)+57);
return (db/10)+57;
}
}
/* convert tenth of dB volume (-780..0) to mixer volume register value */
int tenthdb2mixer(int db)
int sound_val2phys(int setting, int value)
{
if (db < -660) /* 1.5 dB steps */
return (2640 - db) / 15;
else if (db < -600) /* 0.75 dB steps */
return (990 - db) * 2 / 15;
else if (db < -460) /* 0.5 dB steps */
return (460 - db) / 5;
else /* 0.25 dB steps */
return -db * 2 / 5;
}
int result;
#define IPOD_PCM_LEVEL 0x65 /* -6dB */
//#define BASSCTRL 0x
//#define TREBCTRL 0x0b
/* Silently enable / disable audio output */
void audiohw_enable_output(bool enable)
{
if (enable)
switch(setting)
{
/* reset the I2S controller into known state */
i2s_reset();
/* TODO: Review the power-up sequence to prevent pops */
wmcodec_write(RESET, 0x1ff); /*Reset*/
wmcodec_write(PWRMGMT1, 0x2b);
wmcodec_write(PWRMGMT2, 0x180);
wmcodec_write(PWRMGMT3, 0x6f);
wmcodec_write(AINTFCE, 0x10);
wmcodec_write(CLKCTRL, 0x49);
wmcodec_write(OUTCTRL, 1);
/* The iPod can handle multiple frequencies, but fix at 44.1KHz
for now */
audiohw_set_sample_rate(WM8758_44100HZ);
wmcodec_write(LOUTMIX,0x1); /* Enable mixer */
wmcodec_write(ROUTMIX,0x1); /* Enable mixer */
audiohw_mute(0);
} else {
audiohw_mute(1);
#ifdef HAVE_RECORDING
case SOUND_LEFT_GAIN:
case SOUND_RIGHT_GAIN:
case SOUND_MIC_GAIN:
result = ((value - 16) * 15) / 2;
break;
#endif
default:
result = value;
break;
}
return result;
}
void audiohw_mute(bool mute)
{
if (mute) {
wmcodec_write(DACCTRL, DACCTRL_SOFTMUTE);
} else {
wmcodec_write(DACCTRL, 0);
}
}
void audiohw_preinit(void)
{
i2s_reset();
wmcodec_write(RESET, RESET_RESET);
wmcodec_write(PWRMGMT1, PWRMGMT1_PLLEN | PWRMGMT1_BIASEN
| PWRMGMT1_VMIDSEL_5K);
wmcodec_write(PWRMGMT2, PWRMGMT2_ROUT1EN | PWRMGMT2_LOUT1EN);
wmcodec_write(PWRMGMT3, PWRMGMT3_LOUT2EN | PWRMGMT3_ROUT2EN
| PWRMGMT3_RMIXEN | PWRMGMT3_LMIXEN
| PWRMGMT3_DACENR | PWRMGMT3_DACENL);
wmcodec_write(AINTFCE, AINTFCE_IWL_16BIT | AINTFCE_FORMAT_I2S);
wmcodec_write(OUTCTRL, OUTCTRL_VROI);
wmcodec_write(CLKCTRL, CLKCTRL_MS); /* WM8758 is clock master */
audiohw_set_sample_rate(WM8758_44100HZ);
wmcodec_write(LOUTMIX, LOUTMIX_DACL2LMIX);
wmcodec_write(ROUTMIX, ROUTMIX_DACR2RMIX);
}
void audiohw_postinit(void)
{
wmcodec_write(PWRMGMT1, PWRMGMT1_PLLEN | PWRMGMT1_BIASEN
| PWRMGMT1_VMIDSEL_75K);
/* lower the VMID power consumption */
audiohw_mute(false);
}
void audiohw_set_master_vol(int vol_l, int vol_r)
{
/* OUT1 */
wmcodec_write(LOUT1VOL, 0x080 | vol_l);
wmcodec_write(ROUT1VOL, 0x180 | vol_r);
wmcodec_write(LOUT1VOL, LOUT1VOL_LOUT1ZC | vol_l);
wmcodec_write(ROUT1VOL, ROUT1VOL_OUT1VU | ROUT1VOL_ROUT1ZC | vol_r);
}
void audiohw_set_lineout_vol(int vol_l, int vol_r)
{
/* OUT2 */
wmcodec_write(LOUT2VOL, vol_l);
wmcodec_write(ROUT2VOL, 0x100 | vol_r);
}
void audiohw_set_mixer_vol(int channel1, int channel2)
{
(void)channel1;
(void)channel2;
wmcodec_write(LOUT2VOL, LOUT2VOL_LOUT2ZC | vol_l);
wmcodec_write(ROUT2VOL, ROUT2VOL_OUT2VU | ROUT2VOL_ROUT2ZC | vol_r);
}
void audiohw_set_bass(int value)
{
eq1_reg = (eq1_reg & ~EQ_GAIN_MASK) | EQ_GAIN_VALUE(value);
wmcodec_write(EQ1, 0x100 | eq1_reg);
wmcodec_write(EQ1, eq1_reg);
}
void audiohw_set_bass_cutoff(int value)
{
eq1_reg = (eq1_reg & ~EQ_CUTOFF_MASK) | EQ_CUTOFF_VALUE(value);
wmcodec_write(EQ1, 0x100 | eq1_reg);
wmcodec_write(EQ1, eq1_reg);
}
void audiohw_set_treble(int value)
@ -166,31 +162,16 @@ void audiohw_set_treble_cutoff(int value)
wmcodec_write(EQ5, eq5_reg);
}
void audiohw_mute(bool mute)
{
if (mute)
{
/* Set DACMU = 1 to soft-mute the audio DACs. */
wmcodec_write(DACCTRL, 0x40);
} else {
/* Set DACMU = 0 to soft-un-mute the audio DACs. */
wmcodec_write(DACCTRL, 0x0);
}
}
/* Nice shutdown of WM8758 codec */
void audiohw_close(void)
{
audiohw_mute(1);
audiohw_mute(true);
wmcodec_write(PWRMGMT3, 0x0);
wmcodec_write(PWRMGMT1, 0x0);
wmcodec_write(PWRMGMT2, 0x40);
wmcodec_write(PWRMGMT3, 0);
wmcodec_write(PWRMGMT1, 0);
wmcodec_write(PWRMGMT2, PWRMGMT2_SLEEP);
}
/* Change the order of the noise shaper, 5th order is recommended above 32kHz */
void audiohw_set_nsorder(int order)
{
(void)order;
@ -202,89 +183,68 @@ void audiohw_set_sample_rate(int sampling_control)
/**** We force 44.1KHz for now. ****/
(void)sampling_control;
/* set clock div */
wmcodec_write(CLKCTRL, 1 | (0 << 2) | (2 << 5));
/* setup PLL for MHZ=11.2896 */
wmcodec_write(PLLN, (1 << 4) | 0x7);
wmcodec_write(PLLN, PLLN_PLLPRESCALE | 0x7);
wmcodec_write(PLLK1, 0x21);
wmcodec_write(PLLK2, 0x161);
wmcodec_write(PLLK3, 0x26);
/* set clock div */
wmcodec_write(CLKCTRL, 1 | (1 << 2) | (2 << 5) | (1 << 8));
wmcodec_write(CLKCTRL, CLKCTRL_CLKSEL | CLKCTRL_MCLKDIV_2
| CLKCTRL_BCLKDIV_2 | CLKCTRL_MS);
/* set srate */
wmcodec_write(SRATECTRL, (0 << 1));
wmcodec_write(ADDCTRL, ADDCTRL_SR_48kHz | ADDCTRL_SLOWCLKEN);
/* SLOWCLK enabled for zero cross timeout to work */
}
void audiohw_enable_recording(bool source_mic)
{
(void)source_mic; /* We only have a line-in (I think) */
/* reset the I2S controller into known state */
i2s_reset();
wmcodec_write(RESET, 0x1ff); /*Reset*/
wmcodec_write(PWRMGMT1, 0x2b);
wmcodec_write(PWRMGMT2, 0x18f); /* Enable ADC - 0x0c enables left/right PGA input, and 0x03 turns on power to the ADCs */
wmcodec_write(PWRMGMT3, 0x6f);
wmcodec_write(PWRMGMT2, PWRMGMT2_ROUT1EN | PWRMGMT2_LOUT1EN
| PWRMGMT2_INPGAENR | PWRMGMT2_INPGAENL
| PWRMGMT2_ADCENR | PWRMGMT2_ADCENL);
wmcodec_write(AINTFCE, 0x10);
wmcodec_write(CLKCTRL, 0x49);
wmcodec_write(INCTRL, INCTRL_R2_2INPGA | INCTRL_L2_2INPGA);
wmcodec_write(OUTCTRL, 1);
/* The iPod can handle multiple frequencies, but fix at 44.1KHz
for now */
audiohw_set_sample_rate(WM8758_44100HZ);
wmcodec_write(INCTRL,0x44); /* Connect L2 and R2 inputs */
/* Set L2/R2_2BOOSTVOL to 0db (bits 4-6) */
/* 000 = disabled
001 = -12dB
010 = -9dB
011 = -6dB
100 = -3dB
101 = 0dB
110 = 3dB
111 = 6dB
*/
wmcodec_write(LADCBOOST,0x50);
wmcodec_write(RADCBOOST,0x50);
/* Set L/R input PGA Volume to 0db */
// wm8758_write(LINPGAVOL,0x3f);
// wm8758_write(RINPGAVOL,0x13f);
wmcodec_write(LADCBOOST, LADCBOOST_L2_2BOOST(5));
wmcodec_write(RADCBOOST, RADCBOOST_R2_2BOOST(5));
/* Enable monitoring */
wmcodec_write(LOUTMIX,0x17); /* Enable output mixer - BYPL2LMIX @ 0db*/
wmcodec_write(ROUTMIX,0x17); /* Enable output mixer - BYPR2RMIX @ 0db*/
audiohw_mute(0);
wmcodec_write(LOUTMIX, LOUTMIX_BYP2LMIXVOL(5)
| LOUTMIX_BYPL2LMIX | LOUTMIX_DACL2LMIX);
wmcodec_write(ROUTMIX, ROUTMIX_BYP2RMIXVOL(5)
| ROUTMIX_BYPR2RMIX | ROUTMIX_DACR2RMIX);
}
void audiohw_disable_recording(void) {
audiohw_mute(1);
void audiohw_disable_recording(void)
{
wmcodec_write(LOUTMIX, LOUTMIX_DACL2LMIX);
wmcodec_write(ROUTMIX, ROUTMIX_DACR2RMIX);
wmcodec_write(PWRMGMT3, 0x0);
wmcodec_write(PWRMGMT1, 0x0);
wmcodec_write(PWRMGMT2, 0x40);
wmcodec_write(PWRMGMT2, PWRMGMT2_ROUT1EN | PWRMGMT2_LOUT1EN);
}
void audiohw_set_recvol(int left, int right, int type) {
(void)left;
(void)right;
(void)type;
void audiohw_set_recvol(int left, int right, int type)
{
switch (type)
{
case AUDIO_GAIN_MIC:
right = left;
/* fall through */
case AUDIO_GAIN_LINEIN:
wmcodec_write(LINPGAVOL, LINPGAVOL_INPGAZCL
| (left & LINPGAVOL_INPGAVOL_MASK));
wmcodec_write(RINPGAVOL, RINPGAVOL_INPGAVU | RINPGAVOL_INPGAZCR
| (right & RINPGAVOL_INPGAVOL_MASK));
break;
default:
return;
}
}
void audiohw_set_monitor(bool enable) {
void audiohw_set_monitor(bool enable)
{
(void)enable;
}

View file

@ -34,9 +34,6 @@
#include "audiohw.h"
#include "i2s.h"
/* use zero crossing to reduce clicks during volume changes */
#define VOLUME_ZC_WAIT (1<<7)
const struct sound_settings_info audiohw_settings[] = {
[SOUND_VOLUME] = {"dB", 0, 1, -74, 6, -25},
[SOUND_BASS] = {"dB", 0, 1, -6, 9, 0},
@ -45,12 +42,38 @@ const struct sound_settings_info audiohw_settings[] = {
[SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0},
[SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100},
#ifdef HAVE_RECORDING
[SOUND_LEFT_GAIN] = {"dB", 1, 1,-128, 96, 0},
[SOUND_RIGHT_GAIN] = {"dB", 1, 1,-128, 96, 0},
[SOUND_MIC_GAIN] = {"dB", 1, 1,-128, 108, 16},
[SOUND_LEFT_GAIN] = {"dB", 1, 1, 0, 63, 23},
[SOUND_RIGHT_GAIN] = {"dB", 1, 1, 0, 63, 23},
[SOUND_MIC_GAIN] = {"dB", 1, 1, 0, 63, 0},
#endif
};
static unsigned short wm8975_regs[] =
{
[LINVOL] = LINVOL_LZCEN | 23, /* 0dB */
[RINVOL] = RINVOL_RIVU | RINVOL_RZCEN | 23, /* 0dB */
[DAPCTRL] = DAPCTRL_DACMU,
[PWRMGMT1] = PWRMGMT1_VMIDSEL_5K | PWRMGMT1_VREF,
[PWRMGMT2] = PWRMGMT2_DACL | PWRMGMT2_DACR | PWRMGMT2_LOUT1
| PWRMGMT2_ROUT1 | PWRMGMT2_LOUT2 | PWRMGMT2_ROUT2,
};
static void wm8975_write(int reg, unsigned val)
{
wm8975_regs[reg] = val;
wmcodec_write(reg, val);
}
static void wm8975_write_and(int reg, unsigned bits)
{
wm8975_write(reg, wm8975_regs[reg] & bits);
}
static void wm8975_write_or(int reg, unsigned bits)
{
wm8975_write(reg, wm8975_regs[reg] | bits);
}
/* convert tenth of dB volume (-730..60) to master volume register value */
int tenthdb2master(int db)
{
@ -67,65 +90,83 @@ int tenthdb2master(int db)
}
}
#define IPOD_PCM_LEVEL 0x65 /* -6dB */
/* Silently enable / disable audio output */
void audiohw_enable_output(bool enable)
int sound_val2phys(int setting, int value)
{
if (enable)
int result;
switch(setting)
{
/* reset the I2S controller into known state */
i2s_reset();
#ifdef HAVE_RECORDING
case SOUND_LEFT_GAIN:
case SOUND_RIGHT_GAIN:
result = ((value - 23) * 15) / 2;
break;
case SOUND_MIC_GAIN:
result = ((value - 23) * 15) / 2 + 200;
break;
#endif
default:
result = value;
break;
}
/*
* 1. Switch on power supplies.
* By default the WM8750L is in Standby Mode, the DAC is
* digitally muted and the Audio Interface, Line outputs
* and Headphone outputs are all OFF (DACMU = 1 Power
* Management registers 1 and 2 are all zeros).
*/
wmcodec_write(RESET, 0x1ff); /*Reset*/
wmcodec_write(RESET, 0x0);
/* 2. Enable Vmid and VREF. */
wmcodec_write(PWRMGMT1, 0xc0); /*Pwr Mgmt(1)*/
return result;
}
/* From app notes: allow Vref to stabilize to reduce clicks */
sleep(HZ/4);
/* 3. Enable DACs as required. */
wmcodec_write(PWRMGMT2, 0x180); /*Pwr Mgmt(2)*/
/* 4. Enable line and / or headphone output buffers as required. */
wmcodec_write(PWRMGMT2, 0x1f8); /*Pwr Mgmt(2)*/
/* BCLKINV=0(Dont invert BCLK) MS=1(Enable Master) LRSWAP=0 LRP=0 */
/* IWL=00(16 bit) FORMAT=10(I2S format) */
wmcodec_write(AINTFCE, 0x42);
/* The iPod can handle multiple frequencies, but fix at 44.1KHz for now */
audiohw_set_sample_rate(WM8975_44100HZ);
/* set the volume to -6dB */
wmcodec_write(LOUT1VOL, VOLUME_ZC_WAIT | IPOD_PCM_LEVEL);
wmcodec_write(ROUT1VOL, VOLUME_ZC_WAIT | 0x100 | IPOD_PCM_LEVEL);
wmcodec_write(LOUTMIX1, 0x150); /* Left out Mix(def) */
wmcodec_write(LOUTMIX2, 0x50);
wmcodec_write(ROUTMIX1, 0x50); /* Right out Mix(def) */
wmcodec_write(ROUTMIX2, 0x150);
wmcodec_write(MOUTMIX1, 0x0); /* Mono out Mix */
wmcodec_write(MOUTMIX2, 0x0);
audiohw_mute(0);
void audiohw_mute(bool mute)
{
if (mute) {
/* Set DACMU = 1 to soft-mute the audio DACs. */
wm8975_write_or(DAPCTRL, DAPCTRL_DACMU);
} else {
audiohw_mute(1);
/* Set DACMU = 0 to soft-un-mute the audio DACs. */
wm8975_write_and(DAPCTRL, ~DAPCTRL_DACMU);
}
}
#define IPOD_PCM_LEVEL 0x65 /* -6dB */
void audiohw_preinit(void)
{
i2s_reset();
/* POWER UP SEQUENCE */
wmcodec_write(RESET, RESET_RESET);
/* 2. Enable Vmid and VREF, quick startup. */
wm8975_write(PWRMGMT1, wm8975_regs[PWRMGMT1]);
sleep(HZ/50);
wm8975_regs[PWRMGMT1] &= ~PWRMGMT1_VMIDSEL_MASK;
wm8975_write(PWRMGMT1, wm8975_regs[PWRMGMT1] | PWRMGMT1_VMIDSEL_50K);
/* 4. Enable DACs, line and headphone output buffers as required. */
wm8975_write(PWRMGMT2, wm8975_regs[PWRMGMT2]);
wmcodec_write(AINTFCE, AINTFCE_MS | AINTFCE_LRP_I2S_RLO
| AINTFCE_IWL_16BIT | AINTFCE_FORMAT_I2S);
wm8975_write(DAPCTRL, wm8975_regs[DAPCTRL] );
audiohw_set_sample_rate(WM8975_44100HZ);
/* set the volume to -6dB */
wmcodec_write(LOUT1VOL, LOUT1VOL_LO1ZC | IPOD_PCM_LEVEL);
wmcodec_write(ROUT1VOL, ROUT1VOL_RO1VU | ROUT1VOL_RO1ZC | IPOD_PCM_LEVEL);
wmcodec_write(LOUTMIX1, LOUTMIX1_LD2LO| LOUTMIX1_LI2LOVOL(5));
wmcodec_write(LOUTMIX2, LOUTMIX2_RI2LOVOL(5));
wmcodec_write(ROUTMIX1, ROUTMIX1_LI2ROVOL(5));
wmcodec_write(ROUTMIX2, ROUTMIX2_RD2RO| ROUTMIX2_RI2ROVOL(5));
wmcodec_write(MOUTMIX1, 0);
wmcodec_write(MOUTMIX2, 0);
}
void audiohw_postinit(void)
{
audiohw_mute(false);
}
void audiohw_set_master_vol(int vol_l, int vol_r)
@ -137,163 +178,137 @@ void audiohw_set_master_vol(int vol_l, int vol_r)
/* 0101111 == mute (0x2f) */
/* OUT1 */
wmcodec_write(LOUT1VOL, VOLUME_ZC_WAIT | vol_l);
wmcodec_write(ROUT1VOL, VOLUME_ZC_WAIT | 0x100 | vol_r);
wmcodec_write(LOUT1VOL, LOUT1VOL_LO1ZC | vol_l);
wmcodec_write(ROUT1VOL, ROUT1VOL_RO1VU | ROUT1VOL_RO1ZC | vol_r);
}
void audiohw_set_lineout_vol(int vol_l, int vol_r)
{
/* OUT2 */
wmcodec_write(LOUT2VOL, VOLUME_ZC_WAIT | vol_l);
wmcodec_write(ROUT2VOL, VOLUME_ZC_WAIT | 0x100 | vol_r);
wmcodec_write(LOUT2VOL, LOUT2VOL_LO2ZC | vol_l);
wmcodec_write(ROUT2VOL, ROUT2VOL_RO2VU | ROUT2VOL_RO2ZC | vol_r);
}
void audiohw_set_bass(int value)
{
const int regvalues[] = {
11, 10, 10, 9, 8, 8, 0xf, 6, 6, 5, 4, 4, 3, 2, 1, 0
11, 10, 10, 9, 8, 8, 0xf, 6, 6, 5, 4, 4, 3, 2, 2, 1
};
if ((value >= -6) && (value <= 9)) {
/* We use linear bass control with 200 Hz cutoff */
wmcodec_write(BASSCTRL, regvalues[value + 6] | 0x40);
wmcodec_write(BASSCTRL, regvalues[value + 6] | BASSCTRL_BC);
}
}
void audiohw_set_treble(int value)
{
const int regvalues[] = {
11, 10, 10, 9, 8, 8, 0xf, 6, 6, 5, 4, 4, 3, 2, 1, 0
11, 10, 10, 9, 8, 8, 0xf, 6, 6, 5, 4, 4, 3, 2, 2, 1
};
if ((value >= -6) && (value <= 9)) {
/* We use linear treble control with 4 kHz cutoff */
wmcodec_write(TREBCTRL, regvalues[value + 6] | 0x40);
}
}
void audiohw_mute(bool mute)
{
if (mute)
{
/* Set DACMU = 1 to soft-mute the audio DACs. */
wmcodec_write(DACCTRL, 0x8);
} else {
/* Set DACMU = 0 to soft-un-mute the audio DACs. */
wmcodec_write(DACCTRL, 0x0);
wmcodec_write(TREBCTRL, regvalues[value + 6] | TREBCTRL_TC);
}
}
/* Nice shutdown of WM8975 codec */
void audiohw_close(void)
{
/* 1. Set DACMU = 1 to soft-mute the audio DACs. */
wmcodec_write(DACCTRL, 0x8);
audiohw_mute(true);
/* 2. Disable all output buffers. */
wmcodec_write(PWRMGMT2, 0x0); /*Pwr Mgmt(2)*/
wmcodec_write(PWRMGMT2, 0x0);
/* 3. Switch off the power supplies. */
wmcodec_write(PWRMGMT1, 0x0); /*Pwr Mgmt(1)*/
wmcodec_write(PWRMGMT1, 0x0);
}
/* Change the order of the noise shaper, 5th order is recommended above 32kHz */
void audiohw_set_nsorder(int order)
{
(void)order;
}
/* Note: Disable output before calling this function */
void audiohw_set_sample_rate(int sampling_control) {
wmcodec_write(0x08, sampling_control);
void audiohw_set_sample_rate(int sampling_control)
{
wmcodec_write(SAMPCTRL, sampling_control);
}
#ifdef HAVE_RECORDING
void audiohw_enable_recording(bool source_mic)
{
(void)source_mic;
wm8975_regs[PWRMGMT1] |= PWRMGMT1_AINL | PWRMGMT1_AINR
| PWRMGMT1_ADCL | PWRMGMT1_ADCR;
wm8975_write(PWRMGMT1, wm8975_regs[PWRMGMT1]);
/* reset the I2S controller into known state */
i2s_reset();
/* NOTE: When switching to digital monitoring we will not want
* the DACs disabled. Also the outputs shouldn't be disabled
* when recording from line in (dock connector) - needs testing. */
wm8975_regs[PWRMGMT2] &= ~(PWRMGMT2_LOUT1 | PWRMGMT2_ROUT1
| PWRMGMT2_LOUT2 | PWRMGMT2_ROUT2);
wm8975_write(PWRMGMT2, wm8975_regs[PWRMGMT2]);
/*
* 1. Switch on power supplies.
* By default the WM8750L is in Standby Mode, the DAC is
* digitally muted and the Audio Interface, Line outputs
* and Headphone outputs are all OFF (DACMU = 1 Power
* Management registers 1 and 2 are all zeros).
*/
wmcodec_write(0x0f, 0x1ff);
wmcodec_write(0x0f, 0x000);
wm8975_write_or(LINVOL, LINVOL_LINMUTE);
wm8975_write_or(RINVOL, RINVOL_RINMUTE);
/* 2. Enable Vmid and VREF. */
wmcodec_write(0x19, 0xc0); /*Pwr Mgmt(1)*/
/* 3. Enable ADCs as required. */
wmcodec_write(0x19, 0xcc); /*Pwr Mgmt(1)*/
wmcodec_write(0x1a, 0x180); /*Pwr Mgmt(2)*/
/* 4. Enable line and / or headphone output buffers as required. */
wmcodec_write(0x19, 0xfc); /*Pwr Mgmt(1)*/
/* BCLKINV=0(Dont invert BCLK) MS=1(Enable Master) LRSWAP=0 LRP=0 */
/* IWL=00(16 bit) FORMAT=10(I2S format) */
wmcodec_write(0x07, 0x42);
/* The iPod can handle multiple frequencies, but fix at 44.1KHz for now */
audiohw_set_sample_rate(WM8975_44100HZ);
/* unmute inputs */
wmcodec_write(0x00, 0x17); /* LINVOL (def 0dB) */
wmcodec_write(0x01, 0x117); /* RINVOL (def 0dB) */
wmcodec_write(0x15, 0x1d7); /* LADCVOL max vol x was ff */
wmcodec_write(0x16, 0x1d7); /* RADCVOL max vol x was ff */
wmcodec_write(ADDCTRL3, ADDCTRL3_VROI);
if (source_mic) {
/* VSEL=10(def) DATSEL=10 (use right ADC only) */
wmcodec_write(0x17, 0xc9); /* Additional control(1) */
/* VROI=1 (sets output resistance to 40kohms) */
wmcodec_write(0x1b, 0x40); /* Additional control(3) */
/* LINSEL=1 (LINPUT2) LMICBOOST=10 (20dB boost) */
wmcodec_write(0x20, 0x60); /* ADCL signal path */
wmcodec_write(0x21, 0x60); /* ADCR signal path */
wmcodec_write(ADDCTRL1, ADDCTRL1_VSEL_LOWBIAS | ADDCTRL1_DATSEL_RADC
| ADDCTRL1_TOEN);
wmcodec_write(ADCLPATH, 0);
wmcodec_write(ADCRPATH, ADCRPATH_RINSEL_RIN2 | ADCRPATH_RMICBOOST_20dB);
} else {
/* VSEL=10(def) DATSEL=00 (left->left, right->right) */
wmcodec_write(0x17, 0xc1); /* Additional control(1) */
wmcodec_write(ADDCTRL1, ADDCTRL1_VSEL_LOWBIAS | ADDCTRL1_DATSEL_NORMAL
| ADDCTRL1_TOEN);
wmcodec_write(ADCLPATH, ADCLPATH_LINSEL_LIN1 | ADCLPATH_LMICBOOST_OFF);
wmcodec_write(ADCRPATH, ADCRPATH_RINSEL_RIN1 | ADCRPATH_RMICBOOST_OFF);
}
wm8975_write_and(LINVOL, ~LINVOL_LINMUTE);
wm8975_write_and(RINVOL, ~RINVOL_RINMUTE);
}
/* VROI=1 (sets output resistance to 40kohms) */
wmcodec_write(0x1b, 0x40); /* Additional control(3) */
void audiohw_disable_recording(void)
{
/* mute inputs */
wm8975_write_or(LINVOL, LINVOL_LINMUTE);
wm8975_write_or(RINVOL, RINVOL_RINMUTE);
/* LINSEL=0 (LINPUT1) LMICBOOST=00 (bypass boost) */
wmcodec_write(0x20, 0x00); /* ADCL signal path */
/* RINSEL=0 (RINPUT1) RMICBOOST=00 (bypass boost) */
wmcodec_write(0x21, 0x00); /* ADCR signal path */
wmcodec_write(ADDCTRL3, 0);
wm8975_regs[PWRMGMT2] |= PWRMGMT2_DACL | PWRMGMT2_DACR
| PWRMGMT2_LOUT1 | PWRMGMT2_ROUT1
| PWRMGMT2_LOUT2 | PWRMGMT2_ROUT2;
wm8975_write(PWRMGMT2, wm8975_regs[PWRMGMT2]);
wm8975_regs[PWRMGMT1] &= ~(PWRMGMT1_AINL | PWRMGMT1_AINR
| PWRMGMT1_ADCL | PWRMGMT1_ADCR);
wm8975_write(PWRMGMT1, wm8975_regs[PWRMGMT1]);
}
void audiohw_set_recvol(int left, int right, int type)
{
switch (type)
{
case AUDIO_GAIN_MIC: /* Mic uses right ADC */
wm8975_regs[RINVOL] &= ~RINVOL_MASK;
wm8975_write_or(RINVOL, left & RINVOL_MASK);
break;
case AUDIO_GAIN_LINEIN:
wm8975_regs[LINVOL] &= ~LINVOL_MASK;
wm8975_write_or(LINVOL, left & LINVOL_MASK);
wm8975_regs[RINVOL] &= ~RINVOL_MASK;
wm8975_write_or(RINVOL, right & RINVOL_MASK);
break;
default:
return;
}
}
void audiohw_disable_recording(void) {
/* 1. Set DACMU = 1 to soft-mute the audio DACs. */
wmcodec_write(0x05, 0x8);
/* 2. Disable all output buffers. */
wmcodec_write(0x1a, 0x0); /*Pwr Mgmt(2)*/
/* 3. Switch off the power supplies. */
wmcodec_write(0x19, 0x0); /*Pwr Mgmt(1)*/
}
void audiohw_set_recvol(int left, int right, int type) {
(void)left;
(void)right;
(void)type;
}
void audiohw_set_monitor(bool enable) {
void audiohw_set_monitor(bool enable)
{
(void)enable;
}
#endif /* HAVE_RECORDING */

View file

@ -437,6 +437,9 @@ static int button_flip(int button)
#endif
#if CONFIG_KEYPAD == RECORDER_PAD
| BUTTON_F1 | BUTTON_F3
#endif
#if CONFIG_KEYPAD == SANSA_C200_PAD
| BUTTON_VOL_UP | BUTTON_VOL_DOWN
#endif
);
@ -462,6 +465,12 @@ static int button_flip(int button)
if (button & BUTTON_F3)
newbutton |= BUTTON_F1;
#endif
#if CONFIG_KEYPAD == SANSA_C200_PAD
if (button & BUTTON_VOL_UP)
newbutton |= BUTTON_VOL_DOWN;
if (button & BUTTON_VOL_DOWN)
newbutton |= BUTTON_VOL_UP;
#endif
return newbutton;
}

View file

@ -44,7 +44,8 @@ enum {
};
#define USING_ATA_CALLBACK !defined(SIMULATOR) \
&& !defined(HAVE_FLASH_DISK)
&& !defined(HAVE_FLASH_DISK) \
&& !defined(BOOTLOADER)
typedef bool (*ata_idle_notify)(void);

View file

@ -75,8 +75,7 @@
#define FIRMWARE_OFFSET_FILE_DATA 6
/* The start address index for ROM builds */
/* #define ROM_START 0xD010 for behind original Archos */
#define ROM_START 0x6010 /* for behind BootBox */
#define ROM_START 0x7010 /* for behind BootBox */
/* Software controlled LED */
#define CONFIG_LED LED_REAL

View file

@ -21,9 +21,11 @@
#ifndef __HOTSWAP_H__
#define __HOTSWAP_H__
#include <stdbool.h>
typedef struct
{
int initialized;
bool initialized;
unsigned char bitrate_register;
unsigned long read_timeout; /* n * 8 clock cycles */
unsigned long write_timeout; /* n * 8 clock cycles */
@ -35,10 +37,8 @@ typedef struct
unsigned int nsac; /* clock cycles */
unsigned long tsac; /* n * 0.1 ns */
unsigned int r2w_factor;
unsigned long size; /* size in bytes */
unsigned long numblocks; /* size in flash blocks */
unsigned int blocksize; /* block size in bytes */
unsigned int block_exp; /* block size exponent */
} tCardInfo;
#ifdef HAVE_ATA_SD

View file

@ -37,53 +37,261 @@ extern void audiohw_set_mixer_vol(int channel1, int channel2);
extern void audiohw_set_nsorder(int order);
extern void audiohw_set_sample_rate(int sampling_control);
#define RESET 0x00
#define PWRMGMT1 0x01
#define PWRMGMT2 0x02
#define PWRMGMT3 0x03
#define AINTFCE 0x04
#define CLKCTRL 0x06
#define SRATECTRL 0x07
#define DACCTRL 0x0a
#define INCTRL 0x2c
#define LINPGAVOL 0x2d
#define RINPGAVOL 0x2e
#define LADCBOOST 0x2f
#define RADCBOOST 0x30
#define OUTCTRL 0x31
#define LOUTMIX 0x32
#define ROUTMIX 0x33
#define RESET 0x00
#define RESET_RESET 0x0
#define LOUT1VOL 0x34
#define ROUT1VOL 0x35
#define LOUT2VOL 0x36
#define ROUT2VOL 0x37
#define PWRMGMT1 0x01
#define PWRMGMT1_VMIDSEL_OFF (0 << 0)
#define PWRMGMT1_VMIDSEL_75K (1 << 0)
#define PWRMGMT1_VMIDSEL_300K (2 << 0)
#define PWRMGMT1_VMIDSEL_5K (3 << 0)
#define PWRMGMT1_BUFIOEN (1 << 2)
#define PWRMGMT1_BIASEN (1 << 3)
#define PWRMGMT1_MICBEN (1 << 4)
#define PWRMGMT1_PLLEN (1 << 5)
#define PWRMGMT1_OUT3MIXEN (1 << 6)
#define PWRMGMT1_OUT4MIXEN (1 << 7)
#define PWRMGMT1_BUFDCOPEN (1 << 8)
#define PLLN 0x24
#define PLLK1 0x25
#define PLLK2 0x26
#define PLLK3 0x27
#define PWRMGMT2 0x02
#define PWRMGMT2_ADCENL (1 << 0)
#define PWRMGMT2_ADCENR (1 << 1)
#define PWRMGMT2_INPGAENL (1 << 2)
#define PWRMGMT2_INPGAENR (1 << 3)
#define PWRMGMT2_BOOSTENL (1 << 4)
#define PWRMGMT2_BOOSTENR (1 << 5)
#define PWRMGMT2_SLEEP (1 << 6)
#define PWRMGMT2_LOUT1EN (1 << 7)
#define PWRMGMT2_ROUT1EN (1 << 8)
#define EQ1 0x12
#define EQ2 0x13
#define EQ3 0x14
#define EQ4 0x15
#define EQ5 0x16
#define EQ_GAIN_MASK 0x001f
#define EQ_CUTOFF_MASK 0x0060
#define EQ_GAIN_VALUE(x) (((-x) + 12) & 0x1f)
#define EQ_CUTOFF_VALUE(x) ((((x) - 1) & 0x03) << 5)
#define PWRMGMT3 0x03
#define PWRMGMT3_DACENL (1 << 0)
#define PWRMGMT3_DACENR (1 << 1)
#define PWRMGMT3_LMIXEN (1 << 2)
#define PWRMGMT3_RMIXEN (1 << 3)
#define PWRMGMT3_ROUT2EN (1 << 5)
#define PWRMGMT3_LOUT2EN (1 << 6)
#define PWRMGMT3_OUT3EN (1 << 7)
#define PWRMGMT3_OUT4EN (1 << 8)
/* Register settings for the supported samplerates: */
#define WM8758_8000HZ 0x4d
#define WM8758_12000HZ 0x61
#define WM8758_16000HZ 0x55
#define WM8758_22050HZ 0x77
#define WM8758_24000HZ 0x79
#define WM8758_32000HZ 0x59
#define WM8758_44100HZ 0x63
#define WM8758_48000HZ 0x41
#define WM8758_88200HZ 0x7f
#define WM8758_96000HZ 0x5d
#define AINTFCE 0x04
#define AINTFCE_MONO (1 << 0)
#define AINTFCE_ALRSWAP (1 << 1)
#define AINTFCE_DLRSWAP (1 << 2)
#define AINTFCE_FORMAT_MSB_RJUST (0 << 3)
#define AINTFCE_FORMAT_MSB_LJUST (1 << 3)
#define AINTFCE_FORMAT_I2S (2 << 3)
#define AINTFCE_FORMAT_DSP (3 << 3)
#define AINTFCE_FORMAT_MASK (3 << 3)
#define AINTFCE_IWL_16BIT (0 << 5)
#define AINTFCE_IWL_20BIT (1 << 5)
#define AINTFCE_IWL_24BIT (2 << 5)
#define AINTFCE_IWL_32BIT (3 << 5)
#define AINTFCE_IWL_MASK (3 << 5)
#define AINTFCE_LRP (1 << 7)
#define AINTFCE_BCP (1 << 8)
#define COMPCTRL 0x05 /* unused */
#define CLKCTRL 0x06
#define CLKCTRL_MS (1 << 0)
#define CLKCTRL_BCLKDIV_1 (0 << 2)
#define CLKCTRL_BCLKDIV_2 (1 << 2)
#define CLKCTRL_BCLKDIV_4 (2 << 2)
#define CLKCTRL_BCLKDIV_8 (3 << 2)
#define CLKCTRL_BCLKDIV_16 (4 << 2)
#define CLKCTRL_BCLKDIV_32 (5 << 2)
#define CLKCTRL_MCLKDIV_1 (0 << 5)
#define CLKCTRL_MCLKDIV_1_5 (1 << 5)
#define CLKCTRL_MCLKDIV_2 (2 << 5)
#define CLKCTRL_MCLKDIV_3 (3 << 5)
#define CLKCTRL_MCLKDIV_4 (4 << 5)
#define CLKCTRL_MCLKDIV_6 (5 << 5)
#define CLKCTRL_MCLKDIV_8 (6 << 5)
#define CLKCTRL_MCLKDIV_12 (7 << 5)
#define CLKCTRL_CLKSEL (1 << 8)
#define ADDCTRL 0x07
#define ADDCTRL_SLOWCLKEN (1 << 0)
#define ADDCTRL_SR_48kHz (0 << 1)
#define ADDCTRL_SR_32kHz (1 << 1)
#define ADDCTRL_SR_24kHz (2 << 1)
#define ADDCTRL_SR_16kHz (3 << 1)
#define ADDCTRL_SR_12kHz (4 << 1)
#define ADDCTRL_SR_8kHz (5 << 1)
#define ADDCTRL_SR_MASK (7 << 1)
/* unused */
#define GPIOCTRL 0x08
#define JACKDETECTCTRL1 0x09
#define DACCTRL 0x0a
#define DACCTRL_DACLPOL (1 << 0)
#define DACCTRL_DACRPOL (1 << 1)
#define DACCTRL_AMUTE (1 << 2)
#define DACCTRL_DACOSR128 (1 << 3)
#define DACCTRL_SOFTMUTE (1 << 6)
#define LDACVOL 0x0b
#define LDACVOL_MASK 0xff
#define LDACVOL_DACVU (1 << 8)
#define RDACVOL 0x0c
#define RDACVOL_MASK 0xff
#define RDACVOL_DACVU (1 << 8)
#define JACKDETECTCTRL2 0x0d /* unused */
#define ADCCTRL 0x0e
#define ADCCTRL_ADCLPOL (1 << 0)
#define ADCCTRL_ADCRPOL (1 << 1)
#define ADCCTRL_ADCOSR128 (1 << 3)
#define ADCCTRL_HPFCUT_MASK (7 << 4)
#define ADCCTRL_HPFAPP (1 << 7)
#define ADCCTRL_HPFEN (1 << 8)
#define LADCVOL 0x0f
#define LADCVOL_MASK 0xff
#define LADCVOL_ADCVU (1 << 8)
#define RADCVOL 0x10
#define RADCVOL_MASK 0xff
#define RADCVOL_ADCVU (1 << 8)
#define EQ1 0x12
#define EQ5 0x16
/* note: the WM8983 used for reference has a true 5 band EQ, but the WM8758
* does only have low shelf & high shelf (tested). Not sure about 3D mode. */
#define EQ1_EQ3DMODE (1 << 8)
#define EQ_GAIN_MASK 0x1f
#define EQ_CUTOFF_MASK (3 << 5)
#define EQ_GAIN_VALUE(x) (((-x) + 12) & 0x1f)
#define EQ_CUTOFF_VALUE(x) ((((x) - 1) & 0x03) << 5)
/* unused */
#define DACLIMITER1 0x18
#define DACLIMITER2 0x19
#define NOTCHFILTER1 0x1b
#define NOTCHFILTER2 0x1c
#define NOTCHFILTER3 0x1d
#define NOTCHFILTER4 0x1e
#define ALCCONTROL1 0x20
#define ALCCONTROL2 0x21
#define ALCCONTROL3 0x22
#define NOISEGATE 0x23
#define PLLN 0x24
#define PLLN_PLLN_MASK 0x0f
#define PLLN_PLLPRESCALE (1 << 4)
#define PLLK1 0x25
#define PLLK1_MASK 0x3f
#define PLLK2 0x26
#define PLLK3 0x27
#define THREEDCTRL 0x29
#define THREEDCTRL_DEPTH3D_MASK 0x0f
#define OUT4TOADC 0x2a
#define OUT4TOADC_OUT1DEL (1 << 0)
#define OUT4TOADC_DELEN (1 << 1)
#define OUT4TOADC_POBCTRL (1 << 2)
#define OUT4TOADC_OUT4_2LNR (1 << 5)
#define OUT4TOADC_OUT4_ADCVOL_MASK (7 << 6)
#define BEEPCTRL 0x2b
#define BEEPCTRL_BEEPEN (1 << 0)
#define BEEPCTRL_BEEPVOL_MASK (7 << 1)
#define BEEPCTRL_INVROUT2 (1 << 4)
#define BEEPCTRL_MUTERPGA2INV (1 << 5)
#define BEEPCTRL_BYPR2LMIX (1 << 7)
#define BEEPCTRL_BYPL2RMIX (1 << 8)
#define INCTRL 0x2c
#define INCTRL_LIP2INPGA (1 << 0)
#define INCTRL_LIN2INPGA (1 << 1)
#define INCTRL_L2_2INPGA (1 << 2)
#define INCTRL_RIP2INPGA (1 << 4)
#define INCTRL_RIN2INPGA (1 << 5)
#define INCTRL_R2_2INPGA (1 << 6)
#define INCTRL_MBVSEL (1 << 8)
#define LINPGAVOL 0x2d
#define LINPGAVOL_INPGAVOL_MASK 0x3f
#define LINPGAVOL_INPGAMUTEL (1 << 6)
#define LINPGAVOL_INPGAZCL (1 << 7)
#define LINPGAVOL_INPGAVU (1 << 8)
#define RINPGAVOL 0x2e
#define RINPGAVOL_INPGAVOL_MASK 0x3f
#define RINPGAVOL_INPGAMUTER (1 << 6)
#define RINPGAVOL_INPGAZCR (1 << 7)
#define RINPGAVOL_INPGAVU (1 << 8)
#define LADCBOOST 0x2f
#define LADCBOOST_AUXL2BOOST_MASK (7 << 0)
#define LADCBOOST_L2_2BOOST_MASK (7 << 4)
#define LADCBOOST_L2_2BOOST(x) ((x) << 4)
#define LADCBOOST_PGABOOSTL (1 << 8)
#define RADCBOOST 0x30
#define RADCBOOST_AUXR2BOOST_MASK (7 << 0)
#define RADCBOOST_R2_2BOOST_MASK (7 << 4)
#define RADCBOOST_R2_2BOOST(x) ((x) << 4)
#define RADCBOOST_PGABOOSTR (1 << 8)
#define OUTCTRL 0x31
#define OUTCTRL_VROI (1 << 0)
#define OUTCTRL_TSDEN (1 << 1)
#define OUTCTRL_SPKBOOST (1 << 2)
#define OUTCTRL_OUT3BOOST (1 << 3)
#define OUTCTRL_OUT4BOOST (1 << 4)
#define OUTCTRL_DACR2LMIX (1 << 5)
#define OUTCTRL_DACL2RMIX (1 << 6)
#define LOUTMIX 0x32
#define LOUTMIX_DACL2LMIX (1 << 0)
#define LOUTMIX_BYPL2LMIX (1 << 1)
#define LOUTMIX_BYP2LMIXVOL_MASK (7 << 2)
#define LOUTMIX_BYP2LMIXVOL(x) ((x) << 2)
#define LOUTMIX_AUXL2LMIX (1 << 5)
#define LOUTMIX_AUXLMIXVOL_MASK (7 << 6)
#define ROUTMIX 0x33
#define ROUTMIX_DACR2RMIX (1 << 0)
#define ROUTMIX_BYPR2RMIX (1 << 1)
#define ROUTMIX_BYP2RMIXVOL_MASK (7 << 2)
#define ROUTMIX_BYP2RMIXVOL(x) ((x) << 2)
#define ROUTMIX_AUXR2RMIX (1 << 5)
#define ROUTMIX_AUXRMIXVOL_MASK (7 << 6)
#define LOUT1VOL 0x34
#define LOUT1VOL_MASK 0x3f
#define LOUT1VOL_LOUT1MUTE (1 << 6)
#define LOUT1VOL_LOUT1ZC (1 << 7)
#define LOUT1VOL_OUT1VU (1 << 8)
#define ROUT1VOL 0x35
#define ROUT1VOL_MASK 0x3f
#define ROUT1VOL_ROUT1MUTE (1 << 6)
#define ROUT1VOL_ROUT1ZC (1 << 7)
#define ROUT1VOL_OUT1VU (1 << 8)
#define LOUT2VOL 0x36
#define LOUT2VOL_MASK 0x3f
#define LOUT2VOL_LOUT2MUTE (1 << 6)
#define LOUT2VOL_LOUT2ZC (1 << 7)
#define LOUT2VOL_OUT2VU (1 << 8)
#define ROUT2VOL 0x37
#define ROUT2VOL_MASK 0x3f
#define ROUT2VOL_ROUT2MUTE (1 << 6)
#define ROUT2VOL_ROUT2ZC (1 << 7)
#define ROUT2VOL_OUT2VU (1 << 8)
/* Dummy definition, to be removed when the audio driver API gets reworked. */
#define WM8758_44100HZ 0
#endif /* _WM8758_H */

View file

@ -35,26 +35,264 @@ extern void audiohw_set_lineout_vol(int vol_l, int vol_r);
extern void audiohw_set_nsorder(int order);
extern void audiohw_set_sample_rate(int sampling_control);
/* Register addresses */
#define LOUT1VOL 0x02
#define ROUT1VOL 0x03
#define DACCTRL 0x05
#define AINTFCE 0x07
#define BASSCTRL 0x0c
#define TREBCTRL 0x0d
#define RESET 0x0f
#define PWRMGMT1 0x19
#define PWRMGMT2 0x1a
#define LOUTMIX1 0x22
#define LOUTMIX2 0x23
#define ROUTMIX1 0x24
#define ROUTMIX2 0x25
#define MOUTMIX1 0x26
#define MOUTMIX2 0x27
#define LOUT2VOL 0x28
#define ROUT2VOL 0x29
/* Register addresses and bits */
/* Register settings for the supported samplerates: */
#define LINVOL 0x00
#define LINVOL_MASK 0x3f
#define LINVOL_LZCEN (1 << 6)
#define LINVOL_LINMUTE (1 << 7)
#define LINVOL_LIVU (1 << 8)
#define RINVOL 0x01
#define RINVOL_MASK 0x3f
#define RINVOL_RZCEN (1 << 6)
#define RINVOL_RINMUTE (1 << 7)
#define RINVOL_RIVU (1 << 8)
#define LOUT1VOL 0x02
#define LOUT1VOL_MASK 0x7f
#define LOUT1VOL_LO1ZC (1 << 7)
#define LOUT1VOL_LO1VU (1 << 8)
#define ROUT1VOL 0x03
#define ROUT1VOL_MASK 0x7f
#define ROUT1VOL_RO1ZC (1 << 7)
#define ROUT1VOL_RO1VU (1 << 8)
#define DAPCTRL 0x05 /* Digital audio path control */
#define DAPCTRL_ADCHPD (1 << 0)
#define DAPCTRL_DEEMP_DISABLE (0 << 1)
#define DAPCTRL_DEEMP_32KHz (1 << 1)
#define DAPCTRL_DEEMP_44KHz (2 << 1)
#define DAPCTRL_DEEMP_48KHz (3 << 1)
#define DAPCTRL_DEEMP_MASK (3 << 1)
#define DAPCTRL_DACMU (1 << 3)
#define DAPCTRL_HPOR (1 << 4)
#define DAPCTRL_ADCPOL_NORMAL (0 << 5)
#define DAPCTRL_ADCPOL_LINVERT (1 << 5)
#define DAPCTRL_ADCPOL_RINVERT (2 << 5)
#define DAPCTRL_ADCPOL_LRINVERT (3 << 5)
#define DAPCTRL_ADCPOL_MASK (3 << 5)
#define DAPCTRL_DACDIV2 (1 << 7)
#define DAPCTRL_ADCDIV2 (1 << 8)
#define AINTFCE 0x07
#define AINTFCE_FORMAT_MSB_RJUST (0 << 0)
#define AINTFCE_FORMAT_MSB_LJUST (1 << 0)
#define AINTFCE_FORMAT_I2S (2 << 0)
#define AINTFCE_FORMAT_DSP (3 << 0)
#define AINTFCE_FORMAT_MASK (3 << 0)
#define AINTFCE_IWL_16BIT (0 << 2)
#define AINTFCE_IWL_20BIT (1 << 2)
#define AINTFCE_IWL_24BIT (2 << 2)
#define AINTFCE_IWL_32BIT (3 << 2)
#define AINTFCE_IWL_MASK (3 << 2)
#define AINTFCE_LRP_I2S_RLO (0 << 4)
#define AINTFCE_LRP_I2S_RHI (1 << 4)
#define AINTFCE_DSP_MODE_B (0 << 4)
#define AINTFCE_DSP_MODE_A (1 << 4)
#define AINTFCE_LRSWAP (1 << 5)
#define AINTFCE_MS (1 << 6)
#define AINTFCE_BCLKINV (1 << 7)
#define SAMPCTRL 0x08
#define SAMPCTRL_USB (1 << 0)
/* Bits 1-5:
* Sample rate setting are device-specific. See datasheet
* for proper settings for the device's clocking */
#define SAMPCTRL_SR_MASK (0x1f << 1)
#define SAMPCTRL_CLKDIV2 (1 << 6)
#define SAMPCTRL_BCM_OFF (0 << 7)
#define SAMPCTRL_BCM_MCLK_4 (1 << 7)
#define SAMPCTRL_BCM_MCLK_8 (2 << 7)
#define SAMPCTRL_BCM_MCLK_16 (3 << 7)
#define LDACVOL 0x0a
#define LDACVOL_MASK 0xff
#define LDACVOL_LDVU (1 << 8)
#define RDACVOL 0x0b
#define RDACVOL_MASK 0xff
#define RDACVOL_RDVU (1 << 8)
#define BASSCTRL 0x0c
#define BASSCTRL_MASK 0x0f
#define BASSCTRL_BC (1 << 6)
#define BASSCTRL_BB (1 << 7)
#define TREBCTRL 0x0d
#define TREBCTRL_MASK 0x0f
#define TREBCTRL_TC (1 << 6)
#define RESET 0x0f
#define RESET_RESET 0x0
/* not used atm */
#define ALC1 0x11
#define ALC2 0x12
#define ALC3 0x13
#define NOISEGATE 0x14
#define LADCVOL 0x15
#define LADCVOL_MASK 0xff
#define LADCVOL_LAVU (1 << 8)
#define RADCVOL 0x16
#define RADCVOL_MASK 0xff
#define RADCVOL_RAVU (1 << 8)
#define ADDCTRL1 0x17
#define ADDCTRL1_TOEN (1 << 0)
#define ADDCTRL1DACINV (1 << 1)
#define ADDCTRL1_DATSEL_NORMAL (0 << 2)
#define ADDCTRL1_DATSEL_LADC (1 << 2)
#define ADDCTRL1_DATSEL_RADC (2 << 2)
#define ADDCTRL1_DATSEL_SWAPPED (3 << 2)
#define ADDCTRL1_DMONOMIX_STEREO (0 << 4)
#define ADDCTRL1_DMONOMIX_MONOLEFT (1 << 4)
#define ADDCTRL1_DMONOMIX_MONORIGHT (2 << 4)
#define ADDCTRL1_DMONOMIX_MONO (3 << 4)
#define ADDCTRL1_VSEL_HIGHBIAS (0 << 6)
#define ADDCTRL1_VSEL_MEDBIAS (1 << 6)
#define ADDCTRL1_VSEL_LOWBIAS (3 << 6)
#define ADDCTRL1_TSDEN (1 << 8)
#define ADDCTRL2 0x18
#define ADDCTRL2_DACOSR (1 << 0)
#define ADDCTRL2_ADCOSR (1 << 1)
#define ADDCTRL2_LRCM (1 << 2)
#define ADDCTRL2_TRI (1 << 3)
#define ADDCTRL2_ROUT2INV (1 << 4)
#define ADDCTRL2_HPSWPOL (1 << 5)
#define ADDCTRL2_HPSWEN (1 << 6)
#define ADDCTRL2_OUT3SW_VREF (0 << 7)
#define ADDCTRL2_OUT3SW_ROUT1 (1 << 7)
#define ADDCTRL2_OUT3SW_MONOOUT (2 << 7)
#define ADDCTRL2_OUT3SW_ROUTMIX (3 << 7)
#define PWRMGMT1 0x19
#define PWRMGMT1_DIGENB (1 << 0)
#define PWRMGMT1_MICB (1 << 1)
#define PWRMGMT1_ADCR (1 << 2)
#define PWRMGMT1_ADCL (1 << 3)
#define PWRMGMT1_AINR (1 << 4)
#define PWRMGMT1_AINL (1 << 5)
#define PWRMGMT1_VREF (1 << 6)
#define PWRMGMT1_VMIDSEL_OFF (0 << 7)
#define PWRMGMT1_VMIDSEL_50K (1 << 7)
#define PWRMGMT1_VMIDSEL_500K (2 << 7)
#define PWRMGMT1_VMIDSEL_5K (3 << 7)
#define PWRMGMT1_VMIDSEL_MASK (3 << 7)
#define PWRMGMT2 0x1a
#define PWRMGMT2_OUT3 (1 << 1)
#define PWRMGMT2_MONO (1 << 2)
#define PWRMGMT2_ROUT2 (1 << 3)
#define PWRMGMT2_LOUT2 (1 << 4)
#define PWRMGMT2_ROUT1 (1 << 5)
#define PWRMGMT2_LOUT1 (1 << 6)
#define PWRMGMT2_DACR (1 << 7)
#define PWRMGMT2_DACL (1 << 8)
#define ADDCTRL3 0x1b
#define ADDCTRL3_HPFLREN (1 << 5)
#define ADDCTRL3_VROI (1 << 6)
#define ADDCTRL3_ADCLRM_IN (0 << 7)
#define ADDCTRL3_ADCLRM_MCLK (1 << 7)
#define ADDCTRL3_ADCLRM_MCLK_55 (2 << 7)
#define ADDCTRL3_ADCLRM_MCLK_6 (3 << 7)
#define ADCINMODE 0x1f
#define ADCINMODE_LDCM (1 << 4)
#define ADCINMODE_RDCM (1 << 5)
#define ADCINMODE_MONOMIX_STEREO (0 << 6)
#define ADCINMODE_MONOMIX_LADC (1 << 6)
#define ADCINMODE_MONOMIX_RADC (2 << 6)
#define ADCINMODE_MONOMIX_DIGITAL (3 << 6)
#define ADCINMODE_DS (1 << 8)
#define ADCLPATH 0x20
#define ADCLPATH_LMICBOOST_OFF (0 << 4)
#define ADCLPATH_LMICBOOST_13dB (1 << 4)
#define ADCLPATH_LMICBOOST_20dB (2 << 4)
#define ADCLPATH_LMICBOOST_29dB (3 << 4)
#define ADCLPATH_LINSEL_LIN1 (0 << 6)
#define ADCLPATH_LINSEL_LIN2 (1 << 6)
#define ADCLPATH_LINSEL_LIN3 (2 << 6)
#define ADCLPATH_LINSEL_DIFF (3 << 6)
#define ADCRPATH 0x21
#define ADCRPATH_RMICBOOST_OFF (0 << 4)
#define ADCRPATH_RMICBOOST_13dB (1 << 4)
#define ADCRPATH_RMICBOOST_20dB (2 << 4)
#define ADCRPATH_RMICBOOST_29dB (3 << 4)
#define ADCRPATH_RINSEL_RIN1 (0 << 6)
#define ADCRPATH_RINSEL_RIN2 (1 << 6)
#define ADCRPATH_RINSEL_RIN3 (2 << 6)
#define ADCRPATH_RINSEL_DIFF (3 << 6)
#define LOUTMIX1 0x22
#define LOUTMIX1_LMIXSEL_LIN1 (0 << 0)
#define LOUTMIX1_LMIXSEL_LIN2 (1 << 0)
#define LOUTMIX1_LMIXSEL_LIN3 (2 << 0)
#define LOUTMIX1_LMIXSEL_LADCIN (3 << 0)
#define LOUTMIX1_LMIXSEL_DIFF (4 << 0)
#define LOUTMIX1_LI2LOVOL(x) ((x & 7) << 4)
#define LOUTMIX1_LI2LOVOL_MASK (7 << 4)
#define LOUTMIX1_LI2LO (1 << 7)
#define LOUTMIX1_LD2LO (1 << 8)
#define LOUTMIX2 0x23
#define LOUTMIX2_RI2LOVOL(x) ((x & 7) << 4)
#define LOUTMIX2_RI2LOVOL_MASK (7 << 4)
#define LOUTMIX2_RI2LO (1 << 7)
#define LOUTMIX2_RD2LO (1 << 8)
#define ROUTMIX1 0x24
#define ROUTMIX1_RMIXSEL_RIN1 (0 << 0)
#define ROUTMIX1_RMIXSEL_RIN2 (1 << 0)
#define ROUTMIX1_RMIXSEL_RIN3 (2 << 0)
#define ROUTMIX1_RMIXSEL_RADCIN (3 << 0)
#define ROUTMIX1_RMIXSEL_DIFF (4 << 0)
#define ROUTMIX1_LI2ROVOL(x) ((x & 7) << 4)
#define ROUTMIX1_LI2ROVOL_MASK (7 << 4)
#define ROUTMIX1_LI2RO (1 << 7)
#define ROUTMIX1_LD2RO (1 << 8)
#define ROUTMIX2 0x25
#define ROUTMIX2_RI2ROVOL(x) ((x & 7) << 4)
#define ROUTMIX2_RI2ROVOL_MASK (7 << 4)
#define ROUTMIX2_RI2RO (1 << 7)
#define ROUTMIX2_RD2RO (1 << 8)
#define MOUTMIX1 0x26
#define MOUTMIX1_LI2MOVOL(x) ((x & 7) << 4)
#define MOUTMIX1_LI2MOVOL_MASK (7 << 4)
#define MOUTMIX1_LI2MO (1 << 7)
#define MOUTMIX1_LD2MO (1 << 8)
#define MOUTMIX2 0x27
#define MOUTMIX2_RI2MOVOL(x) ((x & 7) << 4)
#define MOUTMIX2_RI2MOVOL_MASK (7 << 4)
#define MOUTMIX2_RI2MO (1 << 7)
#define MOUTMIX2_RD2MO (1 << 8)
#define LOUT2VOL 0x28
#define LOUT2VOL_MASK 0x7f
#define LOUT2VOL_LO2ZC (1 << 7)
#define LOUT2VOL_LO2VU (1 << 8)
#define ROUT2VOL 0x29
#define ROUT2VOL_MASK 0x7f
#define ROUT2VOL_RO2ZC (1 << 7)
#define ROUT2VOL_RO2VU (1 << 8)
#define MOUTVOL 0x2a
#define MOUTVOL_MASK 0x7f
#define MOUTVOL_MOZC (1 << 7)
/* SAMPCTRL values for the supported samplerates: */
#define WM8975_8000HZ 0x4d
#define WM8975_12000HZ 0x61
#define WM8975_16000HZ 0x55

View file

@ -26,8 +26,6 @@
*/
#include "config.h"
#if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR)
#include <stdio.h>
#include <string.h>
#include "inttypes.h"
@ -37,9 +35,12 @@
#include "debug.h"
#include "panic.h"
#include "rbunicode.h"
#ifndef BOOTLOADER
/* Font cache includes */
#include "font_cache.h"
#include "lru.h"
#endif
#ifndef O_BINARY
#define O_BINARY 0
@ -48,6 +49,8 @@
/* compiled-in font */
extern struct font sysfont;
#ifndef BOOTLOADER
/* structure filled in by font_load */
static struct font font_ui;
@ -378,27 +381,6 @@ struct font* font_get(int font)
panicf("No font!");
}
}
/*
* Returns the stringsize of a given string.
*/
int font_getstringsize(const unsigned char *str, int *w, int *h, int fontnumber)
{
struct font* pf = font_get(fontnumber);
unsigned short ch;
int width = 0;
for (str = utf8decode(str, &ch); ch != 0 ; str = utf8decode(str, &ch))
{
/* get proportional width and glyph bits*/
width += font_get_width(pf,ch);
}
if ( w )
*w = width;
if ( h )
*h = pf->height;
return width;
}
/*
* Reads an entry into cache entry
@ -565,8 +547,73 @@ static void glyph_cache_load(void)
}
return;
}
#else /* BOOTLOADER */
#endif /* HAVE_LCD_BITMAP */
void font_init(void)
{
}
/*
* Bootloader only supports the built-in sysfont.
*/
struct font* font_get(int font)
{
(void)font;
return &sysfont;
}
/*
* Returns width of character
*/
int font_get_width(struct font* pf, unsigned short char_code)
{
/* check input range*/
if (char_code < pf->firstchar || char_code >= pf->firstchar+pf->size)
char_code = pf->defaultchar;
char_code -= pf->firstchar;
return pf->width? pf->width[char_code]: pf->maxwidth;
}
const unsigned char* font_get_bits(struct font* pf, unsigned short char_code)
{
const unsigned char* bits;
/* check input range*/
if (char_code < pf->firstchar || char_code >= pf->firstchar+pf->size)
char_code = pf->defaultchar;
char_code -= pf->firstchar;
bits = pf->bits + (pf->offset?
pf->offset[char_code]:
(((pf->height + 7) / 8) * pf->maxwidth * char_code));
return bits;
}
#endif /* BOOTLOADER */
/*
* Returns the stringsize of a given string.
*/
int font_getstringsize(const unsigned char *str, int *w, int *h, int fontnumber)
{
struct font* pf = font_get(fontnumber);
unsigned short ch;
int width = 0;
for (str = utf8decode(str, &ch); ch != 0 ; str = utf8decode(str, &ch))
{
/* get proportional width and glyph bits*/
width += font_get_width(pf,ch);
}
if ( w )
*w = width;
if ( h )
*h = pf->height;
return width;
}
/* -----------------------------------------------------------------
* vim: et sw=4 ts=8 sts=4 tw=78

View file

@ -1122,7 +1122,7 @@ void sys_poweroff(void)
#if (defined(IAUDIO_X5) || defined(IAUDIO_M5)) && !defined (SIMULATOR)
pcf50606_reset_timeout(); /* Reset timer on first attempt only */
#endif
#ifdef HAVE_RECORDING
#if defined(HAVE_RECORDING) && !defined(BOOTLOADER)
if (audio_status() & AUDIO_STATUS_RECORD)
shutdown_timeout += HZ*8;
#endif

View file

@ -625,8 +625,8 @@ void sound_set(int setting, int value)
sound_set_val(value);
}
#if (!defined(HAVE_AS3514) && !defined (HAVE_WM8731) && !defined(HAVE_TSC2100)) \
|| defined(SIMULATOR)
#if (!defined(HAVE_AS3514) && !defined (HAVE_WM8731) && !defined(HAVE_WM8975) \
&& !defined(HAVE_WM8758) && !defined(HAVE_TSC2100)) || defined(SIMULATOR)
int sound_val2phys(int setting, int value)
{
#if CONFIG_CODEC == MAS3587F

View file

@ -1260,9 +1260,6 @@ tCardInfo *card_get_info_target(int card_no)
for(i=0; i<4; i++) card.cid[i] = card_info[card_no].cid[3-i];
card.numblocks = card_info[card_no].numblocks;
card.blocksize = card_info[card_no].block_size;
card.size = card_info[card_no].capacity < 0xffffffff ?
card_info[card_no].capacity : 0xffffffff;
card.block_exp = card_info[card_no].block_exp;
temp = card_extract_bits(card.csd, 29, 3);
card.speed = mantissa[card_extract_bits(card.csd, 25, 4)]
* exponent[temp > 2 ? 7 : temp + 4];

View file

@ -365,7 +365,8 @@ void pcm_play_dma_init(void)
/* Initialize default register values. */
audiohw_init();
#if !defined(HAVE_WM8731) && !defined(HAVE_WM8751)
#if !defined(HAVE_WM8731) && !defined(HAVE_WM8751) && !defined(HAVE_WM8975) \
&& !defined(HAVE_WM8758)
/* Power on */
audiohw_enable_output(true);
/* Unmute the master channel (DAC should be at zero point now). */
@ -590,6 +591,13 @@ void pcm_rec_dma_start(void *addr, size_t size)
void pcm_rec_dma_close(void)
{
pcm_rec_dma_stop();
#if defined(IPOD_COLOR) || defined (IPOD_4G)
/* The usual magic from IPL - I'm guessing this configures the headphone
socket to be input or output - in this case, output. */
GPIO_SET_BITWISE(GPIOI_OUTPUT_VAL, 0x40);
GPIO_SET_BITWISE(GPIOA_OUTPUT_VAL, 0x04);
#endif
} /* pcm_close_recording */
void pcm_rec_dma_init(void)
@ -597,8 +605,8 @@ void pcm_rec_dma_init(void)
#if defined(IPOD_COLOR) || defined (IPOD_4G)
/* The usual magic from IPL - I'm guessing this configures the headphone
socket to be input or output - in this case, input. */
GPIOI_OUTPUT_VAL &= ~0x40;
GPIOA_OUTPUT_VAL &= ~0x4;
GPIO_CLEAR_BITWISE(GPIOI_OUTPUT_VAL, 0x40);
GPIO_CLEAR_BITWISE(GPIOA_OUTPUT_VAL, 0x04);
#endif
pcm_rec_dma_stop();

View file

@ -40,8 +40,19 @@ vectors:
b irq_handler
b fiq_handler
/* This branch is used to make sure that we know where the shutdown routine
* is located in flash (0x04000020)
*/
b rom_shutdown
/* Add some strings to detect the bootloader in flash and give it a version
* number. (0x04000024, 0x04000028)
*/
.string "ROCKBOX"
.word 0x0001
/*
* Function: code_copy
* Function: word_copy
* Variables:
* r0 = from
* r1 = to
@ -53,8 +64,7 @@ vectors:
.global word_copy
.type word_copy, %function
word_copy:
sub r2, r2, #0x04
cmp r2, #0
subs r2, r2, #0x04
ldrge r3, [r0], #4
strge r3, [r1], #4
bgt word_copy
@ -83,14 +93,18 @@ start:
/* Mask all Interupts to be safe */
ldr r2, =0xFFFFFFFF
mov r1, #0x4A000000
str r2, [r1]
str r2, [r1, #0x08]
/* Submask too */
ldr r2, =0x00003FFF
str r2, [r1, #0x1C]
/* Check if loaded by the old bootloader or by the OF
* Be careful with code size above this as well.
/* Check if loaded by the old bootloader or by the OF. This copy routine
* cannot run/copy properly until the memory has been initialized, so the copy
* routine later is still necessary. The old bootloader/OF will initialize the
* memory.
* Be careful with code size above this as well since this routine has to start
* before 0x100 for it to work right.
*/
/* Get the execute address (cannot be past 0x100 for this to work */
@ -125,6 +139,13 @@ start:
skipreset:
/* Initial Clock Setup */
/* set Bus to Asynchronous mode (full speed) */
mov r0, #0
mrc p15, 0, r0, c1, c0, 0
ldr r1, =0xC0000000
orr r0, r0, r1
mcr p15, 0, r0, c1, c0, 0
mov r2, #0x7
mov r1, #0x4C000000
str r2, [r1, #0x14]
@ -159,48 +180,11 @@ start:
nop
nop
/* If we want to disable extraneous clocks, uncomment, but it can
* freeze the device
*/
#if 0
ldr r2, =0x6030
mov r1, #0x4C000000
str r2, [r1, #0x0C]
#endif
/* set Bus to Asynchronous mode (full speed) */
mov r0, #0
mrc p15, 0, r0, c1, c0, 0
ldr r1, =0xC0000000
orr r0, r0, r1
mcr p15, 0, r0, c1, c0, 0
/* Setup MISCCR */
ldr r2, =0x00613020
mov r1, #0x56000000
str r2, [r1, #0x80]
/* Setup some unknown outputs in GPB and GPH */
ldr r2, [r1, #0x10]
mov r3, #0x05
orr r2, r3, r2
str r2, [r1, #0x10]
ldr r2, [r1, #0x14]
mov r3, #0x03
orr r2, r3, r2
str r2, [r1, #0x14]
ldr r2, [r1, #0x70]
mov r3, #0x05
orr r2, r3, r2
str r2, [r1, #0x70]
ldr r2, [r1, #0x74]
mov r3, #0x03
orr r2, r3, r2
str r2, [r1, #0x74]
/* Memory setup (taken from 0x5070) */
/* BWSCON
@ -323,6 +307,18 @@ start:
/* MRSRB7 */
str r2, [r1, #0x30]
/*
0x56000000 0x1FFFCFF
4 0x1FFFEFF
0X4800002C 0X0
0X560000
*/
/* GPACON */
mov r1, #0x56000000
ldr r2, =0x00FFFFFF
str r2, [r1]
#if 0
/* GPACON */
mov r1, #0x56000000
@ -448,8 +444,10 @@ stackmunge:
/* Start the main function */
ldr pc, =main
/* Should never get here, but let's restart in case */
// b vectors
/* Should never get here, but let's restart in case (also needed when
* linking)
*/
b vectors
/* All illegal exceptions call into UIE with exception address as first
parameter. This is calculated differently depending on which exception
@ -486,6 +484,148 @@ fiq_handler:
UIE:
b UIE
/*
* Function: rom_shutdown
* Variables:
* none
*/
.section .init.text, "ax", %progbits
.align 0x04
.global rom_shutdown
.type rom_shutdown, %function
rom_shutdown:
/* Turn off the MMU */
mrc p15, 0, r1, c1, c0, 0
bic r1, r1, #0x0001
mcr p15, 0, r1, c1, c0, 0
/* Taken from 0x10010 */
ldr r2, =0x56000014 //GPBDAT
ldr r1, =0x56000010 //GPBCON
ldr r3, =0x00015450
ldr r8, =0x56000024 //GPCDAT
ldr r10, =0x56000020 //GPCCON
ldr r5, =0xAAA054A8
ldr r6, =0x56000024 //GPDDAT
ldr r7, =0x56000030 //GPDCON
ldr r12, =0x56000044 //GPEDAT
ldr lr, =0x56000040 //GPECON
ldr r0, =0x56000054 //GPFDAT
mov r4, #0
str r4, [r2]
str r3, [r1]
ldr r1, =0xAAA0AAA5
ldr r2, =0xAA8002AA
mov r3, #0x80
str r3, [r8]
add r3, r3, #0x980
str r5, [r10]
mov r5, #4
str r4, [r6]
str r1, [r7]
str r4, [r12]
str r2, [lr]
str r4, [r0],#(0x56000064-0x56000054) //(GPGDAT - GPFDAT)
add r12, r12, #(0x56000060-0x56000044)//(GPGCON - GPEDAT)
ldr r1, =0x56000050 //GPFCON
ldr r2, =0x01401002
mov lr, #0xFFFFFFFF
str r3, [r1],#(0x56000074-0x56000050)// (GPHDAT - GPFCON)
str r4, [r0],#(0x56000060-0x56000054)// (GPGCON - GPFDAT)
// str r2, [r12]
ldr r2, =0x140A5
mov r3, #0x81
str r3, [r1]
ldr r12, =0x4A000008 //INTMSK
// mov r3, #0x200000 // disable EINT13
ldr r3, =0xFFFFFECF
str r2, [r0] // GPFDAT=0x140A5
ldr r2, =0x56000088 //EXTINT0
ldr r0, =0x4A000010 //INTPND
add r1, r1, #(0x56000068 - 0x56000050) // (GPGUP - GPFCON) (0x18)
str lr, [r12] /* INTMSK = 0xFFFFFFFF */
str r3, [r2],#(0x560000A4 - 0x56000088) // (EINTMASK - EXTINT0) disable EINT13 (0x1C)
// mov r3, #0xFFFFFECF
mov r3, #0xFFFFFEFF
str r5, [r1],#(0x56000074-0x56000058) //(GPHDAT - GPFUP) (0x1C) DCLKCON
str r3, [r2]
ldr r11, =0x56000060
ldr r6, =0x01401002
str r6, [r11]
// add r3, r3, #0x00000100
ldr r3, =0xFFFFFFDF;
str r3, [r12] // disable INT_TICK
mov r3, #0x4A000000
add r2, r2, #(0x560000B0-0x56000088) //(GSTATUS1 - EXTINT0) //; 0x600 (0x28)
str lr, [r1]
str lr, [r3]
mov r3, #0x600
str lr, [r0]
str r3, [r2] // GSTATUS1 = 0x600 /* what for ??? */
ldr r12, =0x56000080 //MISCCr
mov r2, #0x58000000 //ADCCON
str r5, [r2]
add r2, r2, #(0x4D000000-0x58000000) //(LCDCON1 - ADCCON) // LCDCON1 (0xF5000000)
ldr r3, [r12]
ldr r0, =0x48000024 // REFRESH
bic r3, r3, #0x700000
bic r3, r3, #0x3000
orr r3, r3, #0x600000
orr r3, r3, #0x3000
str r3, [r12] // MISCCR = (MISCCR & ~0x100000) | 0x603000;
/* clear [20] BATTFLT_FUNC - BATT_FLT function On/Off.
* 0, Battery fault function will be turned on.
* set [21] BATTFLT_INTR - BATT_FLT Interrupt On/Off.
* 1, Battery fault interrupt will be masked by hardware.
* set [13] SEL_SUSPND1 - USB Port 1 Suspend mode
* 1= suspend mode
* set [12] SEL_SUSPND0 - USB Port 0 Suspend mode
* 1= suspend mode
*/
mov r3, #0x4C000000 // LOCKTIME
str r4, [r2]
str lr, [r3]
ldr r1, [r0]
ldr lr, =0x4C00000C // CLKCON
// str r1, [r11,#-0x28]
ldr r2, [lr]
// str r2, [r11,#-0x28]
ldr r3, [r0]
Orr r3, r3, #0x00400000
/* REFRESH
* [22] TREFMD - SDRAM Refresh Mode
*/
str r3, [r0]
ldr r2, [r12]
ldr r3, =0x00004018
/* [3] SLEEP - Control SLEEP mode of S3C2440X.
* [4] NAND - Control HCLK into NAND Flash Controller block.
* [14] RTC - Control PCLK into RTC control block.
*/
orr r2, r2, #0x000E0000
/* [17] nEN_SCLK0 - SCLK0 output enable (1: SCLK 0 = 0)
* [18] nEN_SCLK1 - SCLK1 output enable (1: SCLK 1 = 0)
* [19] OFFREFRESH - Self refresh retain enable after wake-up from sleep
*/
str r2, [r12]
str r3, [lr]
1:
b 1b
.ltorg
.size rom_shutdown, .-rom_shutdown
.section .text
/* 256 words of IRQ stack */
.space 256*4

View file

@ -244,6 +244,24 @@ static void LCD_SPI_init(void)
/* LCD init */
void lcd_init_device(void)
{
#ifdef BOOTLOADER
int i;
/* When the Rockbox bootloader starts, we are changing framebuffer address,
but we don't want what's shown on the LCD to change until we do an
lcd_update(), so copy the data from the old framebuffer to the new one */
unsigned short *buf = (unsigned short*)FRAME;
memcpy(FRAME, (short *)((LCDSADDR1)<<1), 320*240*2);
/* The Rockbox bootloader is transitioning from RGB555I to RGB565 mode
so convert the frambuffer data accordingly */
for(i=0; i< 320*240; i++){
*buf = ((*buf>>1) & 0x1F) | (*buf & 0xffc0);
buf++;
}
#endif
/* Set pins up */
GPHUP &= 0x600;

View file

@ -144,51 +144,49 @@ void s3c_regclr(volatile int *reg, unsigned int mask)
void system_init(void)
{
/* Disable interrupts and set all to IRQ mode */
INTMSK = -1;
INTMOD = 0;
SRCPND = -1;
INTPND = -1;
INTSUBMSK = -1;
SUBSRCPND = -1;
INTMSK = 0xFFFFFFFF;
INTMOD = 0;
SRCPND = 0xFFFFFFFF;
INTPND = 0xFFFFFFFF;
INTSUBMSK = 0xFFFFFFFF;
SUBSRCPND = 0xFFFFFFFF;
GPBCON |= 0x85;
GPBDAT |= 0x07;
GPBUP |= 0x20F;
/* Take care of flash related pins */
GPCCON |= 0x1000;
GPCDAT &= ~0x40;
GPCUP |= 0x51;
GPDCON |= 0x05;
GPDUP |= 0x03;
GPDDAT &= ~0x03;
GPFCON |= 0x00000AAA;
GPFUP |= 0xFF;
GPGCON |= 0x01001000;
GPGUP |= 0x70;
GPHCON |= 0x4005;
GPHDAT |= 0x03;
/* TODO: do something with PRIORITY */
/* Turn off currently-not or never-needed devices */
CLKCON &= ~(
/* Turn off AC97 and Camera */
(1<<19) | (1<<20)
/* Turn off SPI */
| (1 << 18)
/* Turn off IIS */
| (1 << 17)
/* Turn off I2C */
| (1 << 16)
/* Turn off all of the UARTS */
| ( (1<<10) | (1<<11) |(1<<12) )
/* Turn off MMC/SD/SDIO Controller (SDI) */
| (1 << 9)
/* Turn off USB device */
| (1 << 7)
/* Turn off USB host */
| (1 << 6)
/* Turn off NAND flash controller */
| (1 << 4)
);
/* Turn off the USB PLL */
CLKSLOW |= (1 << 7);
/* Turn off currently-not or never-needed devices.
* Be careful here, it is possible to freeze the device by disabling
* clocks at the wrong time.
*
* Turn off AC97, Camera, SPI, IIS, I2C, UARTS, MMC/SD/SDIO Controller
* USB device, USB host, NAND flash controller.
*
* IDLE, Sleep, LCDC, PWM timer, GPIO, RTC, and ADC are untouched (on)
*/
CLKCON &= ~0xFF1ED0;
CLKSLOW |= 0x80;
}
int system_memory_guard(int newmode)

View file

@ -96,13 +96,15 @@ void audiohw_init(void) {
#endif /* IPOD_1G2G/3G */
#endif
#if defined(HAVE_WM8731) || defined(HAVE_WM8751)
#if defined(HAVE_WM8731) || defined(HAVE_WM8751) || defined(HAVE_WM8975) \
|| defined(HAVE_WM8758)
audiohw_preinit();
#endif
}
#if !defined(HAVE_WM8731) && !defined(HAVE_WM8751)
#if !defined(HAVE_WM8731) && !defined(HAVE_WM8751) && !defined(HAVE_WM8975) \
&& !defined(HAVE_WM8758)
void audiohw_postinit(void)
{
}

View file

@ -203,7 +203,7 @@ _lcd_write_data:
/* This is the place to reenable the interrupts, if we have disabled
* them. See above. */
#ifndef BOOTLOADER
.align 2
.global _lcd_grey_data
.type _lcd_grey_data,@function
@ -345,7 +345,10 @@ _lcd_grey_data:
.short 0x0080
.align 2
.lcdr:
.long LCDR
.pmask:
.long 0x80808080
#endif
.align 2
.lcdr:
.long LCDR

View file

@ -48,14 +48,12 @@
#include "logf.h"
/* Conditions under which we want the entire driver */
#if !defined(BOOTLOADER) || \
#if !defined(BOOTLOADER) || (CONFIG_CPU == SH7034) || \
(defined(TOSHIBA_GIGABEAT_S) && defined(USE_ROCKBOX_USB) && defined(USB_STORAGE)) || \
(defined(CREATIVE_ZVx) && defined(HAVE_USBSTACK))
#define USB_FULL_INIT
#endif
extern void dbg_ports(void); /* NASTY! defined in apps/ */
#ifdef HAVE_LCD_BITMAP
bool do_screendump_instead_of_usb = false;
#if defined(USB_FULL_INIT) && defined(BOOTLOADER)
@ -122,18 +120,7 @@ static void usb_slave_mode(bool on)
rc = ata_init();
if(rc)
{
/* fixme: can we remove this? (already such in main.c) */
char str[32];
lcd_clear_display();
snprintf(str, 31, "ATA error: %d", rc);
lcd_puts(0, 0, str);
lcd_puts(0, 1, "Press ON to debug");
lcd_update();
while(!(button_get(true) & BUTTON_REL)) {};
dbg_ports();
panicf("ata: %d",rc);
}
rc = disk_mount_all();
if (rc <= 0) /* no partition */

View file

@ -627,7 +627,7 @@ static void handle_scsi(struct command_block_wrapper* cbw)
unsigned int block_size_mult = 1;
#if defined(HAVE_ATA_SD) || defined(HAVE_HOTSWAP)
tCardInfo* cinfo = card_get_info(lun);
if(cinfo->initialized==1 && cinfo->numblocks > 0) {
if(cinfo->initialized && cinfo->numblocks > 0) {
block_size = cinfo->blocksize;
block_count = cinfo->numblocks;
}

View file

@ -44,7 +44,7 @@
#include "usb.h"
#include "powermgmt.h"
void usb_screen(void)
static void usb_screen(void)
{
lcd_clear_display();
lcd_puts(0, 0, "USB mode");
@ -55,24 +55,16 @@ void usb_screen(void)
}
}
int show_logo(void)
static void show_logo(void)
{
lcd_clear_display();
lcd_puts(0, 0, "Rockbox");
lcd_puts(0, 1, "Rescue boot");
lcd_update();
return 0;
}
#if CONFIG_CHARGING
/*
bool backlight_get_on_when_charging(void)
{
return false;
}
*/
void charging_screen(void)
static void charging_screen(void)
{
unsigned int button;
const char* msg;
@ -125,7 +117,7 @@ void charging_screen(void)
#endif /* CONFIG_CHARGING */
/* prompt user to plug USB and fix a problem */
void prompt_usb(const char* msg1, const char* msg2)
static void prompt_usb(const char* msg1, const char* msg2)
{
int button;
lcd_clear_display();
@ -190,7 +182,6 @@ void main(void)
panicf("ata: %d", rc);
}
//disk_init();
usb_start_monitoring();
while (usb_detect() == USB_INSERTED)
{ /* enter USB mode early, before trying to mount */
@ -219,15 +210,6 @@ void main(void)
/* These functions are present in the firmware library, but we reimplement
them here because the originals do a lot more than we want */
void screen_dump(void)
{
}