Pulseaudio output peaking at -6db, not 0db.

I'm streaming audio with my M-Audio M-track Plus II USB interface to some online class. Everything is fine, everyone can hear me but I've noticed that even if my hardware LED meter shows me that sometimes I'm peaking my audio, pavucontrol never peak at 0db (I'm losing all within the yellow circle), no matter if I almost crank up the volume knob all the way up in the interface or put the boost slide at pavucontrol at its maximum:
(it says "input devices")
2020-06-18_00-33

I never had this problem with other services like jackd or Ardour 6 with "pure ALSA backend".

Later on at Audacity I discovered that Pulseaudio output never pass more than -6dB like if I was using some limiter, as you can see in this tiny (and probably dangerous to the interface's preamps) test:

I need it to peak as close as possible to 0dB (100%) like everything else I used to, since losing 6dB may affect the comprehension to someone listening to me in some quieter sources.

Here some outputs:

$ lsusb
Bus 002 Device 006: ID 0763:4009 M-Audio
$ inxi -A
Audio:
  Device-1: Intel 5 Series/3400 Series High Definition Audio 
  driver: snd_hda_intel 
  Device-2: M-Audio type: USB driver: snd-usb-audio 
  Sound Server: ALSA v: k5.6.14-2-rt7-MANJARO 

$ cat /proc/asound/cards
 0 [MID            ]: HDA-Intel - HDA Intel MID
                      HDA Intel MID at 0xb4400000 irq 29
 1 [Plus           ]: USB-Audio - M-Track Plus
                      M-Audio M-Track Plus at usb-0000:00:1d.0-1.3, high speed
 $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: MID [HDA Intel MID], device 0: ALC272X Analog [ALC272X Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Plus [M-Track Plus], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
 $ amixer --card 1
Simple mixer control 'Mic',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 127
  Front Left: Capture 127 [100%] [0.00dB] [on]
  Front Right: Capture 127 [100%] [0.00dB] [on]
Simple mixer control 'Mic',1
  Capabilities: cvolume cvolume-joined cswitch cswitch-joined
  Capture channels: Mono
  Limits: Capture 0 - 127
  Mono: Capture 127 [100%] [0.00dB] [on]
Simple mixer control 'M-Audio M-Track Plus',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 127
  Mono:
  Front Left: Playback 127 [100%] [0.00dB] [on]
  Front Right: Playback 127 [100%] [0.00dB] [on]
Simple mixer control 'M-Audio M-Track Plus',1
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 127
  Mono: Playback 127 [100%] [0.00dB] [on]
$ lsmod | grep snd
snd_hrtimer            16384  1
snd_seq_dummy          16384  0
snd_seq                86016  7 snd_seq_dummy
snd_usb_audio         294912  4
snd_usbmidi_lib        36864  1 snd_usb_audio
snd_rawmidi            40960  1 snd_usbmidi_lib
snd_seq_device         16384  2 snd_seq,snd_rawmidi
mc                     57344  5 videodev,snd_usb_audio,videobuf2_v4l2,uvcvideo,videobuf2_common
snd_hda_codec_hdmi     69632  1
snd_hda_codec_realtek   131072  1
snd_hda_codec_generic    94208  1 snd_hda_codec_realtek
ledtrig_audio          16384  2 snd_hda_codec_generic,snd_hda_codec_realtek
snd_hda_intel          53248  1
snd_intel_dspcfg       24576  1 snd_hda_intel
snd_hda_codec         159744  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core          102400  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_hwdep              16384  2 snd_usb_audio,snd_hda_codec
snd_pcm               143360  7 snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,snd_hda_core
snd_timer              36864  3 snd_seq,snd_hrtimer,snd_pcm
snd                   110592  23 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm,snd_rawmidi
soundcore              16384  1 snd

$ pulseaudio -vv --log-time
(   0.000|   0.000) I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operação não permitida
(   0.000|   0.000) D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
(   0.040|   0.039) D: [pulseaudio] core-util.c: RealtimeKit worked.
(   0.040|   0.000) I: [pulseaudio] core-util.c: Successfully gained nice level -11.
(   0.040|   0.000) I: [pulseaudio] main.c: This is PulseAudio 13.0
(   0.040|   0.000) D: [pulseaudio] main.c: Compilation host: x86_64
(   0.040|   0.000) D: [pulseaudio] main.c: Compilation CFLAGS: Not yet supported on meson
(   0.040|   0.000) D: [pulseaudio] main.c: Running on host: Linux x86_64 5.6.14-2-rt7-MANJARO #1 SMP PREEMPT_RT Wed May 27 15:48:47 UTC 2020
(   0.040|   0.000) D: [pulseaudio] main.c: Found 4 CPUs.
(   0.040|   0.000) I: [pulseaudio] main.c: Page size is 4096 bytes
(   0.040|   0.000) D: [pulseaudio] main.c: Compiled with Valgrind support: no
(   0.040|   0.000) D: [pulseaudio] main.c: Running in valgrind mode: no
(   0.040|   0.000) D: [pulseaudio] main.c: Running in VM: no
(   0.040|   0.000) D: [pulseaudio] main.c: Running from build tree: no
(   0.040|   0.000) D: [pulseaudio] main.c: Optimized build: yes
(   0.040|   0.000) D: [pulseaudio] main.c: All asserts enabled.
(   0.050|   0.009) I: [pulseaudio] main.c: Machine ID is 3b0c28f5e6b1419e80b5356d69adf203.
(   0.050|   0.000) I: [pulseaudio] main.c: Session ID is 2.
(   0.050|   0.000) I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
(   0.050|   0.000) I: [pulseaudio] main.c: Using state directory /home/mojo/.config/pulse.
(   0.050|   0.000) I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-13.0/modules.
(   0.050|   0.000) I: [pulseaudio] main.c: Running in system mode: no
(   0.050|   0.000) E: [pulseaudio] pid.c: Daemon already running.
(   0.050|   0.000) E: [pulseaudio] main.c: pa_pid_file_create() failed.
$ pacmd list-sources
2 source(s) available.
    index: 15
	name: <alsa_output.usb-M-Audio_M-Track_Plus-00.analog-stereo.monitor>
	driver: <module-alsa-card.c>
	flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE
	priority: 1040
	volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
	        balance 0,00
	base volume: 65536 / 100% / 0,00 dB
	volume steps: 65537
	muted: no
	current latency: 0,00 ms
	max rewind: 0 KiB
	sample spec: s32le 2ch 44100Hz
	channel map: front-left,front-right
	             Estéreo
	used by: 0
	linked by: 0
	configured latency: 0,00 ms; range is 0,50 .. 2000,00 ms
	monitor_of: 9
	card: 4 <alsa_card.usb-M-Audio_M-Track_Plus-00>
	module: 34
	properties:
		device.description = "Monitor of M-Track Plus Estéreo analógico"
		device.class = "monitor"
		alsa.card = "1"
		alsa.card_name = "M-Track Plus"
		alsa.long_card_name = "M-Audio M-Track Plus at usb-0000:00:1d.0-1.3, high speed"
		alsa.driver_name = "snd_usb_audio"
		device.bus_path = "pci-0000:00:1d.0-usb-0:1.3:1.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.0/sound/card1"
		udev.id = "usb-M-Audio_M-Track_Plus-00"
		device.bus = "usb"
		device.vendor.id = "0763"
		device.vendor.name = "M-Audio"
		device.product.id = "4009"
		device.product.name = "M-Track Plus"
		device.serial = "M-Audio_M-Track_Plus"
		device.string = "1"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-usb"
  * index: 16
	name: <alsa_input.usb-M-Audio_M-Track_Plus-00.analog-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL LATENCY DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE
	priority: 9049
	volume: front-left: 65536 / 100%,   front-right: 65536 / 100%
	        balance 0,00
	base volume: 65536 / 100%
	volume steps: 128
	muted: no
	current latency: 0,00 ms
	max rewind: 0 KiB
	sample spec: s32le 2ch 44100Hz
	channel map: front-left,front-right
	             Estéreo
	used by: 0
	linked by: 0
	configured latency: 0,00 ms; range is 0,50 .. 2000,00 ms
	card: 4 <alsa_card.usb-M-Audio_M-Track_Plus-00>
	module: 34
	properties:
		alsa.resolution_bits = "32"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "USB Audio"
		alsa.id = "USB Audio"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "1"
		alsa.card_name = "M-Track Plus"
		alsa.long_card_name = "M-Audio M-Track Plus at usb-0000:00:1d.0-1.3, high speed"
		alsa.driver_name = "snd_usb_audio"
		device.bus_path = "pci-0000:00:1d.0-usb-0:1.3:1.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.0/sound/card1"
		udev.id = "usb-M-Audio_M-Track_Plus-00"
		device.bus = "usb"
		device.vendor.id = "0763"
		device.vendor.name = "M-Audio"
		device.product.id = "4009"
		device.product.name = "M-Track Plus"
		device.serial = "M-Audio_M-Track_Plus"
		device.string = "front:1"
		device.buffering.buffer_size = "705600"
		device.buffering.fragment_size = "352800"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Estéreo analógico"
		device.description = "M-Track Plus Estéreo analógico"
		alsa.mixer_name = "USB Mixer"
		alsa.components = "USB0763:4009"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-usb"
	ports:
		analog-input-mic: Microfone (priority 8700, latency offset 0 usec, available: unknown)
			properties:
				device.icon_name = "audio-input-microphone"
	active port: <analog-input-mic>

In alsamixer everything also seems to be as louder as possible both in capture as in playback:
alsamixer

Sorry the long post. I'm trying to make it as easy as possible for anyone who answers me.

Thank you.

What happens when you plug straight into a USB port bypassing ntrack to test levels.
Also are you sure you are not just overloading things using those input levals it all points to ntrack low input that is why try to bypass ntrack to test.
Again it could be ntrack that is overloaded input to high or soft mute is on
Or i'm talking out of context.

Thank you for the reply.

I'm not sure if I got your point, but I don't believe this interface may have some kind of protection against input overload, otherwise Jack or ALSA would also be limited to -6dB. The specs also didn't mentioned anything like this. Normally I stream with the preamp knob set to 2 hours (kind of 75%) without clipping anything. I just put it almost at 100% of input only for this test.

There is just one knob that controls the input signal, where output is set by some configuration I'm not achieving to. The other button is to select between mic (line or microphone signal) and inst (instrument level signals):
2020-06-18_16-16

For my surprise, I plugged a dynamic mic into a generic XLR to USB "cable" and I got peaking at 0dB with Pulseaudio:
2020-06-18_15-43

The outputs:

$ lsusb
Bus 002 Device 004: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0402:9665 ALi Corp. Gateway Webcam
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: MID [HDA Intel MID], device 0: ALC272X Analog [ALC272X Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Set [C-Media USB Headphone Set], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
$ amixer --card 1
Simple mixer control 'PCM',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 151
  Mono:
  Front Left: Playback 44 [29%] [-20.13dB] [on]
  Front Right: Playback 44 [29%] [-20.13dB] [on]
Simple mixer control 'Mic',0
  Capabilities: cvolume cvolume-joined cswitch cswitch-joined
  Capture channels: Mono
  Limits: Capture 0 - 16
  Mono: Capture 9 [56%] [13.39dB] [on]
Simple mixer control 'Auto Gain Control',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
$ pacmd list-sources
2 source(s) available.
  * index: 5
	name: <alsa_output.pci-0000_00_1b.0.analog-stereo.monitor>
	driver: <module-alsa-card.c>
	flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: RUNNING
	suspend cause: (none)
	priority: 1030
	volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
	        balance 0,00
	base volume: 65536 / 100% / 0,00 dB
	volume steps: 65537
	muted: no
	current latency: 0,00 ms
	max rewind: 6 KiB
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Estéreo
	used by: 1
	linked by: 1
	configured latency: 40,00 ms; range is 0,50 .. 2000,00 ms
	monitor_of: 3
	card: 0 <alsa_card.pci-0000_00_1b.0>
	module: 6
	properties:
		device.description = "Monitor of √Āudio interno Est√©reo anal√≥gico"
		device.class = "monitor"
		alsa.card = "0"
		alsa.card_name = "HDA Intel MID"
		alsa.long_card_name = "HDA Intel MID at 0xb4400000 irq 29"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1b.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "3b56"
		device.product.name = "5 Series/3400 Series Chipset High Definition Audio"
		device.form_factor = "internal"
		device.string = "0"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
    index: 6
	name: <alsa_input.usb-0d8c_C-Media_USB_Headphone_Set-00.mono-fallback>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: RUNNING
	suspend cause: (none)
	priority: 9940
	volume: mono: 48524 /  74% / -7,83 dB
	        balance 0,00
	base volume: 26281 /  40% / -23,81 dB
	volume steps: 65537
	muted: no
	current latency: 17,14 ms
	max rewind: 0 KiB
	sample spec: s16le 1ch 44100Hz
	channel map: mono
	             Mono
	used by: 1
	linked by: 1
	configured latency: 40,00 ms; range is 16,00 .. 2000,00 ms
	card: 2 <alsa_card.usb-0d8c_C-Media_USB_Headphone_Set-00>
	module: 29
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "USB Audio"
		alsa.id = "USB Audio"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "1"
		alsa.card_name = "C-Media USB Headphone Set"
		alsa.long_card_name = "C-Media USB Headphone Set at usb-0000:00:1d.0-1.2, full speed"
		alsa.driver_name = "snd_usb_audio"
		device.bus_path = "pci-0000:00:1d.0-usb-0:1.2:1.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/sound/card1"
		udev.id = "usb-0d8c_C-Media_USB_Headphone_Set-00"
		device.bus = "usb"
		device.vendor.id = "0d8c"
		device.vendor.name = "C-Media Electronics, Inc."
		device.product.id = "000c"
		device.product.name = "Audio Adapter"
		device.serial = "0d8c_C-Media_USB_Headphone_Set"
		device.form_factor = "headphone"
		device.string = "hw:1"
		device.buffering.buffer_size = "176400"
		device.buffering.fragment_size = "88200"
		device.access_mode = "mmap+timer"
		device.profile.name = "mono-fallback"
		device.profile.description = "Mono"
		device.description = "Audio Adapter Mono"
		alsa.mixer_name = "USB Mixer"
		alsa.components = "USB0d8c:000c"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-headphones-usb"
	ports:
		analog-input-mic: Microfone (priority 8700, latency offset 0 usec, available: unknown)
			properties:
				device.icon_name = "audio-input-microphone"
	active port: <analog-input-mic>

But when I plug the same dynamic mic into the m-audio I got the same -6dB max with Pulseaudio. Can you see any difference between capture levels here? I'm totally confused, because the M-Audio configs shows everything at 100%/0dB, but clipping at -6dB and the C-Media card shows levels of capturing at Mono: Capture 9 [56%] [13.39dB] [on] but, in reality, it clips at 0dB as it should.

in the first screenshot of OP for pavucontrol Input Devices
device is showing as Estereo analogico (Stereo Analog)
so presumably clicking on the padlock icon would show 2 stereo channels
but is audio from microphone showing in only one channel?
or has pulseaudio remixed the microphone to both channels?

if pulseaudio has remixed the microphone in Ch2 of the M-Audio interface to both left and right channels audio with -6dB level for both channels it will be similar audible level to mono audio with 0dB - combining 2 channels at -6dB is equivalent to mono 0dB
combining 2 channels at 0dB can result in audio with +6dB peak which is also likely to sound horribly distorted

if callers on VOIP or chat do not report any reduction in audio level it may be that the only problem here is the level meter in pavucontrol is showing the level incorrectly

if callers do report that level is reduced. you could use JACK to get microphone audio at 0dB and then send it to Pulseaudio JACK Source for the VOIP/chat app

if you use JACK or Pulseaudio it may also help to add a graphic equalizer and some other signal processing effects (compressor, limiter, noise gate) to improve vocal clarity
pulseaudio-equalizer-ladspa could boost the microphone audio level
but also cutting out some of the high and low frequencies would help
(range of human speech is only really 70 Hz - 10 KHz)

Oh, man. You made my day. Seems the problem was between the chair and the keyboard.

I didn't realize, pulseaudio indeed mix the two channels.
Here in m-audio:

And at the generic xlr to usb:

I just plugged two dynamic mics here and it sees both of them and I can control the amount of input separately but it mixes them as mono (both channels at both left and right speakers).

2020-06-22_21-21

I tried to use pulseeffects, it have nice webrtc implementation with echo cancellation, noise gate, compressor and HP and LP filters but I ended up with a bit of latency and I prefer without it. JACK may be a better solution with more control, i'll try it.

Thank you!

1 Like

JACK will have the same effects plugins (and many more) but better GUI controls and lower latency
so it is the better option when adding signal processing effects

but DSP effects will always add a bit of extra latency so best not to use too many even in JACK

1 Like

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

Forum kindly sponsored by