Remove the generic TLV320AIC3104 codec header. The codec
is sufficiently complex that a one-size-fits-all driver
isn't really feasible, eg. due to different clocking and
output configurations.
It's easier for targets to have their own audio headers
tailored to their use case than a generic header with
lots of ifdefs.
Change-Id: I63d92d57c28ddd7da7aa3174bd583d8afb1aa56d
Firmware didn't start sleep countdown if
1. Display was already dimmed
2. Fade out timer was set
You can reproduce this by:
1. Set fade out timer. For example, 500ms
2. Wait till display will be dimmed and go to sleep
3. Switch hold ON or plug headphones
Change-Id: I27ca857aa8db4551bd9caad4815cd73a64bf6185
According to RM0433 the DCTRL register needs to be written
after DLENR and DTIMER. This is respected for data transfer
commands but not for non-data commands. Nothing bad seems
to be happening because of this, but it seems wise to rectify
the issue.
Change-Id: I55d8f2c1994bff747e5978847fda57445f001b02
According to RM0433 consecutive writes to the CLKCR and CMDR
registers must be separated by at least 7 AHB clock cycles.
The initialization code didn't respect this and it seemed to
be causing a nasty bug, where the SDMMC bus clock got stuck
at 400 KHz in hardware. Despite the CLKCR register reading
back the correct value, it could not be written with a new
value even in the debugger; resetting the peripheral was the
only way out of this state.
Adding some dummy register reads after any access to CLKCR
should insert the necessary number of wait states. Without
the fix, the SDMMC clock gets stuck about 12% of the time.
With this fix, the clock always initializes correctly.
Change-Id: Iba85b8e1e3c60992ddc42fb4c1e66c37941ed617
Register the M0 Pro as an X1000 device in jztool for USB boot loading.
Uses Shanling USB IDs (0x0525/0xa4a5) for mass storage identification.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change-Id: I5ab71d6e7dcce925a2c91c2779964b4302ef777e
If not, these devices will charge very slowly (0.07A) when plugged into a wall plug, and will all discharge slowly when docked & playing music.
Enabling this option (that is already enabled by default on some other devices like erosq and fiio m3k) make them pull between 0.20 and 0.30. They charge faster, just as fast as on Stock OS, and won't discharge when playing music while docked.
Change-Id: I90a59caaca463354772b1869f7333d8efce4f117
Replace the factor calculation from pcm-alsa.c, which
is based on signal *power* ratios, with the fp_factor()
calculation that is based on amplitude ratios. Because
power changes with the square of amplitude, this means
1 dB of power equals 2 dB of amplitude.
Rockbox's volume controls are amplitude-based, so the
smallest step size for pcm-alsa was effectively 2 dB.
The fp_factor() method supports 0.1 dB steps and is a
bit more accurate besides, so it's simply superior in
all respects (aside from taking a few more CPU cycles
to calculate the factor).
Change-Id: I34d143c225d8b5e085cde299fc405f83c13314bf
Disabling an IRQ in the NVIC may not take effect right away;
if the IRQ is being disabled to implement a critical section
it's necessary to follow up with dsb + isb to serialize the
NVIC update. Add a helper function for doing this.
Change-Id: Iaaa238ad39997cc3c6d62867d265cf9e9e0e5c4b
pcm_play_data -> mixer_channel_play_data
pcm_set_frequeny -> mixer_set_frequency
pcm_play_stop -> audio_stop at startup / mixer_channel_stop at shutdown
pcm_is_playing -> mixer_channel_status
All of these have been removed from the plugin API. Updated API docs to
clarify role of audio_stop() vs mixer_channel_stop()
Todo: get rid of pcm_play_[un]lock().
Change-Id: I8800c131b51f064ee923a4c6e42aa405d33851fc
With the statusbar enabled, the UI viewport's
font may be different from the UI font, which
breaks stringsize calculations in LRC Player
that are currently all based on the UI font.
Change-Id: Ib53de62134b250fa50353074959843278f38478f
It was added back in 2007 (commit 8b6d28790e) apparently
in a half-baked state, and has never been enabled since.
Change-Id: I728b5730fe05262bae292cd7fcdcfe4b53c4b315
lrcplayer currently automatically scrolls the lyrics for you, as it assumes that there is sync information in the lyrics. In the case where there aren't (like for ID3V2 USLT tags), the plugin will automatically assume timestamps and will scroll automatically.
This commit adds an option in the Display Menu to allow automatic scrolling to be disabled. When disabled, you can scroll the lyrics using the volume keys (like you would on the iPod's OS).
Change-Id: I87ef27fd2b84c97374bdfd0e47f4c00ddb4bc85e
Fix single mode fails to pause between tracks with different sample rates with auto frequency switch enabled.
Fixup for c199d9a3
Change-Id: I51bbd33a15be16b711b3a8e46c0cab1b15a93705
Extend AUTOROCK define functionality to allow specifying both the
autostart plugin path and its argument.
Example:
#define AUTOROCK VIEWERS_DATA_DIR "/imageviewer.rock"
#define AUTOROCK_ARG "/jpegs/sample.jpg"
Change-Id: Icc41bceac676e8db17d3a63baefdf96e3023c181
At low speed there's some occasional corrupted pixels,
most visible on album art and such; this goes away at
medium speed.
Change-Id: Ice4eaec4284023d2d3f5c571b242cb27ebc26da9
The problem with drive strength and things not working reliably
at 50 MHz turned out to be entirely caused by the ESD diodes on
the data/command/clock lines, which have a whopping 200-300 pF
junction capacitance -- 6-10x higher than the 30 pF limit given
by the MMC spec.
After desoldering the diodes the bus seems stable at 50 MHz and
with any drive strength (note MEDIUM is still fast enough even
for 50 MHz, so the drive strength is unchanged).
Change-Id: If9847ee4145f5ed2f7e172cfa89acad0737a897f
* Get rid of the SD_CIM_RESET meta-command and put all
reset/init logic into one place
* Don't double-issue the SD_GO_IDLE_STATE command
* Explicitly set lowest speed upon reset
Change-Id: I5abfe9f64997e39087b8a77d525f90c77733a1a8
It was limited to 48KHz due to insufficient IRAM but at some point in
the last five years or so that must have changed.
Change-Id: Ia893ed5e1f3026158daad77991c3d9cca2fed97c
* Rework logf/DEBUG distinction
* Don't try to init a card that isn't detected
* Inform card that host supports SDUC
* Implement CMD22 (SET_UPPER_ADDR)
* Implement CMD23 (SET_BLOCK_COUNT)
* Disable DMA for transfers under 512 bytes
* Created ACMD+data xfer command path
* Incorrect handling of RESPONSE_R7
* Clean up 4bit stuff, only turn it on after we enable it in the card.
* Clear END_CMD_RES bit _after_ we check the status
* Probe SCR <-- NOT YET WORKING, DISABLED
jz4740 had these additional improvements:
* Restructuring to bring it closer to 4760 driver
* Unified read/write setup code
* IRQ handling and polling improvements
Change-Id: I47379f097af4bf50177499b3d80a6c9c42d48057
Use ":" as the separator. Useful for plugin development and debugging.
Example:
../tools/configure --target=hibyr1 --type=ADS --plugins="properties.c:imageviewer"
This creates a debug simulator build for Hiby R1 with the properties.c file and the imageviewer directory plugins enabled.
Change-Id: If974cfb0c54bd2c1a53ae11cc3f942c698ef2fe4
Low speed works for 50pF loads up to 12 MHz. LCD signals
fall well within those limits so there's no reason to use
any higher speed.
Change-Id: I6dab899fac316bb02572174ef13a98cccbf4ae66
The semaphore was released after all bytes were read/written
without waiting for the EOT event, which is why the delay at
the end of the transfer needed to be longer than expected.
Change-Id: I6b48fc01cda69564c0ec8f843afd1b0c3a9c5a3c
SDL needs to do lcd_update from the main thread
stars.lua uses an event that runs in a timer thread
so in the sim the screen never updates
Change-Id: I6002525363010c3133ebbfb490763f747c5d773a
I have a 1TB SD card that gets filesystem corruption when writing large
amounts of data when using Rockbox in USB storage mode. The card doesn't show
this behaviour when using the original firmware or when using an external SD
card writer.
This is on an Aigo Eros Q device. Same brand 512GB card does not exhibit this
behaviour.
Whether this specific SD card explicitly requires CMD23 or if there's a
problem with the controller's timing of auto-CMD12 in combination with this
card is currently unknown, but implementing it does solve the problem.
This change request implements CMD23 by first probing if SBC is supported by
the SD card and then using it instead of AUTO_CMD12.
Change-Id: Ib2dc8e179b0fab98ca59c348061cb7d5850884dd
Someone opened a bug, its not a bug but it is annoying
these are the smallest screens so the 18 character width ends up
wasting lines that could be displaying characters
this layout repeats some but should be more ergonomic
Change-Id: I2ed4c0887477aac49821c4edb6f3bf174e38d36e