Pipewire configuration to lower the volume

I have a USB sound card but by default, it is very loud at low volume setting. With PulseAudio I can fix it by editing /usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common file ( details about fix ). So I would change to the following settings.

[Element PCM]
switch = mute
volume = ignore
volume-limit = 0.01

I need to do the same with pipewire. So I added the following lines to /etc/pipewire/media-session.d/alsa-monitor.conf.

    {
    	matches = [
    		{
    			node.name = "alsa_output.usb-C-Media_Electronics_Inc"
    		}
    	]
    	actions = {
    		update-props = {
    			# api.alsa.use-acp		= true
                # api.alsa.use-ucm		= true
    			api.alsa.ignore-dB		= true
                # api.alsa.soft-mixer		= true
				api.alsa.volume			= "ignore"
				api.alsa.volume-limit	= 0.01
    		}
    	}
    }

In the output of pactl list I can see that options are applied but the volume stays the same (too loud).
My sound card
ID 8086:0808 Intel Corp. USB PnP Sound Device
Does anyone know how to fix it?

And I found this in the kernel log

manjaro pipewire-media-session[1971]: The decibel volume range for element 'Speaker' (-2837 dB - -6 dB) has negative maximum. Disabling the decibel range.

Solved.
Create file /usr/share/alsa-card-profile/mixer/paths/analog-output-fixed.conf with contents

[Element PCM]
switch = mute
volume = ignore
volume-limit = 0.01
override-map.1 = all 
override-map.2 = all-left,all-right

Copy /usr/share/alsa-card-profile/mixer/profile-sets/default.conf
to /usr/share/alsa-card-profile/mixer/profile-sets/profile-for-bad-soundcards.conf
And change this (we change only the last line)

[Mapping analog-stereo]
device-strings = front:%f
channel-map = left,right
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2

to this

[Mapping analog-stereo]
device-strings = front:%f
channel-map = left,right
paths-output = analog-output-fixed

Lastly create udev rule for your sound card.
Create file /usr/lib/udev/rules.d/89-pipewire-sound-card-fix.rules (IDK maybe you should use 91, because pipewire config is 90). Change idVendor and idProduct to your values.

ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0808", ENV{ACP_PROFILE_SET}="profile-for-bad-soundcards.conf"

Reboot

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.