Repository navigation
fix(audio): control AYANEO Pocket S2 headphone volume digitally - #834
Closed
rafalrojek wants to merge 3 commits into
Closed
rafalrojek wants to merge 3 commits into
rafalrojek wants to merge 3 commits into
Conversation
Headphones on the Pocket S2 distorted from about 10% system volume. PipeWire drove the volume through the "HP" mixer element, i.e. the HPHL/HPHR PA gain, but with the WCD939x compander on that register has no effect on the output level. The only real attenuation was PipeWire's software volume (-60 dB at 10%), which is audibly distorted at such low digital levels. Attenuating in the codec instead was clean. - UCM: map "HP Digital Playback Volume" onto RX_RX0/RX_RX1 Digital Volume, as is already done for "Speakers Digital", and use it as the headphone playback mixer element. - Kernel: the RX digital volume reaches +40 dB, so cap it at 74 (-10 dB) on the Pocket S2 only; otherwise 100% of the slider would be +40 dB. Generated by: Claude | Model: Claude Sonnet 4.6 | Role: AI-Generated Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Listening tests showed the headphone output crackles above RX digital volume 59 (-25 dB), with the compander on or off. PCM HPH mode, as on Android, only produced loud noise, so it is not used. Generated by: Claude | Model: Claude Sonnet 4.6 | Role: AI-Generated Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Resolve conflicts in patches/series and PATCHES.md after main dropped the Pocket DS speaker cap (0538, reverted in armada-os#830). Regenerate 0539 against the series without 0538. Generated by: Claude | Model: Claude Sonnet 4.6 | Role: AI-Generated Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Disk image
Downloads as a zip holding |
Author
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.
Follow-up to #663: a commenter reported that headphone playback on the AYANEO Pocket S2 becomes badly distorted above roughly 10% volume.
Problem
PipeWire drove the headphone volume through the
HPmixer element, i.e. the HPHL/HPHR PA gain. With the WCD939x compander on, that register has no effect on the output level, so the only real attenuation was PipeWire's software volume (-60 dB at 10%). That is audibly distorted at such low digital levels. Attenuating in the codec instead is clean.Changes
APS2/HiFi.conf,SM8650-APS2.conf): mapHP Digital Playback VolumeontoRX_RX0/RX_RX1 Digital Volumethroughctl.default.map, as already done forSpeakers Digital, and use it as the headphone playback mixer element.0539): the RX digital volume reaches +40 dB, so on the Pocket S2 only it is capped at 59 (-25 dB). Otherwise 100% of the slider would be +40 dB. In listening tests the output was clean up to RX 59 and crackled above it, with the compander on or off.Testing
Tested on a Pocket S2 with 4-pin headphones: a module built from this patch set (cap 59) and the UCM from this branch, loaded at runtime on the running image (no full image build). Verified: the control max is 59 for RX0 and RX1, the slider spans the whole range, and playback is clean at low and high levels.
Not verified
Notes
🤖 Generated with Claude Code