Configuration
如何使用 aplay 或 pacmd 或其他方式為我的麥克風和聲音輸出找到正確的名稱,以應用於 asound.conf?
我需要在
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" } }
如果我理解正確,您希望在您的內置音效卡上播放並從外部 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 } }