summaryrefslogtreecommitdiffstats
path: root/firmware
AgeCommit message (Collapse)AuthorFilesLines
2020-10-03coldfire: Allow building when 88KHz audio is disabledSolomon Peachy2-3/+5
Change-Id: Ieeacf591ad4233428dca99c347043e61abae1d1f
2020-10-03Disable 88/96KHz from targets that lack the IRAM to hold the mix buffersSolomon Peachy8-42/+12
Change-Id: I67b15d4c517a74a23639f8659acbc89022c264b5
2020-10-03pcm: Dynamically-size the mixer buffer at higher audio bitrates.Solomon Peachy1-10/+29
Basically, existing sizes apply for <= 48KHz audio. Up to 96K, we double the mix buffer. up to 192K, we double it again. Will help reduce the interrupt load and overall latency, keeping it roughtly constant as a function of time, regardless of bitrate. (It is acutally a fixed-size buffer, statically-allocated to handle the worst-case bitrate the player supports. However, at runtime if we are using a lower bitrate we will only use a portion of it in order to keep latancies down) Change-Id: I61ca23180a86502732b0903fe9691c1a8c2aeaea
2020-10-03alsa: introduce AUDIOHW_MUTE_ON_PAUSE, and have rocker use it.Solomon Peachy3-8/+15
Change-Id: I1edbb8e71a9c73baaeecb01b66cbee6c3f7b5f8f
2020-10-03xduoo codec cleanupsSolomon Peachy1-6/+5
Change-Id: I6c3437bde2d9f781a02ffc6b3a83148b9a7af872
2020-10-03xduoox3ii/x20: Rework the mute control to actually function properly.Solomon Peachy1-12/+22
(By switching the output away from the audio jacks) Change-Id: Ib8511c9d45029bba038dc4d1d187174d56cb3043
2020-10-03alsa: Explicitly mute the output when we stop playing, and unmute after ↵Solomon Peachy1-1/+14
playback starts Allows us to avoid hearing the codec powering on and off. Change-Id: Idaaff437932009952ed248be97eedf54cb4cf28e
2020-10-03alsa: Handle underruns when starting a new streamSolomon Peachy1-47/+69
Unsure why this is happening, but now we detect and recover errors at startup. Also clean up the mismash of printf(), DEBUGF(), etc in favor of panicf() for the really serious stuff and logf() for everything else. Change-Id: I9aaa620d55d556645c9a6d108541b987983b32a8
2020-10-02alsa: Use larger playback buffers for higher bitratesSolomon Peachy1-4/+16
(existing ones apply up to 48KHz, scale up linearly to 192KHz) Change-Id: Iac32d49b8073b63a5d40fd21f41437e6051cb8de
2020-10-02imx233: Hardware codec supports up to 192KHz. Make it so!Solomon Peachy2-2/+8
Change-Id: If08a1d244f28092a5d5332d666fb9afdc78f35a9
2020-10-02hosted: Don't use O_SYNC for the framebuffer handle.Solomon Peachy1-1/+1
Change-Id: Iff4b1947fe053313d677b894c78250760aaef967
2020-10-02For backlights that have a wide control, support skipping steps.Solomon Peachy4-3/+28
the rocker, x3ii, and x20 now take advantage of this, and fades are far faster now. Change-Id: Iceb1a5a6c1d1389c3fdb859b32016b5114a80a22
2020-10-02hosted: Fix overzealous spamming of backlight and lcd enableSolomon Peachy2-10/+27
This caused random delays in LCD activity, and also caused key inputs to go nuts Change-Id: Ie483c86f7461455308f8c5f8999df313521c6b55
2020-10-01xduoox3: Work out clocks for 176/192KHz support.Solomon Peachy2-12/+13
Note: PCM mix buffer sizes are _way_ too small for these high bitrates (We really need to make the mixer stuff use dynamic buffer sizes based on the bitrate. Maybe pre-allocate a max size based on upper bitrate limit, but use only part of it at lower bitrates? So we can have sane latency..) Change-Id: Id7b4afd73dba7f1ffb84b2e1c016859fae5d6835
2020-10-01fix more red.Solomon Peachy1-7/+0
Change-Id: If5fee31d633e5f75272ba85f5293ad01b1ce573a
2020-10-01Fix warnings and errors introduced in b030bf5Solomon Peachy2-0/+8
Change-Id: I23966b6a79c0d2cbab2e01c649c1b991f460d8ad
2020-10-01xduoox3ii/x20: Proper lineout detection and volume mangling.Solomon Peachy9-44/+80
hotplugging hp and lineout works, without blowing out eardrums. Change-Id: I2df5c7a618bb2d1d77d416548d45dff9cfc619db
2020-10-01fix some of the red introduced in e43726dSolomon Peachy5-12/+4
Change-Id: Id1abb0dd11f8a8e79a80fc54e58a5a22706a03ad
2020-10-01hosted pcm-alsa improvementsSolomon Peachy13-90/+212
* xduoo x3ii/x20: Better line out support * less granular volume settings (too many steps before) * Better handling of swiching sample rates * Log actual sample rate in debug menu Most credit goes to Roman Stolyarov Additional integration [re]work by myself Change-Id: I63af3740678cf2ed3170f61534e1029c81826bb6
2020-10-01hosted: fix shutdown crash in framebuffer code.Solomon Peachy1-1/+9
Change-Id: I78315b81ab8df0408abc64d5edb6af37db568ad7
2020-10-01Hosted: Improvements in the LCD code. (Roman Stolyarov)Solomon Peachy2-21/+31
* Kill LCD when turning off the backlight * Fix logic errors in lcd_enable() calls * Use ioctls instead of sysfs to twiddle lcd enable Change-Id: I6864ff63d87b747ac48719b0f4ba2de00333a1d3
2020-09-30pcm: Missed a file for the 192/176K playback.Solomon Peachy1-0/+4
Change-Id: Ie9b5299bfb074604db5a9ac340f67c5ed75aa926
2020-09-30audio: Add support for 192 and 176KHz playbackSolomon Peachy29-77/+118
* SAMPR_CAPS_ALL -> SAMPR_CAPS_ALL_48/96/192 * All targets claiming SAMPR_CAPS_ALL now get appropriate subset * No need to explicitly define HAVE_PLAY_FREQ * Rates that are a multiple of 44 or 48KHz can be used for playback Inspired by a patch by Roman Stolyarov, but substantially rewritten by myself. Change-Id: Iaca7363521b1cb9921e047ba1004d3cbe9c9c23e
2020-09-30Leave HOME_DIR out of default recording and playlist pathsSolomon Peachy2-5/+5
The hosted filesystem code will automatically prepend HOME_DIR. Change-Id: I36a76e51637ab2bb68353f8eb9ffac25ca75bad1
2020-09-28fix x20 and yp-r1 builds.Solomon Peachy1-1/+1
Change-Id: Ifc6638c2ed6bc862ded389f1b81f30c7a0419ec0
2020-09-28xduoo: x3ii and x20 also have their CPUs clocked at 1008 MHz.Solomon Peachy2-2/+2
Change-Id: I59fbd1edc934a6e2b2323e13b4efc3cc1caad903
2020-09-28xduoox20: UI Simulator supportSolomon Peachy3-9/+14
Change-Id: I2a03cea07fbad9fb5862ca69e4cfca2e8ca6b17f
2020-09-29rocker: CPU is actually running at 1008MHz, not 532.Solomon Peachy1-1/+1
Change-Id: If5204574cb604d1ea82f0863d300468bedcf541d
2020-09-29hosted: Slightly cleaner shutdown; kill the display first.Solomon Peachy1-0/+4
Change-Id: I620d7afb2eb0556cde07c7828b134b13892e6db4
2020-09-29rocker: Increase the long-press shutdown delay a bit.Solomon Peachy1-1/+1
Change-Id: Ief64f3d39556efa7de7df32eb7613a29a466a02e
2020-09-18jz4760: Implement USB DMA RXSolomon Peachy1-22/+135
Can be disabled at runtime by setting hold switch. Boosts sysbench sequential write performance by 34-58% Change-Id: I060c9d7dddc1b448f18aa46af8f8aff046e07843
2020-09-18Headphone / lineout pause/resume #FS13237William Wilgus2-1/+5
Allow Lineout to behave like headphone port in regards to plug/unplug pause/resume Change-Id: I9cb2c9c40e0bdf3bf7e1e272164acd343f6b3850
2020-09-17jz4760: Heavily rework USB driver to add working DMA supportSolomon Peachy3-139/+257
* DMA Bulk IN (ie our TX) results in sequential transfers 33-68% faster. * DMA Bulk OUT (ie RX) is mostly stripped out due to complete brokenness. * Interrupt and control endpoints remain PIO-driven. Other improvements: 1) Use consistent endpoint references (no magic numbers) 2) Greatly enhanced logging 3) DMA support can be compiled out completely 4) Setting lockswitch will disable all DMA operations at runtime 5) Much more robust error checking and recovery Change-Id: I57b82e655e55ced0dfe289e379b0b61d8fe443b4
2020-09-17Xduoo X3 add headphone and lineout status to IO Ports debug menuWilliam Wilgus1-13/+30
Change-Id: I9caf55c1249625dff7e437158afd20a526fa7499
2020-09-13Xduoo X3 no ADC after ROLOWilliam Wilgus2-0/+8
Speachy suggested we don't shut down the adc on ROLO this fixes the random adc drop out on ROLO Change-Id: Ife7d679ce51a6f767963210ee650815f1de12223
2020-09-13Xduoo X3 Add tree scrolling FS#13240, Emulate Multibutton pressesWilliam Wilgus2-19/+50
Fixes deficiencies with the button system on the X3 The x3 has an interesting button layout. Multiple key presses are NOT supported unless [BUTTON_POWER] is one of the combined keys As you can imagine this causes problems as the power button takes precedence in the button system and initiates a shutdown if the key is held too long instead of BUTTON_POWER use BUTTON_PWRALT in combination with other keys IF using as a prerequsite button then BUTTON_POWER should be used Multiple buttons are emulated by button_read_device but there are a few caveats to be aware of: Button Order Matters! different keys have different priorities, higher priority keys 'overide' the lower priority keys VOLUP[7] VOLDN[6] PREV[5] NEXT[4] PLAY[3] OPTION[2] HOME[1] There will be no true release or repeat events, the user can let off the button pressed initially and it will still continue to appear to be pressed as long as the second key is held Tree scrolling is PLAY+NEXT or PLAY+PREV Change-Id: I88dfee1c70a6a99659e8227f5becacc50cc43910
2020-09-08XduooX3 LCD tweaks #2William Wilgus1-48/+110
Group commands for a bit more speed bitdelay was not being inlined lower bitdelay to 12 cycles Clean-up magic numbers Change-Id: Ifeb57a5532807a598f1ec5e1c55f03e4aa1e133f
2020-09-06XduooX3 Gpio reconfigure button system #2William Wilgus1-79/+45
Fix issue with first battery sample taking 30 seconds Clean up code Change-Id: If2437d241e0ab4e3d23b141f5d853b6cf3209b07
2020-09-06jz4760: Fix and re-enable the hardware udelay() timerSolomon Peachy1-12/+19
Change-Id: I591b4f023776b3501fce03e08bfc87a355f4c69b
2020-09-06jz4760: Use a #define for the timer id, not a raw numberSolomon Peachy1-15/+17
Change-Id: Ic31267a2ae82beede72100c1cc5ddf7211aa0abe
2020-09-05mips: Convert 'nop' to 'ssnop' -- for future-proofingSolomon Peachy6-77/+77
Change-Id: I17625f4d56a1f5205887cb47668a2dcb628053f4
2020-09-04jz47xx: Audio path tweaks:Solomon Peachy5-0/+10
* Increase audio buffer size to better handle IRQ latency (256->2048) * Ensure DMA engine is idle prior to starting transfers * Set AIC to repeat last sample in case of underflows Change-Id: I9c45c20481ee072e5882b7586fb7d50bd8ef2f35
2020-09-03Xduoo Gpio fix bugWilliam Wilgus1-0/+3
Change-Id: I76eda59a391a408d1a6642497d8cc4aeb93a0da1
2020-09-03mips: Heavily rework DMA & caching codeSolomon Peachy16-128/+187
Based on code originally written by Amaury Pouly (g#1789, g#1791, g#1527) but rebased and heavily updated. Change-Id: Ic794abb5e8d89feb4b88fc3abe854270fb28db70
2020-09-03XduooX3 Gpio reconfigure button systemWilliam Wilgus1-14/+69
only check button values with adc when buttons are actually pressed battery level check frequency is now around 30 seconds switched to polling for the battery voltage w/ timeout Ifdef functions Allow BACK OPTION PLAY to be the first of a two key combo Change-Id: Icb48d62ac8d82b4dc931df5e1c5b4a84a9a69772
2020-09-02jz4760: Dial down PIXCLK as low as possibleSolomon Peachy1-0/+3
We don't use it on the X3. Should we ever get another jz4760 target we can revisit this. Change-Id: I591d02c7e47b35424b3c96b776b31a38e3c8ceee
2020-09-02xduoox3: Disable the LCD and MSC0 clocks as we don't use themSolomon Peachy2-2/+5
Change-Id: If2261aed464fcbe3ea1f036dd18376fa8ff42e69
2020-09-02XduooX3 Slow down greylib framerateWilliam Wilgus1-1/+4
halves cpu usage Change-Id: I3797b01ecd2f7615acfed53a77d8a1f51e947c8b
2020-09-02XduooX3 Debug Menu -- HW_infoWilliam Wilgus1-128/+339
add scrolling for clocks and such moved to a switch based structure.. this ends up a lot cleaner Change-Id: I940506c4b8dc73f0b776d20810780527cbf7e0d4
2020-09-02mips: use .set push/pop in asm codeSolomon Peachy2-9/+11
Change-Id: I3e7bc7ffb8d6d0c5d18a6ab38b1a270559a62fb9