Open
Conversation
- Lower codec2 task priority from 20 to 1 and speaker task from 22 to 2 to prevent preemption of the main loop on PTT press, which was blocking screen updates for ~2 seconds - Remove unnecessary i2s_zero_dma_buffer call on RX-only PDM mic port - Reorder PTT handler: update screen before audio cleanup so display responds immediately - Add MVSR variant (tlora_t3s3_v1_mvsr) with dual I2S PDM mic + MAX98357 speaker configuration
…play improvements - Add speaker_gain, mic_gain, audio_target fields to AudioConfig protobuf - Update nanopb generated header (module_config.pb.h) with new fields - Add on-screen audio settings menu via long-press SELECT on audio frame - Mic Gain / Speaker Gain submenus with labeled levels (Quiet/Low/Default/High/Loud/Max) - Target submenu with dynamic node list for DM or Broadcast selection - Settings persist to flash via nodeDB->saveToDisk() - Replace static 'Receive' idle text with informative display: - Mic/Speaker gain labels and target info shown using FONT_SMALL - Fix menu flash (pendingMenu suppression in drawFrame) - Fix inconsistent menu triggering (lastDrawMs threshold 200->1000ms) - Add AUDIO_DEFAULT_GAIN constant, runtime gain helpers (getMicGain/getSpeakerGain) - Audio defaults initialization in NodeDB::installDefaultModuleConfig() - variant.h: PCF85063A RTC on Wire1, vibration motor GPIO 46, PTT GPIO 47 - platformio.ini: add SensorLib@0.3.4 dependency - NodeDB.cpp: fix HAS_I2S nag_timeout overwriting PIN_VIBRATION config
Direct-message audio packets were failing because the audio payload (224 bytes) plus protobuf overhead (~6 bytes) plus header (16 bytes) plus PKI overhead (12 bytes) exceeded the MAX_LORA_PAYLOAD_LEN of 255 bytes. Instead of excluding AUDIO_APP from PKI encryption (which would lose end-to-end Curve25519 encryption for DMs), reduce MAX_AUDIO_DATA from 224 to 212 bytes so audio packets fit within the PKI-encrypted frame. Trade-off: ~5-7% fewer codec frames per packet (e.g., CODEC2_1600 goes from 28 to 26 frames per packet, 1120ms to 1040ms), which is barely noticeable. Broadcast audio is unaffected since PKI only applies to non-broadcast packets.
…display, codec rate menu, default 1200 - Combined Target + Channel selection into single menu (broadcast channels + DM nodes) - Changed mic/speaker gain menus and idle display to numeric 1-12 range - Added RX source indicator: 'RX DM' for direct messages, 'RX [ChannelName]' for broadcast - Added codec rate menu with live reinit (3200/2400/1600/1400/1300/1200/700) - Fixed codec rate change garbled audio (memcpy tx_encode_frame after mode update) - Changed default codec rate from 1600 to 1200 - Added audio_channel protobuf field (tag 11) for broadcast channel persistence - Display long_name for DM targets, channel names in header and idle screen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a significant re-work of the audio module, explicitly to support the Lilygo T3S3 SX1280 + MVSR board. I will unabashedly admit that alot of this was done using an LLM, but I have alot of experience with I2S audio and heavily directed it's actions to properly function.
The end result works quite well, if I may say so. I'm very pleased - and my pie-in-the-sky hope is that this enables an off-the-shelf board to work as a neato mesh walkie-talkie.
NOTE - this did require changes to the protobuf definitions - I have submitted a secondary PR for this as well.
🤝 Attestations