Commit Graph
100 Commits
Author SHA1 Message Date
jacqueline 6d6f59cb94 Don't enable usb msc when the database is updating 2024-10-01 15:46:00 +10:00
jacqueline 6987f7befc GC after locking 2024-10-01 14:30:50 +10:00
jacqueline 222465d31b Run the Lua GC a little more aggresively 2024-10-01 14:15:33 +10:00
jacqueline 825728af23 Ensure the stack is clean after luavgl event callbacks 2024-10-01 13:51:10 +10:00
jacqueline c1d89e7948 Add lua stub for play_count 2024-09-24 15:26:44 +10:00
jacqueline faddb229fc Record play_count in TrackData, incrementing it when tracks finish 2024-09-24 15:24:16 +10:00
jacqueline 94ccd405e3 Retry SD card mounting a few times when talking to the card fails 2024-09-24 13:28:42 +10:00
jacqueline ec4fb715d0 Hide database indexes that do not contain any tracks 2024-09-24 12:01:13 +10:00
jacqueline 2ac2629c48 Don't try to configure the dac if there is no dac
Fixes #106
2024-09-20 14:55:29 +10:00
jacqueline b95cd34520 Make the 'Podcasts' index just a list by title
Podcasts aren't tagged consistently enough for other groupings to make
sense, at least until we implement RSS parsing
2024-09-20 14:08:47 +10:00
jacqueline ade5e4bc08 Encode and decode MediaType in TrackData 2024-09-19 16:32:11 +10:00
jacqueline ea9c7a0498 Include leading slash in media type paths 2024-09-19 16:32:11 +10:00
jacqueline 57af3e64c8 Introduce a MediaType for each track and index
Initially set based on filepath, or by genre if the filepath doesn't
match one of our presets
2024-09-19 16:32:11 +10:00
jacqueline 9c95c2b422 Merge branch 'main' of codeberg.org:cool-tech-zone/tangara-fw 2024-09-19 15:03:43 +10:00
jacqueline 111085b857 Add quick USB MSC access to the main menu 2024-09-19 14:53:33 +10:00
jacqueline 9aa77ec5ad Actually this is more like a minor bump 2024-09-17 13:42:20 +10:00
jacqueline a650c94d18 Version bump 2024-09-17 13:29:37 +10:00
jacqueline 7d1266404d Move SPI ISR back to CPU0
See if this does anything for the itermittent spi acquire hangs
2024-09-17 11:57:32 +10:00
jacqueline 1106012bde Merge branch 'main' into jqln/tts 2024-09-13 10:17:34 +10:00
jacqueline a174d76aa1 Mount the SD card asynchronously when it becomes available
Previously we were doing it synchronously, which led to some odd looking
livelock stacktraces... we still don't have a consistent repro, but this
at least makes the stack when we mount a lot more predictable
2024-09-13 10:12:40 +10:00
jacqueline d8b9e65e68 Clean up some tts logging and descriptions 2024-09-12 11:44:20 +10:00
jacqueline c51709f99f Pause and unpause the current audio output in response to TTS 2024-09-12 10:44:26 +10:00
jacqueline 542ebc6531 Play TTS files in response to TTS prompts, but it's legible now
- input files are upsamples and padded to stereo before playback
 - any in-progress playback is cancelled before playing a new file
2024-09-11 12:57:04 +10:00
jacqueline 50d6efada5 Use '/sd' instead of '/sdcard' for accessing the sd card
it's cleaner
2024-09-10 14:42:40 +10:00
jacqueline d0b739c66e Play basic wav files in response to tts prompts
It's currently quite limited (no stereo or sample rate conversion,
multiple messages clobber each other, only plays if music is playing),
but we're getting there!
2024-09-09 16:39:22 +10:00
jacqueline 2b1a01705d Merge branch 'main' into jqln/tts 2024-09-09 15:15:00 +10:00
jacqueline acdc9789c9 version bump 2024-09-09 10:25:56 +10:00
jacqueline dacf3efc45 Look for music in "/Music", with the root dir as a fallback 2024-09-06 14:53:01 +10:00
jacqueline d0f70787b1 m3u and m3u8 2024-09-06 12:41:49 +10:00
jacqueline 172d31ec6d Ignore comments within playlist files
Includes a general cleanup+restructure of playlist.cpp, and fixing the
tests and benchmarks
2024-09-06 12:40:11 +10:00
jacqueline 0426dfd4f2 Support opening m3u and m3u8 files as playlists 2024-09-06 12:39:53 +10:00
jacqueline 99a3a904e4 Handle collation text that includes '\0'
This seems to be tickled by the ogg comment handling changes (possibly libtags doesn't actually handle this case?)
2024-09-03 14:36:54 +10:00
jacqueline e6921dc055 Use libogg + our own parser for ogg files
This is somewhat faster than relying on libtags to parse these, and also better handles cornercases such as tags that cross physical page boundaries.
2024-09-03 11:17:13 +10:00
jacqueline b4a2b4fb6f Merge branch 'main' of codeberg.org:cool-tech-zone/tangara-fw 2024-08-29 17:21:23 +10:00
jacqueline 3d484211a5 Add reference doc regen instructions 2024-08-29 17:20:55 +10:00
jacqueline 91eaed4b37 use snake_case consistently in lua function names 2024-08-29 15:52:34 +10:00
jacqueline 3421bd652c When clicking a track in the file browser, play it
Includes adding a `playback.is_playable` for working out whether or not
a particular file is able to be played
2024-08-28 15:30:53 +10:00
jacqueline af7a70450e Support adding filepaths to the track queue 2024-08-28 15:30:25 +10:00
jacquelineandcooljqln 9145722b08 Don't show n+1/n when we run out of queue 2024-08-28 04:07:21 +00:00
jacquelineandcooljqln 71aafc1711 Fix random.cpp not being built 2024-08-28 04:07:21 +00:00
jacquelineandcooljqln 32869129ff clang-format 2024-08-28 04:07:21 +00:00
jacquelineandcooljqln 9ec8d6dafc Handle the loading state whilst appending many tracks better
1) Update the queue length periodically so that the user can see we're
   working
2) Clear any previous track and display "loading..." instead
2024-08-28 04:07:21 +00:00
jacqueline d3c15bf070 spello 2024-08-28 12:47:29 +10:00
jacqueline 8f4e1ece75 Some minor cleanup, docs, assertions 2024-08-28 09:45:19 +10:00
jacqueline f253d2ee75 Timeout when writing output samples throughout the audio pipeline
This allows the audio pipeline to remain responsive even when the drain
buffer has completely filled. This in turn means that you now see the
track info in the 'now playing' screen change if the current track
changes whilst you are paused.

Since I was fucking around a lot in the audio processor anyway, I also
added mono->stereo expansion so that playing mono tracks on Bluetooth no
longer destroys your ears.
2024-08-28 09:45:19 +10:00
jacqueline ef227f8c51 Move the UI task main loop info iram 2024-08-28 09:45:19 +10:00
jacqueline b1c90278ae Delete unused half readme 2024-08-28 09:45:19 +10:00
jacqueline 91f26afa75 Merge branch 'main' of codeberg.org:cool-tech-zone/tangara-fw 2024-08-26 13:50:39 +10:00
jacqueline 275ade5d13 Move some hot driver functions into iram
We've got the space for it now!

Also turn SW radio coexistence off whilst we're here; the docs recommend this if you only use Bluetooth(R)
2024-08-26 13:45:24 +10:00
jacqueline 360cc5342e it's free iram 2024-08-26 11:03:44 +10:00
jacqueline ad5760b5ab version bump 2024-08-19 10:27:12 +10:00
jacqueline 3ed3f1dfeb Add cool skeumorphic embossing 2024-08-16 11:42:32 +10:00
jacqueline 493f8e1200 Don't break early from clearing PcmBuffer 2024-08-15 11:44:49 +10:00
jacqueline 9c56261122 Delay DB reindexing slightly
This helps with boot time by preventing a ton of
disk I/O before the UI has had a chance to load.
2024-08-15 10:26:26 +10:00
jacqueline d94c32d615 Merge branch 'main' of codeberg.org:cool-tech-zone/tangara-fw 2024-08-15 09:44:29 +10:00
jacqueline 40c754a72a Always initialise bytes_cleared when clearing PcmBuffers 2024-08-14 15:18:57 +10:00
jacqueline 326cc42a63 Don't spuriously report that the current track has changed
Fixes the last track in the queue repeating forever
2024-08-13 16:25:47 +10:00
jacquelineandcooljqln ff7468635f Remove/Migrated some old sdkconfig flags 2024-08-13 06:02:54 +00:00
jacquelineandcooljqln 6a2d259f46 Move off of deprecated APIs 2024-08-13 06:02:54 +00:00
jacquelineandcooljqln 822c9dc93e Fix build errors from stricter visibility requirements 2024-08-13 06:02:54 +00:00
jacquelineandcooljqln 5a02f34ed9 Update bt fork to be based on v5.3 2024-08-13 06:02:54 +00:00
jacquelineandcooljqln be9725c1c7 bump esp-idf to v5.3 2024-08-13 06:02:54 +00:00
jacqueline 9e1fc64c88 Accept a specific tag in loglevel 2024-08-13 14:21:43 +10:00
jacqueline 4fd15f148a Bump up the ui task stack size 2024-08-12 15:09:07 +10:00
jacqueline 2ad83cb210 Shard searching for new tracks across multiple tasks
This also has the effect of breaking up the enormous 'updateIndexes'
method into one call per file, which means database updates also no
longer monopolise a single background task for their entire duration.

avg. time per new file is now <140ms for a completely fresh database,
which is pretty good i think!
2024-08-12 13:20:08 +10:00
jacqueline 28cf749951 Make FileGatherer shaped more like a normal iterator 2024-08-12 13:20:08 +10:00
jacqueline 30aaefca64 Batch up the db operations associated with adding new tracks
This is ostensibly yet another 'prepare for multithreaded updates'
commit, however it does actually save us another 60(!!) odd milliseconds
per track.
2024-08-12 13:20:08 +10:00
jacqueline b5dc53670a Derive the next track id from stored track data, instead of tracking it explicitly
This saves about 1ms per new track right now, but more importantly means
that minting a new track id is now a single atomic operation, rather
than being its own database write. This is a useful property that will
come in handy in a few commits time.
2024-08-12 13:20:08 +10:00
jacqueline f8a3c16aad Use one MMU page per leveldb write buffer
Also drop some of the other tuning changes, since they don't seem to
impact much.
2024-08-12 13:20:08 +10:00
jacqueline 3d7b005dc9 Experiment with putting BT stack allocs in internal ram 2024-08-09 14:19:59 +10:00
jacqueline 5d390c821a Claw back some internal ram
- 'main' doesn't need 12k of internal ram
 - lvgl's draw task doesn't need that much either
 - also lower the bg worker stack sizes whilst we're here, since they've got tons over headroom
2024-08-09 13:11:34 +10:00
jacqueline 2811a3c899 Don't try to serialise a missing playlist name 2024-08-07 14:21:28 +10:00
jacqueline 1ff28233bd Recalibrate the touchwheel after unlocking
Also power it down whilst we're locked. This saves about half a
milliamp.
2024-08-07 12:09:23 +10:00
jacqueline 649cb74f03 Advance the queue when the current track fails to start 2024-07-30 14:56:58 +10:00
jacqueline 2a280c9b4b Start playback immediately when selecting a playlist 2024-07-30 14:56:42 +10:00
jacqueline 64c8496a91 Use a piecewise linear formula to calculate battery % 2024-07-26 16:09:40 +10:00
jacqueline 4210a8ac54 add some helpful hex dump overloads 2024-07-25 09:50:50 +10:00
jacqueline be9564d1c7 Parse single-byte track ids properly 2024-07-25 09:50:31 +10:00
jacqueline 2afad172bd Merge branch 'main' of codeberg.org:cool-tech-zone/tangara-fw 2024-07-24 15:30:32 +10:00
jacqueline 0cc7536684 Add a settings screen with power+battery info
Mostly for debugging, but also u can toggle fast charging off and on now
2024-07-24 15:29:45 +10:00
jacqueline eb5d0d50cd Bump up LVGL's memory allotment 2024-07-24 15:29:17 +10:00
jacqueline 69cd284757 Merge branch 'main' of codeberg.org:cool-tech-zone/tangara-fw 2024-07-19 16:13:50 +10:00
jacqueline 90a0caf286 version bump 2024-07-19 16:13:07 +10:00
jacqueline f00e1d7493 Fix track ids containing '\n' not decoding properly
This has been the cause of the elusive "selecting a track opens it like an index" bug :)
2024-07-19 16:11:22 +10:00
jacqueline 9475d10d10 WIP initial tts player wiring 2024-07-19 13:59:30 +10:00
jacqueline ac54cab319 Add Hangul characters to the bundled font 2024-07-18 18:57:51 +10:00
jacqueline 2ab459598c Encode snapshots as PNGs when saving to disk 2024-07-17 17:22:59 +10:00
jacqueline 7012e64a14 Fix an error in the scroll sensitivity UI 2024-07-17 14:13:03 +10:00
jacqueline a3f48074fb Add a console command to dump a snapshot 2024-07-17 13:39:14 +10:00
jacqueline d8ce31e46b Scroll to top when selecting the back button 2024-07-17 13:38:44 +10:00
jacqueline 374bc5e734 Add a screen for FCC and CE regulatory nonsense 2024-07-17 13:38:19 +10:00
jacqueline 0ca82fb1d1 Fix the top bar scrolling off the screen on the licenses screen 2024-07-17 13:37:38 +10:00
jacqueline 24fde7af0c Disable shuffle when selecting 'play all' 2024-07-12 16:14:52 +10:00
jacqueline f78de39a75 Give Bluetooth settings a bit of a refresh
It's now a bit more responsive to stuff happening, gives you more information, and remembers your previously paired devices for faster switching between them.
2024-07-12 14:40:54 +10:00
jacqueline a3eb2dd9dc WIP improve bluetooth api and settings screen 2024-07-11 15:11:28 +10:00
jacqueline a9d2335e1d Break FatfsStreamFactory's dep on ServiceLocator 2024-07-11 12:12:42 +10:00
jacqueline 7d33f99216 i will continue to tweak a2dp constants until my great foe "audio stutter" is defeated for all time 2024-07-10 17:56:25 +10:00
jacqueline ad6a81f3d6 Update the SBC target bitrate
Not sure what this actually controls? Probably good to make it match our encoding configuration tho
2024-07-10 17:30:14 +10:00
jacqueline b63e897268 Move the SPI interrupt alloc to the second core
We're a bit close to the line on core0 allocs, so this helps balance things out a bit.
2024-07-10 15:18:55 +10:00
jacqueline 11bddb1b1d add a console command for dumping intr allocations 2024-07-10 15:18:33 +10:00