Repository navigation
2.3.4 - #378
2.3.4#378
Conversation
…reference During LE Audio playback the sound image intermittently moved to one side: the two earphones rendered the same audio 0.5 ms or more apart. Presentation compensation compared the time since the block now being rendered was received with the transport delay of a different, newly arriving frame. Controller delivery times vary by many milliseconds and differ between the two earphones, so a 150 ms average of that mixture could be off by more than half a 500 us I2S block. A correctly aligned FIFO was then moved by whole blocks, and the periodic re-check kept re-triggering this. Each output block now carries its SDU reference and the delay is read when I2S starts that block, independent of delivery. Further sources of jumps: - the clock phase was reduced modulo the block period from a 64-bit difference of 32-bit timestamps; at each timestamp wrap (71.6 min) this reads up to half a block wrong and unlocks both control loops - one late block-complete interrupt or one rejected SDU timestamp was followed by the audio clock; the phase is now the median of five blocks, the validated reference is used, and losing lock needs two consecutive out-of-range periods - removing delay moved the producer index while the I2S interrupt consumed blocks; overtaking it made a nearly empty FIFO read as full - frames that could not be decoded were skipped, rendering all later audio 10 ms early until re-measured; they now occupy their slot with silence - a FIFO filled to exactly its capacity read as empty A timestamp taken while the sync timer's overflow is unaccounted is 512 s off; up to three such implausible delay samples are ignored. The arithmetic is covered by the new audio_sync_math unit suite. The firmware was not built or run on hardware for this change. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YaHqdQTqEW9t6nzB1e4gYp
A new LE Audio stream took about a second to settle, and each earphone faded in on its own once it was done, so playback could begin on one side. Most of that time was fixed measurement and waiting windows. While the startup gate mutes the stream nobody hears corrections, so: - the block phase is regulated in 20 ms periods instead of 150 ms with the same loop gain per period; any initial phase is inside the lock range after two corrections, and the correction that hands over to the locked state is sized for the regular period it then lasts - a presentation measurement takes 3 frames instead of 15, as the rendered delay is exact, and the wait after an adjustment covers the presentation delay instead of the whole FIFO Drift compensation now starts over when the stream state changes. It used to keep regulating towards the previous stream's reference grid until the lock was found lost, which since the unlock confirmation costs two periods. The center frequency is kept: once it has locked a stream, calibration is skipped and only the block phase is searched. If the phase is not found within 3 s it is calibrated again. A headset no longer follows a reference while it is not streaming. Corrections of an audible stream are unchanged. Expected settling by calculation: roughly 0.25-0.35 s instead of 0.9-1.1 s. Covered by the audio_sync_math unit suite for the loop arithmetic only; the firmware was not built or run on hardware. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YaHqdQTqEW9t6nzB1e4gYp
fix(power): configure 3.3 V before enabling the rail
✅ Unit tests passed9 passed, 0 failed/error, 0 skipped — view workflow run
Download the |
CodeChecker static analysis (advisory)Note This report is informational. It does not block merging and does not change code. At a glance
Findings on changed linesFound 1 non-style issue(s) on lines changed by this PR.
Analyzer coverage
Complete-codebase summarySeverity: 1 high Complete-codebase findingsEach finding includes source context. The Show detailed findings with source context (1 of 1)HIGH —
|
Compiler warningsThe extended-warning build completed successfully. Application compiler warningsShow warnings |
|
Build output available: |
An earphone could stay in a rattling state after an LE Audio stream had started. Pixel phones set the ACL interval to 20 ms at every stream start; while it stays there every second 10 ms audio frame is lost. The stream is clean again once the earphone's request for 10 ms is granted, which used to be left to the next 1 s tick. That request could fail to be made at all: - the interval was only tracked from update notifications, so after a reconnect the stored value could say 10 ms while the link was at 20 ms, and the request was skipped as redundant - only the most recent connection was known, so with a second central the request went to the wrong link, or to none after it disconnected The intervals are now read from the connections themselves, and a request goes to every connection on which the device is the peripheral. The phone also drops requests without notice while it sets up the CIS (6 of 6 requests sent 206 ms after ASE enable, 1 of 6 at about 360 ms). The minimum interval is therefore requested 150 ms after the stream started and again every 300 ms until it is in place, at most ten times. The tick now runs in the system workqueue instead of the timer interrupt, as it reads connection state. Measured on one earphone with both connected to a Pixel 10a: 10 ms in place about 605 ms after ASE enable in 5 of 6 starts (965 ms once), before 600-1480 ms; audio fades in at about 510 ms. Confirmed by ear on both earphones by the author. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
fix(power): preserve button wake flags during regulator startup
|
Build output available: |
…handling fix(power): restore recovery after charger communication errors
|
Build output available: |
Fix/le audio stereo sync jumps
|
Build output available: |
|
Build output available: |
|
Build output available: |
|
Build output available: |
|
Build output available: |
2.3.4
This release restores left/right discovery after flashing by including the legacy chip ID and channel in LE Audio advertisements. It restores the 2.3.2 battery-recovery behavior, sets the VARTA profile to 100 mA and 45 °C, and retains the Grepow-specific profile and a 4.2 V unidentified-battery fallback. It also defaults auto-off to disabled and includes the 3.3 V regulator, button wake and LE Audio synchronization fixes.
USB charging is enabled after the selected profile is programmed and before fuel-gauge configuration, restoring the earlier startup order that can power the gauge without an attached cell. Charger enable does not depend on fuel-gauge readiness or charger register readback. The 2.3.2 gauge setup wait behavior, learned-capacity mismatch check, and charge-inhibit handling are restored. A gauge that does not enter configuration mode can block startup while charging remains enabled, before the startup voltage and temperature checks. Existing saved auto-off modes take precedence over the default. Startup still verifies the 3.3 V rail, and an unidentified battery uses the 4.2 V fallback.
Battery limitations: the legacy path can re-enable charging below 2.5 V or outside startup temperature limits, and its 10 mA precharge does not implement VARTA's timed low-current over-discharge procedure. Failed or ignored charger voltage writes can leave a 4.3 V setting on a 4.2 V battery. Hardware recovery at 2.9 V and battery-less startup after the latest change have not been validated.
Validation