Distortion on built-in microphone

Whenever I use the built-in microphone there is distortion. Do I need a better Intel audio driver?

[jr@hp ~]$ inxi -Fxxx
System:    Host: hp Kernel: 5.9.11-2-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 Desktop: KDE Plasma 5.20.3 tk: Qt 5.15.2 
           wm: kwin_x11 dm: SDDM Distro: Manjaro Linux 
Machine:   Type: Laptop System: Hewlett-Packard product: HP ProBook 440 G2 v: A3009DD10203 serial: <superuser/root required> 
           Chassis: type: 10 serial: <superuser/root required> 
           Mobo: Hewlett-Packard model: 2247 v: KBC Version 67.25 serial: <superuser/root required> BIOS: Hewlett-Packard 
           v: M74 Ver. 01.51 date: 05/22/2019 
Battery:   ID-1: BAT0 charge: 31.6 Wh condition: 31.6/31.6 Wh (100%) volts: 16.7/14.8 model: Hewlett-Packard Primary 
           type: Li-ion serial: 00001 2020/07/25 status: Full 
CPU:       Info: Dual Core model: Intel Core i5-4210U bits: 64 type: MT MCP arch: Haswell rev: 1 L2 cache: 3072 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 bogomips: 19161 
           Speed: 1696 MHz min/max: 800/2700 MHz Core speeds (MHz): 1: 1698 2: 1709 3: 1701 4: 1701 
Graphics:  Device-1: Intel Haswell-ULT Integrated Graphics vendor: Hewlett-Packard driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:0a16 
           Device-2: Lite-On HP HD Webcam type: USB driver: uvcvideo bus ID: 2-7:4 chip ID: 04ca:704d serial: 200901010001 
           Display: x11 server: X.Org 1.20.9 compositor: kwin_x11 driver: intel unloaded: modesetting alternate: fbdev,vesa 
           resolution: 1600x900~60Hz s-dpi: 96 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4400 (HSW GT2) v: 4.5 Mesa 20.2.3 compat-v: 3.0 direct render: Yes 
Audio:     Device-1: Intel Haswell-ULT HD Audio vendor: Hewlett-Packard driver: snd_hda_intel v: kernel bus ID: 00:03.0 
           chip ID: 8086:0a0c 
           Device-2: Intel 8 Series HD Audio vendor: Hewlett-Packard driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
           chip ID: 8086:9c20 
           Sound Server: ALSA v: k5.9.11-2-MANJARO 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Hewlett-Packard driver: r8169 v: kernel 
           port: 3000 bus ID: 08:00.0 chip ID: 10ec:8168 
           IF: enp8s0 state: down mac: 3c:a8:2a:dc:eb:e5 
           Device-2: Broadcom and subsidiaries BCM43228 802.11a/b/g/n driver: wl v: kernel port: 3000 bus ID: 09:00.0 
           chip ID: 14e4:4359 
           IF: wlo1 state: up mac: d0:53:49:f2:78:9d 
Drives:    Local Storage: total: 931.51 GiB used: 39.60 GiB (4.3%) 
           ID-1: /dev/sda vendor: HGST (Hitachi) model: HTS541010A9E680 size: 931.51 GiB speed: 6.0 Gb/s rotation: 5400 rpm 
           serial: JD1000CHKLS48K rev: A710 scheme: MBR 
Partition: ID-1: / size: 457.20 GiB used: 39.60 GiB (8.7%) fs: ext4 dev: /dev/sda3 
Swap:      Alert: No Swap data was found. 
Sensors:   System Temperatures: cpu: 51.0 C mobo: 0.0 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 244 Uptime: 2d 21h 56m Memory: 15.51 GiB used: 9.01 GiB (58.1%) Init: systemd v: 246 Compilers: 
           gcc: 10.2.0 Packages: pacman: 1259 Shell: Bash v: 5.0.18 running in: konsole inxi: 3.1.08 
[jr@hp ~]$ 

Have you gone through these steps to try and troubleshoot your issue?
https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Microphone

I had not, but just went through the steps now for “static noise in microphone recording” as well as reading the rest of the page.

However, the issue still persists.

These are commands from my terminal session:

[jr@hp ~]$ arecord --list-devices
**** List of CAPTURE Hardware Devices ****
card 1: PCH [HDA Intel PCH], device 0: ALC3227 Analog [ALC3227 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
[jr@hp ~]$ arecord -f dat -r 60000 -D hw:1,0 -d 5 test.wav 
arecord: main:830: audio open error: Device or resource busy
[jr@hp ~]$ arecord -f dat -r 60000 -D hw:1,0 -d 5 test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 60000 Hz, Stereo
Warning: rate is not accurate (requested = 60000Hz, got = 48000Hz)
         please, try the plug plugin 
[jr@hp ~]$ sed 's/; default-sample-rate = 48000/default-sample-rate = 44100/g' -i /etc/pulse/daemon.conf
sed: couldn't open temporary file /etc/pulse/sedeI8J63: Permission denied
[jr@hp ~]$ sudo sed 's/; default-sample-rate = 48000/default-sample-rate = 44100/g' -i /etc/pulse/daemon.conf
[sudo] password for jr: 
[jr@hp ~]$ sudo sed 's/; default-sample-rate = 48000/default-sample-rate = 44100^C' -i /etc/pulse/daemon.conf
[jr@hp ~]$ grep "default-sample-rate" /etc/pulse/daemon.conf
; default-sample-rate = 44100
[jr@hp ~]$ sudo sed 's/; default-sample-rate = 48000/default-sample-rate = 44100/g' -i /etc/pulse/daemon.conf
[sudo] password for jr: 
Sorry, try again.
[sudo] password for jr: 
[jr@hp ~]$ pulseaudio -k
[jr@hp ~]$ pulseaudio --start
[jr@hp ~]$ arecord -f cd -d 10 test-mic.wav
Recording WAVE 'test-mic.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
[jr@hp ~]$ arecord -f cd -d 10 test-mic.wav
Recording WAVE 'test-mic.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
[jr@hp ~]$ aplay test-mic.wav
Playing WAVE 'test-mic.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
^CAborted by signal Interrupt...
aplay: pcm_write:2058: write error: Interrupted system call
[jr@hp ~]$ arecord -f dat -r 60000 -D hw:1,0 -d 5 test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 60000 Hz, Stereo
Warning: rate is not accurate (requested = 60000Hz, got = 48000Hz)
         please, try the plug plugin 
[jr@hp ~]$ pacmd list-sources | grep 'name:.*input'
[jr@hp ~]$ ^C <alsa_input.pci-0000_00_1b.0.analog-stereo>
[jr@hp ~]$ pulseaudio -k
[jr@hp ~]$ pulseaudio --start
[jr@hp ~]$ arecord -f dat -r 60000 -D hw:1,0 -d 5 test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 60000 Hz, Stereo
Warning: rate is not accurate (requested = 60000Hz, got = 48000Hz)
         please, try the plug plugin 
[jr@hp ~]$ aplay test-mic.wav
Playing WAVE 'test-mic.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
alsa_input.pci-0000_00_1b.0.analog-stereo^CAborted by signal Interrupt...
aplay: pcm_write:2058: write error: Interrupted system call
[jr@hp ~]$ arecord -f cd -d 10 test-mic.wav
Recording WAVE 'test-mic.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
[jr@hp ~]$ aplay test-mic.wav
Playing WAVE 'test-mic.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
^CAborted by signal Interrupt...
aplay: pcm_write:2058: write error: Interrupted system call

I also tried the instructions under

Microphone crackling with Realtek ALC892

That didn’t help either. Alternative solutions include using another recording device, my desktop or another device, or to go back to using Windows on this laptop, at least when I want to record.

[jr@hp ~]$ cat /etc/pulse/daemon.conf
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

## Configuration file for the PulseAudio daemon. See pulse-daemon.conf(5) for
## more information. Default values are commented out.  Use either ; or # for
## commenting.

; daemonize = no
; fail = yes
; allow-module-loading = yes
; allow-exit = yes
; use-pid-file = yes
; system-instance = no
; local-server-type = user
; enable-shm = yes
; enable-memfd = yes
; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
; lock-memory = no
; cpu-limit = no

; high-priority = yes
; nice-level = -11

; realtime-scheduling = yes
; realtime-priority = 5

; exit-idle-time = 20
; scache-idle-time = 20

; dl-search-path = (depends on architecture)

; load-default-script-file = yes
; default-script-file = /etc/pulse/default.pa

; log-target = auto
; log-level = notice
; log-meta = no
; log-time = no
; log-backtrace = 0

;  resample-method = speex-float-1
resample-method = src-sinc-best-quality
avoid-resampling = yes
; enable-remixing = yes
; remixing-use-all-sink-channels = yes
; remixing-produce-lfe = no
; remixing-consume-lfe = no
; lfe-crossover-freq = 0

; flat-volumes = no

; rescue-streams = yes

; rlimit-fsize = -1
; rlimit-data = -1
; rlimit-stack = -1
; rlimit-core = -1
; rlimit-as = -1
; rlimit-rss = -1
; rlimit-nproc = -1
; rlimit-nofile = 256
; rlimit-memlock = -1
; rlimit-locks = -1
; rlimit-sigpending = -1
; rlimit-msgqueue = -1
; rlimit-nice = 31
; rlimit-rtprio = 9
; rlimit-rttime = 200000

default-sample-format = s16le
; default-sample-rate = 44100
; alternate-sample-rate = 48000
; default-sample-channels = 2
; default-channel-map = front-left,front-right

; default-fragments = 4
; default-fragment-size-msec = 25

; enable-deferred-volume = yes
; deferred-volume-safety-margin-usec = 8000
; deferred-volume-extra-delay-usec = 0
[jr@hp ~]$ cat /etc/pulse/default.pa
#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)

.fail

### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore

### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties

### Should be after module-*-restore but before module-*-detect
load-module module-switch-on-port-available

### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect use_ucm=0 tsched=0
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect channels=2
.fail
.endif

### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif

.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif

### Load several protocols
load-module module-dbus-protocol
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix

### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
#load-module module-native-protocol-tcp
#load-module module-zeroconf-publish

### Load the RTP receiver module (also configured via paprefs, see above)
#load-module module-rtp-recv

### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
#load-module module-rtp-send source=rtp.monitor

### Load additional modules from GSettings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gsettings.so
.nofail
load-module module-gsettings
.fail
.endif


### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore

### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams

### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink

### Honour intended role device property
load-module module-intended-roles

### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle

### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif

### Enable positioned event sounds
load-module module-position-event-sounds

### Cork music/video streams when a phone stream is active
load-module module-role-cork

### Modules to allow autoloading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply

### Make some devices default
#set-default-sink output
#set-default-source input

# automatically switch to newly-connected devices
#load-module module-switch-on-connect

load-module module-remap-source source_name=record_mono master=alsa_input.pci-0000_00_1b.0.analog-stereo master_channel_map=front-left channel_map=mono
set-default-source record_mono