summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2025-02-14Merge pull request 'Change output mode when bluetooth connects/disconnects' ↵cooljqln
(#261) from ailurux/output-mode-fix into main Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/261
2025-02-11Only change output mode if the new output mode is differentailurux
2025-02-11TTS: Implement and wire up a TTS toggle in Display Settings (#251)Tursiae
This change introduces the ability to enable or disable the spoken interface/TTS from the on-device settings, either via the UI or the Lua console. This closes out the implementation of issue #245. The TTS setting is only visible in Display settings if voice samples are present in `/.tangara-tts/` on the SD card. Playback of new TTS voice samples is inhibited when TTS is disabled. By default, the setting is enabled, as the device will only play back TTS voices if samples are present on disk. If you need samples to test TTS on your device, feel free to grab the voice samples I have at https://codeberg.org/tursiae/tangara-tts-samples. There's about 80-85% coverage of the UI, with the remainder to be added soonish. Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/251 Co-authored-by: Tursiae <git@tursiae.org> Co-committed-by: Tursiae <git@tursiae.org>
2025-02-11Merge branch 'main' of codeberg.org:cool-tech-zone/tangara-fwailurux
2025-02-11Fix bug in infinite list causing items to be removed (#253)ailurux
2025-02-10TTS: Better document the ownership and task/control flow.Tursiae
2025-02-10TTS: Avoid exhausting the WorkerPool with concurrent TTS playback.Tursiae
Reported in issue #258. As of v1.2.0, if /.tangara-tts/ samples are present on the SD card, and >= 4 menu items with matching TTS samples are highlighted in the UI, and no audio output (headphones or BT sink) is connected, the `tts::Player`'s invocation of lambdas on the WorkerPool will result in worker task exhaustion. This is because we get stuck in state where the `drivers::PcmBuffer` is not accepting any new samples, and the inner loop in `Player::decodeToSink` that pushes to the output isn't checking to see whether playback was cancelled. So the loop never terminates, and we consume that worker slot. Repeat with another 3 menu items, and, hey, all four worker threads are consumed with TTS that will not terminate until headphones/BT are connected.
2025-02-10Merge pull request 'Console: Update doco to point to `sdkconfig`, and handle ↵ailurux
no-stats cases.' (#257) from tursiae/tangara-fw:tasksconfig into main Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/257
2025-02-10s/sdkconfig.local/sdkconfig/gTursiae
2025-02-10Change output mode when bluetooth connects/disconnectsailurux
2025-02-10Also document the `idf.py menuconfig` approach.Tursiae
2025-02-09Console: Update doco to point to `sdkconfig.local`, and handle no-stats cases.Tursiae
When `CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS` is not set, the FreeRTOS scheduler will not keep track of task runtime statistics, and the `tasks` command on the console will show `nan%` for the usage. This adds a recommendation for the user to enable the `...STATS` config in their build, and also updates the guidance for `configUSE_TRACE_FACILITY` to point at the supported `sdkconfig.local` configuration pathway, instead of pointing at the `#define` that's deeper in the configuration stack. Also, the sampling period is dropped from 2.5s to 10ms when the runtime stats are not enabled; given that we're not measuring any usage, it's not worth sleeping any longer than that. We might even be able to drop to zero?
2025-02-09Console: Stop `tasks` from hanging in `std::sort`.Tursiae
`std::sort` expects a comparator that returns `a < b`. Flipping this to `a >= b` would normally be fine to reverse the order, but floats behave weirdly with NaN. Instead of flipping the comparator, this uses the reverse-iterators to reverse the sort order of the tasks, and returns to an `a < b` comparator.
2025-02-07Add centre button haptic feedback on touch, and setting to disable/lessen ↵ailurux
haptics (#246) This adds a way for feedback devices to respond to events from outside of LVGL's event system, being passed from input device to feedback device through a vector. This was done so that touch events and long-press triggers can now give feedback through haptics. This PR also adds haptic modes, saved in nvs similarly to input and locked input modes, to disable or change the haptic effect behaviour based on which mode is selected. Finally, this also fixes a bug in which some click events would not trigger haptics, at the expense of re-introducing the (undesired?) behaviour of clicking a button that transitions to a new screen causing a double click. Relevant issues this should close: #195, #233, and (partially?) #120 Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/246 Co-authored-by: ailurux <ailuruxx@gmail.com> Co-committed-by: ailurux <ailuruxx@gmail.com>
2025-02-06Update the docs to eliminate the mention of the Spoken Interface setting ↵Tursiae
until re-added.
2025-02-06Make the TTS playback work by assuming the file is a .wav.Tursiae
The extension is needed to trigger format detection in the tag reader.
2025-02-06Briefly document the TTS module.Tursiae
2025-02-05Fix issue with last touch wheel time not being initialisedailurux
2025-02-03Merge pull request 'Add optional support for adjusting volume while locked' ↵cooljqln
(#230) from teisenbe/tangara-fw:locked_input into main Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/230
2025-02-02Persist locked control mode settingTess Eisenberger
2025-02-02Add optional support for changing volume while lockedTess Eisenberger
This adds a new Controls setting for adjusting the behavior when locked, and an option for allowing volume control.
2025-02-02Add a new setting for input controls when lockedTess Eisenberger
This is just the plumbing of the new setting. The input methods will come in subsequent patches.
2025-02-01Don't detect center button touch until 250ms after wheel touchRockwell Schrock
2025-01-31Merge branch 'main' of codeberg.org:cool-tech-zone/tangara-fwailurux
2025-01-31Fix playlists not setting the queue to readyailurux
2025-01-29Add 'Tdisc' to libtagsjacqueline
Uses 'TPOS' for id3v2 tags, and 'DISCNUMBER' for vorbis comments (mostly just relevant to flacs for our use case). Fixes #181.
2025-01-29Actually read+write the fast charge nvs bitjacqueline
It turns out that our error prone method of managing nvs keys has led to an error! We took a look over the other keys here and it didn't look like any others were missing. Fixes #204
2025-01-24Resolve some issues with dangling index records (#193)cooljqln
- The tag parser's cache is now cleared between indexing runs, preventing stale data from being used - Multi-value tag fields (genres, all artists) are now properly ingested in the tag value cache - Cleaning up removed index records now properly handles the case where only a subset of the records for multi-value tags need to be deleted. - Synthesizing missing tag values is now done in the tag parser instead of TrackTags, which resolves some issues with multi-value tag callbacks from libtags not being handled properly These fixes seem to address all the issues with stale index records we were able to repro (including the issues in https://codeberg.org/cool-tech-zone/tangara-fw/issues/191), but if you've got any more cases with consistent repros then lmk! Co-authored-by: ailurux <ailuruxx@gmail.com> Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/193
2025-01-17ailurux/now-playing-menu (#184)ailurux
Overflow menu for the now playing screen. New home for the info screen here. Adds quick navigation to current album or artist (thanks tjk!) and clear queue button. Also fixed up the way the now playing screen looks when queue is cleared (remove previous duration and don't show "loading" if nothing is actively loading). Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/184 Co-authored-by: ailurux <ailuruxx@gmail.com> Co-committed-by: ailurux <ailuruxx@gmail.com>
2025-01-17Merge pull request 'Add an input sequence for hard rebooting' (#185) from ↵cooljqln
jqln/hard-reset into main Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/185
2025-01-17Fix audiobook/podcast queue methodailurux
2025-01-17Add commentjacqueline
2025-01-15Add a hard reset input sequence to recover from broken device statesjacqueline
- Unlock device - Hold both volume buttons - Lock device - Unlock device
2025-01-15Handle lock state in each input device, instead of in the lvgl driverjacqueline
2025-01-14Merge pull request 'MP3 gap... less' (#180) from tjk/tangara-fw:mp3-gapless ↵cooljqln
into main Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/180 Reviewed-by: cooljqln <cooljqln@noreply.codeberg.org>
2025-01-13Skip gap samples in MP3 decodingTom Kirchner
2025-01-13Merge pull request 'Update licensing info' (#174) from ↵cooljqln
tjk/tangara-fw:update-reuse into main Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/174 Reviewed-by: cooljqln <cooljqln@noreply.codeberg.org>
2025-01-11Extract gapless info from MP3 LAME headerTom Kirchner
2025-01-11Handle optional frames field in bytes offset of MP3 headerTom Kirchner
2025-01-11Check for frames/bytes/TOC in CBR as wellTom Kirchner
2025-01-11Rename VbrInfo to Mp3InfoTom Kirchner
It can apply to CBR files too, when the marker is "Info"
2025-01-10Isolate the SD card from the SPI bus when talking to the display (#176)jacqueline
This should help significantly with https://codeberg.org/cool-tech-zone/tangara-fw/issues/121, which seems to be caused by some SD cards being very picky about being the only SPI device on their bus. Co-authored-by: ailurux <ailuruxx@gmail.com> Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/176 Co-authored-by: jacqueline <me@jacqueline.id.au> Co-committed-by: jacqueline <me@jacqueline.id.au>
2025-01-09Extend idle -> sleep time to 2 minutesTom Kirchner
2025-01-08Add bitrate infoTom Kirchner
2025-01-08Add missing copyright/license headersTom Kirchner
2025-01-07Improvements to the queue for shuffling/playing all (#170)ailurux
Queue now has a separate 'ready' property to indicate it's ready to be used, which is independent from whether it's still loading tracks in. This also improves the response time for shuffling all tracks (we will initially pick a random track in the first 100 tracks whilst the rest of the tracks are loading). This should also fix issues where one song will start playing and then repeat itself when the queue finishes loading, and hopefully solve #160 as well (though I couldn't actually repro this myself). Co-authored-by: jacqueline <me@jacqueline.id.au> Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/170 Reviewed-by: cooljqln <cooljqln@noreply.codeberg.org> Co-authored-by: ailurux <ailuruxx@gmail.com> Co-committed-by: ailurux <ailuruxx@gmail.com>
2025-01-02Expose more properties to Lua for UITom Kirchner
2024-12-31Reorder indexesjacqueline
It turns out the index *id* controls this, which is probably not good!
2024-12-31Pass through TXXX kv pairs from libtags, treated as vorbis commentsjacqueline
mp3 is no good i do not like them at all
2024-12-31Handle synthesizing missing tag values in TrackTags instead of the indexerjacqueline