You are not logged in.
Hey all.
Yesterday I got myself a cheapo microphone. It works alright on Windows, nothing to say about its quality, because it was very good for it's price. Nevertheless, when I tried it on my Arch machine, it sounds like ASS! I sound like a robot lollll. It's a USB microphone.
It's like my voice break all around and it has cracking and other audio distortion effects.
The microphone itself has 2 controls: volume and echo. Dunno if that has anything to do with this problem, but I wanted to let you know.
alsa-info.sh: https://termbin.com/uq8z
lsusb -v: https://termbin.com/qc5h (the device is 1b3f:2008).
I'm running pipewire as we speak. If any more info/output is needed, just let me know!
Last edited by b0ss_ (2024-03-22 22:08:46)
Offline
Just to make sure it's not interfering, disable the Auto-Gain control it appears to have.
amixer -c2 set 'Auto Gain Control',0 off
Probably have to play around with the min quantum values or so: https://gitlab.freedesktop.org/pipewire … de-Latency . During an active recording attempt what outputs do you get from
pactl list sources
pactl list source-outputs
pw-top
Last edited by V1del (2024-03-19 13:50:02)
Offline
Hi V1del, good to see you mate.
I manually enabled the auto gain control, thought it might help with the issue. It didn't, but it also didn't make it worse.
From "pactl list sources" (while using Audacity to record) I get the following:
Source #33
State: SUSPENDED
Name: output.rnnoise_source
Description: Noise Canceling source
Driver: PipeWire
Sample Specification: float32le 2ch 48000Hz
Channel Map: aux0,aux1
Owner Module: 4294967295
Mute: no
Volume: aux0: 65536 / 100% / 0,00 dB, aux1: 65536 / 100% / 0,00 dB
balance 0,00
Base Volume: 65536 / 100% / 0,00 dB
Monitor of Sink: n/a
Latency: 0 usec, configured 0 usec
Flags: DECIBEL_VOLUME LATENCY
Properties:
media.class = "Audio/Source"
device.description = "Noise Canceling source"
node.group = "filter-chain-100316-7"
node.link-group = "filter-chain-100316-7"
node.virtual = "true"
media.name = "Noise Canceling source"
resample.prefill = "true"
resample.disable = "true"
node.name = "output.rnnoise_source"
stream.is-live = "true"
node.want-driver = "true"
node.autoconnect = "true"
node.trigger = "true"
adapt.follower.spa-node = ""
object.register = "false"
factory.id = "6"
clock.quantum-limit = "8192"
factory.mode = "split"
audio.adapt.follower = ""
library.name = "audioconvert/libspa-audioconvert"
client.id = "31"
object.id = "33"
object.serial = "33"
Formats:
pcm
Source #55
State: RUNNING
Name: alsa_input.usb-Generalplus_Usb_Audio_Device-00.mono-fallback
Description: Usb Audio Device Mono
Driver: PipeWire
Sample Specification: s16le 1ch 48000Hz
Channel Map: mono
Owner Module: 4294967295
Mute: no
Volume: mono: 66288 / 101% / 0,30 dB
balance 0,00
Base Volume: 18471 / 28% / -33,00 dB
Monitor of Sink: n/a
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
alsa.card = "2"
alsa.card_name = "Usb Audio Device"
alsa.class = "generic"
alsa.device = "0"
alsa.driver_name = "snd_usb_audio"
alsa.id = "USB Audio"
alsa.long_card_name = "Generalplus Usb Audio Device at usb-0000:02:00.0-6, full speed"
alsa.name = "USB Audio"
alsa.resolution_bits = "16"
alsa.subclass = "generic-mix"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
api.alsa.card.longname = "Generalplus Usb Audio Device at usb-0000:02:00.0-6, full speed"
api.alsa.card.name = "Usb Audio Device"
api.alsa.path = "hw:2"
api.alsa.pcm.card = "2"
api.alsa.pcm.stream = "capture"
audio.channels = "1"
audio.position = "MONO"
card.profile.device = "1"
device.api = "alsa"
device.class = "sound"
device.id = "46"
device.profile.description = "Mono"
device.profile.name = "mono-fallback"
device.routes = "1"
factory.name = "api.alsa.pcm.source"
media.class = "Audio/Source"
device.description = "Usb Audio Device"
node.name = "alsa_input.usb-Generalplus_Usb_Audio_Device-00.mono-fallback"
node.nick = "Usb Audio Device"
node.pause-on-idle = "false"
object.path = "alsa:pcm:2:hw:2:capture"
priority.driver = "2000"
priority.session = "2000"
factory.id = "18"
clock.quantum-limit = "8192"
client.id = "42"
node.driver = "true"
factory.mode = "split"
audio.adapt.follower = ""
library.name = "audioconvert/libspa-audioconvert"
object.id = "52"
object.serial = "55"
node.max-latency = "16384/48000"
api.alsa.period-size = "512"
api.alsa.period-num = "64"
api.alsa.headroom = "512"
api.acp.auto-port = "false"
api.alsa.card = "2"
api.alsa.use-acp = "true"
api.dbus.ReserveDevice1 = "Audio2"
api.dbus.ReserveDevice1.Priority = "-20"
device.bus = "usb"
device.bus-id = "usb-Generalplus_Usb_Audio_Device-00"
device.bus_path = "pci-0000:02:00.0-usb-0:6:1.0"
device.enum.api = "udev"
device.icon_name = "audio-card-analog-usb"
device.name = "alsa_card.usb-Generalplus_Usb_Audio_Device-00"
device.nick = "Usb Audio Device"
device.plugged.usec = "35678582903"
device.product.id = "0x2008"
device.product.name = "Usb Audio Device"
device.serial = "Generalplus_Usb_Audio_Device"
device.subsystem = "sound"
sysfs.path = "/devices/pci0000:00/0000:00:01.2/0000:02:00.0/usb2/2-6/2-6:1.0/sound/card2"
device.vendor.id = "0x1b3f"
device.vendor.name = "Generalplus Technology Inc."
device.string = "2"
Ports:
analog-input-mic: Micrófono (type: Mic, priority: 8700, availability unknown)
Active Port: analog-input-mic
Formats:
pcm
Source #56
State: SUSPENDED
Name: alsa_output.pci-0000_0a_00.6.analog-stereo.2.monitor
Description: Monitor of Family 17h/19h HD Audio Controller Estéreo analógico
Driver: PipeWire
Sample Specification: s32le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: no
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
Monitor of Sink: alsa_output.pci-0000_0a_00.6.analog-stereo.2
Latency: 0 usec, configured 0 usec
Flags: HARDWARE DECIBEL_VOLUME LATENCY
Properties:
alsa.card = "1"
alsa.card_name = "HD-Audio Generic"
alsa.class = "generic"
alsa.device = "0"
alsa.driver_name = "snd_hda_intel"
alsa.id = "ALC662 rev3 Analog"
alsa.long_card_name = "HD-Audio Generic at 0xfe540000 irq 68"
alsa.name = "ALC662 rev3 Analog"
alsa.resolution_bits = "16"
alsa.subclass = "generic-mix"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
api.alsa.card.longname = "HD-Audio Generic at 0xfe540000 irq 68"
api.alsa.card.name = "HD-Audio Generic"
api.alsa.path = "front:1"
api.alsa.pcm.card = "1"
api.alsa.pcm.stream = "playback"
audio.channels = "2"
audio.position = "FL,FR"
card.profile.device = "4"
device.api = "alsa"
device.class = "monitor"
device.id = "47"
device.profile.description = "Estéreo analógico"
device.profile.name = "analog-stereo"
device.routes = "3"
factory.name = "api.alsa.pcm.sink"
media.class = "Audio/Sink"
device.description = "Family 17h/19h HD Audio Controller"
node.name = "alsa_output.pci-0000_0a_00.6.analog-stereo.2"
node.nick = "ALC662 rev3 Analog"
node.pause-on-idle = "false"
object.path = "alsa:pcm:1:front:1:playback"
priority.driver = "1009"
priority.session = "1009"
factory.id = "18"
clock.quantum-limit = "8192"
client.id = "42"
node.driver = "true"
factory.mode = "merge"
audio.adapt.follower = ""
library.name = "audioconvert/libspa-audioconvert"
object.id = "53"
object.serial = "56"
api.acp.auto-port = "false"
api.alsa.card = "1"
api.alsa.use-acp = "true"
api.dbus.ReserveDevice1 = "Audio1"
api.dbus.ReserveDevice1.Priority = "-20"
device.bus = "pci"
device.bus_path = "pci-0000:0a:00.6"
device.enum.api = "udev"
device.icon_name = "audio-card-analog-pci"
device.name = "alsa_card.pci-0000_0a_00.6"
device.nick = "HD-Audio Generic"
device.plugged.usec = "7514652"
device.product.id = "0x15e3"
device.product.name = "Family 17h/19h HD Audio Controller"
device.subsystem = "sound"
sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:0a:00.6/sound/card1"
device.vendor.id = "0x1022"
device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
device.string = "1"
Ports:
analog-output-lineout: Línea de salida (type: Line, priority: 9000, availability group: Legacy 4, available)
analog-output-speaker: Altavoces (type: Speaker, priority: 10000, availability group: Legacy 5, not available)
analog-output-headphones: Auriculares (type: Headphones, priority: 9900, availability group: Legacy 6, not available)
Active Port: analog-output-lineout
Formats:
pcm
Source #145
State: SUSPENDED
Name: alsa_output.pci-0000_01_00.1.hdmi-stereo-extra5.2.monitor
Description: Monitor of Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] Digital Stereo (HDMI 6)
Driver: PipeWire
Sample Specification: s32le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: no
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
Monitor of Sink: alsa_output.pci-0000_01_00.1.hdmi-stereo-extra5.2
Latency: 0 usec, configured 0 usec
Flags: HARDWARE DECIBEL_VOLUME LATENCY
Properties:
alsa.card = "0"
alsa.card_name = "HDA ATI HDMI"
alsa.class = "generic"
alsa.device = "11"
alsa.driver_name = "snd_hda_intel"
alsa.id = "HDMI 5"
alsa.long_card_name = "HDA ATI HDMI at 0xfe960000 irq 67"
alsa.name = "HDMI"
alsa.resolution_bits = "16"
alsa.subclass = "generic-mix"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
api.alsa.card.longname = "HDA ATI HDMI at 0xfe960000 irq 67"
api.alsa.card.name = "HDA ATI HDMI"
api.alsa.path = "hdmi:0,5"
api.alsa.pcm.card = "0"
api.alsa.pcm.stream = "playback"
audio.channels = "2"
audio.position = "FL,FR"
card.profile.device = "21"
device.api = "alsa"
device.class = "monitor"
device.id = "57"
device.profile.description = "Digital Stereo (HDMI 6)"
device.profile.name = "hdmi-stereo-extra5"
device.routes = "1"
factory.name = "api.alsa.pcm.sink"
media.class = "Audio/Sink"
device.description = "Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590]"
node.name = "alsa_output.pci-0000_01_00.1.hdmi-stereo-extra5.2"
node.nick = "HDMI"
node.pause-on-idle = "false"
object.path = "alsa:pcm:0:hdmi:0,5:playback"
priority.driver = "568"
priority.session = "568"
factory.id = "18"
clock.quantum-limit = "8192"
client.id = "42"
node.driver = "true"
factory.mode = "merge"
audio.adapt.follower = ""
library.name = "audioconvert/libspa-audioconvert"
object.id = "55"
object.serial = "145"
api.acp.auto-port = "false"
api.alsa.card = "0"
api.alsa.use-acp = "true"
api.dbus.ReserveDevice1 = "Audio0"
api.dbus.ReserveDevice1.Priority = "-20"
device.bus = "pci"
device.bus_path = "pci-0000:01:00.1"
device.enum.api = "udev"
device.icon_name = "audio-card-analog-pci"
device.name = "alsa_card.pci-0000_01_00.1"
device.nick = "HDA ATI HDMI"
device.plugged.usec = "7424530"
device.product.id = "0xaaf0"
device.product.name = "Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590]"
device.subsystem = "sound"
sysfs.path = "/devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card0"
device.vendor.id = "0x1002"
device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
device.string = "0"
Ports:
hdmi-output-5: HDMI / DisplayPort 6 (type: HDMI, priority: 5400, availability group: Legacy 6, available)
Active Port: hdmi-output-5
Formats:
pcm
From "pactl list source-outputs" I get:
Source Output #32
Driver: PipeWire
Owner Module: n/a
Client: n/a
Source: 55
Sample Specification: float32le 2ch 48000Hz
Channel Map: aux0,aux1
Format: pcm, format.sample_format = "\"float32ne\"" format.rate = "48000" format.channels = "2" format.channel_map = "\"aux0,aux1\""
Corked: yes
Mute: no
Volume: aux0: 65536 / 100% / 0,00 dB, aux1: 65536 / 100% / 0,00 dB
balance 0,00
Buffer Latency: 0 usec
Source Latency: 0 usec
Resample method: PipeWire
Properties:
node.passive = "true"
device.description = "Noise Canceling source"
node.group = "filter-chain-100316-7"
node.link-group = "filter-chain-100316-7"
node.virtual = "true"
media.name = "Noise Canceling source"
resample.prefill = "true"
resample.disable = "true"
node.name = "input.rnnoise_source"
stream.is-live = "true"
node.want-driver = "true"
node.autoconnect = "true"
media.class = "Stream/Input/Audio"
adapt.follower.spa-node = ""
object.register = "false"
factory.id = "6"
clock.quantum-limit = "8192"
factory.mode = "merge"
audio.adapt.follower = ""
library.name = "audioconvert/libspa-audioconvert"
client.id = "31"
object.id = "32"
object.serial = "32"
module-stream-restore.id = "source-output-by-media-name:Noise Canceling source"
Which is a virtual device I made trying to solve the issue. It does cancel noise, but my voice still sounds like ass. Guessing by the command, it should also show "USB Audio Device Mono" as it does on Audacity, although I might be wrong.
I toyed around a bit with the quantum values you mentioned, it didn't make a difference. I still sound robotic as hell. It's like I'm recording myself using a trashcan lol. Right now I'm using a value of 200000 as a quantum value.
If you need anything else, just let me know.
Offline
Depending on which device you pick in audacity you're completely bypassing the pipewire layer (and this appears to be the case as nothing shows up in the source-outputs other than the noise canceller), but if it happens in that instance as well then you might indeed have a lower level issue.
Do you have the problem as well with
arecord -Dhw:2 -r 16000 test.wav
(you'd have to kill the rnnoise device for that so it doesn't block the mic away from direct access. Might also be a case of faulty USB suspend support: https://wiki.archlinux.org/title/Power_ … utosuspend or potentially interference on the USB bus (bus 2 is quite crowded with devices, try some other port)
Offline
V1del.
Depending on which device you pick in audacity you're completely bypassing the pipewire layer (and this appears to be the case as nothing shows up in the source-outputs other than the noise canceller), but if it happens in that instance as well then you might indeed have a lower level issue.
On Audacity, I can't see the Pipewire server under Audio configuration. I only see JACK and ALSA. Maybe it's related to the fact that I'm using the wireplumber service to manage Pipewire?
I disabled the noise filter service and now no device is shown in "pactl list source-outputs".
Do you have the problem as well with
arecord -Dhw:2 -r 16000 test.wav
I tried to run your command "as is", but it didn't work. I had to add "-f S16_LE" because it gave me the following error:
-$ arecord -Dhw:2 -r 16000 test.wav
Warning: Some sources (like microphones) may produce inaudible results
with 8-bit sampling. Use '-f' argument to increase resolution
e.g. '-f S16_LE'.
arecord: set_params:1387: Sample format non available
Available formats:
- S16_LE
The recording sounds terrible, so nothing changed there.
(you'd have to kill the rnnoise device for that so it doesn't block the mic away from direct access. Might also be a case of faulty USB suspend support: https://wiki.archlinux.org/title/Power_ … utosuspend or potentially interference on the USB bus (bus 2 is quite crowded with devices, try some other port)
I've already tried multiple USB ports. Before I had the USB microphone on a motherboard port, later tried with a front panel port. Both had the same issue.
I just created the udev rule:
$ cat /etc/udev/rules.d/50-usb_power_save.rules
# blacklist for usb autosuspend
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1b3f", ATTR{idProduct}=="2008", GOTO="power_usb_rules_end"
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="auto"
LABEL="power_usb_rules_end"
I'll restart and report if it helped or not. Thanks!
Offline
Restarted my pc. Had to disable USB power management via cmdline "usbcore.autosuspend=-1" as I was having issues with my other USB devices. Other than that, I see no differences on microphone quality. It's still terrible lol.
Tried to run "pactl list source-outputs" and got the following: https://termbin.com/65yl
It's very long in comparison to the last one. ...I don't know what changed, to be honest.
Offline
For audacity to show you pipewire you'd need pipewire-alsa (... or/and pipewire-jack) but if direct access arecord gives you issues then the kernel driver is at fault.
Try booting with
snd_usb_audio.lowlatency=0 snd_usb_audio.implicit_fb=1
and if that helped try removing one of the two params to isolate the potential offender.
As for the source outputs list, that's because you have pavucontrol open which allocates "recording sources" to show you the volume meter feedback and is somewhat useless to check issues with a specific device. Simplest to just test a pipewire recording would be like
parecord test.wav
or so.
Last edited by V1del (2024-03-19 20:57:57)
Offline
For audacity to show you pipewire you'd need pipewire-alsa (... or/and pipewire-jack) but if direct access arecord gives you issues then the kernel driver is at fault.
Try booting with
snd_usb_audio.lowlatency=0 snd_usb_audio.implicit_fb=1
and if that helped try removing one of the two params to isolate the potential offender.
As for the source outputs list, that's because you have pavucontrol open which allocates "recording sources" to show you the volume meter feedback and is somewhat useless to check issues with a specific device. Simplest to just test a pipewire recording would be like
parecord test.wav
or so.
Thanks for your quick reply! I'll try just that. Be back in some minutes! Also, I do have installed pipewire-alsa and pipewire-jack :3
**some time later, I forgot to reply lol**
The issue seems to be related to "snd_usb_audio.lowlatency=0". Using this kernel parameter, the microphone sounds as a microphone, and not like a beer can. For now, I'll add this parameter to my default/grub config.
Thanks a lot, V1del!
Offline
Although there's still some "robotic" distortion going on, just a tiny little bit. Maybe it has to do with volume? I don't know.
Offline
Possibly, mics are often not really inteded to run at 100% try to lower that a bit.
Offline
Tried it with lots of different volumes, but my voice sounds grainy and noisy. With the noise cancelling vdevice, it sounds better, but the voice grain and noise remains. Is there any way to fix that?
This is the noise cancelling vdevice:
# Noise canceling source
#
# start with pipewire -c filter-chain/input-filter-chain.conf
#
context.properties = {
log.level = 0
}
context.spa-libs = {
audio.convert.* = audioconvert/libspa-audioconvert
support.* = support/libspa-support
}
context.modules = [
{ name = libpipewire-module-rtkit
args = {
#nice.level = -11
#rt.prio = 88
#rt.time.soft = 200000
#rt.time.hard = 200000
}
flags = [ ifexists nofail ]
}
{ name = libpipewire-module-protocol-native }
{ name = libpipewire-module-client-node }
{ name = libpipewire-module-adapter }
{ name = libpipewire-module-filter-chain
args = {
node.name = "rnnoise_source"
node.description = "Noise Canceling source"
media.name = "Noise Canceling source"
filter.graph = {
nodes = [
{
type = ladspa
name = rnnoise
plugin = /usr/lib/ladspa/librnnoise_ladspa.so
label = noise_suppressor_stereo
control = {
"VAD Threshold (%)" 50.0
}
}
]
}
capture.props = {
node.passive = true
}
playback.props = {
media.class = Audio/Source
}
}
}
]
If you have any ideas, just let me know!
Offline
Tried with the "snd_usb_audio.lowlatency=0" AND "snd_usb_audio.implicit_fb=1". Its sounds a thousand times better! I'll close this thread :3 thanks!
Offline
Issue came back after disabling pcie_aspm and reenabling it. This thread is related. Probably an issue with "acpi_osi=Windows 2015", so I'll try to boot w/o it.
EDIT: No dice. Current cmdline:
$ cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-linux root=UUID=90b89d1d-e013-4458-96bf-c105d0fec91b rw loglevel=3 quiet pcie_aspm=1 amdgpu.aspm=1 pcie_aspm.policy=performance snd_usb_audio.implict_fb=1 snd_usb_audio.lowlatency=0 r8168.aspm=1 r8168.dynamic_aspm=0 r8168.debug=16 r8168.disable_wol_support=1 usbcore.autosuspend=-1
EDIT2: "implict_fb=1"... closing up.
Last edited by b0ss_ (2024-03-22 22:08:32)
Offline