Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

speechprocessor -> automatic gain control: output volume higher when pavucontrol is running #3679

Open
Cyborgscode opened this issue Feb 19, 2025 · 1 comment

Comments

@Cyborgscode
Copy link

EasyEffects Version

7.1.9

What package are you using?

Fedora

Distribution

Fedora 40

Describe the bug

Note: I know it sounds insane, but it's really happening

Version-Release number of selected component (if applicable):

Name : easyeffects
Version : 7.1.9
Release : 2.fc40
Architecture: x86_64
Install Date: Mi 13 Nov 2024 09:34:16 CET

Name : pavucontrol
Version : 6.1
Release : 1.fc40
Architecture: x86_64
Install Date: Mi 13 Nov 2024 09:32:57 CET

Description of problem:

I noticed this first on my tablet, but a day later it happend on the desktop pc too.

This happens independend from the used output device.

Action: easyeffects is started after i.e. QMMP
Result: easyeffects is a loud on the output volume, as it SHOULD be.

Action: PavuControl is started
Result: NO CHANGE => easyeffects is a loud on the output volume, as it SHOULD be.

Action: PavuControl is stopped
Result: easyeffects output volume is decreased by ~75%

Action: PavuControl is started again
Result: easyeffects output volume is increased by ~75% back to the original volume

Action: PavuControl is stopped
Result: easyeffects output volume is decreased by ~75%

In the situation of the decreased volume, if automatic amplification gets enables, it boosts the output volume back to max.

This also proves the next statement as true:

While all of this is happening the levels of each output device or app is UNCHANGED.

If i switch QMMP to the output device directly, NOTHING happens when i start or close PavuControl.

Conclusion: Bug is inside easyeffects

As this did not happen a week ago and easyeffects or pulse/pipe haven't been updated for weeks, sounds like a sideffect of a system upgrade. I attached the last 400 lines of dnf.rpm.log .

UPDATE

I think i found the source module of this shananiganz:

Speechprocessor -> Automatic Gain Control

If the speechprocessor is enabled the, volume is decreased in absence of puvucontrol, but gets the intense boost back as soon as pavucontrol is running again.

I will add a picture to illustrate, as it shows the massiv (db-wise) decreased output level of the module itself compared to the way higher input level.

BUGZILLA LINK:

https://bugzilla.redhat.com/show_bug.cgi?id=2346541

Screenshots

Image
Image

Expected Behavior

guess what.. total indepence of pavucontrol running status ;)

Debug Log

Debug Log
Paste your log here

Additional Information

https://bugzilla.redhat.com/show_bug.cgi?id=2346541

@wwmm
Copy link
Owner

wwmm commented Feb 19, 2025

Note: I know it sounds insane, but it's really happening

You are not insane 😄 . I can reproduce this issue. But I'm afraid there is nothing that can be done on our side to fix it. Pavucontrol volume level meters are essentially an audio recording stream that for some reason makes PipeWire switching to low latency values. That change in latency corresponds to a change in the audio buffer size. It gets smaller. That smaller audio buffer size seems to be changing whatever it is the average value that speex library uses internally to do the gain correction.

For now I see only two possible fixes. The first would be to force PipeWire to use a fixed latency (quantum) value. If you open pw-top while doing your tests you will see the QUANTUM column value in your soundcard line changing when Pavucontrol is open. But the downside of a fixed latency is having higher CPU usage when it is not needed to have low latency and too high latency when you need it to be lower than the current value.

The other fix would be to improve whatever the speex library is doing to do the gain correction. But this is out of my current capabilities.

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

No branches or pull requests

2 participants