I have a “Dell Inc. Latitude 5290 2-in-1”, and it comes with a stereo microphone array that, by default, has a gain that is way too extreme.

A value of 100% is screeching / over-blasted to any listener, while a value of 25% is most reasonable.

Thus, I wanted to limit the gain of the microphones through PipeWire.

I created the following WirePlumber configuration file.

# For "Dell Inc. Latitude 5290 2-in-1"
# The analog input array is way too loud

monitor.alsa.rules = [
  {
    matches = [
      # This matches the value of the 'node.name' property of the node.
      {
       	node.name = "alsa_input.pci-0000_00_1f.3.analog-stereo"
      }
    ]
    actions = {
      update-props = {
        node.description        = "Dell Latitude 5290 2-in-1 Stereo Microphone"
        channelmix.min-volume   = 0.0
        channelmix.max-volume   = 0.25
        channelmix.normalize    = true
      }
    }
  }
]

I know this is applying to the correct node, because executing wpctl status shows that the node description has been properly changed.

The problem is that the “channelmix.max-volume” is not applied as I expect it to be. I expect it to make it so that 25% max volume is the new 100%, Instead it seems to do nothing.

What am I doing wrong, and how can I achieve what I want?

Edit 1: Channel Mix is working, but it seems the “Volume” as of wpctl get-volume is referring to gain. Essentially Channel Mix is making it quieter, but the gain because of “Volume” is nonsensical.

Edit 2: RedHat developer says there isn’t support for thatcurrently :( https://fosstodon.org/@wtay/113532113977083665

Edit 3: EasyEffects is not the solution here, This is a lower level issue, not something done via an affect to the audio stream. EasyEffects cannot “undo” gain changes.

  • Sonotsugipaa@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 day ago

    I saved this post hoping for a useful answer, alsa alas, there seems to be none.
    I’m not an audiophile so I’m more or less spreading misinformation, but I think you’re looking to configure ALSA’s device gain rather than going through pipewire.

    kusivittula here mentioned alsamixer, and I found a StackExchange answer saying that you can save its current state using alsactl store (with sudo or write access to /var/lib/alsa/asound.state).
    Alternatively, you can edit /var/lib/alsa/asound.state yourself.

    It doesn’t work if your problem involves audio streams (so *I* am SOL), but making changes through alsamixer seems to lower my headset’s volume so that I can comfortably set it to 100% through wireplumber - I imagine that would also apply to mic gain.

    • Clocks [They/Them]@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      2 days ago

      Doesn’t have the support for hardware gain limitation.

      I am trying to prevent the system from being able to change the microphone gain at all, not apply an affect.

  • Wanderer@r.nf
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    3
    ·
    2 days ago

    Why use a GUI (Easy Effects) when you can do it the hard way and going nowhere.