[Share Experiences] 分享linux deepin麦克风无输入问题解决方法
Tofloor
default avatar
q77190858
deepin
2021-07-24 18:08
Author

1.首先看一下alsa层(驱动层)的麦克风是否工作正常,用

arecord -l

列出所有capture设备

juju@juju-PC:/usr/share/pulseaudio/alsa-mixer/profile-sets$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 1: HDA Digital (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 6: DMIC (*) []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 7: DMIC16kHz (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

比如我就一个声卡card0,然后声卡下面有4个capture设备,分别是0,1,6,7

然后用arecord命令一个一个设备录音试一下看那个能录音

arecord -Dhw:0,6 -d 10 -f cd -c 2 -t wav test.wav
#hw:0是声卡号,6是设备号

如果录音能播放出来,那么恭喜你,可以继续下面的教程,否则就是声卡驱动问题了,得研究内核

 

2.你的麦克风不工作多半是因为pulseaudio的问题,我们只需要虚拟一个声卡出来并且指定刚才能工作的hw:0,6作为默认的source,就可以在deepin设置里切换麦克风了

复制/usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf并且重命名为default-juju.conf(名字随意啊)

 

然后在文件开头[General]后面加上这么一段

[General]
auto-profiles = yes  # 这是文件开头

[Mapping Inter-Mic]
#这里的6根据你的能工作的capture 设备ID来定
device-strings = hw:%f,6
channel-map = left,right
paths-input = analog-input-internal-mic multichannel-input
priority = 9
direction = input

#下面是其他元素

 

然后执行命令

pacmd load-module module-alsa-card device_id=0 profile_set=default-juju.conf
# 这里的device_id根据你的声卡id来定

这样就搞定了,执行 pacmd list-cards 就可以看到多了一张声卡了,这个声卡没有sink,只有source

    index: 1
        name: 
        driver: 
        owner module: 22
        properties:
                alsa.card = "0"
                alsa.card_name = "sof-hda-dsp"
                alsa.long_card_name = "sof-hda-dsp"
                alsa.driver_name = "snd_soc_skl_hda_dsp"
                device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
                sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "34c8"
                device.string = "0"
                device.description = "sof-hda-dsp"
                device.icon_name = "audio-card-pci"
        profiles:
                input:Inter-Mic: Inter-Mic 输入 (priority 59, available: unknown)
                off: 关 (priority 0, available: unknown)
        active profile: 
        sources:
                alsa_input.0.Inter-Mic/#2: sof-hda-dsp Inter-Mic
        ports:
                multichannel-input: 多声道输入 (priority 0, latency offset 0 usec, available: unknown)
                        properties:

然后设置输入里面也有声音了,滑块动了!!!

 

然后你可以把刚才的命令写入到/etc/pulse/default.pa里面,就在最后一行加上就行了

 

然后杀死pulseaudio,它会自动重启,大功告成

pulseaudio -k

 

原贴https://bbs.deepin.org/zh/post/212972

Reply Favorite View the author
All Replies
ping134
deepin
2021-07-24 20:26
#1

完美,已解决,感恩,话说这个问题真的困扰了好久,没想到论坛早就有过教程

Reply View the author
q77190858
deepin
2021-07-24 20:43
#2
ping134

完美,已解决,感恩,话说这个问题真的困扰了好久,没想到论坛早就有过教程

感谢支持,这个也是我昨天肝了一晚上才研究完美解决的

Reply View the author
bbbear2002
deepin
2021-08-09 08:17
#3

多谢指导,小米笔记本 Pro 14 的麦克风搞定了。或者用 pavucontrol 也可以达到效果?

这个红米笔记本 Air 13 麦克风还是没反应,估计是驱动的问题。

Reply View the author
q77190858
deepin
2021-08-09 21:51
#4
bbbear2002

多谢指导,小米笔记本 Pro 14 的麦克风搞定了。或者用 pavucontrol 也可以达到效果?

这个红米笔记本 Air 13 麦克风还是没反应,估计是驱动的问题。

 pavucontrol是一个很简陋的pulseaudio前端图形化工具,没有这么精细的控制功能,只能用代码来实现

Reply View the author
jerk
deepin
2021-08-16 19:11
#5

感谢,解决了

Reply View the author
yimisunrise
deepin
2021-08-18 00:18
#6

我的电脑录制出来,播放有波形,但是没有声音。不知道是怎么回事?

Reply View the author
tatate
deepin
2022-03-10 15:02
#7

录音不能播放出来型号ALC3226

Reply View the author
meiyujack
deepin
2022-08-02 07:55
#8

da shen,please help me, thanks! There's no sound.

[ 0.325530] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.396947] PCI-DMA: Using software bounce buffering for IO (SWIOTLB) [ 0.396949] software IO TLB: mapped [mem 0x0000000067000000-0x000000006b000000] (64MB) [ 3.441559] snd_hda_intel 0000:00:0e.0: DSP detected with PCI class/subclass/prog-if info 0x040100 [ 4.157373] snd_soc_skl 0000:00:0e.0: DSP detected with PCI class/subclass/prog-if info 0x040100 [ 4.386303] sof-audio-pci-intel-apl 0000:00:0e.0: DSP detected with PCI class/subclass/prog-if info 0x040100 [ 4.386577] sof-audio-pci-intel-apl 0000:00:0e.0: DSP detected with PCI class/subclass/prog-if 0x040100 [ 4.679849] sof-audio-pci-intel-apl 0000:00:0e.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915]) [ 4.939330] sof-audio-pci-intel-apl 0000:00:0e.0: use msi interrupt mode [ 4.965797] sof-audio-pci-intel-apl 0000:00:0e.0: hda codecs found, mask 4 [ 4.965807] sof-audio-pci-intel-apl 0000:00:0e.0: using HDA machine driver skl_hda_dsp_generic now [ 4.965815] sof-audio-pci-intel-apl 0000:00:0e.0: DMICs detected in NHLT tables: 0 [ 4.971982] sof-audio-pci-intel-apl 0000:00:0e.0: Firmware info: version 2:2:0-57864 [ 4.971988] sof-audio-pci-intel-apl 0000:00:0e.0: Firmware: ABI 3:22:1 Kernel ABI 3:18:0 [ 4.971991] sof-audio-pci-intel-apl 0000:00:0e.0: warn: FW ABI is more recent than kernel [ 4.971998] sof-audio-pci-intel-apl 0000:00:0e.0: unknown sof_ext_man header type 3 size 0x30 [ 5.025480] sof-audio-pci-intel-apl 0000:00:0e.0: Firmware info: version 2:2:0-57864 [ 5.025497] sof-audio-pci-intel-apl 0000:00:0e.0: Firmware: ABI 3:22:1 Kernel ABI 3:18:0 [ 5.025505] sof-audio-pci-intel-apl 0000:00:0e.0: warn: FW ABI is more recent than kernel [ 5.056050] sof-audio-pci-intel-apl 0000:00:0e.0: Topology: ABI 3:22:1 Kernel ABI 3:18:0 [ 5.056061] sof-audio-pci-intel-apl 0000:00:0e.0: warn: topology ABI is more recent than kernel [ 5.059335] sof-audio-pci-intel-apl 0000:00:0e.0: ASoC: Parent card not yet available, widget card binding deferred [ 5.259151] input: sof-hda-dsp HDMI/DP,pcm=1 as /devices/pci0000:00/0000:00:0e.0/skl_hda_dsp_generic/sound/card0/input21 [ 5.259394] input: sof-hda-dsp HDMI/DP,pcm=2 as /devices/pci0000:00/0000:00:0e.0/skl_hda_dsp_generic/sound/card0/input22 [ 5.259487] input: sof-hda-dsp HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:0e.0/skl_hda_dsp_generic/sound/card0/input23 [ 5.315095] audit: type=1130 audit(1659387663.373:34): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=alsa-restore comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
**** List of PLAYBACK Hardware Devices **** card 0: sofhdadsp [sof-hda-dsp], device 1: HDMI1 (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: sofhdadsp [sof-hda-dsp], device 2: HDMI2 (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: sofhdadsp [sof-hda-dsp], device 3: HDMI3 (*) [] Subdevices: 1/1 Subdevice #0: subdevice #0
Reply View the author
海豚湾
deepin
2022-09-12 21:44
#9

请问执行你这个命令报错是啥原因啊?

pacmd list-cards

没有 PulseAudio 守护进程在运行,或者没有作为会话守护进程运行。

pacmd load-module module-alsa-card device_id=0 profile_set=default-juju.conf

没有 PulseAudio 守护进程在运行,或者没有作为会话守护进程运行。

Reply View the author
tryzhan
deepin
2024-01-01 23:37
#10
yimisunrise

我的电脑录制出来,播放有波形,但是没有声音。不知道是怎么回事?

有解决方法吗?我也是有波形,没有声音,其他能正常播放,感觉还是驱动问题

Reply View the author
Wind
deepin
2025-02-12 02:03
#11

解决了,感恩kissing_heart

Reply View the author