Linux .asoundrc ALSA网络摄像头配置

Linux .asoundrc ALSA网络摄像头配置,linux,audio,configuration,webcam,alsa,Linux,Audio,Configuration,Webcam,Alsa,我也是一个初学者,正在设置我的.asoundrc以从我的网络摄像头录制音频 以下是我为确定硬件是否正常工作所做的工作: 我能够使用下面的basic.asoundrc输出声音 defaults.pcm.!card Generic defaults.pcm.!device 0 defaults.pcm.!ctl Generic pcm.!default { type asym playback.pcm { type hw card Generic

我也是一个初学者,正在设置我的.asoundrc以从我的网络摄像头录制音频

以下是我为确定硬件是否正常工作所做的工作:

我能够使用下面的basic.asoundrc输出声音

defaults.pcm.!card Generic
defaults.pcm.!device 0
defaults.pcm.!ctl Generic
pcm.!default {
    type asym
    playback.pcm {
        type hw
        card Generic
        device 0
    }

    capture.pcm {
        type hw
        card 0
        device 0
    }
}
我用下面的命令成功地从我的网络摄像头录制了一个测试

arecord --device=hw:0,0 --duration=5 --format=S16_LE /tmp/test.wav
然后,利用ALSA配置的基本知识,我写了以下内容

defaults.pcm.!card Generic
defaults.pcm.!device 0
defaults.pcm.!ctl Generic
pcm.!default {
    type asym
    playback.pcm {
        type hw
        card Generic
        device 0
    }

    capture.pcm {
        type hw
        card 0
        device 0
    }
}
但是,这导致没有声音输出或录音功能。请帮助我理解为什么这不起作用


为什么您认为您需要
.asoundrc
?您试图解决的实际问题是什么?默认的alsa设置没有.asoundrc,我的计算机不会输出/录制任何声音。您是否告诉PulseAudio使用正确的设备(
pavucontrol
)?Pulseaudio与本讨论无关。当您尝试在新设备上使用
aplay
arecord
时,会发生什么情况?