Commit graph

348 commits

Author SHA1 Message Date
339f770b0c
feat(ipod): Piezo beeps now match headphone beeps 2023-08-14 19:29:52 +02:00
Solomon Peachy
418169aff8 Revert "Remove YUV blitting functions and LCD modes"
This reverts commit fe6aa21e9e.

Change-Id: I8bb1e5d6c52ed1478002d2140ef494ec5d62b8e3
2022-10-13 11:08:06 -04:00
Aidan MacDonald
fe6aa21e9e Remove YUV blitting functions and LCD modes
None of this is needed now that mpegplayer is gone.

Change-Id: I360366db8513e4d988021e8d7b7d8eb09930efb8
2022-10-03 13:30:01 +01:00
William Wilgus
79864c6ec2 add const to const * strings
I don't think this will amke any difference except maybe for hosted ports

Change-Id: I84f898aea92a6963901a6d889dd18b63f24c9a41
2022-05-03 23:00:58 -04:00
William Wilgus
cfeeb7889d Lcd save function pointer to frame buffer get_address_fn before loops
Calling multiple levels of indirection in a loop slows things down

Really these need to be rewritten to take a start and end address
like most of the rest of the codebase

But this is safer without having test hardware in hand

Change-Id: Idae7b92ee779d020ed7fcc9334e2d5a9c710e64d
2022-03-21 23:53:48 -04:00
Aidan MacDonald
e532714d1f pcm: Remove unused function pcm_play_dma_get_peak_buffer()
Change-Id: Ifd20fb14a22489cdb99154c01f69809a1e70d0c5
2021-07-25 14:07:41 +00:00
Moshe Piekarski
b895fb6643 Add tm->yday to RTC ports missing it
Change-Id: I86882262bafb8d06f925aabb87ebd1b5dcb0cd53
2021-05-12 10:52:03 +00:00
Solomon Peachy
388adff3cc pcm: Further cleanup of unused bits of the PCM ACPI:
* pcm_get_bytes_remaining()
 * pcm_calculate_peaks()
 * pcm_get_peak_buffer()

Nothing in-tree uses these at all (except for the lua plugin wrapper)

Change-Id: I971b7beed6760250c8b1ce58f401a601e1e2d585
2020-11-12 15:59:09 +00:00
Solomon Peachy
fe2d52cc7d pcm: Get rid of pcm_play_pause() and associated APIs
Nothing in the core has used it for some time.  It's exported to the
plugin API but the last plugins to use it were switched to the mixer API
back in 2011.

This allows us to get rid of pcm_play_dma_pause() from all audio drivers

Change-Id: Ic3fa02592316f84963e41d792d1cabb436d1ff6b
2020-10-31 01:18:27 +00:00
Solomon Peachy
7a1bf01541 Undo the hacks that allowed targets without LEFT/RIGHT (UP/DN) to build.
Replaced them with warnings until they are fixed *PROPERLY*

Change-Id: I4425200e60f8b5224262a54f105b974cec471d22
2020-10-08 20:30:08 -04:00
Solomon Peachy
a84176122c Fix two variable-set-but-not-used warnings
(found using -Os with gcc494 on the nano2g)

Change-Id: If0deee3e3cde50e6bf5aff595bebc0f134dcc393
2020-07-24 23:26:15 -04:00
Solomon Peachy
65a91333ef FS#12082: Add Tuner support to the Nano2G (Bertrik Sikken)
(The serial portions of the patch were already present, this just pulls
 in the tuner enablements)

Change-Id: I8090e318f34835769ac0a56d7a48b9250631eb4f
2020-07-09 13:24:14 +00:00
Michael Sevakis
1654efc313 Unify storage threads into one
* Editing a bunch of drivers' thread routines in order to
implement a new feature is tedious.

* No matter the number of storage drivers, they share one thread.
No extra threads needed for CONFIG_STORAGE_MULTI.

* Each has an event callback called by the storage thread.

* A default callback is provided to fake sleeping in order to
trigger idle callbacks. It could also do other default processing.
Changes to it will be part of driver code without editing each
one.

* Drivers may sleep and wake as they please as long as they give
a low pulse on their storage bit to ask to go into sleep mode.
Idle callback is called on its behalf and driver immediately put
into sleep mode.

* Drivers may indicate they are to continue receiving events in
USB mode, otherwise they receve nothing until disconnect (they
do receive SYS_USB_DISCONNECTED no matter what).

* Rework a few things to keep the callback implementation sane
and maintainable. ata.c was dreadful with all those bools; make
it a state machine and easier to follow. Remove last_user_activity;
it has no purpose that isn't served by keeping the disk active
through last_disk_activity instead.

* Even-out stack sizes partly because of a lack of a decent place
to define them by driver or SoC or whatever; it doesn't seem too
critical to do that anyway. Many are simply too large while at
least one isn't really adequate. They may be individually
overridden if necessary (figure out where). The thread uses the
greatest size demanded. Newer file code is much more frugal with
stack space. I barely see use crack 50% after idle callbacks
(usually mid-40s). Card insert/eject doesn't demand much.

* No forcing of idle callbacks. If it isn't necessary for one or
more non-disk storage types, it really isn't any more necessary for
disk storage. Besides, it makes the whole thing easier to implement.

Change-Id: Id30c284d82a8af66e47f2cfe104c52cbd8aa7215
2017-10-26 14:35:41 -04:00
Michael Sevakis
58b849c451 Move intrinsic RTC implmentation differences to driver files
Some drivers set tm_wday just fine and do not need it coerced to
be correct. Others set tm_yday, so don't overwrite what the driver
sets; just zero it inside if it can't fill the field. Move calls
to set_day_of_week() to the sorts of drivers that presumably
required the hammer (FS#11814) in get_time() where the weekday
isn't locked to the date.

Change-Id: Idd0ded6bfc9d9f48fcc1a6074068164c42fcf24a
2017-01-26 23:07:49 -05:00
Cástor Muñoz
ef572fec52 iPod Nano 2G: use the new USB DesignWare driver
Change-Id: I8d1561bf4e239b55617a8d5075457a668e0c312c
2016-08-02 04:57:50 +02:00
Cástor Muñoz
489044d1ca iPod Nano2G: clear external interrupts at startup
Fixes some ROLO issues after commit 9a4cd2e. Note that other ROLO
issues still persist.

Change-Id: I8e0c60519902013694c5a473dcb9fc62a6ff079c
2016-06-10 00:34:23 +02:00
Cástor Muñoz
28920ec5cc iPod Classic: fix typos / cosmetic
Change-Id: Ic6552dea4b300032875097ef0b885a4ae059f4bc
2016-05-28 15:48:02 +02:00
Cástor Muñoz
daee722455 iPod Classic: use PMU interrupts to detect USB and FW
Change-Id: I9be733e1a943ddeb99335d362f81f74879eeb94b
2016-05-26 09:06:30 +02:00
Cástor Muñoz
9a4cd2eaee iPod Nano2G: add IPOD_ACCESSORY_PROTOCOL
Change-Id: I78a19972624504bc802d96b9b8e9cec132164c2c
2016-05-14 19:39:09 +02:00
Cástor Muñoz
d405026ca8 iPod Nano2G: add HAVE_SERIAL
Change-Id: I46dca69c6708d3e6189f66e70badf0a594bac00b
2016-05-13 23:23:35 +02:00
Cástor Muñoz
5017523a6b Add UART suuport for s5l8700 and s5l8701
Add UART support for s5l8700/1 using the UC870X UART controller,
actually the functionallity is disabled and must be enabled for
each individual target. Tested on iPod Nano 2G (s5l8701), not
tested on s5l8700.

Change-Id: Ic0f216bb871502d355a70e4b658e536a2c0976a9
2016-05-13 23:23:01 +02:00
Michael Sparmann
bc56811a0e iPod Nano 2G and Classic: Fix power and charging detection.
This should allow FireWire charging to work on these devices.
It also adds charging state detection on the iPod Classic.

(cherry picked from commit fa86fec4fb)

On Classic (and probably Nano 2G), it seems that the 100/500mA limit
applies only to USB chargers, when FW is connected it supplies all the
power (even if USB is also connected) and USB current limit does not
affect to FW charging, therefore the limit is only set when USB is
connected.

Change-Id: I7c6bab1b6a0f295367999c45faeda6085c3fb091
Signed-off-by: Cástor Muñoz <cmvidal@gmail.com>
2016-02-14 15:42:54 +01:00
Marcin Bukat
89ba7e818c Get rid of stupid _backlight_* function names
_remote_backlight_* and _buttonlight_* are cleaned as well

Change-Id: I73653752831bbe170c26ba95d3bc04c2e3a5cf30
2015-01-12 11:09:27 +01:00
Thomas Jarosch
85c98bc63c Improve readability by adding parenthesis
Change-Id: Iff51ab441a59f1ba842132b809a49d1fe7232e05
2015-01-11 18:19:26 +01:00
Thomas Martitz
c35e1db832 Fix last warnings.
Change-Id: If0a7e11c3e107cb7756c0d70ed5b17fda92b166e
2014-03-03 20:34:46 +01:00
Thomas Martitz
22a28f9caa Add missing kernel.h includes (hopefully all of them).
Change-Id: I9c1825296a788587b8d494d8514b3314847b0ff0
2014-01-05 20:32:09 +01:00
Michael Sevakis
a56f1ca1ed Cleanup MV/MD macros a little.
When using variadic macros there's no need for IF_MD2/IF_MV2 to deal
with function parameters. IF_MD/IF_MV are enough.

Throw in IF_MD_DRV/ID_MV_VOL that return the parameter if MD/MV, or 0
if not.

Change-Id: I7605e6039f3be19cb47110c84dcb3c5516f2c3eb
2013-08-17 12:18:22 -04:00
Rafaël Carré
7ca2081036 remove debug-target.h 2012-05-07 00:55:59 -04:00
Amaury Pouly
f33330c0ff arm: factor all exception handlers out of the crt0.S files
Remove the implementations of all exceptions handlers from the
various crt0.S files and have a single implementation in system-arm.h
The new implementation is weak so that it can be overwritten by some
specific code (like the unwinder)

Change-Id: Ib3e041ed6037376bbe0e79286057e1051640dd90
Reviewed-on: http://gerrit.rockbox.org/205
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2012-04-06 13:46:32 +02:00
Rafaël Carré
41b46231cb usb-nano2g-6g: missing brace in non-default preprocessor path
Change-Id: Iacf6719e58b927bb619d469048e16797cae5cecd
2012-03-30 18:58:38 -04:00
Michael Sevakis
cd8e11b463 Tweak some PCM drivers for less typecasting with the data pointer.
Yeah, sizeof (void) here with GCC is 1. If something has a problem
with that, we'll set it straight.

Change-Id: I9ad3eee75dd440f6404a04a501d1533c8bc18ba9
2012-03-04 08:52:50 -05:00
Michael Sevakis
286a4c5caa Revise the PCM callback system after adding multichannel audio.
Additional status callback is added to pcm_play/rec_data instead of
using a special function to set it. Status includes DMA error
reporting to the status callback. Playback and recording callback
become more alike except playback uses "const void **addr" (because
the data should not be altered) and recording  uses "void **addr".
"const" is put in place throughout where appropriate.

Most changes are fairly trivial. One that should be checked in
particular because it isn't so much is telechips, if anyone cares to
bother. PP5002 is not so trivial either but that tested as working.

Change-Id: I4928d69b3b3be7fb93e259f81635232df9bd1df2
Reviewed-on: http://gerrit.rockbox.org/166
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
2012-03-03 07:23:38 +01:00
Jonathan Gordon
b37e6bc8c1 lcd drivers: Convert lcd_[remote_]framebuffer to a pointer
Change all lcd drivers to using a pointer to the static framebuffer
instead of directly accessing the static array. This will let us
later do fun things like dynamic framebuffer sizes (RaaA) or
ability to use different buffers for different layers (dynamic
skin backdrops!)

Change-Id: I0a4d58a9d7b55e6c932131b929e5d4c9f9414b06
2012-02-28 11:44:59 +11:00
Rafaël Carré
95cf63b294 button-target.h : move prototypes to button.h
no need to define BUTTON_REMOTE anymore

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31620 a1c6a512-1295-4272-9138-f99709370657
2012-01-08 00:07:19 +00:00
Rafaël Carré
ff2a7b6aa4 s5l8700: move debug-target.h content to .c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31567 a1c6a512-1295-4272-9138-f99709370657
2012-01-04 06:34:13 +00:00
Rafaël Carré
393f427a11 dbg_hw_info(): remove duplicate prototypes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31560 a1c6a512-1295-4272-9138-f99709370657
2012-01-04 05:29:30 +00:00
Rafaël Carré
b959497670 dbg_ports(): remove duplicate prototype
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31558 a1c6a512-1295-4272-9138-f99709370657
2012-01-04 05:21:52 +00:00
Thomas Martitz
c1bd9b0361 Rework powermgmt to enable code re-use on appliation and sims.
* Introduce CONFIG_BATTERY_MEASURE define, to allow targets (application)
to break powermgmt.c's assumption about the ability to read battery voltage.
There's now additionally percentage (android) and remaining time measure
(maemo). No measure at all also works (sdl app). If voltage can't be measured,
then battery_level() is king and it'll be used for power_history and runtime
estimation.

* Implement target's API in the simulator, i.e. _battery_voltage(), so it
doesn't need to implement it's own powermgmt.c and other stubs. Now
the sim behaves much more like a native target, although it still
changes the simulated battery voltage quickly,

* Other changes include include renaming battery_adc_voltage() to
_battery_voltage(), for consistency with the new target functions and
making some of the apps code aware that voltage and runtime estimation
is not always available.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31548 a1c6a512-1295-4272-9138-f99709370657
2012-01-03 23:44:38 +00:00
Rafaël Carré
568c441fd8 usb-target.h: remove
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31498 a1c6a512-1295-4272-9138-f99709370657
2011-12-31 18:44:55 +00:00
Rafaël Carré
bce42fdc31 usb_init_device(): move prototype to usb.h
Get rid of some usb-target.h files

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31487 a1c6a512-1295-4272-9138-f99709370657
2011-12-31 18:43:41 +00:00
Rafaël Carré
6fdc91e64f usb-s3c6400x: move usb_init_device
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31478 a1c6a512-1295-4272-9138-f99709370657
2011-12-31 16:17:06 +00:00
Rafaël Carré
249218a5c2 usb-s3c6400x.c: move usb_detect and usb_enable
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31477 a1c6a512-1295-4272-9138-f99709370657
2011-12-31 15:44:32 +00:00
Boris Gjenero
14c2e677fd Make more local functions static.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31395 a1c6a512-1295-4272-9138-f99709370657
2011-12-21 17:36:18 +00:00
Michael Sevakis
09769827fe Swap red and yellow for green on r31339's cranky builds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31340 a1c6a512-1295-4272-9138-f99709370657
2011-12-17 07:54:00 +00:00
Michael Sevakis
43d7a75369 Get the linker files that slipped through in r31337.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31338 a1c6a512-1295-4272-9138-f99709370657
2011-12-17 02:00:59 +00:00
Jonathan Gordon
ea2a3ee7a8 Fix the gpl notice in the previous commits new files, and fix the yelow gevearts naughtily ignored
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30996 a1c6a512-1295-4272-9138-f99709370657
2011-11-16 10:37:48 +00:00
Jonathan Gordon
be716c0be8 Finally commit FS#5111 - piezo clicker for ipods!
Origional implementation by Robert Keevil with contributions from Frederik Vestre,  Stoyan Stratev, Craig Elliott, Michael Sparmann,  Thomas Schott, Rosso Maltese, and syncs from a bunch of other people!

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30995 a1c6a512-1295-4272-9138-f99709370657
2011-11-16 10:25:43 +00:00
Torne Wuff
569285794b Bulk convert all DOS line endings to UNIX.
For the git migration we want a nice clean repository with UNIX line
endings. git does not use svn:eol-style, we just need the file contents to be
sane.

Sorry everybody. I know this messes up blame.

Scumbag *NIX developer says migrating to git will make line ending issues go
away; commits giant change to svn which changes line endings anyway. :)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30924 a1c6a512-1295-4272-9138-f99709370657
2011-11-06 22:44:25 +00:00
Marcin Bukat
bf056d5372 Switch to SYS mode on arm FS#12322 by me
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30741 a1c6a512-1295-4272-9138-f99709370657
2011-10-11 16:06:03 +00:00
Michael Sevakis
4db3e89652 Shuffle some functions around so that interfacing with playback.c in particular isn't required. Though playback does finish the audio init, pcm doesn't care who does it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30403 a1c6a512-1295-4272-9138-f99709370657
2011-09-01 12:15:43 +00:00