summaryrefslogtreecommitdiff
path: root/firmware/target
AgeCommit message (Collapse)Author
2021-10-05x1000: default to sending 0 samples on underflowHEADmasterAidan MacDonald
Previously it used the last sample, which turns out to be broken. The AIC appears to send out a random non-zero sample continously after boot -- probably because the last sample is uninitialized by the hardware. Disabling playback is supposed to make it send zero samples irregardless of the LSMP bit according to the docs, but it doesn't seem to work this way. - Change eliminates the white noise heard on the M3K after boot. - Change has no adverse effects on the Q1. - Leave Eros Q on the old setting since sending zeros exacerbates clicking due to DAC's automute feature. Change-Id: I9996793fc34f4475b19700d076b11505353b3836
2021-09-29Bugfix AS3525 usb driver unboosted the cpu without first boosting itWilliam Wilgus
Change-Id: Id2d45870a9128b19ace0e8d5c16d3b3fa4b923dd
2021-09-26ErosQ Native: Adjust battery % scaleDana Conrad
Adjust the battery scale to be a little better. I've set the 100% (discharge) point to be where the battery sags to when it is done charging but still plugged in. Not quite sure how best to set the charge scale, it's just equal to the discharge scale for now. Change-Id: I9a2730c0b2051300af9eeddb4f67164f38a29002
2021-09-26win32: Add a stub for os_modtime() to make sim builds happySolomon Peachy
Change-Id: Iea90776df2a92777c8e07c5a6b6635b6734d6690
2021-09-20usb: rename usb_drv_recv() to usb_recv_recv_nonblocking()Aidan MacDonald
IMHO the current name is somewhat misleading: - usb_drv_send() is blocking and we have usb_drv_send_nonblocking() for the non-blocking case. This inconsistent naming can only promote confusion. (And what would we call a blocking receive?) - Other hardware abstraction APIs in Rockbox are usually blocking: storage, LCD, backlight, audio... in other words, blocking is the default expected behavior, with non-blocking calls being a rarity. Change-Id: I05b41088d09eab582697674f4f06fdca0c8950af
2021-09-12iPod mini backlight initializationChristian Soffke
Fixes backlight not turning on after booting (tested on an iPod Mini 2G). backlight_hw_init() copied from iPod 4G. Change-Id: I9c32ca5ecd3dc74ea997e6cb843da79d303b0615
2021-08-18x1000: trigger the virtual LED on disk activityAidan MacDonald
Change-Id: Ic129e79e0b192cb0c39e5f05ad602e0ea7a9213f
2021-08-14Fix red from 04fe77a4Solomon Peachy
Change-Id: I13a7b067e60eabe27be1fe983a7cced3ae8b18e3
2021-08-14Remove the (very) incomplete port for the Tatung TPJ-1102Solomon Peachy
It was barely even a stub, and hasn't seen any development since 2009 Change-Id: I0aa15d9a7b90ae8c771924d9f401380d4cc0fab9
2021-08-14Remove Samsung YP-Z5 portAidan MacDonald
It has only a couple GB of onboard flash storage with no storage driver in Rockbox. It hasn't seen any meaningful development since its initial commit, it's not on the build farm, and the bootloader build is broken by other refactoring. Change-Id: Idd9e3c46fac9b96f416ce444182f97a50770e747
2021-08-12Eros Q Hosted: Apply DC Bias to PCM DataDana Conrad
Similar to the native port, the hosted port benefits from adding a -1 dc bias to the PCM data. This prevents almost all clicking artifacts. Change-Id: Ic6378716774b6d88df23c476e2ef54d49f33dc72
2021-08-08As3525 wavpack_enc document some intentional switch fall throughWilliam Wilgus
Change-Id: I56bf439df2c05653d65f49238e886e4ef2291176
2021-08-07move PCM_NATIVE_BITDEPTH definiton into global config codeSolomon Peachy
Change-Id: I391bcffca670916c2c88426e2ba2603351326cee
2021-08-07Fix warnings from 56b0dde545Dana Conrad
Need a default bit depth in pcm-x1000.c Change-Id: I2c6af227975d2f47609b51090638012d8406ec1e
2021-08-07Higher bitdepth software volume scalingDana Conrad
Operates between 0 and -74 dB (mute) without issue Change-Id: I497e002bd8db43833a09ebbc29212fbb6cc8ebfd
2021-08-06Fix wrong printf format in system-hosted.cAidan MacDonald
Change-Id: I73722f0711a295152a98ab784cd6cf76379ef52e
2021-08-06Fix hosted glibc backtraceAidan MacDonald
According to backtrace(3) man page, the string returned from backtrace_symbols() contains the return address so we shouldn't need to print it ourselves. Change-Id: Ia779207285c9ea0052b9aee3d84ee8380bf46d82
2021-08-05hosted: Fix rtc_write_datetime() error handlingSolomon Peachy
(if mktime() fails, don't attempt to write its result to the RTC) Change-Id: Ib09b8dccafdef032119db76f10af74dfc220cc21
2021-07-25Fix remaining yellow from e532714d1fAidan MacDonald
Change-Id: If0bdd1fb3c8ee3324562638bc4c4181357a8fd53
2021-07-25Fix yellow from e532714d1fAidan MacDonald
Change-Id: I4f49e93fc1efa78874fb76de6a436ad1fc894cc5
2021-07-25pcm: Remove unused function pcm_play_dma_get_peak_buffer()Aidan MacDonald
Change-Id: Ifd20fb14a22489cdb99154c01f69809a1e70d0c5
2021-07-18add Eros Q native simulator buildAidan MacDonald
Change-Id: Ifdc882d19020da2e18234d6276409ad3e7efa138
2021-07-18New Port: Eros Q NativeDana Conrad
What works: - LCD: 16-bit RGB565 - all buttons, including scrollwheel - SD Card - Battery level and charging/not charging status - USB - audio - sample rate switching - HP / LO detect, with "safe" fixed LO volume - LO volume will only be put to user-defined max volume if headphones are not present. - rtc - Plugins build, tried a couple and they seem OK - Bootloader, installable to nand via usbboot What doesn't work: - Dual Boot - power on/off has intermittent, low volume audio click (sometimes it's completely silent, sometimes there's a click) - Audio uses 16-bit volume scaling, so clicking/popping is pretty bad at lower volumes - need 32 bit volume scaling, 24 bit I2S data - USB HID keys not yet defined - no jztool support Unknowns: - Stereo Switch pins: Direction select, AC_DC (probably not even hooked up) - What is the actual purpose of the Stereo Swtich? - How does the bluetooth module connect? "Someday" stuff: - get LCD working at higher bit depth - Bluetooth Change-Id: I70dda8fc092c6e3f4352f2245e4164193f803c33
2021-07-13New port: Shanling Q1 nativeAidan MacDonald
- Audio playback works - Touchscreen and buttons work - Bootloader works and is capable of dual boot - Plugins are working - Cabbiev2 theme has been ported - Stable for general usage Thanks to Marc Aarts for porting Cabbiev2 and plugin bitmaps. There's a few minor known issues: - Bootloader must be installed manually using 'usbboot' as there is no support in jztool yet. - Keymaps may be lacking, need further testing and feedback. - Some plugins may not be fully adapted to the screen size and could benefit from further tweaking. - LCD shows abnormal effects under some circumstances: for example, after viewing a mostly black screen an afterimage appears briefly when going back to a brightly-lit screen. Sudden power-off without proper shutdown of the backlight causes a "dissolving" effect. - CW2015 battery reporting driver is buggy, and disabled for now. Battery reporting is currently voltage-based using the AXP192. Change-Id: I635e83f02a880192c5a82cb0861ad3a61c137c3a
2021-07-13x1000: revamp MSC driver card detection logicAidan MacDonald
Debounce logic now handles both removal and insertion and verifies the detection is stable for 100ms before taking any action. This solves the bootloader "file not found" issue on the Shanling Q1. It seems a false removal event was generated, causing the filesystem to be automatically unmounted. Probably this is due to some transient noise at boot. Delays didn't solve the problem, probably because the bogus hotplug event was queued, and normal mdelay() would simply delay event delivery. Change-Id: I8b03fb3550309f5a7ab4be0be7465a3dab2d3450
2021-07-11x1000: Unified flash bootloader installerAidan MacDonald
Change-Id: Ib1d41d4e7d663ff8a21eb08108c13568f7408533
2021-07-11filesystem: implement os_modtime for unixJames Buren
Change-Id: If030d526f29aa786b5a37402413d804752286cf5
2021-07-10Sansa Connect: Ensure LCD starts before backlightTomasz Moń
Extra delay prevents white flash after hold switch release. Change-Id: Ib0d33937dcbb738b913388e7df92ffdf9346c9f9
2021-07-10Sansa Connect: Use deviceid in USB Serial NumberTomasz Moń
Atmel AT88SC6416C CryptoMemory is almost I2C compatible. The device is connected to bitbanged I2C bus shared with compliant I2C devices. Change-Id: Iec54702db1bdfb93c01291eef18ec60391c63b16
2021-07-09Sansa Connect: Fix reported CPU frequencyTomasz Moń
Make frequency related comments accurate. Disable UART0 clock. Change-Id: I224a3d6656ad53165dcff68ed716fa2c6863240d
2021-07-09DM320: Regorganize LCD and TTB memory layoutTomasz Moń
Do not introduce any change for M:Robe 500 as it uses the two LCD frames in non-obvious way. Sansa Connect and Creative ZVM use only single front framebuffer. Place TTB at DRAM end to minimize memory loss due to alignment. Reserve as little as possible memory for the LCD frames. On Sansa Connect this change extends audio buffer by 858 KiB. Change-Id: I21bdeec4cfba86d71803a39acd651a87e73767e6
2021-07-08x1000: SPL refactoringAidan MacDonald
This streamlines the boot code a bit and reduces target specific boilerplate. The clock init hack used by the bootloader has been "standardized" and works for the main Rockbox binary now, so you can boot rockbox.bin over USB without special hacks. Change-Id: I7c1fac37df5a45873583ce6818eaedb9f71a782b
2021-07-08x1000: more CPM register definitionsAidan MacDonald
Change-Id: Ie6fa343a65a6bd19e578664b10bac771289ed0b3
2021-07-07Sansa Connect: Reduce USB RX buffers from 129 to 2Tomasz Moń
Reducing number of fake RX buffers saves a bit more than 127 KiB RAM. Fix compilation with CPPI logging enabled. Change-Id: If1ad3a6fc251e284caaac78c2406a58f3d6547bb
2021-07-07Sansa Connect: Prevent unresponsive interfaceTomasz Moń
AVR interrupt signal can remain active if the state has changed during state read. In such case, there won't be intterupt and the interface would appear unresponsive until AVR thread received event (e.g. USB connection/disconnect). Solve the issue by not waiting for event if AVR interrupt signal is active prior to event wait. Change-Id: I86e388c7cd6da76e3abe7bf7114940f331e4c308
2021-07-07Sansa Connect: Read HDQ battery dataTomasz Moń
Make it possible for target to provide voltage, percentage and time to empty values. The voltage measurement is nice to have in debug menu even if the actions are taken only based on percentage. Perform battery level estimation based on voltage only if percentage is not available. Use time to empty based on actual power consumption. This makes the estimated runtime displayed in Rockbox Info to react to backlight setting. The bq27000 updates time to empty estimate every 5.12 seconds so it is possible to see the estimate with backlight off on the screen if user enters Rockbox Info, activates hold switch, waits 11 seconds and releases the hold switch. Change-Id: Iafe3fa0fb334e3428e3a0ad05b2c020d208dc934
2021-07-05Sansa Connect: Power off LCD to save powerTomasz Moń
Prevent startup screen flash by properly using AVR LCM functions. Power off LCD when not needed to improve battery runtime. Change-Id: I76e3c5c0208774f189fbc6f7d7b3c9e22c062285
2021-07-04Sansa Connect: Fix power off panic screenTomasz Moń
Queue power off requests because power_off() can be called within tick context that must not acquire mutex. Change-Id: I6f1a8f81d15518876cd03556118fc9eb37b8175f
2021-07-04Sansa Connect: Initial libertas WiFi driver portTomasz Moń
Import non-free firmware image from linux-firmware package. Firmware loading works but is disabled at compile time because just loading firmware without configuring device results in higher power consumption without any benefit to end user. Change-Id: I8fd252c49385ede1ea4e0f9b1e29adeb331ab8ae
2021-06-27x1000: NAND rewriteAidan MacDonald
This new design saves on binary size and stack usage. The API is also block- and page-based, requiring awareness of the chip layout to use properly. Out-of-band areas are also exposed for reading and writing. The byte-oriented routines are kept for compatibility with the existing installer and SPL. Change-Id: Iaacc694d2f651ab74d45330e0434ee778a0d91bc
2021-06-27Sansa Connect: Ensure adequate AVR Slave Select delayTomasz Moń
Waiting 10 us between selecting slave and transmitting data on SPI resolves spurious startup glitches. Cache last read monotime value as it can differ from the first one. Change-Id: Ia6ac5696f6ee2bc3c6a8be27e33aaddd9ff4ce2a
2021-06-27Sansa Connect: Discard invalid monotime readsTomasz Moń
Read monotime twice in a row and only accept the value if it matches or the two reads are 1 second apart. Change-Id: Ibd289103a20404dd1b2bbd131fdfa8905852c788
2021-06-27Sansa Connect: More reliable AVR communicationTomasz Moń
AVR requires bigger delays between retries. Read state instead of version for synchronization purposes as it shifts more bytes. Change-Id: Ib7fa980496d3bc7744a086b45e1865861ef58b88
2021-06-25Sansa Connect: Retry AVR commands only 3 timesTomasz Moń
If the commands repeatedly fail it is likely that the AVR is not programmed. In such case simply continue normal operation. This is especially important in bootloader as it makes it possible to load new rockbox build using bootloader USB mode. Otherwise, the only recovery option would be to use I2C serial. Change-Id: I4b0999833e9a906ec6353bdfdd5b68211f07ac81
2021-06-25Sansa Connect: Implement RTC functionalityTomasz Moń
Use 32-bit monotime AVR counter for time tracking. Set the time by adding fixed offset to the counter value. Store the offset in rockbox directory to make it persistent between reboots. Do not implement alarm functionality as wakeup is only possible from sleep and not from complete power off. Change-Id: I615c7eb4df8ab0619dcbfcff107bc7051a15aace
2021-06-25Sansa Connect: Manually drive SPI Slave SelectTomasz Moń
Keep Slave Select active during command transmission. This relaxes timing requirements on the AVR side. Change-Id: Ia1a6cf45aba3c11f6aeaa7441c6793807ca827f0
2021-06-22Sansa Connect: Refactor AVR command handlingTomasz Moń
Add defines for all commands handled by AVR, including the unknown opcodes (0xC5, 0xD3, 0xD4, 0xD5, 0xD6). Properly synchronize with AVR and keep repeating command until it looks like AVR has accepted it. Change-Id: I3d42e973f135e33092c71c9887421906a900ab58
2021-06-21mi4: replace chksum_crc32 with crc_32rJames Buren
This uses an equivalent algorithm but with a different initial value than we normally use (all bits off vs all bits on). Use the new crc_32r to replace the original MI4 crc32 implementation. This frees up some extra space on mi4 targets which gives us more room on a few very space constrained targets (sansa c200/e200, etc). Change-Id: Iaaac3ae353b30566156b1404cbf31ca32926203d
2021-06-20Sansa Connect: Indicate charging statusTomasz Moń
Consider battery level down to 0 as safe as OF continues to operate normally even when at level 0. Change-Id: Ie3889e5662b9fa6588e20ad02d8953f29e28800c
2021-06-15DM320: Use SD/MMC data done interruptTomasz Moń
Wait on semaphore until DMA finishes instead of busy waiting. This allows the CPU to be used by other tasks during transfers. Increase peripheral clock frequency, divide AHB by 2 instead of 3. Function clock frequency is AHB divided by MMC divider + 1. Change-Id: Ic890634da7e3541962ea3501eae8fa2ca2db606a