Raspberry Pi不是从USB麦克风录制的

时间:2014-05-31 22:31:36

标签: usb raspberry-pi microphone

我有一个USB集线器(Plugabble),带有usb Daffodil声卡。 扬声器工作得很好,但麦克风不工作。我不知道该怎么办才能让它发挥作用。

usb声卡设为默认

arecord命令记录但没有录制声音。

aplay戏剧听起来很不错。

以下是我的一些设置:

pi@raspberrypi ~ $ arecord -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=Set
    C-Media USB Headphone Set, USB Audio
    Default Audio Device
sysdefault:CARD=Set
    C-Media USB Headphone Set, USB Audio
    Default Audio Device
front:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    Front speakers
surround40:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Set,DEV=0
    C-Media USB Headphone Set, USB Audio
    IEC958 (S/PDIF) Digital Audio Output


pi@raspberrypi ~ $ sudo lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 004: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 005: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
Bus 001 Device 006: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter

pi@raspberrypi ~ $ sudo amixer set Capture cap 8
amixer: Unable to find simple control 'Capture',0

pi@raspberrypi ~ $ amixer
Simple mixer control 'Headphone',0
Capabilities: pvolume pswitch pswitch-joined penum
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: pvolume pvolume-joined cvolume cvolume-joined pswitch pswitch-joined cswitch cswitch-joined penum
Playback channels: Mono
Capture channels: Mono
Limits: Playback 0 - 32 Capture 0 - 16
Mono: Playback 23 [72%] [34.36dB] [on] Capture 9 [56%] [13.39dB] [on]
Simple mixer control 'Auto Gain Control',0
Capabilities: pswitch pswitch-joined penum
Playback channels: Mono
Mono: Playback [off]

谢谢!

1 个答案:

答案 0 :(得分:1)

这取决于您的发行版,因为不同的发行版会以不同的方式处理设备。

所以我认为你正在运行一个蜥蜴jessy,但试图像你一样在喘息的地方配置它。

所以,如果我是对的,你应该使用命令进入文件alsa.conf sudo nano /usr/share/alsa/alsa.conf并修改行

 defaults.ctl.card 0
 defaults.pcm.card 0 

 defaults.ctl.card 1
 defaults.pcm.card 1

然后使用命令.asoundrc转到文件sudo nano /home/pi/.asoundrc并对其进行编辑,使其如下所示:

pcm.!default {
    type hw
    card 1
}

ctl.!default {
    type hw
    card 1
}

重新启动,希望它可以正常工作。

如果我猜错了,请在答案下发表评论我会更新:)希望它有所帮助。