【问题标题】:Raspberry Pi 3 - sound and microphone doesn't workRaspberry Pi 3 - 声音和麦克风不起作用
【发布时间】:2017-06-01 06:31:54
【问题描述】:


我在我的 Raspberry Pi 3 上安装了带有 Pixel 的 Raspbian Jessie(2017 年 4 月版)。我插入了 Platronics C320-M 耳机 + 麦克风组。 显然它不起作用。
我已按照以下说明操作:https://raspberrypi.stackexchange.com/questions/40831/how-do-i-configure-my-sound-for-jasper-on-raspbian-jessie/40832 使我的 USB 设备成为主要设备。 所以不,我有:

pi@raspberrypi:~ $ cat /proc/asound/modules 
 0 snd_usb_audio
 1 snd_bcm2835

pi@raspberrypi:~ $ cat /etc/modprobe.d/alsa-base.conf 
# This sets the index value of the cards but doesn't reorder.
options snd_usb_audio index=0
options snd_bcm2835 index=1

# Does the reordering.
options snd slots=snd_usb_audio,snd_bcm2835

pi@raspberrypi:~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: C320M [Plantronics C320-M], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

但是当我尝试播放测试声音时:

speaker-test -c2 -twav

我可以看到测试正在运行,但听不到任何声音。
真的不知道要检查/设置什么更多... 如有任何提示,我将不胜感激。

问候 帕维尔

【问题讨论】:

    标签: raspberry-pi3


    【解决方案1】:

    尝试按照以下步骤从 rpi-3 的 USB 声音适配器启用音频录制和播放。我在从 USB 声音适配器执行录音时记录了这些。希望对您有所帮助。

    • 步骤:

    1.1) 创建/编辑文件 .asoundrc

    $vim .asoundrc
    

    如果文件不存在,则创建它;

    $ touch .asoundrc
    
    $vim .asoundrc 
    pcm.!default {
            type asym
            playback.pcm "hw:1,0"
            capture.pcm "hw:1,0"
    }
    
    ctl.!default {
            type hw
            card 1
    }
    

    1.2)在文件 alsa.conf 中编辑以下行;

    $sudo vim /usr/share/alsa/alsa.conf
    defaults.ctl.card 0
    defaults.pcm.card 0
    

    $sudo vim /usr/share/alsa/alsa.conf
    defaults.ctl.card 1
    defaults.pcm.card 1
    

    1.3) 使用 alsamixer 实用程序更改音频电平/设置

    $alsamixer
    

    1.4) 录制音频的命令

    $arecord -D plughw:1 -f S16_LE -r 48000 -d 5 ./testSound.wav
    

    1.5) 播放录制音频的命令

    $aplay --device=plughw:1,0 ./testSound.wav
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-04-13
      • 1970-01-01
      • 1970-01-01
      • 2022-01-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多