Skip to content

Audio: Add noise cancellation and equalization - #248

Draft
Sean-StarLabs wants to merge 7 commits into
elementary:mainfrom
StarLabsLtd:echo-cancellation-audio
Draft

Sean-StarLabs wants to merge 7 commits into
elementary:mainfrom
StarLabsLtd:echo-cancellation-audio

Conversation

@Sean-StarLabs

@Sean-StarLabs Sean-StarLabs commented Oct 3, 2026 •

Copy link
Copy Markdown

Add Noise Cancellation per input and an optional five-band equaliser per output. settings-daemon owns processing, so closing Sound Settings does not switch it off.

EQ stays on the physical output instead of adding another “EQ Speakers” device, as having two volume sliders for one device is chaos. Disabled processing is removed. Device profiles can supply factory defaults; hardware matching stays outside the daemon.

Companion Sound Settings changes: elementary/settings-sound#310

Test=StarFighter MTL: selected-device EQ and Noise Cancellation, audio-server restart, unchanged physical volume/mute/routing, and no extra EQ output. Foreign graphs with and without controls survive enable/disable attempts; removing them permits explicit recovery. Off confirmation waits for graph removal.

@danirabbit

Copy link
Copy Markdown
Member

Hey @Sean-StarLabs just want to confirm you're not using LLMs for this and other branches you've submitted as per our contributor guide? https://docs.elementary.io/contributor-guide/development/generative-ai-policy

Add a Noise Cancellation option using WebRTC processing for the selected
input device. Keep it running after Settings closes, with automatic gain
control disabled.

Test=Private PulseAudio/PipeWire: on/off, active streams and reconnect.
Add an optional five-band equaliser; the bands are inspired by Realtek's
HDA filters. All existing controls remain the same.

Use the PipeWire backend and store preferences per output device and route.

Test=Private PipeWire: sliders, Reset, recovery and output changes.
Add device profiles to pre-set the EQ. Vendors whose firmware leaves EQ
to software can make the speakers sound half decent for the rare few who
don't tweak them.

Test=Private PipeWire: OEM defaults, neutral routes and rejected profiles.
Attach the filter graph on enable and remove it on disable. Keep saved gains and the physical output unchanged.

Test=StarFighter: Off removes the filters, On restores saved gains, and volume, mute and AEC still work.
An empty set of our controls does not mean the graph slot is free.
Check the native graph properties before installing or removing EQ,
including graphs without controls. Leave ALSA device properties alone.

Test=StarFighter: foreign linear and control-less graphs survive EQ
     enable/disable; explicit recovery works after removal.
Replace state numbers and positional request fields with names.
Expand the guards so the audit and reconnect paths are easier to follow.

Test=StarFighter: EQ and noise cancellation enable/disable, custom
     gains, Reset, mixer controls and audio-server restart.
Stopping removes the queued native audit. Clear its pending flag too, so a disconnected output does not stay busy.

Test=Native PipeWire: stopping before the queued audit clears busy; the same check failed before this change.
@Sean-StarLabs
Sean-StarLabs force-pushed the echo-cancellation-audio branch from 59c80f5 to 21122ae Compare October 7, 2026 20:53
@Sean-StarLabs Sean-StarLabs changed the title Add session-owned echo cancellation Audio: Add noise cancellation and equalization Oct 7, 2026
@garaevdi

garaevdi commented Oct 9, 2026 •

Copy link
Copy Markdown

FYI wireplumber devs are planing to drop public GObject API in the next major release https://gitlab.freedesktop.org/pipewire/wireplumber/-/work_items/985

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants