我需要在asound.conf
配置文件中写入默认麦克风和默认扬声器输出。但我不确切知道如何找到我的外部声卡或麦克风设备的名称,以便在重新启动或拔出/插入时我不必再次重新配置它。
我尝试使用以下方法找到它们:
sun@sun-To-be-filled-by-O-E-M:/tmp$ pacmd dump | grep alsa_input
set-source-volume alsa_input.pci-0000_00_1b.0.analog-stereo 0xddb
set-source-mute alsa_input.pci-0000_00_1b.0.analog-stereo no
suspend-source alsa_input.pci-0000_00_1b.0.analog-stereo yes
set-source-volume alsa_input.usb-0d8c_C-Media_USB_Audio_Device-00-Device.analog-mono 0x9091
set-source-mute alsa_input.usb-0d8c_C-Media_USB_Audio_Device-00-Device.analog-mono no
suspend-source alsa_input.usb-0d8c_C-Media_USB_Audio_Device-00-Device.analog-mono yes
set-source-volume alsa_input.usb-046d_HD_Pro_Webcam_C920_8E9E4FCF-02-C920.analog-stereo 0xfffe
set-source-mute alsa_input.usb-046d_HD_Pro_Webcam_C920_8E9E4FCF-02-C920.analog-stereo no
suspend-source alsa_input.usb-046d_HD_Pro_Webcam_C920_8E9E4FCF-02-C920.analog-stereo yes
set-default-source alsa_input.usb-046d_HD_Pro_Webcam_C920_8E9E4FCF-02-C920.analog-stereo
或者:
sun@sun-To-be-filled-by-O-E-M:/tmp$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: Device [C-Media USB Audio Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
但这让我很困惑。我在做事时必须使用哪一个名字sudo vim /etc/asound.conf
?
根据上面给出的信息,该设备是我的麦克风:
card 2: Device [C-Media USB Audio Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
从上面的信息来看,这个设备是我的音频输出:
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
我怎样才能在我的 中说出这一点/etc/asound.conf
?我尝试了以下方法,但它不起作用:
pcm.usb
{
type hw
card C-Media USB Audio Device
}
pcm.!default
{
type asym
playback.pcm
{
type plug
slave.pcm "dmix"
}
capture.pcm
{
type plug
slave.pcm "usb"
}
}
答案1
如果我理解正确的话,您希望在内置声卡上播放并从外部 USB 设备捕获(麦克风)。
您的外部设备被列为卡2:设备0和你内置的声卡作为卡 0:设备 0
我认为你的asound.conf
应该看起来像这样:
pcm.!default
{
playback.pcm
{
type hw
card 0
device 0
}
playback.capture
{
type hw
card 2
device 0
}
}