Linux aplay无法从config.asoundrc读取

Linux aplay无法从config.asoundrc读取,linux,audio,raspberry-pi,raspberry-pi3,alsa,Linux,Audio,Raspberry Pi,Raspberry Pi3,Alsa,我想从.arecordrc文件读取数据,但失败了 pi@raspberrypi:~ $ aplay numnuts.wav ALSA lib pcm_hw.c:1667:(_snd_pcm_hw_open) Invalid value for card aplay: main:722: audio open error: No such device 当我在命令行中提供硬件时,它可以工作 pi@raspberrypi:~ $ aplay -D hw:0,0 numnuts.wav Play

我想从.arecordrc文件读取数据,但失败了

pi@raspberrypi:~ $ aplay numnuts.wav 
ALSA lib pcm_hw.c:1667:(_snd_pcm_hw_open) Invalid value for card
aplay: main:722: audio open error: No such device
当我在命令行中提供硬件时,它可以工作

pi@raspberrypi:~ $ aplay -D hw:0,0 numnuts.wav 
Playing WAVE 'numnuts.wav' : Unsigned 8 bit, Rate 11025 Hz, Mono
我的.asoundrc:

pi@raspberrypi:~ $ cat .asoundrc
pcm.!default {
  type asym
  capture.pcm "mic"
  playback.pcm "speaker"
}
pcm.mic {
  type plug
  slave {
    pcm "hw:1,0"
  }
}
pcm.speaker {
  type plug
  slave {
    pcm "hw:0:0"
  }
}
谁能告诉我pcm有什么变化吗。演讲者

aplay-l输出

pi@raspberrypi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

解决了,这是一个打字错误:

内置pcm扬声器

replace pcm "hw:0:0"

pcm "hw:0,0"