我刚刚在我的 Asus N73SV 笔记本电脑上安装了 Ubuntu 20.04。我无法将麦克风与 Skype 或任何其他录音应用程序一起使用。当我尝试录音时,我只有“白噪音”。
这是我的配置。
$ cat /proc/asound/card0/codec* | grep Codec
Codec: Realtek ALC269VB
Codec: Intel CougarPoint HDMI
$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VB Analog [ALC269VB Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
附加选项/etc/modprobe.d/alsa-base.conf
:
# https://help.ubuntu.com/community/HdaIntelSoundHowto
options snd-hda-intel model=laptop-amic
# https://bugzilla.kernel.org/show_bug.cgi?id=205959
options snd-intel-dspcfg dsp_driver=1
初始化:
$ dmesg | grep hda
[ 4.008259] snd_hda_intel 0000:00:1b.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 4.008512] snd_hda_intel 0000:01:00.1: Refused to change power state, currently in D3
[ 4.027969] snd_hda_intel 0000:01:00.1: Refused to change power state, currently in D3
[ 4.036166] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC269VB: line_outs=2 (0x1b/0x14/0x0/0x0/0x0) type:speaker
[ 4.036170] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 4.036172] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[ 4.036173] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 4.036175] snd_hda_codec_realtek hdaudioC0D0: dig-out=0x1e/0x0
[ 4.036177] snd_hda_codec_realtek hdaudioC0D0: inputs:
[ 4.036179] snd_hda_codec_realtek hdaudioC0D0: Internal Mic=0x19
[ 4.036182] snd_hda_codec_realtek hdaudioC0D0: Mic=0x18
[ 4.039933] snd_hda_intel 0000:01:00.1: Disabling MSI
[ 4.039994] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client
[ 4.040502] snd_hda_intel 0000:01:00.1: number of I/O streams is 30, forcing separate stream tags
[ 4.149204] hdaudio hdaudioC1D0: no AFG or MFG node found
[ 4.149214] hdaudio hdaudioC1D1: no AFG or MFG node found
[ 4.149221] hdaudio hdaudioC1D2: no AFG or MFG node found
[ 4.149227] hdaudio hdaudioC1D3: no AFG or MFG node found
[ 4.149236] hdaudio hdaudioC1D4: no AFG or MFG node found
[ 4.149244] hdaudio hdaudioC1D5: no AFG or MFG node found
[ 4.149251] hdaudio hdaudioC1D6: no AFG or MFG node found
[ 4.149257] hdaudio hdaudioC1D7: no AFG or MFG node found
[ 4.149261] snd_hda_intel 0000:01:00.1: no codecs initialized
这是记录结果:
$ arecord -f S16_LE -d 5 /tmp/test-mic.wav
Recording WAVE '/tmp/test-mic.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
答案1
噪音消除Linux操作系统的命令:打开终端后运行以下命令。
sudo nano /etc/pulse/default.pa
## Add Below line
load-module module-echo-cancel
## Save & Close
pulseaudio -k
pulseaudio --start
如果仍然不起作用再次打开文件添加以下代码结束
在文件末尾添加以下行:
### Enable Echo/Noise-Cancelation
load-module module-echo-cancel aec_method=webrtc aec_args="analog_gain_control=0 digital_gain_control=1" source_name=echoCancel_source sink_name=echoCancel_sink
set-default-source echoCancel_source
set-default-sink echoCancel_sink
答案2
答案3
我在 Ubuntu 20.04 上也遇到了静电噪音问题。后来发现,原因在于 Ubuntu 上启用的省电设置。
当我禁用 snd_hda_intel 音频模块的省电模式时,噪音消失了。
步骤1:检查snd_hda_intel是否开启了省电功能:
cat /sys/module/snd_hda_intel/parameters/power_save
如果返回值为1,代表开启省电模式,我们需要将其设置为0
第2步:
sudo su
echo 0 > /sys/module/snd_hda_intel/parameters/power_save
就是这个!
参考:https://www.makeuseof.com/fix-static-noise-from-speakers-linux/